Compare commits
No commits in common. "9ab72aed19f4174abdff83e45d9f3bfd16448ad4" and "0842640fec285a3d99f0c7551f008919e64e5dcd" have entirely different histories.
9ab72aed19
...
0842640fec
@ -1,3 +0,0 @@
|
|||||||
public/env.sample.js
|
|
||||||
public/workbox-*.js
|
|
||||||
public/workbox-*.js.map
|
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,6 +5,3 @@ dist
|
|||||||
dist-ssr
|
dist-ssr
|
||||||
public/env.js
|
public/env.js
|
||||||
/build
|
/build
|
||||||
yarn.lock
|
|
||||||
package-lock.json
|
|
||||||
*.map
|
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -3,17 +3,11 @@ WORKDIR /app
|
|||||||
RUN npm i -g pnpm
|
RUN npm i -g pnpm
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN pnpm i
|
RUN pnpm i
|
||||||
COPY package.json *.config.js workbox-config.js ./
|
COPY package.json *.config.js ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY public ./public
|
COPY public ./public
|
||||||
RUN pnpm run build:sw
|
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
# final image
|
# final image
|
||||||
FROM alpine
|
|
||||||
COPY --from=0 /app/build /app
|
|
||||||
RUN rm -rf /app/build/_dist_/components
|
|
||||||
RUN rm -rf /app/build/_dist_/locales
|
|
||||||
RUN rm -rf /app/build-manifest.json
|
|
||||||
FROM fholzer/nginx-brotli:v1.19.1
|
FROM fholzer/nginx-brotli:v1.19.1
|
||||||
COPY --from=1 /app /usr/share/nginx/html
|
COPY --from=0 /app/build /usr/share/nginx/html
|
||||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
COPY ./nginx.conf /etc/nginx/nginx.conf
|
@ -1,6 +1,5 @@
|
|||||||
const config = {
|
const config = {
|
||||||
baseurl: 'https://dev.lauf-fuer-kaya.de',
|
baseurl: 'https://dev.lauf-fuer-kaya.de',
|
||||||
fallback_username: 'admin',
|
fallback_username: 'admin',
|
||||||
fallback_password: '72fpTzsev4xUu78QPs2FCbwZ3',
|
fallback_password: '72fpTzsev4xUu78QPs2FCbwZ3'
|
||||||
prefersHashRouting: true
|
|
||||||
};
|
};
|
||||||
|
933
licenses.md
Normal file
933
licenses.md
Normal file
@ -0,0 +1,933 @@
|
|||||||
|
# @odit/lfk-client-js
|
||||||
|
**Author**: ODIT.Services
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: CC-BY-NC-SA-4.0
|
||||||
|
**Description**: A lib to interact with https://git.odit.services/lfk/backend. Use this version for native JS applications.
|
||||||
|
## License Text
|
||||||
|
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Creative
|
||||||
|
Commons Corporation ("Creative Commons") is not a law firm and does not provide
|
||||||
|
legal services or legal advice. Distribution of Creative Commons public licenses
|
||||||
|
does not create a lawyer-client or other relationship. Creative Commons makes
|
||||||
|
its licenses and related information available on an "as-is" basis. Creative
|
||||||
|
Commons gives no warranties regarding its licenses, any material licensed
|
||||||
|
under their terms and conditions, or any related information. Creative Commons
|
||||||
|
disclaims all liability for damages resulting from their use to the fullest
|
||||||
|
extent possible.
|
||||||
|
|
||||||
|
Using Creative Commons Public Licenses
|
||||||
|
|
||||||
|
Creative Commons public licenses provide a standard set of terms and conditions
|
||||||
|
that creators and other rights holders may use to share original works of
|
||||||
|
authorship and other material subject to copyright and certain other rights
|
||||||
|
specified in the public license below. The following considerations are for
|
||||||
|
informational purposes only, are not exhaustive, and do not form part of our
|
||||||
|
licenses.
|
||||||
|
|
||||||
|
Considerations for licensors: Our public licenses are intended for use by
|
||||||
|
those authorized to give the public permission to use material in ways otherwise
|
||||||
|
restricted by copyright and certain other rights. Our licenses are irrevocable.
|
||||||
|
Licensors should read and understand the terms and conditions of the license
|
||||||
|
they choose before applying it. Licensors should also secure all rights necessary
|
||||||
|
before applying our licenses so that the public can reuse the material as
|
||||||
|
expected. Licensors should clearly mark any material not subject to the license.
|
||||||
|
This includes other CC-licensed material, or material used under an exception
|
||||||
|
or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors
|
||||||
|
|
||||||
|
Considerations for the public: By using one of our public licenses, a licensor
|
||||||
|
grants the public permission to use the licensed material under specified
|
||||||
|
terms and conditions. If the licensor's permission is not necessary for any
|
||||||
|
reason–for example, because of any applicable exception or limitation to copyright–then
|
||||||
|
that use is not regulated by the license. Our licenses grant only permissions
|
||||||
|
under copyright and certain other rights that a licensor has authority to
|
||||||
|
grant. Use of the licensed material may still be restricted for other reasons,
|
||||||
|
including because others have copyright or other rights in the material. A
|
||||||
|
licensor may make special requests, such as asking that all changes be marked
|
||||||
|
or described. Although not required by our licenses, you are encouraged to
|
||||||
|
respect those requests where reasonable. More considerations for the public
|
||||||
|
: wiki.creativecommons.org/Considerations_for_licensees
|
||||||
|
|
||||||
|
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public
|
||||||
|
License
|
||||||
|
|
||||||
|
By exercising the Licensed Rights (defined below), You accept and agree to
|
||||||
|
be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike
|
||||||
|
4.0 International Public License ("Public License"). To the extent this Public
|
||||||
|
License may be interpreted as a contract, You are granted the Licensed Rights
|
||||||
|
in consideration of Your acceptance of these terms and conditions, and the
|
||||||
|
Licensor grants You such rights in consideration of benefits the Licensor
|
||||||
|
receives from making the Licensed Material available under these terms and
|
||||||
|
conditions.
|
||||||
|
|
||||||
|
Section 1 – Definitions.
|
||||||
|
|
||||||
|
a. Adapted Material means material subject to Copyright and Similar Rights
|
||||||
|
that is derived from or based upon the Licensed Material and in which the
|
||||||
|
Licensed Material is translated, altered, arranged, transformed, or otherwise
|
||||||
|
modified in a manner requiring permission under the Copyright and Similar
|
||||||
|
Rights held by the Licensor. For purposes of this Public License, where the
|
||||||
|
Licensed Material is a musical work, performance, or sound recording, Adapted
|
||||||
|
Material is always produced where the Licensed Material is synched in timed
|
||||||
|
relation with a moving image.
|
||||||
|
|
||||||
|
b. Adapter's License means the license You apply to Your Copyright and Similar
|
||||||
|
Rights in Your contributions to Adapted Material in accordance with the terms
|
||||||
|
and conditions of this Public License.
|
||||||
|
|
||||||
|
c. BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses,
|
||||||
|
approved by Creative Commons as essentially the equivalent of this Public
|
||||||
|
License.
|
||||||
|
|
||||||
|
d. Copyright and Similar Rights means copyright and/or similar rights closely
|
||||||
|
related to copyright including, without limitation, performance, broadcast,
|
||||||
|
sound recording, and Sui Generis Database Rights, without regard to how the
|
||||||
|
rights are labeled or categorized. For purposes of this Public License, the
|
||||||
|
rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||||
|
|
||||||
|
e. Effective Technological Measures means those measures that, in the absence
|
||||||
|
of proper authority, may not be circumvented under laws fulfilling obligations
|
||||||
|
under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
|
||||||
|
and/or similar international agreements.
|
||||||
|
|
||||||
|
f. Exceptions and Limitations means fair use, fair dealing, and/or any other
|
||||||
|
exception or limitation to Copyright and Similar Rights that applies to Your
|
||||||
|
use of the Licensed Material.
|
||||||
|
|
||||||
|
g. License Elements means the license attributes listed in the name of a Creative
|
||||||
|
Commons Public License. The License Elements of this Public License are Attribution,
|
||||||
|
NonCommercial, and ShareAlike.
|
||||||
|
|
||||||
|
h. Licensed Material means the artistic or literary work, database, or other
|
||||||
|
material to which the Licensor applied this Public License.
|
||||||
|
|
||||||
|
i. Licensed Rights means the rights granted to You subject to the terms and
|
||||||
|
conditions of this Public License, which are limited to all Copyright and
|
||||||
|
Similar Rights that apply to Your use of the Licensed Material and that the
|
||||||
|
Licensor has authority to license.
|
||||||
|
|
||||||
|
j. Licensor means the individual(s) or entity(ies) granting rights under this
|
||||||
|
Public License.
|
||||||
|
|
||||||
|
k. NonCommercial means not primarily intended for or directed towards commercial
|
||||||
|
advantage or monetary compensation. For purposes of this Public License, the
|
||||||
|
exchange of the Licensed Material for other material subject to Copyright
|
||||||
|
and Similar Rights by digital file-sharing or similar means is NonCommercial
|
||||||
|
provided there is no payment of monetary compensation in connection with the
|
||||||
|
exchange.
|
||||||
|
|
||||||
|
l. Share means to provide material to the public by any means or process that
|
||||||
|
requires permission under the Licensed Rights, such as reproduction, public
|
||||||
|
display, public performance, distribution, dissemination, communication, or
|
||||||
|
importation, and to make material available to the public including in ways
|
||||||
|
that members of the public may access the material from a place and at a time
|
||||||
|
individually chosen by them.
|
||||||
|
|
||||||
|
m. Sui Generis Database Rights means rights other than copyright resulting
|
||||||
|
from Directive 96/9/EC of the European Parliament and of the Council of 11
|
||||||
|
March 1996 on the legal protection of databases, as amended and/or succeeded,
|
||||||
|
as well as other essentially equivalent rights anywhere in the world.
|
||||||
|
|
||||||
|
n. You means the individual or entity exercising the Licensed Rights under
|
||||||
|
this Public License. Your has a corresponding meaning.
|
||||||
|
|
||||||
|
Section 2 – Scope.
|
||||||
|
|
||||||
|
a. License grant.
|
||||||
|
|
||||||
|
1. Subject to the terms and conditions of this Public License, the Licensor
|
||||||
|
hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
|
||||||
|
irrevocable license to exercise the Licensed Rights in the Licensed Material
|
||||||
|
to:
|
||||||
|
|
||||||
|
A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial
|
||||||
|
purposes only; and
|
||||||
|
|
||||||
|
B. produce, reproduce, and Share Adapted Material for NonCommercial purposes
|
||||||
|
only.
|
||||||
|
|
||||||
|
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
|
||||||
|
and Limitations apply to Your use, this Public License does not apply, and
|
||||||
|
You do not need to comply with its terms and conditions.
|
||||||
|
|
||||||
|
3. Term. The term of this Public License is specified in Section 6(a).
|
||||||
|
|
||||||
|
4. Media and formats; technical modifications allowed. The Licensor authorizes
|
||||||
|
You to exercise the Licensed Rights in all media and formats whether now known
|
||||||
|
or hereafter created, and to make technical modifications necessary to do
|
||||||
|
so. The Licensor waives and/or agrees not to assert any right or authority
|
||||||
|
to forbid You from making technical modifications necessary to exercise the
|
||||||
|
Licensed Rights, including technical modifications necessary to circumvent
|
||||||
|
Effective Technological Measures. For purposes of this Public License, simply
|
||||||
|
making modifications authorized by this Section 2(a)(4) never produces Adapted
|
||||||
|
Material.
|
||||||
|
|
||||||
|
5. Downstream recipients.
|
||||||
|
|
||||||
|
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed
|
||||||
|
Material automatically receives an offer from the Licensor to exercise the
|
||||||
|
Licensed Rights under the terms and conditions of this Public License.
|
||||||
|
|
||||||
|
B. Additional offer from the Licensor – Adapted Material. Every recipient
|
||||||
|
of Adapted Material from You automatically receives an offer from the Licensor
|
||||||
|
to exercise the Licensed Rights in the Adapted Material under the conditions
|
||||||
|
of the Adapter's License You apply.
|
||||||
|
|
||||||
|
C. No downstream restrictions. You may not offer or impose any additional
|
||||||
|
or different terms or conditions on, or apply any Effective Technological
|
||||||
|
Measures to, the Licensed Material if doing so restricts exercise of the Licensed
|
||||||
|
Rights by any recipient of the Licensed Material.
|
||||||
|
|
||||||
|
6. No endorsement. Nothing in this Public License constitutes or may be construed
|
||||||
|
as permission to assert or imply that You are, or that Your use of the Licensed
|
||||||
|
Material is, connected with, or sponsored, endorsed, or granted official status
|
||||||
|
by, the Licensor or others designated to receive attribution as provided in
|
||||||
|
Section 3(a)(1)(A)(i).
|
||||||
|
|
||||||
|
b. Other rights.
|
||||||
|
|
||||||
|
1. Moral rights, such as the right of integrity, are not licensed under this
|
||||||
|
Public License, nor are publicity, privacy, and/or other similar personality
|
||||||
|
rights; however, to the extent possible, the Licensor waives and/or agrees
|
||||||
|
not to assert any such rights held by the Licensor to the limited extent necessary
|
||||||
|
to allow You to exercise the Licensed Rights, but not otherwise.
|
||||||
|
|
||||||
|
2. Patent and trademark rights are not licensed under this Public License.
|
||||||
|
|
||||||
|
3. To the extent possible, the Licensor waives any right to collect royalties
|
||||||
|
from You for the exercise of the Licensed Rights, whether directly or through
|
||||||
|
a collecting society under any voluntary or waivable statutory or compulsory
|
||||||
|
licensing scheme. In all other cases the Licensor expressly reserves any right
|
||||||
|
to collect such royalties, including when the Licensed Material is used other
|
||||||
|
than for NonCommercial purposes.
|
||||||
|
|
||||||
|
Section 3 – License Conditions.
|
||||||
|
|
||||||
|
Your exercise of the Licensed Rights is expressly made subject to the following
|
||||||
|
conditions.
|
||||||
|
|
||||||
|
a. Attribution.
|
||||||
|
|
||||||
|
1. If You Share the Licensed Material (including in modified form), You must:
|
||||||
|
|
||||||
|
A. retain the following if it is supplied by the Licensor with the Licensed
|
||||||
|
Material:
|
||||||
|
|
||||||
|
i. identification of the creator(s) of the Licensed Material and any others
|
||||||
|
designated to receive attribution, in any reasonable manner requested by the
|
||||||
|
Licensor (including by pseudonym if designated);
|
||||||
|
|
||||||
|
ii. a copyright notice;
|
||||||
|
|
||||||
|
iii. a notice that refers to this Public License;
|
||||||
|
|
||||||
|
iv. a notice that refers to the disclaimer of warranties;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||||
|
|
||||||
|
B. indicate if You modified the Licensed Material and retain an indication
|
||||||
|
of any previous modifications; and
|
||||||
|
|
||||||
|
C. indicate the Licensed Material is licensed under this Public License, and
|
||||||
|
include the text of, or the URI or hyperlink to, this Public License.
|
||||||
|
|
||||||
|
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner
|
||||||
|
based on the medium, means, and context in which You Share the Licensed Material.
|
||||||
|
For example, it may be reasonable to satisfy the conditions by providing a
|
||||||
|
URI or hyperlink to a resource that includes the required information.
|
||||||
|
|
||||||
|
3. If requested by the Licensor, You must remove any of the information required
|
||||||
|
by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||||
|
|
||||||
|
b. ShareAlike.In addition to the conditions in Section 3(a), if You Share
|
||||||
|
Adapted Material You produce, the following conditions also apply.
|
||||||
|
|
||||||
|
1. The Adapter's License You apply must be a Creative Commons license with
|
||||||
|
the same License Elements, this version or later, or a BY-NC-SA Compatible
|
||||||
|
License.
|
||||||
|
|
||||||
|
2. You must include the text of, or the URI or hyperlink to, the Adapter's
|
||||||
|
License You apply. You may satisfy this condition in any reasonable manner
|
||||||
|
based on the medium, means, and context in which You Share Adapted Material.
|
||||||
|
|
||||||
|
3. You may not offer or impose any additional or different terms or conditions
|
||||||
|
on, or apply any Effective Technological Measures to, Adapted Material that
|
||||||
|
restrict exercise of the rights granted under the Adapter's License You apply.
|
||||||
|
|
||||||
|
Section 4 – Sui Generis Database Rights.
|
||||||
|
|
||||||
|
Where the Licensed Rights include Sui Generis Database Rights that apply to
|
||||||
|
Your use of the Licensed Material:
|
||||||
|
|
||||||
|
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
|
||||||
|
reuse, reproduce, and Share all or a substantial portion of the contents of
|
||||||
|
the database for NonCommercial purposes only;
|
||||||
|
|
||||||
|
b. if You include all or a substantial portion of the database contents in
|
||||||
|
a database in which You have Sui Generis Database Rights, then the database
|
||||||
|
in which You have Sui Generis Database Rights (but not its individual contents)
|
||||||
|
is Adapted Material, including for purposes of Section 3(b); and
|
||||||
|
|
||||||
|
c. You must comply with the conditions in Section 3(a) if You Share all or
|
||||||
|
a substantial portion of the contents of the database.
|
||||||
|
|
||||||
|
For the avoidance of doubt, this Section 4 supplements and does not replace
|
||||||
|
Your obligations under this Public License where the Licensed Rights include
|
||||||
|
other Copyright and Similar Rights.
|
||||||
|
|
||||||
|
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||||
|
|
||||||
|
a. Unless otherwise separately undertaken by the Licensor, to the extent possible,
|
||||||
|
the Licensor offers the Licensed Material as-is and as-available, and makes
|
||||||
|
no representations or warranties of any kind concerning the Licensed Material,
|
||||||
|
whether express, implied, statutory, or other. This includes, without limitation,
|
||||||
|
warranties of title, merchantability, fitness for a particular purpose, non-infringement,
|
||||||
|
absence of latent or other defects, accuracy, or the presence or absence of
|
||||||
|
errors, whether or not known or discoverable. Where disclaimers of warranties
|
||||||
|
are not allowed in full or in part, this disclaimer may not apply to You.
|
||||||
|
|
||||||
|
b. To the extent possible, in no event will the Licensor be liable to You
|
||||||
|
on any legal theory (including, without limitation, negligence) or otherwise
|
||||||
|
for any direct, special, indirect, incidental, consequential, punitive, exemplary,
|
||||||
|
or other losses, costs, expenses, or damages arising out of this Public License
|
||||||
|
or use of the Licensed Material, even if the Licensor has been advised of
|
||||||
|
the possibility of such losses, costs, expenses, or damages. Where a limitation
|
||||||
|
of liability is not allowed in full or in part, this limitation may not apply
|
||||||
|
to You.
|
||||||
|
|
||||||
|
c. The disclaimer of warranties and limitation of liability provided above
|
||||||
|
shall be interpreted in a manner that, to the extent possible, most closely
|
||||||
|
approximates an absolute disclaimer and waiver of all liability.
|
||||||
|
|
||||||
|
Section 6 – Term and Termination.
|
||||||
|
|
||||||
|
a. This Public License applies for the term of the Copyright and Similar Rights
|
||||||
|
licensed here. However, if You fail to comply with this Public License, then
|
||||||
|
Your rights under this Public License terminate automatically.
|
||||||
|
|
||||||
|
b. Where Your right to use the Licensed Material has terminated under Section
|
||||||
|
6(a), it reinstates:
|
||||||
|
|
||||||
|
1. automatically as of the date the violation is cured, provided it is cured
|
||||||
|
within 30 days of Your discovery of the violation; or
|
||||||
|
|
||||||
|
2. upon express reinstatement by the Licensor.
|
||||||
|
|
||||||
|
For the avoidance of doubt, this Section 6(b) does not affect any right the
|
||||||
|
Licensor may have to seek remedies for Your violations of this Public License.
|
||||||
|
|
||||||
|
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material
|
||||||
|
under separate terms or conditions or stop distributing the Licensed Material
|
||||||
|
at any time; however, doing so will not terminate this Public License.
|
||||||
|
|
||||||
|
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||||
|
|
||||||
|
Section 7 – Other Terms and Conditions.
|
||||||
|
|
||||||
|
a. The Licensor shall not be bound by any additional or different terms or
|
||||||
|
conditions communicated by You unless expressly agreed.
|
||||||
|
|
||||||
|
b. Any arrangements, understandings, or agreements regarding the Licensed
|
||||||
|
Material not stated herein are separate from and independent of the terms
|
||||||
|
and conditions of this Public License.
|
||||||
|
|
||||||
|
Section 8 – Interpretation.
|
||||||
|
|
||||||
|
a. For the avoidance of doubt, this Public License does not, and shall not
|
||||||
|
be interpreted to, reduce, limit, restrict, or impose conditions on any use
|
||||||
|
of the Licensed Material that could lawfully be made without permission under
|
||||||
|
this Public License.
|
||||||
|
|
||||||
|
b. To the extent possible, if any provision of this Public License is deemed
|
||||||
|
unenforceable, it shall be automatically reformed to the minimum extent necessary
|
||||||
|
to make it enforceable. If the provision cannot be reformed, it shall be severed
|
||||||
|
from this Public License without affecting the enforceability of the remaining
|
||||||
|
terms and conditions.
|
||||||
|
|
||||||
|
c. No term or condition of this Public License will be waived and no failure
|
||||||
|
to comply consented to unless expressly agreed to by the Licensor.
|
||||||
|
|
||||||
|
d. Nothing in this Public License constitutes or may be interpreted as a limitation
|
||||||
|
upon, or waiver of, any privileges and immunities that apply to the Licensor
|
||||||
|
or You, including from the legal processes of any jurisdiction or authority.
|
||||||
|
|
||||||
|
Creative Commons is not a party to its public licenses. Notwithstanding, Creative
|
||||||
|
Commons may elect to apply one of its public licenses to material it publishes
|
||||||
|
and in those instances will be considered the "Licensor." The text of the
|
||||||
|
Creative Commons public licenses is dedicated to the public domain under the
|
||||||
|
CC0 Public Domain Dedication. Except for the limited purpose of indicating
|
||||||
|
that material is shared under a Creative Commons public license or as otherwise
|
||||||
|
permitted by the Creative Commons policies published at creativecommons.org/policies,
|
||||||
|
Creative Commons does not authorize the use of the trademark "Creative Commons"
|
||||||
|
or any other trademark or logo of Creative Commons without its prior written
|
||||||
|
consent including, without limitation, in connection with any unauthorized
|
||||||
|
modifications to any of its public licenses or any other arrangements, understandings,
|
||||||
|
or agreements concerning use of licensed material. For the avoidance of doubt,
|
||||||
|
this paragraph does not form part of the public licenses.
|
||||||
|
|
||||||
|
Creative Commons may be contacted at creativecommons.org.
|
||||||
|
|
||||||
|
|
||||||
|
# filepond
|
||||||
|
**Author**: [object Object]
|
||||||
|
**Repo**: pqina/filepond
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: FilePond, Where files go to stretch their bits.
|
||||||
|
## License Text
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019 PQINA | Rik Schennink <rik@pqina.nl>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# gridjs
|
||||||
|
**Author**: Afshin Mehrabani <afshin.meh@gmail.com>
|
||||||
|
**Repo**: https://github.com/grid-js/gridjs
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Advanced table plugin
|
||||||
|
## License Text
|
||||||
|
|
||||||
|
|
||||||
|
# localforage
|
||||||
|
**Author**: Mozilla
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: Apache-2.0
|
||||||
|
**Description**: Offline storage, improved.
|
||||||
|
## License Text
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright 2014 Mozilla
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
# svelte-filepond
|
||||||
|
**Author**: [object Object]
|
||||||
|
**Repo**: pqina/svelte-filepond
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: A handy FilePond adapter component for Svelte
|
||||||
|
## License Text
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 PQINA | Rik Schennink <rik@pqina.nl>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# svelte-i18n
|
||||||
|
**Author**: Christian Kaisermann <christian@kaisermann.me>
|
||||||
|
**Repo**: https://github.com/kaisermann/svelte-i18n
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Internationalization library for Svelte
|
||||||
|
## License Text
|
||||||
|
Copyright 2017 Christian Kaisermann <christian@kaisermann.me>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# svelte-spa-router
|
||||||
|
**Author**: Alessandro Segala (@ItalyPaleAle)
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Router for SPAs using Svelte 3
|
||||||
|
## License Text
|
||||||
|
# The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019, Alessandro Segala
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# tailwindcss
|
||||||
|
**Author**: undefined
|
||||||
|
**Repo**: https://github.com/tailwindlabs/tailwindcss.git
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: A utility-first CSS framework for rapidly building custom user interfaces.
|
||||||
|
## License Text
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Adam Wathan <adam.wathan@gmail.com>
|
||||||
|
Copyright (c) Jonathan Reinink <jonathan@reinink.ca>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# toastify-js
|
||||||
|
**Author**: Varun A P
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Toastify is a lightweight, vanilla JS toast notification library.
|
||||||
|
## License Text
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2018 apvarun
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# validator
|
||||||
|
**Author**: Chris O'Hara <cohara87@gmail.com>
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: String validation and sanitization
|
||||||
|
## License Text
|
||||||
|
Copyright (c) 2018 Chris O'Hara <cohara87@gmail.com>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# @odit/license-exporter
|
||||||
|
**Author**: ODIT.Services
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: A simple license crawler
|
||||||
|
## License Text
|
||||||
|
MIT License Copyright (c) 2020 ODIT.Services (info@odit.services)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice (including the next
|
||||||
|
paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||||
|
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||||
|
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# @snowpack/plugin-svelte
|
||||||
|
**Author**: undefined
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: undefined
|
||||||
|
## License Text
|
||||||
|
|
||||||
|
|
||||||
|
# autoprefixer
|
||||||
|
**Author**: Andrey Sitnik <andrey@sitnik.ru>
|
||||||
|
**Repo**: postcss/autoprefixer
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website
|
||||||
|
## License Text
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# postcss
|
||||||
|
**Author**: Andrey Sitnik <andrey@sitnik.ru>
|
||||||
|
**Repo**: postcss/postcss
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Tool for transforming styles with JS plugins
|
||||||
|
## License Text
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# postcss-load-config
|
||||||
|
**Author**: Michael Ciniawky <michael.ciniawsky@gmail.com>
|
||||||
|
**Repo**: postcss/postcss-load-config
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Autoload Config for PostCSS
|
||||||
|
## License Text
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright Michael Ciniawsky <michael.ciniawsky@gmail.com>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# snowpack
|
||||||
|
**Author**: Fred K. Schott <fkschott@gmail.com>
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: The ESM-powered frontend build tool. Fast, lightweight, unbundled.
|
||||||
|
## License Text
|
||||||
|
|
||||||
|
|
||||||
|
# svelte
|
||||||
|
**Author**: Rich Harris
|
||||||
|
**Repo**: [object Object]
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Cybernetically enhanced web apps
|
||||||
|
## License Text
|
||||||
|
Copyright (c) 2016-20 [these people](https://github.com/sveltejs/svelte/graphs/contributors)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# svelte-preprocess
|
||||||
|
**Author**: Christian Kaisermann <christian@kaisermann.me>
|
||||||
|
**Repo**: https://github.com/sveltejs/svelte-preprocess
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: A Svelte preprocessor wrapper with baked-in support for commonly used preprocessors
|
||||||
|
## License Text
|
||||||
|
Copyright (c) 2016-20 [these people](https://github.com/sveltejs/svelte-preprocess/graphs/contributors)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
36
nginx.conf
36
nginx.conf
@ -1,24 +1,19 @@
|
|||||||
events {
|
events{}
|
||||||
}
|
|
||||||
http {
|
http {
|
||||||
include mime.types;
|
include mime.types;
|
||||||
sendfile on;
|
sendfile on;
|
||||||
server {
|
server {
|
||||||
error_page 404 /index.html;
|
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
|
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Pragma public;
|
add_header Pragma public;
|
||||||
add_header Cache-Control "public";
|
add_header Cache-Control "public";
|
||||||
}
|
}
|
||||||
# --- Brotli
|
# --- Brotli
|
||||||
brotli on;
|
# brotli on;
|
||||||
brotli_comp_level 6;
|
# brotli_comp_level 6;
|
||||||
brotli_static on;
|
# brotli_static on;
|
||||||
brotli_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
|
# brotli_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
|
||||||
# --- GZIP
|
# --- GZIP
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_disable "msie6";
|
gzip_disable "msie6";
|
||||||
@ -27,25 +22,6 @@ http {
|
|||||||
gzip_comp_level 6;
|
gzip_comp_level 6;
|
||||||
gzip_buffers 16 8k;
|
gzip_buffers 16 8k;
|
||||||
gzip_http_version 1.1;
|
gzip_http_version 1.1;
|
||||||
gzip_types application/javascript
|
gzip_types application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon text/css text/javascript text/plain text/xml;
|
||||||
application/rss+xml
|
|
||||||
application/vnd.ms-fontobject
|
|
||||||
application/x-font
|
|
||||||
application/x-font-opentype
|
|
||||||
application/x-font-otf
|
|
||||||
application/x-font-truetype
|
|
||||||
application/x-font-ttf
|
|
||||||
application/x-javascript
|
|
||||||
application/xhtml+xml
|
|
||||||
application/xml
|
|
||||||
font/opentype
|
|
||||||
font/otf
|
|
||||||
font/ttf
|
|
||||||
image/svg+xml
|
|
||||||
image/x-icon
|
|
||||||
text/css
|
|
||||||
text/javascript
|
|
||||||
text/plain
|
|
||||||
text/xml;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
16
order.js
16
order.js
@ -1,16 +0,0 @@
|
|||||||
const fs = require('fs');
|
|
||||||
// get all language files
|
|
||||||
const files = fs.readdirSync('./src/locales/');
|
|
||||||
files.forEach((f) => {
|
|
||||||
// read file as object
|
|
||||||
const unordered = JSON.parse(fs.readFileSync(`src/locales/${f}`));
|
|
||||||
// order object by keys alpabetically A-Z
|
|
||||||
const ordered = Object.keys(unordered).sort().reduce((obj, key) => {
|
|
||||||
obj[key] = unordered[key];
|
|
||||||
return obj;
|
|
||||||
}, {});
|
|
||||||
// format output as json for commit diff compatibility
|
|
||||||
const out = JSON.stringify(ordered, 0, 4);
|
|
||||||
// write output file
|
|
||||||
fs.writeFileSync(`src/locales/${f}`, out);
|
|
||||||
});
|
|
40
package.json
40
package.json
@ -2,34 +2,30 @@
|
|||||||
"name": "@odit/lfk-frontend",
|
"name": "@odit/lfk-frontend",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n-order": "node order.js",
|
|
||||||
"dev": "snowpack dev",
|
"dev": "snowpack dev",
|
||||||
"build": "snowpack build",
|
"build": "snowpack build",
|
||||||
"build:sw": "workbox generateSW workbox-config.js",
|
"licenses:export": "license-exporter --md"
|
||||||
"licenses:export": "license-exporter --json -o public"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@odit/lfk-client-js": "0.0.10",
|
"@odit/lfk-client-js": "0.0.6",
|
||||||
"filepond": "4.25.1",
|
"filepond": "^4.25.1",
|
||||||
"gridjs": "3.2.1",
|
"gridjs": "^3.2.0",
|
||||||
"localforage": "1.9.0",
|
"localforage": "^1.9.0",
|
||||||
"svelte-filepond": "0.0.1",
|
"svelte-filepond": "^0.0.1",
|
||||||
"svelte-focus-trap": "1.0.1",
|
"svelte-i18n": "^3.3.0",
|
||||||
"svelte-i18n": "3.3.0",
|
"svelte-spa-router": "^3.1.0",
|
||||||
"tailwindcss": "2.0.2",
|
"tailwindcss": "^2.0.2",
|
||||||
"tinro": "0.5.6",
|
"toastify-js": "^1.9.3",
|
||||||
"toastify-js": "1.9.3",
|
"validator": "^13.5.2"
|
||||||
"validator": "13.5.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@odit/license-exporter": "0.0.8",
|
"@odit/license-exporter": "^0.0.8",
|
||||||
"@snowpack/plugin-svelte": "3.4.1",
|
"@snowpack/plugin-svelte": "^3.4.1",
|
||||||
"autoprefixer": "10.2.1",
|
"autoprefixer": "^10.1.0",
|
||||||
"postcss": "8.2.4",
|
"postcss": "^8.2.1",
|
||||||
"postcss-load-config": "3.0.0",
|
"postcss-load-config": "^3.0.0",
|
||||||
"snowpack": "3.0.0-rc.2",
|
"snowpack": "3.0.0-rc.2",
|
||||||
"svelte": "3.31.2",
|
"svelte": "^3.31.0",
|
||||||
"svelte-preprocess": "4.6.1",
|
"svelte-preprocess": "^4.6.1"
|
||||||
"workbox-cli": "6.0.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
const config = {
|
const config = {
|
||||||
baseurl: 'http://localhost:4010',
|
baseurl: 'http://localhost:4010',
|
||||||
// optional
|
// optional params ⏬
|
||||||
prefersHashRouting: true
|
fallback_username: 'demo',
|
||||||
|
fallback_password: 'demo'
|
||||||
};
|
};
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="/favicon.png" />
|
<link rel="icon" href="/favicon.png" />
|
||||||
<link rel="manifest" href="/manifest.webmanifest">
|
<link rel="manifest" href="/manifest.webmanifest">
|
||||||
<link rel="apple-touch-icon" href="/lfk-logo.png">
|
|
||||||
<meta name="theme-color" content="#FFFFFF">
|
<meta name="theme-color" content="#FFFFFF">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="description" content="Lauf Für Kaya! - Admin" />
|
<meta name="description" content="Lauf Für Kaya! - Admin" />
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 31 KiB |
File diff suppressed because one or more lines are too long
@ -4,7 +4,6 @@
|
|||||||
"start_url": ".",
|
"start_url": ".",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"background_color": "#fff",
|
"background_color": "#fff",
|
||||||
"theme_color": "#fff",
|
|
||||||
"description": "Lauf für Kaya! - Admin",
|
"description": "Lauf für Kaya! - Admin",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
@ -16,12 +15,6 @@
|
|||||||
"src": "/favicon.png",
|
"src": "/favicon.png",
|
||||||
"sizes": "144x144",
|
"sizes": "144x144",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
},
|
}
|
||||||
{
|
|
||||||
"src": "/lfk-logo.png",
|
|
||||||
"sizes": "1540x144",
|
|
||||||
"type": "image/png"
|
|
||||||
},
|
|
||||||
{ "src": "/maskable_icon_x1.png", "sizes": "750x750", "type": "image/png", "purpose": "any maskable" }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 52 KiB |
@ -1,2 +1 @@
|
|||||||
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,s,o)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const c={uri:location.origin+r.slice(1)};return Promise.all(s.map((r=>{switch(r){case"exports":return i;case"module":return c;default:return e(r)}}))).then((e=>{const r=o(...e);return i.default||(i.default=r),i}))})))}}define("./sw.js",["./workbox-c8ead010"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"favicon.ico",revision:"ba44f340afba5bb1a07f14decc15dd04"},{url:"favicon.png",revision:"07a9941cec62319578fa2a1734db9959"},{url:"favicon.svg",revision:"689d6c6fda51e359c0e5725d9e905064"},{url:"index.html",revision:"931c34f3675364dcc09411aa0f223776"},{url:"logo.svg",revision:"4c9e31a1f4268d7e36e22cda7656e561"},{url:"manifest.webmanifest",revision:"75c93eb352c4877216e77b1d7f73445f"},{url:"robots.txt",revision:"61c27d2cd39a713f7829422c3d9edcc7"}],{})}));
|
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return s[e]||(r=new Promise((async r=>{if("document"in self){const s=document.createElement("script");s.src=e,document.head.appendChild(s),s.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!s[e])throw new Error(`Module ${e} didn’t register its module`);return s[e]}))},r=(r,s)=>{Promise.all(r.map(e)).then((e=>s(1===e.length?e[0]:e)))},s={require:Promise.resolve(r)};self.define=(r,i,c)=>{s[r]||(s[r]=Promise.resolve().then((()=>{let s={};const o={uri:location.origin+r.slice(1)};return Promise.all(i.map((r=>{switch(r){case"exports":return s;case"module":return o;default:return e(r)}}))).then((e=>{const r=c(...e);return s.default||(s.default=r),s}))})))}}define("./sw.js",["./workbox-c8ead010"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"env.js",revision:"d774a7cf97a5e7390045bcf8b304062c"},{url:"env.sample.js",revision:"83a2a360688fb3ab53c67f3137a72683"},{url:"favicon.ico",revision:"ba44f340afba5bb1a07f14decc15dd04"},{url:"favicon.png",revision:"07a9941cec62319578fa2a1734db9959"},{url:"favicon.svg",revision:"689d6c6fda51e359c0e5725d9e905064"},{url:"index.html",revision:"4c19a21d81de8fd5ca73503cec356c7c"},{url:"logo.svg",revision:"4c9e31a1f4268d7e36e22cda7656e561"},{url:"robots.txt",revision:"61c27d2cd39a713f7829422c3d9edcc7"}],{})}));
|
||||||
//# sourceMappingURL=sw.js.map
|
|
File diff suppressed because one or more lines are too long
@ -10,7 +10,6 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
installOptions: {
|
installOptions: {
|
||||||
/* ... */
|
/* ... */
|
||||||
sourceMap: false
|
|
||||||
},
|
},
|
||||||
devOptions: {
|
devOptions: {
|
||||||
/* ... */
|
/* ... */
|
||||||
@ -23,8 +22,5 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
alias: {
|
alias: {
|
||||||
/* ... */
|
/* ... */
|
||||||
},
|
|
||||||
experiments: {
|
|
||||||
optimize: { bundle: true, minify: true }
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
110
src/App.svelte
110
src/App.svelte
@ -1,18 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import "./TailwindStyles.svelte";
|
import TailwindStyles from "./TailwindStyles.svelte";
|
||||||
import "toastify-js/src/toastify.css";
|
import Router from "svelte-spa-router";
|
||||||
import { Route, router } from "tinro";
|
import { replace } from "svelte-spa-router";
|
||||||
router.subscribe((routeInfo) => {
|
import { wrap } from "svelte-spa-router/wrap";
|
||||||
// console.log(routeInfo.path);
|
|
||||||
window.scrollTo(0, 0);
|
|
||||||
});
|
|
||||||
// console.log($router.path);
|
|
||||||
// console.log(config);
|
|
||||||
if (config.prefersHashRouting) {
|
|
||||||
if (config.prefersHashRouting === true) {
|
|
||||||
router.useHashNavigation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
import localForage from "localforage";
|
import localForage from "localforage";
|
||||||
import { addMessages, init, getLocaleFromNavigator } from "svelte-i18n";
|
import { addMessages, init, getLocaleFromNavigator } from "svelte-i18n";
|
||||||
import en from "./locales/en.json";
|
import en from "./locales/en.json";
|
||||||
@ -32,25 +22,37 @@
|
|||||||
//
|
//
|
||||||
import Login from "./components/Login.svelte";
|
import Login from "./components/Login.svelte";
|
||||||
import Dashboard from "./components/Dashboard.svelte";
|
import Dashboard from "./components/Dashboard.svelte";
|
||||||
import store from "./store.js";
|
|
||||||
import NotFound from "./components/NotFound.svelte";
|
import NotFound from "./components/NotFound.svelte";
|
||||||
|
import store from "./store.js";
|
||||||
import ForgotPassword from "./components/ForgotPassword.svelte";
|
import ForgotPassword from "./components/ForgotPassword.svelte";
|
||||||
import MainDashContent from "./components/MainDashContent.svelte";
|
|
||||||
import Users from "./components/Users.svelte";
|
|
||||||
import About from "./components/About.svelte";
|
import About from "./components/About.svelte";
|
||||||
import Settings from "./components/Settings.svelte";
|
|
||||||
import Transition from "./components/Transition.svelte";
|
|
||||||
import Orgs from "./components/Orgs.svelte";
|
|
||||||
import Runners from "./components/Runners.svelte";
|
|
||||||
import Footer from "./components/Footer.svelte";
|
|
||||||
import Tracks from "./components/Tracks.svelte";
|
|
||||||
import TracksOverview from "./components/TracksOverview.svelte";
|
|
||||||
import OrgDetail from "./components/OrgDetail.svelte";
|
|
||||||
import Teams from "./components/Teams.svelte";
|
|
||||||
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
|
||||||
OpenAPI.BASE = config.baseurl;
|
|
||||||
store.init();
|
store.init();
|
||||||
|
//
|
||||||
|
const checkAuth = (detail) => {
|
||||||
|
if (!$store.isLoggedIn) {
|
||||||
|
console.log("not authed");
|
||||||
|
replace("/login/");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
const routes = {
|
||||||
|
"/about": About,
|
||||||
|
"/login": Login,
|
||||||
|
"/forgot_password": ForgotPassword,
|
||||||
|
"/dashboard": wrap({ component: Dashboard, conditions: [checkAuth] }),
|
||||||
|
"/": wrap({ component: Dashboard, conditions: [checkAuth] }),
|
||||||
|
// Using named parameters, with last being optional
|
||||||
|
// "/author/:first/:last?": Author,
|
||||||
|
|
||||||
|
// Wildcard parameter
|
||||||
|
// "/book/*": Book,
|
||||||
|
|
||||||
|
// Catch-all
|
||||||
|
// This is optional, but if present it must be the last
|
||||||
|
"*": NotFound,
|
||||||
|
};
|
||||||
|
//
|
||||||
if ("serviceWorker" in navigator) {
|
if ("serviceWorker" in navigator) {
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
navigator.serviceWorker.register("/sw.js").then(
|
navigator.serviceWorker.register("/sw.js").then(
|
||||||
@ -65,54 +67,4 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Route>
|
<Router {routes} />
|
||||||
{#if $router.path === '/forgot_password'}
|
|
||||||
<Route path="/forgot_password">
|
|
||||||
<ForgotPassword />
|
|
||||||
</Route>
|
|
||||||
{:else if $router.path === '/about'}
|
|
||||||
<Route path="/about">
|
|
||||||
<About />
|
|
||||||
</Route>
|
|
||||||
{:else if $store.isLoggedIn}
|
|
||||||
<Dashboard>
|
|
||||||
<Transition>
|
|
||||||
<Route path="/">
|
|
||||||
<MainDashContent />
|
|
||||||
</Route>
|
|
||||||
<Route path="/users">
|
|
||||||
<Users />
|
|
||||||
</Route>
|
|
||||||
<Route path="/tracks/*">
|
|
||||||
<Route path="/">
|
|
||||||
<TracksOverview />
|
|
||||||
</Route>
|
|
||||||
<Route path="/:trackid" let:params />
|
|
||||||
</Route>
|
|
||||||
<Route path="/runners">
|
|
||||||
<Runners />
|
|
||||||
</Route>
|
|
||||||
<Route path="/teams">
|
|
||||||
<Teams />
|
|
||||||
</Route>
|
|
||||||
<Route path="/orgs/*">
|
|
||||||
<Route path="/">
|
|
||||||
<Orgs />
|
|
||||||
</Route>
|
|
||||||
<Route path="/:orgid" let:params>
|
|
||||||
<OrgDetail {params} />
|
|
||||||
</Route>
|
|
||||||
</Route>
|
|
||||||
<Route path="/about">
|
|
||||||
<About />
|
|
||||||
</Route>
|
|
||||||
<Route path="/settings">
|
|
||||||
<Settings />
|
|
||||||
</Route>
|
|
||||||
</Transition>
|
|
||||||
<Footer />
|
|
||||||
</Dashboard>
|
|
||||||
{:else}
|
|
||||||
<Login />
|
|
||||||
{/if}
|
|
||||||
</Route>
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<style global>
|
<style global>
|
||||||
/*! @import */
|
|
||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
@ -1,15 +1,27 @@
|
|||||||
<script>
|
<script>
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
const license_promise = fetch("/licenses.json");
|
import Footer from "./Footer.svelte";
|
||||||
let licenses = [];
|
|
||||||
license_promise
|
|
||||||
.then((response) => response.json())
|
|
||||||
.then((json) => {
|
|
||||||
licenses = json;
|
|
||||||
console.log(json);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
font-family: "Agave", sans-serif;
|
||||||
|
/* font-family: "Comic Neue", cursive; */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/npm/@xz/fonts@1/serve/agave.min.css" />
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/npm/@xz/fonts@1/serve/nevermind.min.css" />
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
||||||
|
<link
|
||||||
|
href="https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap"
|
||||||
|
rel="stylesheet" />
|
||||||
|
</svelte:head>
|
||||||
<div class="pt-12 px-4 sm:px-6 lg:px-8 lg:pt-20 bg-gray-900 pb-12">
|
<div class="pt-12 px-4 sm:px-6 lg:px-8 lg:pt-20 bg-gray-900 pb-12">
|
||||||
<div class="text-center mb-8">
|
<div class="text-center mb-8">
|
||||||
<h1
|
<h1
|
||||||
@ -40,40 +52,149 @@
|
|||||||
<p class="text-center">{$_('oss_credit_description')}</p>
|
<p class="text-center">{$_('oss_credit_description')}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-screen leading-8 pl-5 mt-5">
|
<div class="w-screen leading-8 pl-5 mt-5">
|
||||||
{#await license_promise}
|
<!-- -->
|
||||||
<p class="text-center w-full">Licenses are being loaded...</p>
|
|
||||||
{:then}
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>name</th>
|
||||||
<th>License</th>
|
<th>licenseType</th>
|
||||||
<th>Link</th>
|
<th>link</th>
|
||||||
<th>Installed version</th>
|
<th>installedVersion</th>
|
||||||
<th>Author</th>
|
<th>author</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{#each licenses as l}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{l.name}</td>
|
<td>@odit/lfk-client-js</td>
|
||||||
<td>{l.license || '?'}</td>
|
<td>CC-BY-NC-SA-4.0</td>
|
||||||
<td>{(l.repo?.url || l.repo).replace('git+', '')}</td>
|
<td>https://git.odit.services/lfk/lfk-client-js</td>
|
||||||
<td>{l.version || '?'}</td>
|
<td>0.0.5</td>
|
||||||
<td>{l.author?.name || l.author || '?'}</td>
|
<td>ODIT.Services</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filepond</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/pqina/filepond.git</td>
|
||||||
|
<td>4.25.1</td>
|
||||||
|
<td>PQINA</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridjs</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/grid-js/gridjs.git</td>
|
||||||
|
<td>3.2.0</td>
|
||||||
|
<td>Afshin Mehrabani</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>svelte-filepond</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/pqina/svelte-filepond.git</td>
|
||||||
|
<td>0.0.1</td>
|
||||||
|
<td>PQINA</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>svelte-i18n</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/kaisermann/svelte-i18n.git</td>
|
||||||
|
<td>3.3.0</td>
|
||||||
|
<td>Christian Kaisermann</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>svelte-spa-router</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/ItalyPaleAle/svelte-spa-router.git</td>
|
||||||
|
<td>3.1.0</td>
|
||||||
|
<td>Alessandro Segala</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tailwindcss</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/tailwindlabs/tailwindcss.git</td>
|
||||||
|
<td>2.0.2</td>
|
||||||
|
<td />
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>toastify-js</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/apvarun/toastify-js.git</td>
|
||||||
|
<td>1.9.3</td>
|
||||||
|
<td>Varun A P</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>validator</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/chriso/validator.js.git</td>
|
||||||
|
<td>13.5.2</td>
|
||||||
|
<td>Chris O'Hara</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>@snowpack/plugin-svelte</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/snowpackjs/snowpack.git</td>
|
||||||
|
<td>3.4.1</td>
|
||||||
|
<td />
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>autoprefixer</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/postcss/autoprefixer.git</td>
|
||||||
|
<td>10.1.0</td>
|
||||||
|
<td>Andrey Sitnik</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>postcss</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/postcss/postcss.git</td>
|
||||||
|
<td>8.2.1</td>
|
||||||
|
<td>Andrey Sitnik</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>postcss-load-config</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/postcss/postcss-load-config.git</td>
|
||||||
|
<td>3.0.0</td>
|
||||||
|
<td>Michael Ciniawky</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>snowpack</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/snowpackjs/snowpack.git</td>
|
||||||
|
<td>3.0.0-rc.2</td>
|
||||||
|
<td>Fred K. Schott</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>svelte</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/sveltejs/svelte.git</td>
|
||||||
|
<td>3.31.0</td>
|
||||||
|
<td>Rich Harris</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>svelte-preprocess</td>
|
||||||
|
<td>MIT</td>
|
||||||
|
<td>https://github.com/sveltejs/svelte-preprocess.git</td>
|
||||||
|
<td>4.6.1</td>
|
||||||
|
<td>Christian Kaisermann</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{:catch error}
|
<!-- -->
|
||||||
<div
|
<!-- <ul class="list-disc text-gray-500">
|
||||||
class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500">
|
<li>
|
||||||
<span class="inline-block align-middle mr-8">
|
Snowpack:
|
||||||
<b class="capitalize">{$_('general_promise_error')}</b>
|
<a
|
||||||
{error}
|
class="underline"
|
||||||
</span>
|
href="https://snowpack.dev"
|
||||||
</div>
|
target="_blank">https://snowpack.dev</a>
|
||||||
{/await}
|
</li>
|
||||||
|
<li>
|
||||||
|
SvelteJS:
|
||||||
|
<a
|
||||||
|
class="underline"
|
||||||
|
href="https://svelte.dev"
|
||||||
|
target="_blank">https://svelte.dev</a>
|
||||||
|
</li>
|
||||||
|
</ul> -->
|
||||||
</div>
|
</div>
|
||||||
<h2 class="text-4xl font-display font-semibold text-gray-900 md:text-5xl">
|
<h2 class="text-4xl font-display font-semibold text-gray-900 md:text-5xl">
|
||||||
Fragen
|
Fragen
|
||||||
@ -106,3 +227,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Footer />
|
||||||
|
@ -1,224 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
import { clickOutside } from "./outsideclick";
|
|
||||||
import { focusTrap } from "svelte-focus-trap";
|
|
||||||
import { tracks as tracksstore } from "../store.js";
|
|
||||||
import { TrackService } from "@odit/lfk-client-js";
|
|
||||||
import Toastify from "toastify-js";
|
|
||||||
import "toastify-js/src/toastify.css";
|
|
||||||
export let modal_open;
|
|
||||||
let trackname_input;
|
|
||||||
function focus(el) {
|
|
||||||
el.focus();
|
|
||||||
}
|
|
||||||
$: trackname_input_value = "";
|
|
||||||
$: track_min_duration = 0;
|
|
||||||
$: tracklength = 0;
|
|
||||||
$: processed_last_submit = true;
|
|
||||||
$: smart_track_min_duration_placeholder = parseInt(tracklength || 0) * 0.369;
|
|
||||||
$: isTracknameValid = trackname_input_value.trim().length === 0;
|
|
||||||
$: isTracklengthValid = tracklength <= 0;
|
|
||||||
$: trackMintimevalid = track_min_duration >= 0;
|
|
||||||
$: createbtnenabled = !isTracknameValid && !isTracklengthValid;
|
|
||||||
(function () {
|
|
||||||
document.onkeydown = function (e) {
|
|
||||||
e = e || window.event;
|
|
||||||
if (e.key === "Escape") {
|
|
||||||
modal_open = false;
|
|
||||||
}
|
|
||||||
if (e.keyCode === 13) {
|
|
||||||
if (createbtnenabled === true) {
|
|
||||||
createbtnenabled = false;
|
|
||||||
submit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
function submit() {
|
|
||||||
if (processed_last_submit === true) {
|
|
||||||
processed_last_submit = false;
|
|
||||||
const toast = Toastify({
|
|
||||||
text: $_("track-is-being-added"),
|
|
||||||
duration: -1,
|
|
||||||
}).showToast();
|
|
||||||
TrackService.trackControllerPost({
|
|
||||||
distance: parseInt(tracklength),
|
|
||||||
name: trackname_input_value,
|
|
||||||
minimumLapTime: track_min_duration,
|
|
||||||
})
|
|
||||||
.then((result) => {
|
|
||||||
trackname_input_value = "";
|
|
||||||
track_min_duration = 0;
|
|
||||||
tracklength = 0;
|
|
||||||
modal_open = false;
|
|
||||||
//
|
|
||||||
Toastify({
|
|
||||||
text: $_("track-added"),
|
|
||||||
duration: 500,
|
|
||||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
|
||||||
}).showToast();
|
|
||||||
let storeval = [];
|
|
||||||
tracksstore.subscribe((val) => {
|
|
||||||
storeval = val;
|
|
||||||
});
|
|
||||||
storeval.push(result);
|
|
||||||
tracksstore.set(storeval);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
//
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
processed_last_submit = true;
|
|
||||||
//
|
|
||||||
toast.hideToast();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if modal_open}
|
|
||||||
<div
|
|
||||||
class="fixed z-10 inset-0 overflow-y-auto"
|
|
||||||
use:focusTrap
|
|
||||||
use:clickOutside
|
|
||||||
on:click_outside={() => {
|
|
||||||
modal_open = false;
|
|
||||||
}}>
|
|
||||||
<div
|
|
||||||
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
|
||||||
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-gray-500 opacity-75"
|
|
||||||
data-id="modal_backdrop" />
|
|
||||||
</div>
|
|
||||||
<span
|
|
||||||
class="hidden sm:inline-block sm:align-middle sm:h-screen"
|
|
||||||
aria-hidden="true">​</span>
|
|
||||||
<div
|
|
||||||
class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"
|
|
||||||
role="dialog"
|
|
||||||
aria-modal="true"
|
|
||||||
aria-labelledby="modal-headline">
|
|
||||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
|
|
||||||
<div class="sm:flex sm:items-start">
|
|
||||||
<div
|
|
||||||
class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10">
|
|
||||||
<svg
|
|
||||||
class="h-6 w-6 text-blue-600"
|
|
||||||
fill="none"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 640 512"><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M635.7 167.2L556.1 31.7c-8.8-15-28.3-20.1-43.5-11.5l-69 39.1L503.3 161c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L416 75l-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L333.2 122 278 153.3 337.8 255c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-59.7-101.7-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-27.9-47.5-55.2 31.3 59.7 101.7c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L84.9 262.9l-69 39.1C.7 310.7-4.6 329.8 4.2 344.8l79.6 135.6c8.8 15 28.3 20.1 43.5 11.5L624.1 210c15.2-8.6 20.4-27.8 11.6-42.8z" /></svg>
|
|
||||||
</div>
|
|
||||||
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
|
|
||||||
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
|
||||||
{$_('create-a-new-track')}
|
|
||||||
</h3>
|
|
||||||
<div class="mt-2 mb-6">
|
|
||||||
<p class="text-sm text-gray-500">
|
|
||||||
{$_('please-provide-the-required-information-to-add-a-new-track')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6">
|
|
||||||
<label
|
|
||||||
for="trackname"
|
|
||||||
class="block text-sm font-medium text-gray-700">{$_('track-name')}</label>
|
|
||||||
<input
|
|
||||||
use:focus
|
|
||||||
autocomplete="off"
|
|
||||||
placeholder={$_('track-name')}
|
|
||||||
class:border-red-500={isTracknameValid}
|
|
||||||
class:focus:border-red-500={isTracknameValid}
|
|
||||||
class:focus:ring-red-500={isTracknameValid}
|
|
||||||
bind:value={trackname_input_value}
|
|
||||||
bind:this={trackname_input}
|
|
||||||
type="text"
|
|
||||||
name="trackname"
|
|
||||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2" />
|
|
||||||
{#if isTracknameValid}
|
|
||||||
<span
|
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
|
||||||
Track name must not be empty
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="col-span-6">
|
|
||||||
<label
|
|
||||||
for="track_length_m"
|
|
||||||
class="block text-sm font-medium text-gray-700">{$_('track-length-in-m')}</label>
|
|
||||||
<div class="mt-1 flex rounded-md shadow-sm">
|
|
||||||
<input
|
|
||||||
autocomplete="off"
|
|
||||||
class:border-red-500={isTracklengthValid}
|
|
||||||
class:focus:border-red-500={isTracklengthValid}
|
|
||||||
class:focus:ring-red-500={isTracklengthValid}
|
|
||||||
bind:value={tracklength}
|
|
||||||
type="number"
|
|
||||||
name="track_length_m"
|
|
||||||
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full rounded-none rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 p-2"
|
|
||||||
placeholder="1000" />
|
|
||||||
<span
|
|
||||||
class="inline-flex items-center px-3 rounded-r-md border border-gray-300 bg-gray-50 text-gray-500 text-sm">m</span>
|
|
||||||
</div>
|
|
||||||
{#if isTracklengthValid}
|
|
||||||
<span
|
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
|
||||||
Track length must be greater than 0
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="col-span-6">
|
|
||||||
<label
|
|
||||||
for="track_min_duration"
|
|
||||||
class="block text-sm font-medium text-gray-700">{$_('minimum-lap-time-in-s')}</label>
|
|
||||||
<div class="mt-1 flex rounded-md shadow-sm">
|
|
||||||
<input
|
|
||||||
autocomplete="off"
|
|
||||||
class:border-red-500={!trackMintimevalid}
|
|
||||||
class:focus:border-red-500={!trackMintimevalid}
|
|
||||||
class:focus:ring-red-500={!trackMintimevalid}
|
|
||||||
bind:value={track_min_duration}
|
|
||||||
type="number"
|
|
||||||
name="track_min_duration"
|
|
||||||
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full rounded-none rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 p-2"
|
|
||||||
placeholder={smart_track_min_duration_placeholder} />
|
|
||||||
<span
|
|
||||||
class="inline-flex items-center px-3 rounded-r-md border border-gray-300 bg-gray-50 text-gray-500 text-sm">s</span>
|
|
||||||
</div>
|
|
||||||
{#if !trackMintimevalid}
|
|
||||||
<span
|
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
|
||||||
minimum lap time must be a positive number or 0
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
|
|
||||||
<button
|
|
||||||
disabled={!createbtnenabled}
|
|
||||||
class:opacity-50={!createbtnenabled}
|
|
||||||
on:click={submit}
|
|
||||||
type="button"
|
|
||||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
|
||||||
Create
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
modal_open = false;
|
|
||||||
}}
|
|
||||||
type="button"
|
|
||||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
@ -1,224 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
import { clickOutside } from "./outsideclick";
|
|
||||||
import { focusTrap } from "svelte-focus-trap";
|
|
||||||
import { tracks as tracksstore } from "../store.js";
|
|
||||||
import { TrackService } from "@odit/lfk-client-js";
|
|
||||||
import Toastify from "toastify-js";
|
|
||||||
import "toastify-js/src/toastify.css";
|
|
||||||
export let modal_open;
|
|
||||||
let trackname_input;
|
|
||||||
function focus(el) {
|
|
||||||
el.focus();
|
|
||||||
}
|
|
||||||
$: trackname_input_value = "";
|
|
||||||
$: track_min_duration = 0;
|
|
||||||
$: tracklength = 0;
|
|
||||||
$: processed_last_submit = true;
|
|
||||||
$: smart_track_min_duration_placeholder = parseInt(tracklength || 0) * 0.369;
|
|
||||||
$: isTracknameValid = trackname_input_value.trim().length === 0;
|
|
||||||
$: isTracklengthValid = tracklength <= 0;
|
|
||||||
$: trackMintimevalid = track_min_duration >= 0;
|
|
||||||
$: createbtnenabled = !isTracknameValid && !isTracklengthValid;
|
|
||||||
(function () {
|
|
||||||
document.onkeydown = function (e) {
|
|
||||||
e = e || window.event;
|
|
||||||
if (e.key === "Escape") {
|
|
||||||
modal_open = false;
|
|
||||||
}
|
|
||||||
if (e.keyCode === 13) {
|
|
||||||
if (createbtnenabled === true) {
|
|
||||||
createbtnenabled = false;
|
|
||||||
submit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
function submit() {
|
|
||||||
if (processed_last_submit === true) {
|
|
||||||
processed_last_submit = false;
|
|
||||||
const toast = Toastify({
|
|
||||||
text: $_("track-is-being-added"),
|
|
||||||
duration: -1,
|
|
||||||
}).showToast();
|
|
||||||
TrackService.trackControllerPost({
|
|
||||||
distance: parseInt(tracklength),
|
|
||||||
name: trackname_input_value,
|
|
||||||
minimumLapTime: track_min_duration,
|
|
||||||
})
|
|
||||||
.then((result) => {
|
|
||||||
trackname_input_value = "";
|
|
||||||
track_min_duration = 0;
|
|
||||||
tracklength = 0;
|
|
||||||
modal_open = false;
|
|
||||||
//
|
|
||||||
Toastify({
|
|
||||||
text: $_("track-added"),
|
|
||||||
duration: 500,
|
|
||||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
|
||||||
}).showToast();
|
|
||||||
let storeval = [];
|
|
||||||
tracksstore.subscribe((val) => {
|
|
||||||
storeval = val;
|
|
||||||
});
|
|
||||||
storeval.push(result);
|
|
||||||
tracksstore.set(storeval);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
//
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
processed_last_submit = true;
|
|
||||||
//
|
|
||||||
toast.hideToast();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if modal_open}
|
|
||||||
<div
|
|
||||||
class="fixed z-10 inset-0 overflow-y-auto"
|
|
||||||
use:focusTrap
|
|
||||||
use:clickOutside
|
|
||||||
on:click_outside={() => {
|
|
||||||
modal_open = false;
|
|
||||||
}}>
|
|
||||||
<div
|
|
||||||
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
|
||||||
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 bg-gray-500 opacity-75"
|
|
||||||
data-id="modal_backdrop" />
|
|
||||||
</div>
|
|
||||||
<span
|
|
||||||
class="hidden sm:inline-block sm:align-middle sm:h-screen"
|
|
||||||
aria-hidden="true">​</span>
|
|
||||||
<div
|
|
||||||
class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"
|
|
||||||
role="dialog"
|
|
||||||
aria-modal="true"
|
|
||||||
aria-labelledby="modal-headline">
|
|
||||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
|
|
||||||
<div class="sm:flex sm:items-start">
|
|
||||||
<div
|
|
||||||
class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10">
|
|
||||||
<svg
|
|
||||||
class="h-6 w-6 text-blue-600"
|
|
||||||
fill="none"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 640 512"><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M635.7 167.2L556.1 31.7c-8.8-15-28.3-20.1-43.5-11.5l-69 39.1L503.3 161c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L416 75l-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L333.2 122 278 153.3 337.8 255c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-59.7-101.7-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-27.9-47.5-55.2 31.3 59.7 101.7c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L84.9 262.9l-69 39.1C.7 310.7-4.6 329.8 4.2 344.8l79.6 135.6c8.8 15 28.3 20.1 43.5 11.5L624.1 210c15.2-8.6 20.4-27.8 11.6-42.8z" /></svg>
|
|
||||||
</div>
|
|
||||||
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
|
|
||||||
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
|
||||||
{$_('create-a-new-track')}
|
|
||||||
</h3>
|
|
||||||
<div class="mt-2 mb-6">
|
|
||||||
<p class="text-sm text-gray-500">
|
|
||||||
{$_('please-provide-the-required-information-to-add-a-new-track')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6">
|
|
||||||
<label
|
|
||||||
for="trackname"
|
|
||||||
class="block text-sm font-medium text-gray-700">{$_('track-name')}</label>
|
|
||||||
<input
|
|
||||||
use:focus
|
|
||||||
autocomplete="off"
|
|
||||||
placeholder={$_('track-name')}
|
|
||||||
class:border-red-500={isTracknameValid}
|
|
||||||
class:focus:border-red-500={isTracknameValid}
|
|
||||||
class:focus:ring-red-500={isTracknameValid}
|
|
||||||
bind:value={trackname_input_value}
|
|
||||||
bind:this={trackname_input}
|
|
||||||
type="text"
|
|
||||||
name="trackname"
|
|
||||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2" />
|
|
||||||
{#if isTracknameValid}
|
|
||||||
<span
|
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
|
||||||
Track name must not be empty
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="col-span-6">
|
|
||||||
<label
|
|
||||||
for="track_length_m"
|
|
||||||
class="block text-sm font-medium text-gray-700">{$_('track-length-in-m')}</label>
|
|
||||||
<div class="mt-1 flex rounded-md shadow-sm">
|
|
||||||
<input
|
|
||||||
autocomplete="off"
|
|
||||||
class:border-red-500={isTracklengthValid}
|
|
||||||
class:focus:border-red-500={isTracklengthValid}
|
|
||||||
class:focus:ring-red-500={isTracklengthValid}
|
|
||||||
bind:value={tracklength}
|
|
||||||
type="number"
|
|
||||||
name="track_length_m"
|
|
||||||
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full rounded-none rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 p-2"
|
|
||||||
placeholder="1000" />
|
|
||||||
<span
|
|
||||||
class="inline-flex items-center px-3 rounded-r-md border border-gray-300 bg-gray-50 text-gray-500 text-sm">m</span>
|
|
||||||
</div>
|
|
||||||
{#if isTracklengthValid}
|
|
||||||
<span
|
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
|
||||||
Track length must be greater than 0
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="col-span-6">
|
|
||||||
<label
|
|
||||||
for="track_min_duration"
|
|
||||||
class="block text-sm font-medium text-gray-700">{$_('minimum-lap-time-in-s')}</label>
|
|
||||||
<div class="mt-1 flex rounded-md shadow-sm">
|
|
||||||
<input
|
|
||||||
autocomplete="off"
|
|
||||||
class:border-red-500={!trackMintimevalid}
|
|
||||||
class:focus:border-red-500={!trackMintimevalid}
|
|
||||||
class:focus:ring-red-500={!trackMintimevalid}
|
|
||||||
bind:value={track_min_duration}
|
|
||||||
type="number"
|
|
||||||
name="track_min_duration"
|
|
||||||
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full rounded-none rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 p-2"
|
|
||||||
placeholder={smart_track_min_duration_placeholder} />
|
|
||||||
<span
|
|
||||||
class="inline-flex items-center px-3 rounded-r-md border border-gray-300 bg-gray-50 text-gray-500 text-sm">s</span>
|
|
||||||
</div>
|
|
||||||
{#if !trackMintimevalid}
|
|
||||||
<span
|
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
|
||||||
minimum lap time must be a positive number or 0
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
|
|
||||||
<button
|
|
||||||
disabled={!createbtnenabled}
|
|
||||||
class:opacity-50={!createbtnenabled}
|
|
||||||
on:click={submit}
|
|
||||||
type="button"
|
|
||||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
|
||||||
Create
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
modal_open = false;
|
|
||||||
}}
|
|
||||||
type="button"
|
|
||||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
@ -1,75 +0,0 @@
|
|||||||
<script>
|
|
||||||
import Avatars from "./Avatars.svelte";
|
|
||||||
import Badges from "./Badges.svelte";
|
|
||||||
import BreadcrumbNav from "./BreadcrumbNav.svelte";
|
|
||||||
import FileUpload from "./FileUpload.svelte";
|
|
||||||
import Pagination from "./Pagination.svelte";
|
|
||||||
import Table from "./Table.svelte";
|
|
||||||
import Tabs from "./Tabs.svelte";
|
|
||||||
import Tags from "./Tags.svelte";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="border-4 border-dashed rounded h-96 mb-4" />
|
|
||||||
<div class="mb-8">
|
|
||||||
<FileUpload />
|
|
||||||
</div>
|
|
||||||
<div class="mb-8">
|
|
||||||
<Tabs />
|
|
||||||
</div>
|
|
||||||
<div class="mb-8">
|
|
||||||
<Tags />
|
|
||||||
</div>
|
|
||||||
<div class="mb-8">
|
|
||||||
<Badges />
|
|
||||||
</div>
|
|
||||||
<div class="mb-8">
|
|
||||||
<Avatars />
|
|
||||||
</div>
|
|
||||||
<Pagination />
|
|
||||||
<div class="mb-8">
|
|
||||||
<Table />
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="widget w-full p-4 mb-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
|
||||||
<div class="flex flex-row items-center justify-between mb-6">
|
|
||||||
<div class="flex flex-col">
|
|
||||||
<div class="text-sm font-light text-grey-500">Regular</div>
|
|
||||||
<div class="text-sm font-bold"><span>Text inputs</span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex flex-col lg:flex-row lg:flex-wrap w-full lg:space-x-4">
|
|
||||||
<div class="w-full lg:w-1/4">
|
|
||||||
<div class="form-element ">
|
|
||||||
<div class="form-label">Label</div><input
|
|
||||||
name="name"
|
|
||||||
type="text"
|
|
||||||
class="form-input"
|
|
||||||
placeholder="Enter something..." />
|
|
||||||
<div class="form-hint">This is a hint</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="w-full lg:w-1/4">
|
|
||||||
<div class="form-element ">
|
|
||||||
<div class="form-label">First name</div><input
|
|
||||||
name="name"
|
|
||||||
type="text"
|
|
||||||
class="form-input form-input-invalid"
|
|
||||||
placeholder="john@example.com" />
|
|
||||||
<div class="form-error">First name is required</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="w-full lg:w-1/4">
|
|
||||||
<div class="form-element ">
|
|
||||||
<div class="form-label">First name</div><input
|
|
||||||
name="name"
|
|
||||||
type="text"
|
|
||||||
class="form-input form-input-valid"
|
|
||||||
placeholder="john@example.com" />
|
|
||||||
<div class="form-success">First name is valid</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mb-8">
|
|
||||||
<BreadcrumbNav />
|
|
||||||
</div>
|
|
@ -538,7 +538,7 @@
|
|||||||
stroke-linejoin="round" size="18" height="18" width="18" xmlns="http://www.w3.org/2000/svg">
|
stroke-linejoin="round" size="18" height="18" width="18" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
||||||
</svg><span
|
</svg><span
|
||||||
class="absolute uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 items-center justify-center rounded-full bg-blue-500 text-white"
|
class="absolute uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 inline-flex items-center justify-center rounded-full bg-blue-500 text-white"
|
||||||
style="top:14px;right:8px">5</span></button>
|
style="top:14px;right:8px">5</span></button>
|
||||||
<div class="dropdown absolute top-0 right-0 mt-16 ">
|
<div class="dropdown absolute top-0 right-0 mt-16 ">
|
||||||
<div class="dropdown-content w-64 bottom-start">
|
<div class="dropdown-content w-64 bottom-start">
|
||||||
@ -659,7 +659,7 @@
|
|||||||
<div class="relative"><button class="flex h-16 w-8 rounded-full ml-2 relative"><span
|
<div class="relative"><button class="flex h-16 w-8 rounded-full ml-2 relative"><span
|
||||||
class="absolute top-0 left-0 pt-4"><img class="h-8 w-8 rounded-full shadow" src="/images/faces/m1.png"
|
class="absolute top-0 left-0 pt-4"><img class="h-8 w-8 rounded-full shadow" src="/images/faces/m1.png"
|
||||||
alt="avatar"><span
|
alt="avatar"><span
|
||||||
class="absolute uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 items-center justify-center rounded-full bg-red-500 text-white shadow-outline-white"
|
class="absolute uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 inline-flex items-center justify-center rounded-full bg-red-500 text-white shadow-outline-white"
|
||||||
style="top:10px;right:-4px">2</span></span></button>
|
style="top:10px;right:-4px">2</span></span></button>
|
||||||
<div class="dropdown absolute top-0 right-0 mt-16 ">
|
<div class="dropdown absolute top-0 right-0 mt-16 ">
|
||||||
<div class="dropdown-content w-48 bottom-end">
|
<div class="dropdown-content w-48 bottom-end">
|
||||||
@ -672,7 +672,7 @@
|
|||||||
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
|
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
|
||||||
<polyline points="22,6 12,13 2,6"></polyline>
|
<polyline points="22,6 12,13 2,6"></polyline>
|
||||||
</svg><span class="mx-2">Inbox</span><span
|
</svg><span class="mx-2">Inbox</span><span
|
||||||
class="uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 items-center justify-center rounded-full bg-red-500 text-white ml-auto">2</span></a>
|
class="uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 inline-flex items-center justify-center rounded-full bg-red-500 text-white ml-auto">2</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="dropdown-item"><a class="flex flex-row items-center justify-start h-10 w-full px-2"
|
<li class="dropdown-item"><a class="flex flex-row items-center justify-start h-10 w-full px-2"
|
||||||
href="/"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24"
|
href="/"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24"
|
||||||
@ -682,7 +682,7 @@
|
|||||||
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2">
|
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2">
|
||||||
</polygon>
|
</polygon>
|
||||||
</svg><span class="mx-2">Messages</span><span
|
</svg><span class="mx-2">Messages</span><span
|
||||||
class="uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 items-center justify-center rounded-full bg-blue-500 text-white ml-auto">3</span></a>
|
class="uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 inline-flex items-center justify-center rounded-full bg-blue-500 text-white ml-auto">3</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="dropdown-item"><a class="flex flex-row items-center justify-start h-10 w-full px-2"
|
<li class="dropdown-item"><a class="flex flex-row items-center justify-start h-10 w-full px-2"
|
||||||
href="/extras/user-profile"><svg stroke="currentColor" fill="none" stroke-width="2"
|
href="/extras/user-profile"><svg stroke="currentColor" fill="none" stroke-width="2"
|
||||||
|
@ -1,11 +1,20 @@
|
|||||||
<script>
|
<script>
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
import { active } from "tinro";
|
import BreadcrumbNav from "./BreadcrumbNav.svelte";
|
||||||
import localForage from "localforage";
|
import DataTable from "./DataTable.svelte";
|
||||||
import { router } from "tinro";
|
import FileUpload from "./FileUpload.svelte";
|
||||||
|
import Footer from "./Footer.svelte";
|
||||||
|
import FormLayout from "./FormLayout.svelte";
|
||||||
|
import NotFound from "./NotFound.svelte";
|
||||||
|
import Pagination from "./Pagination.svelte";
|
||||||
|
import StatCards from "./StatCards.svelte";
|
||||||
|
import Table from "./Table.svelte";
|
||||||
|
import Tracks from "./Tracks.svelte";
|
||||||
|
import Tabs from "./Tabs.svelte";
|
||||||
|
import Tags from "./Tags.svelte";
|
||||||
|
import Badges from "./Badges.svelte";
|
||||||
|
import Avatars from "./Avatars.svelte";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import NoComponentLoaded from "./NoComponentLoaded.svelte";
|
|
||||||
|
|
||||||
let activePage = "dashboard";
|
let activePage = "dashboard";
|
||||||
let dropdown1 = false;
|
let dropdown1 = false;
|
||||||
@ -26,10 +35,6 @@
|
|||||||
return check;
|
return check;
|
||||||
}
|
}
|
||||||
$: mobile = ismobile();
|
$: mobile = ismobile();
|
||||||
function logout() {
|
|
||||||
localForage.clear();
|
|
||||||
location.replace("/");
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="min-h-screen bg-gray-50">
|
<section class="min-h-screen bg-gray-50">
|
||||||
@ -38,16 +43,16 @@
|
|||||||
class="select-none fixed top-0 left-0 z-20 h-full pb-10 overflow-x-hidden overflow-y-auto transition origin-left transform bg-white border-r w-60 md:translate-x-0">
|
class="select-none fixed top-0 left-0 z-20 h-full pb-10 overflow-x-hidden overflow-y-auto transition origin-left transform bg-white border-r w-60 md:translate-x-0">
|
||||||
<a href="/" class="flex items-center px-4 py-5">
|
<a href="/" class="flex items-center px-4 py-5">
|
||||||
<img
|
<img
|
||||||
src="/lfk-logo.png"
|
src="https://lauf-fuer-kaya.de/Bilder/kaya-logo-quadrat.png"
|
||||||
alt="Logo"
|
alt="Logo"
|
||||||
class="h-10" />
|
class="h-10" />
|
||||||
<h3 class="text-lg">Lauf für Kaya! Admin</h3>
|
<h3 class="text-lg">Lauf für Kaya! Admin</h3>
|
||||||
</a>
|
</a>
|
||||||
<nav class="text-sm font-medium text-gray-600" aria-label="Main Navigation">
|
<nav class="text-sm font-medium text-gray-600" aria-label="Main Navigation">
|
||||||
<a
|
<a
|
||||||
class:bg-gray-100={$router.path === '/'}
|
class:bg-gray-100={activePage === 'dashboard'}
|
||||||
class="flex items-center px-4 py-3 text-gray-900 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
class="flex items-center px-4 py-3 text-gray-900 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||||
href="/">
|
href="#">
|
||||||
<svg
|
<svg
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
@ -56,82 +61,37 @@
|
|||||||
<path
|
<path
|
||||||
d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" />
|
d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>{$_('dashboard-title')}</span>
|
<span>Dashboard</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class:bg-gray-100={$router.path.includes('/orgs/')}
|
class:bg-gray-100={activePage === 'users'}
|
||||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||||
href="/orgs/">
|
href="/#/users/">
|
||||||
<svg
|
<svg
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
||||||
fill="currentColor"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 20 20"
|
||||||
width="24"
|
fill="currentColor">
|
||||||
height="24"><path fill="none" d="M0 0h24v24H0z" />
|
|
||||||
<path
|
<path
|
||||||
d="M17 19h2v-8h-6v8h2v-6h2v6zM3 19V4a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v5h2v10h1v2H2v-2h1zm4-8v2h2v-2H7zm0 4v2h2v-2H7zm0-8v2h2V7H7z" /></svg>
|
d="M5 3a1 1 0 000 2c5.523 0 10 4.477 10 10a1 1 0 102 0C17 8.373 11.627 3 5 3z" />
|
||||||
<span>{$_('orgs')}</span>
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
class:bg-gray-100={$router.path === '/users/'}
|
|
||||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
|
||||||
href="/users/">
|
|
||||||
<svg
|
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
|
||||||
fill="currentColor"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 640 512"><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M610.5 341.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 368.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm224 32c1.9 0 3.7-.5 5.6-.6 8.3-21.7 20.5-42.1 36.3-59.2 7.4-8 17.9-12.6 28.9-12.6 6.9 0 13.7 1.8 19.6 5.3l7.9 4.6c.8-.5 1.6-.9 2.4-1.4 7-14.6 11.2-30.8 11.2-48 0-61.9-50.1-112-112-112S208 82.1 208 144c0 61.9 50.1 112 112 112zm105.2 194.5c-2.3-1.2-4.6-2.6-6.8-3.9-8.2 4.8-15.3 9.8-27.5 9.8-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-10.7-34.5 24.9-49.7 25.8-50.3-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-3.8-2.2-7-5-9.8-8.1-3.3.2-6.5.6-9.8.6-24.6 0-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h255.4c-3.7-6-6.2-12.8-6.2-20.3v-9.2zM173.1 274.6C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z" /></svg>
|
|
||||||
<span>{$_('users')}</span>
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
class:bg-gray-100={$router.path === '/runners/'}
|
|
||||||
class="flex items-center px-4 py-3 text-gray-900 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
|
||||||
href="/runners/">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
|
||||||
fill="currentColor"
|
|
||||||
width="24"
|
|
||||||
height="24"><path fill="none" d="M0 0h24v24H0z" />
|
|
||||||
<path
|
<path
|
||||||
d="M9.83 8.79L8 9.456V13H6V8.05h.015l5.268-1.918c.244-.093.51-.14.782-.131a2.616 2.616 0 0 1 2.427 1.82c.186.583.356.977.51 1.182A4.992 4.992 0 0 0 19 11v2a6.986 6.986 0 0 1-5.402-2.547l-.581 3.297L15 15.67V23h-2v-5.986l-2.05-1.987-.947 4.298-6.894-1.215.348-1.97 4.924.868L9.83 8.79zM13.5 5.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4z" /></svg>
|
d="M4 9a1 1 0 011-1 7 7 0 017 7 1 1 0 11-2 0 5 5 0 00-5-5 1 1 0 01-1-1zM3 15a2 2 0 114 0 2 2 0 01-4 0z" />
|
||||||
<span>{$_('runners')}</span>
|
</svg>
|
||||||
|
<span>Users</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class:bg-gray-100={$router.path === '/teams/'}
|
class:bg-gray-100={activePage === 'runners'}
|
||||||
class="flex items-center px-4 py-3 text-gray-900 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
class="flex items-center px-4 py-3 text-gray-900 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||||
href="/teams/">
|
href="/#/runners/">
|
||||||
<svg
|
<svg
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
||||||
fill="currentColor"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 640 512"><path
|
viewBox="0 0 20 20"
|
||||||
fill="currentColor"
|
fill="currentColor">
|
||||||
d="M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z" /></svg>
|
<path
|
||||||
<span>{$_('teams')}</span>
|
d="M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z" />
|
||||||
</a>
|
</svg>
|
||||||
<a
|
<span>Runners</span>
|
||||||
class:bg-gray-100={$router.path === '/tracks/'}
|
|
||||||
class="flex items-center px-4 py-3 text-gray-900 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
|
||||||
href="/tracks/">
|
|
||||||
<svg
|
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
|
||||||
fill="currentColor"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 640 512"><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M635.7 167.2L556.1 31.7c-8.8-15-28.3-20.1-43.5-11.5l-69 39.1L503.3 161c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L416 75l-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L333.2 122 278 153.3 337.8 255c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-59.7-101.7-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-27.9-47.5-55.2 31.3 59.7 101.7c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L84.9 262.9l-69 39.1C.7 310.7-4.6 329.8 4.2 344.8l79.6 135.6c8.8 15 28.3 20.1 43.5 11.5L624.1 210c15.2-8.6 20.4-27.8 11.6-42.8z" /></svg>
|
|
||||||
<span>{$_('tracks')}</span>
|
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class:bg-gray-100={activePage === 'blub'}
|
class:bg-gray-100={activePage === 'blub'}
|
||||||
@ -152,7 +112,6 @@
|
|||||||
</a>
|
</a>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
tabindex="0"
|
|
||||||
class:bg-gray-100={activePage === 'blub'}
|
class:bg-gray-100={activePage === 'blub'}
|
||||||
class="flex items-center justify-between px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
class="flex items-center justify-between px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||||
role="button"
|
role="button"
|
||||||
@ -172,19 +131,6 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<span>Integrations</span>
|
<span>Integrations</span>
|
||||||
</div>
|
</div>
|
||||||
{#if dropdown1}
|
|
||||||
<svg
|
|
||||||
class="flex-shrink-0 w-4 h-4 ml-2 transition transform"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
style="transform:rotate(90deg)"
|
|
||||||
viewBox="0 0 20 20"
|
|
||||||
fill="currentColor">
|
|
||||||
<path
|
|
||||||
fill-rule="evenodd"
|
|
||||||
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
|
||||||
clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
{:else}
|
|
||||||
<svg
|
<svg
|
||||||
class="flex-shrink-0 w-4 h-4 ml-2 transition transform"
|
class="flex-shrink-0 w-4 h-4 ml-2 transition transform"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
@ -195,7 +141,6 @@
|
|||||||
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||||
clip-rule="evenodd" />
|
clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{#if dropdown1}
|
{#if dropdown1}
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
@ -225,12 +170,12 @@
|
|||||||
clip-rule="evenodd" />
|
clip-rule="evenodd" />
|
||||||
<path d="M9 11H3v5a2 2 0 002 2h4v-7zM11 18h4a2 2 0 002-2v-5h-6v7z" />
|
<path d="M9 11H3v5a2 2 0 002 2h4v-7zM11 18h4a2 2 0 002-2v-5h-6v7z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>{$_('changelog')}</span>
|
<span>Changelog</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class:bg-gray-100={$router.path === '/settings/'}
|
class:bg-gray-100={activePage === 'settings'}
|
||||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||||
href="/settings/">
|
href="/#/settings/">
|
||||||
<svg
|
<svg
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
@ -241,12 +186,11 @@
|
|||||||
d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z"
|
d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z"
|
||||||
clip-rule="evenodd" />
|
clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>{$_('settings')}</span>
|
<span>Settings</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class:bg-gray-100={$router.path === '/about/'}
|
|
||||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||||
href="/about/">
|
href="/#/about/">
|
||||||
<svg
|
<svg
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
@ -257,25 +201,8 @@
|
|||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" />
|
viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" />
|
||||||
<path d="M12 16v-4M12 8h.01" /></svg>
|
<path d="M12 16v-4M12 8h.01" /></svg>
|
||||||
<span>{$_('about')}</span>
|
<span>About</span>
|
||||||
</a>
|
</a>
|
||||||
<span
|
|
||||||
tabindex="0"
|
|
||||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
|
||||||
on:click={() => {
|
|
||||||
logout();
|
|
||||||
}}>
|
|
||||||
<svg
|
|
||||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
|
||||||
fill="currentColor"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z" />
|
|
||||||
<path
|
|
||||||
d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2a9.985 9.985 0 0 1 8 4h-2.71a8 8 0 1 0 .001 12h2.71A9.985 9.985 0 0 1 12 22zm7-6v-3h-8v-2h8V8l5 4-5 4z" /></svg>
|
|
||||||
<span>{$_('logout')}</span>
|
|
||||||
</span>
|
|
||||||
</nav>
|
</nav>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="ml-0 transition md:ml-60">
|
<div class="ml-0 transition md:ml-60">
|
||||||
@ -325,7 +252,7 @@
|
|||||||
d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z" />
|
d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z" />
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
<a href="/profile/" class="ml-4">
|
<a href="/#/profile/" class="ml-4">
|
||||||
<img
|
<img
|
||||||
class="h-8 w-8 rounded-full"
|
class="h-8 w-8 rounded-full"
|
||||||
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||||
@ -333,9 +260,92 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<slot>
|
<div
|
||||||
<NoComponentLoaded />
|
class="p-5 overflow-x-hidden"
|
||||||
</slot>
|
on:click={() => {
|
||||||
|
navOpen = false;
|
||||||
|
}}>
|
||||||
|
<!-- Add content here, remove div below -->
|
||||||
|
<!-- <div class="border-4 border-dashed rounded h-96" /> -->
|
||||||
|
<h1 class="text-3xl leading-tight">
|
||||||
|
<span class="font-bold">Dashboard</span><span> - hello there, <span class="text-blue-500">{store.state.jwtinfo.userdetails.firstname}</span> 👋</span>
|
||||||
|
</h1>
|
||||||
|
<div class="shadow px-6 pt-4 pb-1">
|
||||||
|
<BreadcrumbNav />
|
||||||
|
</div>
|
||||||
|
<StatCards />
|
||||||
|
<div class="mb-8">
|
||||||
|
<FileUpload />
|
||||||
|
</div>
|
||||||
|
<div class="mb-8">
|
||||||
|
<DataTable />
|
||||||
|
</div>
|
||||||
|
<div class="mb-8">
|
||||||
|
<Tabs />
|
||||||
|
</div>
|
||||||
|
<div class="mb-8">
|
||||||
|
<Tags />
|
||||||
|
</div>
|
||||||
|
<div class="mb-8">
|
||||||
|
<Badges />
|
||||||
|
</div>
|
||||||
|
<div class="mb-8">
|
||||||
|
<Avatars />
|
||||||
|
</div>
|
||||||
|
<div class="mb-8">
|
||||||
|
<Tracks />
|
||||||
|
</div>
|
||||||
|
<Pagination />
|
||||||
|
<div class="mb-8">
|
||||||
|
<Table />
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="widget w-full p-4 mb-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
||||||
|
<div class="flex flex-row items-center justify-between mb-6">
|
||||||
|
<div class="flex flex-col">
|
||||||
|
<div class="text-sm font-light text-grey-500">Regular</div>
|
||||||
|
<div class="text-sm font-bold"><span>Text inputs</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col lg:flex-row lg:flex-wrap w-full lg:space-x-4">
|
||||||
|
<div class="w-full lg:w-1/4">
|
||||||
|
<div class="form-element ">
|
||||||
|
<div class="form-label">Label</div><input
|
||||||
|
name="name"
|
||||||
|
type="text"
|
||||||
|
class="form-input"
|
||||||
|
placeholder="Enter something..." />
|
||||||
|
<div class="form-hint">This is a hint</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="w-full lg:w-1/4">
|
||||||
|
<div class="form-element ">
|
||||||
|
<div class="form-label">First name</div><input
|
||||||
|
name="name"
|
||||||
|
type="text"
|
||||||
|
class="form-input form-input-invalid"
|
||||||
|
placeholder="john@example.com" />
|
||||||
|
<div class="form-error">First name is required</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="w-full lg:w-1/4">
|
||||||
|
<div class="form-element ">
|
||||||
|
<div class="form-label">First name</div><input
|
||||||
|
name="name"
|
||||||
|
type="text"
|
||||||
|
class="form-input form-input-valid"
|
||||||
|
placeholder="john@example.com" />
|
||||||
|
<div class="form-success">First name is valid</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-8">
|
||||||
|
<FormLayout />
|
||||||
|
</div>
|
||||||
|
<Footer />
|
||||||
|
<!-- <NotFound /> -->
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Sidebar Backdrop -->
|
<!-- Sidebar Backdrop -->
|
||||||
<div
|
<div
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
// the name to use for the internal file input
|
// the name to use for the internal file input
|
||||||
let name = "filepond";
|
let name = "filepond";
|
||||||
function handleInit() {
|
function handleInit() {
|
||||||
// console.log("FilePond has initialised");
|
console.log("FilePond has initialised");
|
||||||
}
|
}
|
||||||
function handleAddFile(err, fileItem) {
|
function handleAddFile(err, fileItem) {
|
||||||
// console.log("A file has been added", fileItem);
|
console.log("A file has been added", fileItem);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@
|
|||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<footer class="container">
|
<footer class="block py-4">
|
||||||
<hr class="mt-2 mb-4 border-b-1 border-gray-300" />
|
<div class="container mx-auto px-4">
|
||||||
|
<hr class="mb-4 border-b-1 border-gray-300" />
|
||||||
|
<footer class="text-gray-700 body-font">
|
||||||
|
<div class="container mx-auto flex items-center sm:flex-row flex-col">
|
||||||
<p class="text-sm text-gray-500 mt-4">
|
<p class="text-sm text-gray-500 mt-4">
|
||||||
Lauf für Kaya! Läufersystem - Copyright © 2020 + proudly powered by
|
Lauf für Kaya! Läufersystem - Copyright © 2020 + proudly powered by
|
||||||
<a
|
<a
|
||||||
@ -12,4 +15,7 @@
|
|||||||
rel="noopener,noreferrer"
|
rel="noopener,noreferrer"
|
||||||
target="_blank">ODIT.Services</a>
|
target="_blank">ODIT.Services</a>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -1,31 +1,27 @@
|
|||||||
<script>
|
<script>
|
||||||
import { ApiError, AuthService } from "@odit/lfk-client-js";
|
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
import Toastify from "toastify-js";
|
import store from "../store.js";
|
||||||
import "toastify-js/src/toastify.css";
|
store.init();
|
||||||
|
import { push, pop, replace } from "svelte-spa-router";
|
||||||
|
//
|
||||||
|
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
||||||
import isEmail from "validator/es/lib/isEmail";
|
import isEmail from "validator/es/lib/isEmail";
|
||||||
|
|
||||||
|
//
|
||||||
|
import Toastify from "toastify-js";
|
||||||
|
import "toastify-js/src/toastify.css";
|
||||||
let reset_mail_sent = false;
|
let reset_mail_sent = false;
|
||||||
let usersEmail = "";
|
let usersEmail = "";
|
||||||
function reset() {
|
function reset() {
|
||||||
if (isEmail(usersEmail)) {
|
if (isEmail(usersEmail)) {
|
||||||
AuthService.authControllerGetResetToken({ email: usersEmail })
|
|
||||||
.then((resp) => {
|
|
||||||
console.log(resp);
|
|
||||||
console.log(resp.resetToken);
|
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_("mail-validation-in-progress"),
|
text: $_("mail-validation-in-progress"),
|
||||||
duration: 3500,
|
duration: 3500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
reset_mail_sent = true;
|
reset_mail_sent = true;
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err.body.name);
|
|
||||||
console.log(err.body.message);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_("invalid-mail-reset"),
|
text: $_('invalid-mail-reset'),
|
||||||
duration: 3500,
|
duration: 3500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
}
|
}
|
||||||
@ -35,7 +31,11 @@
|
|||||||
{#if reset_mail_sent}
|
{#if reset_mail_sent}
|
||||||
<div class="min-h-screen flex items-center justify-center bg-gray-100">
|
<div class="min-h-screen flex items-center justify-center bg-gray-100">
|
||||||
<div class="max-w-md w-full py-12 px-6">
|
<div class="max-w-md w-full py-12 px-6">
|
||||||
<img style="height:10rem;" class="mx-auto" src="/lfk-logo.png" alt="" />
|
<img
|
||||||
|
style="height:10rem;"
|
||||||
|
class="mx-auto"
|
||||||
|
src="https://lauf-fuer-kaya.de/Bilder/kaya-logo-quadrat.png"
|
||||||
|
alt="" />
|
||||||
<p class="mt-6 text-lg text-center font-bold text-gray-900">
|
<p class="mt-6 text-lg text-center font-bold text-gray-900">
|
||||||
{$_('application_name')}
|
{$_('application_name')}
|
||||||
</p>
|
</p>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
<a
|
<a
|
||||||
href="/"
|
href="/#/"
|
||||||
class="block w-full text-center py-2 px-3 border border-gray-300 rounded-md text-gray-900 font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm">
|
class="block w-full text-center py-2 px-3 border border-gray-300 rounded-md text-gray-900 font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm">
|
||||||
{$_('goback')}
|
{$_('goback')}
|
||||||
</a>
|
</a>
|
||||||
@ -58,7 +58,11 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<div class="min-h-screen flex items-center justify-center bg-gray-100">
|
<div class="min-h-screen flex items-center justify-center bg-gray-100">
|
||||||
<div class="max-w-md w-full py-12 px-6">
|
<div class="max-w-md w-full py-12 px-6">
|
||||||
<img style="height:10rem;" class="mx-auto" src="/lfk-logo.png" alt="" />
|
<img
|
||||||
|
style="height:10rem;"
|
||||||
|
class="mx-auto"
|
||||||
|
src="https://lauf-fuer-kaya.de/Bilder/kaya-logo-quadrat.png"
|
||||||
|
alt="" />
|
||||||
<p class="mt-6 text-lg text-center font-bold text-gray-900">
|
<p class="mt-6 text-lg text-center font-bold text-gray-900">
|
||||||
{$_('application_name')}
|
{$_('application_name')}
|
||||||
</p>
|
</p>
|
||||||
@ -121,11 +125,6 @@
|
|||||||
{$_('send-a-mail-to-lfk-odit-services')}
|
{$_('send-a-mail-to-lfk-odit-services')}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6">
|
|
||||||
<a
|
|
||||||
href="/"
|
|
||||||
class="block w-full text-center py-2 px-3 border border-gray-300 rounded-md text-gray-900 font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm">{$_('goback')}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,7 +55,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
|
||||||
<label class="block text-sm font-medium text-gray-700">
|
<label class="block text-sm font-medium text-gray-700">
|
||||||
Photo
|
Photo
|
||||||
</label>
|
</label>
|
||||||
@ -72,7 +71,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
|
||||||
<label class="block text-sm font-medium text-gray-700">
|
<label class="block text-sm font-medium text-gray-700">
|
||||||
Cover photo
|
Cover photo
|
||||||
</label>
|
</label>
|
||||||
|
@ -3,11 +3,14 @@
|
|||||||
import localForage from "localforage";
|
import localForage from "localforage";
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
store.init();
|
store.init();
|
||||||
|
import { push, pop, replace } from "svelte-spa-router";
|
||||||
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
||||||
|
OpenAPI.BASE = config.baseurl;
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
|
import "toastify-js/src/toastify.css";
|
||||||
// ------
|
// ------
|
||||||
let username = "demo";
|
let usersUsername;
|
||||||
let password = "demo";
|
let usersPassword = "";
|
||||||
let is_blocked_by_autologin = false;
|
let is_blocked_by_autologin = false;
|
||||||
let last_loginclick_processed = true;
|
let last_loginclick_processed = true;
|
||||||
|
|
||||||
@ -18,6 +21,7 @@
|
|||||||
OpenAPI.TOKEN = value.access_token;
|
OpenAPI.TOKEN = value.access_token;
|
||||||
const jwtinfo = JSON.parse(atob(OpenAPI.TOKEN.split(".")[1]));
|
const jwtinfo = JSON.parse(atob(OpenAPI.TOKEN.split(".")[1]));
|
||||||
store.login(value.access_token, jwtinfo);
|
store.login(value.access_token, jwtinfo);
|
||||||
|
replace("/dashboard/");
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_("welcome_wavinghand"),
|
text: $_("welcome_wavinghand"),
|
||||||
duration: 500,
|
duration: 500,
|
||||||
@ -35,6 +39,14 @@
|
|||||||
text: $_("login_is_checked"),
|
text: $_("login_is_checked"),
|
||||||
duration: 500,
|
duration: 500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
|
let username = usersUsername;
|
||||||
|
let password = usersPassword;
|
||||||
|
// if ((usersUsername + "").length == 0) {
|
||||||
|
username = config.fallback_username || "demo";
|
||||||
|
// }
|
||||||
|
// if ((usersPassword + "").length == 0) {
|
||||||
|
password = config.fallback_password || "demo";
|
||||||
|
// }
|
||||||
AuthService.authControllerLogin({
|
AuthService.authControllerLogin({
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
@ -44,7 +56,7 @@
|
|||||||
OpenAPI.TOKEN = result.access_token;
|
OpenAPI.TOKEN = result.access_token;
|
||||||
const jwtinfo = JSON.parse(atob(OpenAPI.TOKEN.split(".")[1]));
|
const jwtinfo = JSON.parse(atob(OpenAPI.TOKEN.split(".")[1]));
|
||||||
store.login(result.access_token, jwtinfo);
|
store.login(result.access_token, jwtinfo);
|
||||||
location.replace("/");
|
replace("/dashboard/");
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_("welcome_wavinghand"),
|
text: $_("welcome_wavinghand"),
|
||||||
duration: 500,
|
duration: 500,
|
||||||
@ -81,8 +93,12 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
class="min-h-screen flex items-center justify-center bg-gray-100 text-gray-900">
|
class="min-h-screen flex items-center justify-center bg-gray-100 text-gray-900">
|
||||||
<div class="max-w-md w-full py-12 px-6" role="main">
|
<div class="max-w-md w-full py-12 px-6">
|
||||||
<img style="height:10rem;" class="mx-auto" src="/lfk-logo.png" alt="" />
|
<img
|
||||||
|
style="height:10rem;"
|
||||||
|
class="mx-auto"
|
||||||
|
src="https://lauf-fuer-kaya.de/Bilder/kaya-logo-quadrat.png"
|
||||||
|
alt="" />
|
||||||
<p class="mt-6 text-lg text-center font-bold">{$_('application_name')}</p>
|
<p class="mt-6 text-lg text-center font-bold">{$_('application_name')}</p>
|
||||||
<p class="mt-6 text-sm text-center">{$_('log_in_to_your_account')}</p>
|
<p class="mt-6 text-sm text-center">{$_('log_in_to_your_account')}</p>
|
||||||
<div>
|
<div>
|
||||||
@ -97,14 +113,14 @@
|
|||||||
class="border-gray-300 placeholder-gray-500 appearance-none rounded-none relative block w-full px-3 py-2 border rounded-t-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
class="border-gray-300 placeholder-gray-500 appearance-none rounded-none relative block w-full px-3 py-2 border rounded-t-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
||||||
on:keydown={handleKeydown}
|
on:keydown={handleKeydown}
|
||||||
placeholder={$_('email_address_or_username')}
|
placeholder={$_('email_address_or_username')}
|
||||||
bind:value={username} />
|
bind:value={usersUsername} />
|
||||||
</div>
|
</div>
|
||||||
<div class="-mt-px relative">
|
<div class="-mt-px relative">
|
||||||
<input
|
<input
|
||||||
aria-label={$_('password')}
|
aria-label={$_('password')}
|
||||||
type="password"
|
type="password"
|
||||||
required=""
|
required=""
|
||||||
bind:value={password}
|
bind:value={usersPassword}
|
||||||
class="border-gray-300 placeholder-gray-500 appearance-none rounded-none relative block w-full px-3 py-2 border rounded-b-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
class="border-gray-300 placeholder-gray-500 appearance-none rounded-none relative block w-full px-3 py-2 border rounded-b-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
||||||
on:keydown={handleKeydown}
|
on:keydown={handleKeydown}
|
||||||
placeholder={$_('password')} />
|
placeholder={$_('password')} />
|
||||||
@ -133,7 +149,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<a
|
<a
|
||||||
href="/forgot_password"
|
href="/#/forgot_password"
|
||||||
class="block w-full text-center py-2 px-3 border border-gray-300 rounded-md font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm">
|
class="block w-full text-center py-2 px-3 border border-gray-300 rounded-md font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm">
|
||||||
{$_('forgot_password?')}
|
{$_('forgot_password?')}
|
||||||
</a>
|
</a>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<img
|
<img
|
||||||
class="mx-auto h-12 w-auto"
|
class="mx-auto h-12 w-auto"
|
||||||
src="/lfk-logo.png"
|
src="https://lauf-fuer-kaya.de/Bilder/kaya-logo-quadrat.png"
|
||||||
alt="" />
|
alt="" />
|
||||||
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
|
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
|
||||||
Sign in to your account
|
Sign in to your account
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
import StatCards from "./StatCards.svelte";
|
|
||||||
import store from "../store";
|
|
||||||
import ComponentDump from "./ComponentDump.svelte";
|
|
||||||
let navOpen = false;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="p-5 overflow-x-hidden"
|
|
||||||
on:click={() => {
|
|
||||||
navOpen = false;
|
|
||||||
}}>
|
|
||||||
<!-- <div class="border-4 border-dashed rounded h-96" /> -->
|
|
||||||
<h1 class="text-3xl leading-tight">
|
|
||||||
<span class="font-extrabold">{$_('dashboard-title')}</span> <span>
|
|
||||||
-
|
|
||||||
{$_('dashboard-greeting')},
|
|
||||||
<span
|
|
||||||
class="text-blue-500">{store.state.jwtinfo.userdetails.firstname}</span>
|
|
||||||
👋</span>
|
|
||||||
</h1>
|
|
||||||
<StatCards />
|
|
||||||
<ComponentDump />
|
|
||||||
</div>
|
|
@ -1,23 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<body class="antialiased font-sans">
|
|
||||||
<div class="flex min-h-screen">
|
|
||||||
<div class="w-full bg-white flex items-center justify-center ">
|
|
||||||
<div class="max-w-sm m-8">
|
|
||||||
<div class="text-black text-5xl md:text-15xl font-black">
|
|
||||||
Internal Error
|
|
||||||
</div>
|
|
||||||
<div class="w-16 h-1 bg-purple-light my-3 md:my-6" />
|
|
||||||
<p
|
|
||||||
class="text-grey-darker text-2xl md:text-3xl font-light mb-8 leading-normal">
|
|
||||||
Something went wrong in the UI logic
|
|
||||||
</p>
|
|
||||||
<a
|
|
||||||
href="/"
|
|
||||||
class="bg-transparent text-grey-darkest font-bold uppercase tracking-wide py-3 px-6 border-2 border-grey-light hover:border-grey rounded-lg">{$_('goback')}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
@ -1,83 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let params;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<section class="container p-5">
|
|
||||||
<span class="mb-1 text-3xl font-extrabold leading-tight text-gray-900">
|
|
||||||
Orgs
|
|
||||||
</span>
|
|
||||||
<p class="mb-8 text-lg text-gray-500">
|
|
||||||
configure the tracks & minimum lap times
|
|
||||||
</p>
|
|
||||||
<div class="flex flex-row mb-4">
|
|
||||||
<div class="w-full">
|
|
||||||
<nav class="w-full flex">
|
|
||||||
<ol class="list-none flex flex-row items-center justify-start">
|
|
||||||
<li class="mr-2 flex items-center">
|
|
||||||
<svg
|
|
||||||
stroke="currentColor"
|
|
||||||
fill="none"
|
|
||||||
stroke-width="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="h-3 w-3 stroke-current"
|
|
||||||
height="1em"
|
|
||||||
width="1em"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"><path
|
|
||||||
d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
|
|
||||||
<polyline points="9 22 9 12 15 12 15 22" /></svg>
|
|
||||||
</li>
|
|
||||||
<li class="flex items-center">
|
|
||||||
<a class="mr-2" href="/">Home</a><svg
|
|
||||||
stroke="currentColor"
|
|
||||||
fill="none"
|
|
||||||
stroke-width="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="h-3 w-3 mr-2 stroke-current"
|
|
||||||
height="1em"
|
|
||||||
width="1em"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"><line
|
|
||||||
x1="5"
|
|
||||||
y1="12"
|
|
||||||
x2="19"
|
|
||||||
y2="12" />
|
|
||||||
<polyline points="12 5 19 12 12 19" /></svg>
|
|
||||||
</li>
|
|
||||||
<li class="mr-2 flex items-center">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
width="24"
|
|
||||||
height="24"><path fill="none" d="M0 0h24v24H0z" />
|
|
||||||
<path
|
|
||||||
d="M21 20h2v2H1v-2h2V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v17zm-2 0V4H5v16h14zM8 11h3v2H8v-2zm0-4h3v2H8V7zm0 8h3v2H8v-2zm5 0h3v2h-3v-2zm0-4h3v2h-3v-2zm0-4h3v2h-3V7z" /></svg>
|
|
||||||
</li>
|
|
||||||
<li class="flex items-center">
|
|
||||||
<a class="mr-2" href="./">Orgs</a><svg
|
|
||||||
stroke="currentColor"
|
|
||||||
fill="none"
|
|
||||||
stroke-width="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="h-3 w-3 mr-2 stroke-current"
|
|
||||||
height="1em"
|
|
||||||
width="1em"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"><line
|
|
||||||
x1="5"
|
|
||||||
y1="12"
|
|
||||||
x2="19"
|
|
||||||
y2="12" />
|
|
||||||
<polyline points="12 5 19 12 12 19" /></svg>
|
|
||||||
</li>
|
|
||||||
<li class="flex items-center">
|
|
||||||
<span class="mr-2">Org-Details #{params.orgid}</span>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
@ -1,13 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<section class="container p-5">
|
|
||||||
<span class="mb-1 text-3xl font-extrabold leading-tight text-gray-900">
|
|
||||||
Orgs
|
|
||||||
</span>
|
|
||||||
<p class="mb-8 text-lg text-gray-500">
|
|
||||||
add, delete, edit organizations
|
|
||||||
</p>
|
|
||||||
<nav><a class="underline" href="./1">Org 1</a></nav>
|
|
||||||
</section>
|
|
@ -1,10 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<section class="container p-5">
|
|
||||||
<span class="mb-1 text-3xl font-extrabold leading-tight text-gray-900">
|
|
||||||
{$_('runners')}
|
|
||||||
</span>
|
|
||||||
<p class="mb-8 text-lg text-gray-500">läuft bei ihnen</p>
|
|
||||||
</section>
|
|
@ -1,35 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
import FormLayout from "./FormLayout.svelte";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="pt-12 px-4 sm:px-6 lg:px-8 lg:pt-20 bg-gray-900 pb-12">
|
|
||||||
<div class="text-center mb-8">
|
|
||||||
<h1
|
|
||||||
class="mt-9 font-display text-4xl leading-none font-semibold text-white sm:text-5xl lg:text-6xl">
|
|
||||||
🔨<br />{$_('settings')}
|
|
||||||
</h1>
|
|
||||||
<p
|
|
||||||
class="mt-2 max-w-xl mx-auto text-xl lg:max-w-3xl lg:text-2xl text-gray-300">
|
|
||||||
<span class="text-lg">configure your profile however you want</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pt-0 pb-16 bg-gray-50 overflow-hidden lg:pt-12 lg:py-24">
|
|
||||||
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
|
||||||
<!-- <h2 class="text-4xl font-display font-semibold text-gray-900 md:text-5xl">
|
|
||||||
General
|
|
||||||
</h2> -->
|
|
||||||
<div
|
|
||||||
class="max-w-3xl mx-auto text-xl leading-8 font-medium text-gray-900 mb-16">
|
|
||||||
<p class="text-center">
|
|
||||||
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Temporibus et
|
|
||||||
amet voluptate nulla accusantium vero blanditiis nobis facere veritatis.
|
|
||||||
Impedit deserunt saepe aliquid unde consequuntur officia consequatur
|
|
||||||
fugit iusto dolorem?
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<FormLayout />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,22 +1,25 @@
|
|||||||
<script>
|
<script>
|
||||||
import { StatsService } from "@odit/lfk-client-js";
|
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
|
import { TrackService, StatsService } from "@odit/lfk-client-js";
|
||||||
const stats_promise = StatsService.statsControllerGet();
|
const stats_promise = StatsService.statsControllerGet();
|
||||||
|
stats_promise.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<h1>{$_('general-stats')}</h1>
|
<h1>Allgemeine Statistiken</h1>
|
||||||
{#await stats_promise}
|
{#await stats_promise}
|
||||||
<div
|
<div
|
||||||
class="bg-teal-lightest border-t-4 border-teal rounded-b text-teal-darkest px-4 py-3 shadow-md my-2"
|
class="bg-teal-lightest border-t-4 border-teal rounded-b text-teal-darkest px-4 py-3 shadow-md my-2"
|
||||||
role="alert">
|
role="alert">
|
||||||
<p class="font-bold">{$_('stats-are-being-loaded')}</p>
|
<p class="font-bold">stats are being loaded...</p>
|
||||||
<p class="text-sm">{$_('this-might-take-a-moment')}</p>
|
<p class="text-sm">This might take a moment 👀</p>
|
||||||
</div>
|
</div>
|
||||||
{:then stats}
|
{:then stats}
|
||||||
<div
|
<div
|
||||||
class="flex flex-col lg:flex-row w-full lg:space-x-2 space-y-2 lg:space-y-0 mb-2 lg:mb-4">
|
class="flex flex-col lg:flex-row w-full lg:space-x-2 space-y-2 lg:space-y-0 mb-2 lg:mb-4">
|
||||||
<a href="/runners/" class="w-full lg:w-1/4">
|
<div class="w-full lg:w-1/4">
|
||||||
<div
|
<div
|
||||||
class="widget w-full p-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
class="widget w-full p-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
||||||
<div class="flex flex-row items-center justify-between">
|
<div class="flex flex-row items-center justify-between">
|
||||||
@ -35,7 +38,7 @@
|
|||||||
d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z" /></svg>
|
d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z" /></svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
<div class="w-full lg:w-1/4">
|
<div class="w-full lg:w-1/4">
|
||||||
<div
|
<div
|
||||||
class="widget w-full p-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
class="widget w-full p-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
||||||
@ -100,7 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="/teams/" class="w-full lg:w-1/4">
|
<div class="w-full lg:w-1/4">
|
||||||
<div
|
<div
|
||||||
class="widget w-full p-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
class="widget w-full p-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
||||||
<div class="flex flex-row items-center justify-between">
|
<div class="flex flex-row items-center justify-between">
|
||||||
@ -128,8 +131,8 @@
|
|||||||
<path d="M16 3.13a4 4 0 0 1 0 7.75" /></svg>
|
<path d="M16 3.13a4 4 0 0 1 0 7.75" /></svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
<a href="/orgs/" class="w-full lg:w-1/4">
|
<div class="w-full lg:w-1/4">
|
||||||
<div
|
<div
|
||||||
class="widget w-full p-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
class="widget w-full p-4 rounded-lg bg-white border border-grey-100 dark:bg-grey-895 dark:border-grey-890">
|
||||||
<div class="flex flex-row items-center justify-between">
|
<div class="flex flex-row items-center justify-between">
|
||||||
@ -148,7 +151,7 @@
|
|||||||
d="M17 11V3H7v4H3v14h8v-4h2v4h8V11h-4zM7 19H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm4 4H9v-2h2v2zm0-4H9V9h2v2zm0-4H9V5h2v2zm4 8h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm4 12h-2v-2h2v2zm0-4h-2v-2h2v2z" /></svg>
|
d="M17 11V3H7v4H3v14h8v-4h2v4h8V11h-4zM7 19H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm4 4H9v-2h2v2zm0-4H9V9h2v2zm0-4H9V5h2v2zm4 8h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm4 12h-2v-2h2v2zm0-4h-2v-2h2v2z" /></svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:catch error}
|
{:catch error}
|
||||||
<div class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500">
|
<div class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500">
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<section class="container p-5">
|
|
||||||
<span class="mb-1 text-3xl font-extrabold leading-tight text-gray-900">
|
|
||||||
{$_('teams')}
|
|
||||||
</span>
|
|
||||||
<p class="mb-8 text-lg text-gray-500">everything is more fun together 🏃♂️🏃♀️🏃♂️</p>
|
|
||||||
</section>
|
|
@ -1,184 +1,29 @@
|
|||||||
<script>
|
<script>
|
||||||
import { _, json } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
import Toastify from "toastify-js";
|
import store from "../store.js";
|
||||||
import TracksEmptyState from "./TracksEmptyState.svelte";
|
|
||||||
import { TrackService } from "@odit/lfk-client-js";
|
import { TrackService } from "@odit/lfk-client-js";
|
||||||
const tracks_promise = TrackService.trackControllerGetAll();
|
let tracks_promise = TrackService.trackControllerGetAll();
|
||||||
import { getlang } from "./datatable_i18n";
|
|
||||||
import { Grid, html } from "gridjs";
|
|
||||||
import "gridjs/dist/theme/mermaid.css";
|
|
||||||
import { tracks as tracksstore } from "../store.js";
|
|
||||||
$: trackscache = [];
|
|
||||||
$: blocked = [];
|
|
||||||
let table;
|
|
||||||
let datatable;
|
|
||||||
let datatable_inited = false;
|
|
||||||
tracksstore.subscribe((val) => {
|
|
||||||
trackscache = val;
|
|
||||||
setTimeout(() => {
|
|
||||||
if (val.length > 0) {
|
|
||||||
renderdatatable();
|
|
||||||
}
|
|
||||||
}, 100);
|
|
||||||
});
|
|
||||||
tracks_promise.then((data) => {
|
|
||||||
tracksstore.set(data);
|
|
||||||
});
|
|
||||||
window.track__edit_cancel = () => renderdatatable();
|
|
||||||
window.track__edit_save = () => {
|
|
||||||
const trackid = parseInt(window.event.target.getAttribute("data-trackid"));
|
|
||||||
if (blocked.includes(trackid)) {
|
|
||||||
//
|
|
||||||
} else {
|
|
||||||
blocked.push(trackid);
|
|
||||||
const elem = document.querySelector(
|
|
||||||
`[data-id="triggered_table_actions_${trackid}"]`
|
|
||||||
).parentNode.parentNode.parentNode;
|
|
||||||
Toastify({
|
|
||||||
text: "Track is being updated...",
|
|
||||||
duration: 500,
|
|
||||||
}).showToast();
|
|
||||||
TrackService.trackControllerPut(trackid, {
|
|
||||||
id: trackid,
|
|
||||||
name: elem.childNodes[0].childNodes[0].value,
|
|
||||||
distance: parseInt(elem.childNodes[1].childNodes[0].value),
|
|
||||||
minimumLapTime: parseInt(elem.childNodes[2].childNodes[0].value),
|
|
||||||
})
|
|
||||||
.then((r) => {
|
|
||||||
Toastify({
|
|
||||||
text: "Track was updated!",
|
|
||||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
|
||||||
duration: 1000,
|
|
||||||
}).showToast();
|
|
||||||
blocked = blocked.filter((e) => e !== trackid);
|
|
||||||
document
|
|
||||||
.querySelector(`[data-id="default_table_actions_${trackid}"]`)
|
|
||||||
.classList.remove("hidden");
|
|
||||||
document
|
|
||||||
.querySelector(`[data-id="triggered_table_actions_${trackid}"]`)
|
|
||||||
.classList.add("hidden");
|
|
||||||
//
|
|
||||||
elem.childNodes[0].innerHTML = `<td data-column-id="trackName" class="gridjs-td">${elem.childNodes[0].childNodes[0].value}</td>`;
|
|
||||||
elem.childNodes[1].innerHTML = `<td data-column-id="trackName" class="gridjs-td">${elem.childNodes[1].childNodes[0].value}</td>`;
|
|
||||||
elem.childNodes[2].innerHTML = `<td data-column-id="trackName" class="gridjs-td">${elem.childNodes[2].childNodes[0].value}</td>`;
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
window.track__delete_handler = () => {
|
|
||||||
const trackid = parseInt(window.event.target.getAttribute("data-trackid"));
|
|
||||||
document
|
|
||||||
.querySelector(`[data-id="default_table_actions_${trackid}"]`)
|
|
||||||
.classList.add("hidden");
|
|
||||||
document
|
|
||||||
.querySelector(`[data-id="deleteconfirmation_table_actions_${trackid}"]`)
|
|
||||||
.classList.remove("hidden");
|
|
||||||
};
|
|
||||||
window.track__delete_cancel = () => {
|
|
||||||
const trackid = parseInt(window.event.target.getAttribute("data-trackid"));
|
|
||||||
document
|
|
||||||
.querySelector(`[data-id="default_table_actions_${trackid}"]`)
|
|
||||||
.classList.remove("hidden");
|
|
||||||
document
|
|
||||||
.querySelector(`[data-id="deleteconfirmation_table_actions_${trackid}"]`)
|
|
||||||
.classList.add("hidden");
|
|
||||||
};
|
|
||||||
window.track__delete_confirm = () => {
|
|
||||||
const trackid = parseInt(window.event.target.getAttribute("data-trackid"));
|
|
||||||
TrackService.trackControllerRemove(trackid)
|
|
||||||
.then(() => {
|
|
||||||
const newStoreVal = trackscache.filter((obj) => obj.id !== trackid);
|
|
||||||
tracksstore.set(newStoreVal);
|
|
||||||
renderdatatable();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
window.track__edit_handler = () => {
|
|
||||||
const trackid = parseInt(window.event.target.getAttribute("data-trackid"));
|
|
||||||
document
|
|
||||||
.querySelector(`[data-id="default_table_actions_${trackid}"]`)
|
|
||||||
.classList.add("hidden");
|
|
||||||
document
|
|
||||||
.querySelector(`[data-id="triggered_table_actions_${trackid}"]`)
|
|
||||||
.classList.remove("hidden");
|
|
||||||
const elem = document.querySelector(
|
|
||||||
`[data-id="triggered_table_actions_${trackid}"]`
|
|
||||||
).parentNode.parentNode.parentNode;
|
|
||||||
const trackname = elem.childNodes[0].textContent;
|
|
||||||
const tracklength = parseInt(elem.childNodes[1].textContent);
|
|
||||||
const trackmintime = parseInt(elem.childNodes[2].textContent);
|
|
||||||
elem.childNodes[0].innerHTML = `<input type="text" value="${trackname}" name="trackname" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2">`;
|
|
||||||
elem.childNodes[1].innerHTML = `<input type="text" value="${tracklength}" name="tracklength" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2">`;
|
|
||||||
elem.childNodes[2].innerHTML = `<input type="text" value="${trackmintime}" name="trackmintime" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2">`;
|
|
||||||
};
|
|
||||||
//
|
|
||||||
function renderdatatable() {
|
|
||||||
let tabledata = [];
|
|
||||||
trackscache.forEach((track) => {
|
|
||||||
tabledata.push([
|
|
||||||
track.name,
|
|
||||||
track.distance,
|
|
||||||
track.minimumLapTime || 0,
|
|
||||||
html(`
|
|
||||||
<div class="hidden" data-id="triggered_table_actions_${track.id}">
|
|
||||||
<button class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-green-400 text-base font-medium text-white sm:w-auto sm:text-sm" data-trackid="${track.id}" onclick="track__edit_save()">Save</button>
|
|
||||||
<button class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-500 text-base font-medium text-white sm:w-auto sm:text-sm" data-trackid="${track.id}" onclick="track__edit_cancel()">Cancel</button>
|
|
||||||
</div>
|
|
||||||
<div data-id="default_table_actions_${track.id}">
|
|
||||||
<button class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-gray-400 text-base font-medium text-white sm:w-auto sm:text-sm" data-trackid="${track.id}" onclick="track__edit_handler()">Edit</button>
|
|
||||||
<button class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-500 text-base font-medium text-white sm:w-auto sm:text-sm" data-trackid="${track.id}" onclick="track__delete_handler()">Delete</button>
|
|
||||||
</div>
|
|
||||||
<div class="hidden" data-id="deleteconfirmation_table_actions_${track.id}">
|
|
||||||
<button class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-gray-400 text-base font-medium text-white sm:w-auto sm:text-sm" data-trackid="${track.id}" onclick="track__delete_cancel()">Cancel</button>
|
|
||||||
<button class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-500 text-base font-medium text-white sm:w-auto sm:text-sm" data-trackid="${track.id}" onclick="track__delete_confirm()">Confirm</button>
|
|
||||||
</div>
|
|
||||||
`),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (datatable_inited === false) {
|
|
||||||
datatable = new Grid({
|
|
||||||
columns: [
|
|
||||||
$_("track-name"),
|
|
||||||
$_("track-length-in-m"),
|
|
||||||
$_("minimum-lap-time-in-s"),
|
|
||||||
$_("action"),
|
|
||||||
],
|
|
||||||
language: getlang($json("datatable")),
|
|
||||||
sort: true,
|
|
||||||
search: { enabled: true },
|
|
||||||
data: tabledata,
|
|
||||||
pagination: {
|
|
||||||
enabled: true,
|
|
||||||
limit: 25,
|
|
||||||
summary: false,
|
|
||||||
},
|
|
||||||
}).render(table);
|
|
||||||
datatable_inited = true;
|
|
||||||
} else {
|
|
||||||
datatable.updateConfig({ data: tabledata }).forceRender();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if trackscache.length > 0}
|
<h1>{$_('tracks')}</h1>
|
||||||
<div bind:this={table} />
|
|
||||||
{/if}
|
|
||||||
{#await tracks_promise}
|
{#await tracks_promise}
|
||||||
<div
|
<div
|
||||||
class="bg-teal-lightest border-t-4 border-teal rounded-b text-teal-darkest px-4 py-3 shadow-md my-2"
|
class="bg-teal-lightest border-t-4 border-teal rounded-b text-teal-darkest px-4 py-3 shadow-md my-2"
|
||||||
role="alert">
|
role="alert">
|
||||||
<p class="font-bold">{$_('track-data-is-being-loaded')}</p>
|
<p class="font-bold">track data is being loaded...</p>
|
||||||
<p class="text-sm">{$_('this-might-take-a-moment')}</p>
|
<p class="text-sm">This might take a moment 👀</p>
|
||||||
</div>
|
</div>
|
||||||
{:then}
|
{:then tracks}
|
||||||
{#if trackscache.length === 0}
|
{#if tracks.length > 0}
|
||||||
<TracksEmptyState />
|
<h4>{tracks.length}</h4>
|
||||||
{/if}
|
<hr />
|
||||||
|
<ul>
|
||||||
|
{#each tracks as item}
|
||||||
|
<li>{item.name}</li>
|
||||||
|
<li>{item.distance}</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
{:else}keine Tracks{/if}
|
||||||
{:catch error}
|
{:catch error}
|
||||||
<div class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500">
|
<div class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500">
|
||||||
<span class="inline-block align-middle mr-8">
|
<span class="inline-block align-middle mr-8">
|
||||||
|
@ -1,260 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
import AddTrackModal from "./AddTrackModal.svelte";
|
|
||||||
let modal_open = false;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="text-center items-center justify-center">
|
|
||||||
<svg
|
|
||||||
class="mx-auto"
|
|
||||||
style="height:15rem;"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 997 808"><defs>
|
|
||||||
<linearGradient
|
|
||||||
id="a"
|
|
||||||
x1="570.56"
|
|
||||||
y1="454"
|
|
||||||
x2="570.56"
|
|
||||||
y2="63.07"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop offset="0" stop-color="gray" stop-opacity=".25" />
|
|
||||||
<stop offset=".54" stop-color="gray" stop-opacity=".12" />
|
|
||||||
<stop offset="1" stop-color="gray" stop-opacity=".1" />
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
<path
|
|
||||||
d="M260.64.9c93 12.73 168.51 101.25 252.3 156.49 18.67 12.31 38.24 23.15 58.93 26.36 68.54 10.64 131.74-63.09 200.6-57.07 55.81 4.88 103.14 64 123.22 133.54s17 147.32 5.85 220.32c-17.46 114-56.14 226.15-123.47 300.3-11.11 12.24-23.52 23.69-37.79 26.47-23.78 4.69-45.83-15.46-66.41-32.12-92.88-75.22-210.3-94.32-314-51.08-35.12 14.64-68.71 36-104.65 46.54-69.21 20.26-147.53-5.34-194.52-76s-54.63-186.8-9.86-260c18.69-30.55 44.45-52.12 64.07-81.6 49.3-74 31.1-148.82 25-235.6C133.9 31.94 206.31-6.53 260.64.9z"
|
|
||||||
fill="#4299e1"
|
|
||||||
opacity=".1" />
|
|
||||||
<g opacity=".2">
|
|
||||||
<path
|
|
||||||
d="M683.38 545s27.51 27.51 12 68.33S722 722.03 722 722.03l-1.29-.21c-56.5-10-84.57-74.59-53.15-122.59 11.66-17.81 21.25-38.75 15.82-54.23z"
|
|
||||||
fill="#4299e1" />
|
|
||||||
<path
|
|
||||||
d="M683.38 545.5s27.51 27.51 12 68.33S722 722.53 722 722.53l-1.29-.21c-56.5-10-84.57-74.59-53.15-122.59 11.66-17.86 21.25-38.79 15.82-54.23z"
|
|
||||||
opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M683.38 545s15.53 33.72 0 61.23-2.66 104.71 38.6 115.8"
|
|
||||||
fill="none"
|
|
||||||
stroke="#535461"
|
|
||||||
stroke-miterlimit="10" />
|
|
||||||
<path
|
|
||||||
d="M634.39 656.3s31.39-5 34.25 23.13 60.36 32 60.36 32l-1.08.72c-47.48 31.17-92.86 19.85-86-21.53 2.53-15.35 2.32-30.81-7.53-34.32z"
|
|
||||||
fill="#4299e1" />
|
|
||||||
<path
|
|
||||||
d="M634.39 656.3s24.37 5.35 22.36 27.5 36.18 48.71 72.25 27.66"
|
|
||||||
fill="none"
|
|
||||||
stroke="#535461"
|
|
||||||
stroke-miterlimit="10" />
|
|
||||||
</g>
|
|
||||||
<g opacity=".2">
|
|
||||||
<path
|
|
||||||
d="M357.1 501.68s22.86 22.86 10 56.77 22.12 90.32 22.12 90.32l-1.07-.18c-46.94-8.29-70.27-62-44.17-101.86 9.66-14.83 17.63-32.22 13.12-45.05z"
|
|
||||||
fill="#4299e1" />
|
|
||||||
<path
|
|
||||||
d="M357.1 502.06s22.86 22.86 10 56.77 22.12 90.32 22.12 90.32l-1.12-.15c-46.94-8.29-70.27-62-44.17-101.86 9.71-14.86 17.68-32.25 13.17-45.08z"
|
|
||||||
opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M357.1 501.68s12.9 28 0 50.87-2.21 87 32.07 96.22"
|
|
||||||
fill="none"
|
|
||||||
stroke="#535461"
|
|
||||||
stroke-miterlimit="10" />
|
|
||||||
<path
|
|
||||||
d="M316.39 594.13s26.11-4.13 28.46 19.22S395 640 395 640l-.9.6c-39.45 25.9-77.16 16.5-71.47-17.89 2.11-12.83 1.94-25.71-6.24-28.58z"
|
|
||||||
fill="#4299e1" />
|
|
||||||
<path
|
|
||||||
d="M316.39 594.13s20.24 4.44 18.58 22.85 30.06 40.48 60 23"
|
|
||||||
fill="none"
|
|
||||||
stroke="#535461"
|
|
||||||
stroke-miterlimit="10" />
|
|
||||||
</g>
|
|
||||||
<g opacity=".2">
|
|
||||||
<path
|
|
||||||
d="M261.1 357.68s22.86 22.86 10 56.77 22.12 90.32 22.12 90.32l-1.07-.18c-46.94-8.29-70.27-62-44.17-101.86 9.66-14.83 17.63-32.22 13.12-45.05z"
|
|
||||||
fill="#4299e1" />
|
|
||||||
<path
|
|
||||||
d="M261.1 358.06s22.86 22.86 10 56.77 22.12 90.32 22.12 90.32l-1.12-.15c-46.94-8.29-70.27-62-44.17-101.86 9.71-14.86 17.68-32.25 13.17-45.08z"
|
|
||||||
opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M261.1 357.68s12.9 28 0 50.87-2.21 87 32.07 96.22"
|
|
||||||
fill="none"
|
|
||||||
stroke="#535461"
|
|
||||||
stroke-miterlimit="10" />
|
|
||||||
<path
|
|
||||||
d="M220.39 450.13s26.11-4.13 28.46 19.22S299 496 299 496l-.9.6c-39.45 25.9-77.16 16.5-71.47-17.89 2.11-12.83 1.94-25.71-6.24-28.58z"
|
|
||||||
fill="#4299e1" />
|
|
||||||
<path
|
|
||||||
d="M220.39 450.13s20.24 4.44 18.58 22.85 30.06 40.48 60 23"
|
|
||||||
fill="none"
|
|
||||||
stroke="#535461"
|
|
||||||
stroke-miterlimit="10" />
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M14.76 592.38v-13.63l279.29-78.33 49.95-5.68v12.49l-278.15 99.9-51.09-14.75z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M14.76 592.38v-13.63l279.29-78.33 49.95-5.68v12.49l-278.15 99.9-51.09-14.75z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M14.76 578.75l279.29-91.96 48.82 7.95-277.02 98.77-51.09-14.76z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M57.9 370.99h18.17v211.17H57.9zM275.88 322.17h18.17v185.06h-18.17z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M339.46 264.27v56.77L112.67 371.7l-26.83 6-66.54 14.86L0 386.88v-65.84l102.91-19.62 25.61-4.88 187.1-35.67 23.84 3.4z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M339.46 264.27v56.77L112.67 371.7l-26.83 6-66.54 14.86L0 386.88v-65.84l102.91-19.62 25.61-4.88 187.1-35.67 23.84 3.4z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M76.07 370.99v11.16l-18.17 4.06v-15.22h18.17zM294.05 322.17v11.29l-18.17 4.05v-15.34h18.17z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M339.46 264.27v56.77l-92.08 20.57-26.78 5.98-107.93 24.11-26.83 6-66.54 14.86 1.14-64.71 92.47-18.43 25.87-5.15h.01L244.5 283.2l25.82-5.15 69.14-13.78z" />
|
|
||||||
<path
|
|
||||||
fill="#4299e1"
|
|
||||||
d="M138.79 304.27l-26.12 67.43-26.83 6 27.07-68.28-10-8 25.61-4.88 10.26 7.73h.01zM271.62 279.03l-24.24 62.58-26.78 5.98 25.14-63.41-1.24-.98-8.76-7.02 25.61-4.88 8.97 6.75 1.29.98h.01z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M61.88 578.47l18.16-4.26v4.26l-18.16 4.26v-4.26zM278.72 503.54l18.16-4.26v4.26l-18.16 4.26v-4.26z" />
|
|
||||||
<path
|
|
||||||
d="M761.23 394.51c-28.95 15.25-58.92-2-58.92-2a19.07 19.07 0 01-1.61 2.52c-.37-.28-.75-.57-1.13-.88-12.44-10.17-26.21-34.18-26.21-34.18l-26.83-50.31a78.52 78.52 0 01-7.37-19.19c-4.42-19.18-18.53-20-18.53-20H604.1c-8 0-19.56 1.68-31 4a2.1 2.1 0 00.57-1.14l-.55.11 6.14-6s17.57-7.12 19.64-22.37l9.3-9.15s.3-.8.72-2.21l3.09-3.89c13.46-16.85 14.43-17.13 14.43-17.13l40.81-24.15s14.65-2.08 8.54-43.05-2-46-2-46 11.1-41.05-10.18-35.94-11.66 40.2-11.66 40.2l1.48 7.75a74.2 74.2 0 01-.3 29.35c-2.21 10.45-4.68 23.36-4.06 26.44 1.09 5.37-11.2 12.17-11.2 12.17l-6.95 4.06a35.17 35.17 0 01-24.39 4.16l-.37-.56L602 184a12.05 12.05 0 00-.3 1.3L600 184v.1c0-.36 0-.7.08-1.08a53.88 53.88 0 012.69-11.28c.11-.34.25-.7.37-1A30.72 30.72 0 00632 140.29a30 30 0 00-1.52-9.44 6.51 6.51 0 002.38 0c3.74-.6 7.71-2.52 9.65-5.83a10.7 10.7 0 00-.79-11.72 11.71 11.71 0 00-1.6-1.67c-3.55-4-9.49-5-14.21-7.69-4.49-2.53-7.9-6.57-12.08-9.58-7.9-5.71-18-7.43-27.64-9-4.14-.67-8.35-1.34-12.51-.79-5.26.7-10.1 3.33-14.22 6.62a12.8 12.8 0 00-3.59 3.95c-1.53 3-.86 6.52-1.13 9.84-.66 8.08-7 14.66-14 18.95-4.3 2.63-9 4.73-12.61 8.26s-5.74 9.1-3.49 13.56c1.19 2.36 3.54 4.33 3.56 7a7.84 7.84 0 01-1 3.34 48.67 48.67 0 01-9.59 13.5c-14.6-3.52-30.36 4.22-30.36 4.22l-47.55 2s-13.44-6.1-31 31.52-23.78 39.66-23.78 39.66-32 28.47-11.37 35.59 32-27.46 32-27.46L417 233.84s25.84-24.41 27.91-29.49 14.47-5.08 14.47-5.08l50.41 2a9.59 9.59 0 01.12 1.23c.12 5.64-5.17 10-10.49 12.09-3.36 1.34-7.2 2.35-9.25 5.29s-1.56 7.21.5 10.21a13.42 13.42 0 002.19 2.43 20.53 20.53 0 007.72 5 35.81 35.81 0 007.51 2.08 76 76 0 01-4.25 12.6l2 .86-.66 1.76c-2.82 7.49-8.63 22.27-13.77 31.21-.05 0-9.34 7.88-16.55 15-5.51 5.42-18.79 57.6 20.07 58.54l8.87 6.54h.18c7.89 11.14 33.94 29.44 33.94 29.44l-46.07 2.72a57.66 57.66 0 00-6.85.83q-1.13.2-2.26.45c-8.12 1.78-17.11 1.15-21.93.58-3.19-6-18-3.56-18-3.56s-2.07 30.51 1 47.79 14.47 6.1 14.47 6.1c-2.07-15.25 15-26.47 15-26.47 2.17-1.09 4.74-2.41 7.76-4 9.58-5.14 55.15 2.72 69.24 5.32a47.65 47.65 0 009.41.8c40.39-.66 29.9-20.36 29.9-20.36l-8.13-16a82.22 82.22 0 01-3.56-8.18c-7.18-19-18.34-29.46-26.89-35.06.46-.58.92-1.16 1.37-1.77 0 0-.68-.16-1.71-.47 7.22-3.69 12-6.64 12-6.64s47.55-28.47 45.49-21.35 10.34 34.57 33.08 53.89c.66.56 1.3 1.13 1.94 1.71l.62.57 1.27 1.2.69.67 1.18 1.18.66.68 1.25 1.34.5.54q.85.94 1.68 1.9l.36.43q.64.76 1.27 1.52l.57.71 1 1.28.58.75 1 1.31.52.69 1.16 1.61.28.38q.71 1 1.39 2l.34.51 1 1.51.42.65.89 1.4.39.62.93 1.53.27.44q1.21 2 2.3 4l.12.22.95 1.72.15.28.91 1.72.06.12a151.46 151.46 0 016.87 15.07 26.4 26.4 0 01-3.53.6c-6.2 27.46 10.34 27.46 10.34 27.46s61-9.15 83.74-32.54-4.08-21.44-4.08-21.44z"
|
|
||||||
transform="translate(-101.5 -46)"
|
|
||||||
fill="url(#a)" />
|
|
||||||
<path
|
|
||||||
d="M438.5 296.5s25.14 6.52 37.68 40.22a81.56 81.56 0 003.45 8l7.87 15.78s10.15 19.37-28.92 20a45.36 45.36 0 01-9.1-.79c-13.63-2.55-57.71-10.28-67-5.23a172.92 172.92 0 01-16 8l-11-12 4-16s13.21 2.48 24.62-.07a55.86 55.86 0 018.81-1.26l44.59-2.65s-35-25-35-34 36-20 36-20z"
|
|
||||||
fill="#f8bdc5" />
|
|
||||||
<path
|
|
||||||
d="M363.5 357.5s-11 17.94 11.49 21c0 0-16.49 11-14.49 26 0 0-11 11-14-6s-1-47-1-47 18-3 18 6z"
|
|
||||||
opacity=".05" />
|
|
||||||
<path
|
|
||||||
d="M438.5 296.5s25.14 6.52 37.68 40.22a81.56 81.56 0 003.45 8l7.87 15.78s10.15 19.37-28.92 20a45.36 45.36 0 01-9.1-.79c-13.63-2.55-57.71-10.28-67-5.23a172.92 172.92 0 01-16 8l-11-12 4-16s13.21 2.48 24.62-.07a55.86 55.86 0 018.81-1.26l44.59-2.65s-35-25-35-34 36-20 36-20z"
|
|
||||||
opacity=".05" />
|
|
||||||
<path
|
|
||||||
d="M360.5 372.5l4-16s13.21 2.48 24.62-.07a55.86 55.86 0 018.81-1.26l44.57-2.67s-35-25-35-34 36-20 36-20l.27.08a32.74 32.74 0 00-5.27-2.08s-36 11-36 20 35 34 35 34l-44.56 2.67a55.86 55.86 0 00-8.81 1.26c-11.41 2.55-24.62.07-24.62.07l-4 16 11 12s.74-.3 2.26-1z"
|
|
||||||
opacity=".05" />
|
|
||||||
<path
|
|
||||||
d="M363.5 357.5s-11 17.94 11.49 21c0 0-16.49 11-14.49 26 0 0-11 11-14-6s-1-47-1-47 18-3 18 6z"
|
|
||||||
fill="#ffd97b" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M333.76 647.38v-13.63l279.29-78.33 49.95-5.68v12.49l-278.15 99.9-51.09-14.75z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M333.76 647.38v-13.63l279.29-78.33 49.95-5.68v12.49l-278.15 99.9-51.09-14.75z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M333.76 633.75l279.29-91.96 48.82 7.95-277.02 98.77-51.09-14.76z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M376.9 425.99h18.17v211.17H376.9zM594.88 377.17h18.17v185.06h-18.17z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M658.46 319.27v56.77L431.67 426.7l-26.83 6-66.54 14.86-19.3-5.68v-65.84l102.9-19.62 25.62-4.88 187.1-35.67 23.84 3.4z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M658.46 319.27v56.77L431.67 426.7l-26.83 6-66.54 14.86-19.3-5.68v-65.84l102.9-19.62 25.62-4.88 187.1-35.67 23.84 3.4z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M395.07 425.99v11.16l-18.17 4.06v-15.22h18.17zM613.05 377.17v11.29l-18.17 4.05v-15.34h18.17z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M658.46 319.27v56.77l-92.08 20.57-26.78 5.98-107.93 24.11-26.83 6-66.54 14.86 1.14-64.71 92.47-18.43 25.87-5.15h.01L563.5 338.2l25.82-5.15 69.14-13.78z" />
|
|
||||||
<path
|
|
||||||
fill="#4299e1"
|
|
||||||
d="M457.79 359.27l-26.12 67.43-26.83 6 27.07-68.28-10.01-8 25.62-4.88 10.26 7.73h.01zM590.62 334.03l-24.24 62.58-26.78 5.98 25.14-63.41-1.24-.98-8.76-7.02 25.61-4.88 8.97 6.75 1.29.98h.01z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M380.88 633.47l18.16-4.26v4.26l-18.16 4.26v-4.26zM597.72 558.54l18.16-4.26v4.26l-18.16 4.25v-4.25z" />
|
|
||||||
<path
|
|
||||||
d="M562.63 146.9l-39.48 23.75s-.94.28-14 16.85l-4.69 6c-9.92 12.75-30.54 17-30.54 17l-13.08-20.12-2.76-24.44 2.9-9.87 2.3-7.82 20.12 2.88 8.1 4.37 10-10c.78.21 1.57.4 2.36.55a33.55 33.55 0 0023.59-4.05l6.72-4s11.88-6.69 10.83-12c-.6-3 1.79-15.72 3.93-26a74.16 74.16 0 00.29-28.86l-1.43-7.62S538.5 29 559.07 24s9.85 35.34 9.85 35.34-3.94 4.94 2 45.23-8.29 42.33-8.29 42.33z"
|
|
||||||
fill="#f8bdc5" />
|
|
||||||
<path
|
|
||||||
d="M497.55 141.54c-1.12 10.58 3.95 12 3.95 12l3 12v13l-9 15h-22l-19-9v-42l-3-10a38.7 38.7 0 005-.65c9.65-1.93 15.12-7.29 18.2-13.11 4.8-9.11 3.8-19.28 3.8-19.28s40-11 26 20c-1.86 4.13-3.28 7.76-4.35 11a53.72 53.72 0 00-2.6 11.04zM472.09 229.33a2.08 2.08 0 01-.59 1.17 8.65 8.65 0 00-1.29 2c-4.68 8.83-13.71 40-13.71 40l-49-18-.71-.18-19.29-4.82c5.47-3.91 14.61-27.36 18.33-37.42 1-2.81 1.67-4.58 1.67-4.58l52 5s13.48 11.8 12.59 16.83z"
|
|
||||||
fill="#f8bdc5" />
|
|
||||||
<path
|
|
||||||
d="M451.5 129.5s-15 6-30 0-33 3-33 3l-46 2s-13-6-30 31-23 39-23 39-31 28-11 35 31-27 31-27l11-21s25-24 27-29 14-5 14-5l50 2-.31 14.62 15.31 13.38 14-12 11-22z"
|
|
||||||
fill="#f8bdc5" />
|
|
||||||
<path
|
|
||||||
d="M504.5 119.5c-1.86 4.13-3.28 7.76-4.35 11h-1.65a29.92 29.92 0 01-23.81-11.76c4.81-9.07 3.81-19.24 3.81-19.24s40-11 26 20z"
|
|
||||||
opacity=".1" />
|
|
||||||
<circle cx="498.5" cy="99.5" r="30" fill="#f8bdc5" />
|
|
||||||
<path
|
|
||||||
d="M472.09 229.33a2.08 2.08 0 01-.59 1.17 8.65 8.65 0 00-1.29 2c-17.79-.78-56.72-17.11-64.38-20.38 1-2.81 1.67-4.58 1.67-4.58l52 5s13.48 11.76 12.59 16.79zM509.19 187.5l-4.69 6c-9.92 12.75-30.54 17-30.54 17l-13.08-20.12-2.76-24.44L459 142c2.79 13 10.59 40.12 22.5 42.5 19.91 4 18.48-24.53 17.5-36.5a16.2 16.2 0 01.5-5.5l4 3 .36.55c9.53 14.8 7.39 32.42 5.33 41.45z"
|
|
||||||
opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M456.5 127.5h-10s10 64-37 46c0 0 4 15-5 36 0 0 48 21 67 21l6-6s17-7 19-22l9-9s10-27-4-48l-4-3a16.16 16.16 0 00-.5 5.5c1 12 2.41 40.48-17.5 36.5-25-5-23-57-23-57z"
|
|
||||||
fill="#eb6576" />
|
|
||||||
<path
|
|
||||||
d="M388.5 309.5l16 12s26 8 47-21c0 0-13-3-11-10s-52 19-52 19z"
|
|
||||||
fill="#5e52ad" />
|
|
||||||
<path
|
|
||||||
d="M388.5 309.5l16 12s26 8 47-21c0 0-13-3-11-10s-52 19-52 19z"
|
|
||||||
opacity=".05" />
|
|
||||||
<path
|
|
||||||
d="M472.09 230.33a2.08 2.08 0 01-.59 1.17c-4 4-15 42-15 42l-49-18-.71-.18a70.21 70.21 0 0112-6.06c3.41-1.32 6.84-2.72 9.81-4.06a44.92 44.92 0 006.91-3.7c4.19-3 20.28-7.8 36.58-11.17z"
|
|
||||||
opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M585.5 372.5l-15 4s-.34-1-1-2.74c-3.2-8.14-13.86-32.61-32-48.26-22-19-34-46-32-53s-44 21-44 21-33.35 20.75-55.39 20.78a23.28 23.28 0 01-9.61-1.78c-8.5-3.83-11.94-10.54-13.09-17a29.72 29.72 0 016-23.31 68.38 68.38 0 0129.4-21.93c3.41-1.32 6.84-2.72 9.81-4.06a44.92 44.92 0 006.91-3.7c7-5 47-15 66-15h16s13.64.8 17.92 19.66a78 78 0 007.1 18.84l25.95 49.5s13.32 23.61 25.35 33.61c3.43 2.86 6.76 4.61 9.65 4.39 13-1-18 19-18 19z"
|
|
||||||
fill="#f8bdc5" />
|
|
||||||
<path
|
|
||||||
d="M538.66 84.52A10.67 10.67 0 00537.9 73c-3.36-4.37-9.43-5.37-14.22-8.11-4.35-2.49-7.64-6.46-11.68-9.42-7.64-5.61-17.38-7.31-26.73-8.84-4-.66-8.08-1.32-12.1-.77-5.09.69-9.77 3.28-13.76 6.51a12.52 12.52 0 00-3.47 3.88c-1.48 2.92-.83 6.42-1.09 9.68-.64 7.95-6.78 14.42-13.55 18.63-4.16 2.59-8.74 4.65-12.2 8.12s-5.55 8.95-3.37 13.33c1.16 2.32 3.43 4.26 3.44 6.86a7.8 7.8 0 01-.94 3.29 47.87 47.87 0 01-9.54 13.55c-3.54 3.52-7.77 6.68-9.61 11.33-1.77 4.47-1 9.57.63 14.1.76 2.16 1.71 4.32 1.75 6.6.11 5.55-5 9.81-10.15 11.89-3.25 1.31-7 2.31-8.95 5.2s-1.51 7.09.48 10 5.2 4.86 8.5 6.19a31.16 31.16 0 0019.38 1.58 23.74 23.74 0 0015.15-11.78c3-5.84 3.2-13 7.36-18.1 7.33-8.91 22.79-6.66 30.44-15.31 6.14-6.95 4.47-17.48 4-26.74a82.37 82.37 0 01.64-15.45c.5-3.64 1.42-7.55 4.28-9.85 2.31-1.86 5.43-2.28 8.37-2.64 6.14-.77 13.21-2.26 16-7.79 1.16-2.3 1.51-5.2 3.6-6.7 2.89-2.08 6.94 0 9.46 2.5 2.78 2.77 5.11 6.18 9.34 5.49 3.59-.56 7.43-2.45 9.3-5.71z"
|
|
||||||
opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M537.58 83.44a10.67 10.67 0 00-.77-11.52c-3.36-4.37-9.43-5.37-14.22-8.11-4.35-2.49-7.64-6.46-11.68-9.42-7.64-5.61-17.38-7.31-26.73-8.84-4-.66-8.08-1.32-12.1-.77-5.09.69-9.77 3.28-13.76 6.51a12.52 12.52 0 00-3.47 3.88c-1.48 2.92-.83 6.42-1.09 9.68-.64 7.95-6.78 14.42-13.55 18.63-4.16 2.59-8.74 4.65-12.2 8.12s-5.55 8.95-3.37 13.33c1.16 2.32 3.43 4.26 3.44 6.86a7.8 7.8 0 01-.94 3.29 47.87 47.87 0 01-9.54 13.55c-3.54 3.52-7.77 6.68-9.61 11.33-1.77 4.47-1 9.57.63 14.1.76 2.16 1.71 4.32 1.75 6.6.11 5.55-5 9.81-10.15 11.89-3.25 1.31-7 2.31-8.95 5.2s-1.51 7.09.48 10 5.2 4.86 8.5 6.19a31.16 31.16 0 0019.38 1.58 23.74 23.74 0 0015.15-11.78c3-5.84 3.2-13 7.36-18.1 7.33-8.91 22.79-6.66 30.44-15.31 6.14-6.95 4.47-17.48 4-26.74a82.37 82.37 0 01.64-15.45c.5-3.64 1.42-7.55 4.28-9.85 2.31-1.86 5.43-2.28 8.37-2.64 6.14-.77 13.21-2.26 16-7.79 1.16-2.3 1.51-5.2 3.6-6.7 2.89-2.08 6.94 0 9.46 2.5 2.78 2.77 5.11 6.18 9.34 5.49 3.59-.57 7.44-2.46 9.31-5.71z"
|
|
||||||
fill="#6e464e" />
|
|
||||||
<path d="M434 202s11 9 25 8" opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M605.92 353.68c-5.74 5.64-18.42 13.82-18.42 13.82l-15 4s-11-32-33-51-34-46-32-53-44 21-44 21-33.35 20.75-55.39 20.78a23.28 23.28 0 01-9.61-1.78c-8.5-3.83-11.94-10.54-13.09-17a28.68 28.68 0 01.82-13.31 29.19 29.19 0 00-2.82 18.31c1.15 6.46 4.59 13.17 13.09 17a23.28 23.28 0 009.61 1.78c22 0 55.39-20.78 55.39-20.78s46-28 44-21 10 34 32 53 33 51 33 51l15-4s25.89-16.71 20.42-18.82z"
|
|
||||||
opacity=".05" />
|
|
||||||
<path
|
|
||||||
d="M429.5 246.5l-1.7.79a61.63 61.63 0 00-28.9 27.46c-13.4 26.08 4.31 37.83 7.21 39.53a23.28 23.28 0 01-9.61-1.78c-8.5-3.83-11.94-10.54-13.09-17a29.72 29.72 0 016-23.31 68.38 68.38 0 0129.4-21.93c3.41-1.32 6.84-2.72 9.81-4.06z"
|
|
||||||
opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M427.5 246.5s-21-7.46-35-3.73c0 0-9 7.73-16 14.73-5.7 5.7-20 64 28 57 0 0-22.16-11.42-7.6-39.75a61.62 61.62 0 0128.9-27.46z"
|
|
||||||
fill="#5e52ad" />
|
|
||||||
<path
|
|
||||||
d="M585.5 372.5l-15 4s-.34-1-1-2.74c3.49-.92 8-3 8-7.26 0 0 11.45-10.69 16.35-17.39 3.43 2.86 6.76 4.61 9.65 4.39 13-1-18 19-18 19z"
|
|
||||||
opacity=".1" />
|
|
||||||
<path
|
|
||||||
d="M578.5 367.5s15-14 18-20c0 0 29 17 57 2 0 0 26-2 4 21s-81 32-81 32-16 0-10-27c0 0 12-1 12-8z"
|
|
||||||
fill="#ffd97b" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M667.76 717.38v-13.63l279.29-78.33 49.95-5.68v12.49l-278.15 99.9-51.09-14.75z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M667.76 717.38v-13.63l279.29-78.33 49.95-5.68v12.49l-278.15 99.9-51.09-14.75z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M667.76 703.75l279.29-91.96 48.82 7.95-277.02 98.77-51.09-14.76z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M710.9 495.99h18.17v211.17H710.9zM928.88 447.17h18.17v185.06h-18.17z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M992.46 389.27v56.77L765.67 496.7l-26.83 6-66.54 14.86-19.3-5.68v-65.84l102.9-19.62 25.62-4.88 187.1-35.67 23.84 3.4z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M992.46 389.27v56.77L765.67 496.7l-26.83 6-66.54 14.86-19.3-5.68v-65.84l102.9-19.62 25.62-4.88 187.1-35.67 23.84 3.4z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M729.07 495.99v11.16l-18.17 4.06v-15.22h18.17zM947.05 447.17v11.29l-18.17 4.05v-15.34h18.17z" />
|
|
||||||
<path
|
|
||||||
fill="#dfe5ee"
|
|
||||||
d="M992.46 389.27v56.77l-92.08 20.57-26.78 5.98-107.93 24.11-26.83 6-66.54 14.86 1.14-64.71 92.47-18.43 25.87-5.15h.01L897.5 408.2l25.82-5.15 69.14-13.78z" />
|
|
||||||
<path
|
|
||||||
fill="#4299e1"
|
|
||||||
d="M791.79 429.27l-26.12 67.43-26.83 6 27.07-68.28-10.01-8 25.62-4.88 10.26 7.73h.01zM924.62 404.03l-24.24 62.58-26.78 5.98 25.14-63.41-1.24-.98-8.76-7.02 25.61-4.88 8.97 6.75 1.29.98h.01z" />
|
|
||||||
<path
|
|
||||||
opacity=".05"
|
|
||||||
d="M714.88 703.47l18.16-4.26v4.26l-18.16 4.26v-4.26zM931.72 628.54l18.16-4.26v4.26l-18.16 4.25v-4.25z" /></svg>
|
|
||||||
<p class="mb-16 text-lg text-gray-500">
|
|
||||||
<span class="font-bold">{$_('no-tracks-added-yet')}</span><br />
|
|
||||||
<span>{$_('add-your-first-track')}</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<AddTrackModal bind:modal_open />
|
|
@ -1,25 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
import AddTrackModal from "./AddTrackModal.svelte";
|
|
||||||
let modal_open = false;
|
|
||||||
import Tracks from "./Tracks.svelte";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<section class="container p-5">
|
|
||||||
<span class="mb-1 text-3xl font-extrabold leading-tight text-gray-900">
|
|
||||||
Tracks
|
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
modal_open = true;
|
|
||||||
}}
|
|
||||||
type="button"
|
|
||||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
|
||||||
Create Track
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
<p class="mb-8 text-lg text-gray-500">
|
|
||||||
configure the tracks & minimum lap times
|
|
||||||
</p>
|
|
||||||
<Tracks />
|
|
||||||
</section>
|
|
||||||
<AddTrackModal bind:modal_open />
|
|
@ -1,11 +0,0 @@
|
|||||||
<!-- Transition.svelte -->
|
|
||||||
<script>
|
|
||||||
import { router } from "tinro";
|
|
||||||
import { fade } from "svelte/transition";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#key $router.path}
|
|
||||||
<div in:fade={{ duration: 75 }}>
|
|
||||||
<slot />
|
|
||||||
</div>
|
|
||||||
{/key}
|
|
@ -1,25 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
import AddUserModal from "./AddUserModal.svelte";
|
|
||||||
export let modal_open = false;
|
|
||||||
import UsersDetail from "./UsersDetail.svelte";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<section class="container p-5">
|
|
||||||
<span class="mb-1 text-3xl font-extrabold leading-tight text-gray-900">
|
|
||||||
Users
|
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
modal_open = true;
|
|
||||||
}}
|
|
||||||
type="button"
|
|
||||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
|
||||||
Create User
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
<p class="mb-8 text-lg text-gray-500">
|
|
||||||
manage admin users
|
|
||||||
</p>
|
|
||||||
<UsersDetail />
|
|
||||||
</section>
|
|
||||||
<AddUserModal bind:modal_open />
|
|
@ -1,131 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _, json } from "svelte-i18n";
|
|
||||||
import Toastify from "toastify-js";
|
|
||||||
import TracksEmptyState from "./TracksEmptyState.svelte";
|
|
||||||
import { TrackService, UserService } from "@odit/lfk-client-js";
|
|
||||||
const users_promise = UserService.userControllerGetAll();
|
|
||||||
import { getlang } from "./datatable_i18n";
|
|
||||||
import { Grid, html } from "gridjs";
|
|
||||||
import "gridjs/dist/theme/mermaid.css";
|
|
||||||
import { tracks as tracksstore } from "../store.js";
|
|
||||||
import UsersEmptyState from "./UsersEmptyState.svelte";
|
|
||||||
$: userscache = [];
|
|
||||||
$: blocked = [];
|
|
||||||
let table;
|
|
||||||
let datatable;
|
|
||||||
let datatable_inited = false;
|
|
||||||
tracksstore.subscribe((val) => {
|
|
||||||
userscache = val;
|
|
||||||
});
|
|
||||||
users_promise.then((data) => {
|
|
||||||
console.log(data);
|
|
||||||
tracksstore.set(data);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#await users_promise}
|
|
||||||
<div
|
|
||||||
class="bg-teal-lightest border-t-4 border-teal rounded-b text-teal-darkest px-4 py-3 shadow-md my-2"
|
|
||||||
role="alert">
|
|
||||||
<p class="font-bold">users are being loaded...</p>
|
|
||||||
<p class="text-sm">{$_('this-might-take-a-moment')}</p>
|
|
||||||
</div>
|
|
||||||
{:then users}
|
|
||||||
{#if userscache.length === 0}
|
|
||||||
<UsersEmptyState />
|
|
||||||
{:else}
|
|
||||||
<div
|
|
||||||
class="shadow border-b border-gray-200 sm:rounded-lg overflow-x-scroll">
|
|
||||||
<table class="divide-y divide-gray-200 w-full">
|
|
||||||
<thead class="bg-gray-50">
|
|
||||||
<tr>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Name
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Title
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Status
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Role
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="relative px-6 py-3">
|
|
||||||
<span class="sr-only">Edit</span>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="bg-white divide-y divide-gray-200">
|
|
||||||
{#each users as u}
|
|
||||||
<tr>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap">
|
|
||||||
<div class="flex items-center">
|
|
||||||
{#if u.profilePic}
|
|
||||||
<div class="flex-shrink-0 h-10 w-10">
|
|
||||||
<img
|
|
||||||
class="h-10 w-10 rounded-full"
|
|
||||||
src={u.profilePic}
|
|
||||||
alt="" />
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
<div class="ml-4">
|
|
||||||
<div class="text-sm font-medium text-gray-900">
|
|
||||||
{u.firstname}
|
|
||||||
</div>
|
|
||||||
<div class="text-sm text-gray-500">
|
|
||||||
{u.email || u.username}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap">
|
|
||||||
<div class="text-sm text-gray-900">
|
|
||||||
Regional Paradigm Technician
|
|
||||||
</div>
|
|
||||||
<div class="text-sm text-gray-500">Optimization</div>
|
|
||||||
</td>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap">
|
|
||||||
{#if u.enabled}
|
|
||||||
<span
|
|
||||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Active</span>
|
|
||||||
{:else}
|
|
||||||
<span
|
|
||||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Inactive</span>
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
|
||||||
{#each u.groups as g}
|
|
||||||
<a href="../groups/{g.id}"
|
|
||||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{g.name}</a>
|
|
||||||
{/each}
|
|
||||||
</td>
|
|
||||||
<td
|
|
||||||
class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
|
||||||
<a
|
|
||||||
href="#"
|
|
||||||
class="text-indigo-600 hover:text-indigo-900">Edit</a>
|
|
||||||
<a href="#" class="text-red-600 hover:text-red-900">Delete</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/each}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{:catch error}
|
|
||||||
<div class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500">
|
|
||||||
<span class="inline-block align-middle mr-8">
|
|
||||||
<b class="capitalize">{$_('general_promise_error')}</b>
|
|
||||||
{error}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{/await}
|
|
@ -1,14 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { _ } from "svelte-i18n";
|
|
||||||
import AddUserModal from "./AddUserModal.svelte";
|
|
||||||
let modal_open = false;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="text-center items-center justify-center">
|
|
||||||
<p class="mb-16 text-lg text-gray-500">
|
|
||||||
<span class="font-bold">There are no users added yet.</span><br />
|
|
||||||
<span>Add your first user</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<AddUserModal bind:modal_open />
|
|
@ -1,10 +0,0 @@
|
|||||||
/** Dispatch event on click outside of node */
|
|
||||||
export function clickOutside(node) {
|
|
||||||
const handleClick = (event) => {
|
|
||||||
if (event.target.getAttribute('data-id') === 'modal_backdrop') {
|
|
||||||
node.dispatchEvent(new CustomEvent('click_outside', node));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
document.removeEventListener('click', handleClick, true);
|
|
||||||
document.addEventListener('click', handleClick, true);
|
|
||||||
}
|
|
@ -1,47 +1,43 @@
|
|||||||
{
|
{
|
||||||
|
"forgot_password?": "Passwort vergessen?",
|
||||||
|
"log_in": "Anmelden",
|
||||||
|
"log_in_to_your_account": "Bitte melde dich an",
|
||||||
|
"login_is_checked": "Login wird überprüft",
|
||||||
|
"welcome_wavinghand": "Willkommen 👋",
|
||||||
|
"error_on_login": "😢Fehler beim Login",
|
||||||
|
"settings": "Einstellungen",
|
||||||
|
"your_profile": "Dein Profil",
|
||||||
|
"password": "Passwort",
|
||||||
|
"email_address_or_username": "E-Mail-Addresse/ Benutzername",
|
||||||
|
"signout": "Abmelden",
|
||||||
"404message": "Die gesuchte Seite wurde leider nicht gefunden.",
|
"404message": "Die gesuchte Seite wurde leider nicht gefunden.",
|
||||||
"404title": "Fehler 404",
|
"404title": "Fehler 404",
|
||||||
"about": "Über",
|
|
||||||
"application_name": "Lauf für Kaya! \n- Admin",
|
"application_name": "Lauf für Kaya! \n- Admin",
|
||||||
"by": "von",
|
"goback": "Zur Startseite",
|
||||||
"cannot-reset-your-password-directly": "Schade. \nWir können das Passwort leider nicht direkt zurücksetzen.\nBitte sende uns eine Mail in der du deine Identität bestätigst.",
|
"cannot-reset-your-password-directly": "Schade. \nWir können das Passwort leider nicht direkt zurücksetzen.\nBitte sende uns eine Mail in der du deine Identität bestätigst.",
|
||||||
"credits": "",
|
"register": "Registrieren",
|
||||||
"dashboard-greeting": "Moin",
|
"send-a-mail-to-lfk-odit-services": "Sende eine Mail an lfk@odit.services",
|
||||||
|
"dont-panic-were-resetting-it": "Keine Panik, wir setzen es zurück ✌",
|
||||||
|
"dont-have-your-email-connected": "Deine E-Mail ist nicht verknüpft?",
|
||||||
|
"reset-my-password": "Passwort zurücksetzen",
|
||||||
|
"e-mail-adress": "E-Mail-Adresse",
|
||||||
|
"invalid-mail-reset": "Das ist keine gültige E-Mail",
|
||||||
"datatable": {
|
"datatable": {
|
||||||
"search": "🔍 Suche ...",
|
"search": "🔍 Suche ...",
|
||||||
"an_error_happened_while_fetching_the_data": "Beim Abrufen der Daten ist ein Fehler aufgetreten",
|
"an_error_happened_while_fetching_the_data": "Beim Abrufen der Daten ist ein Fehler aufgetreten",
|
||||||
"loading": "Wird geladen...",
|
"loading": "Wird geladen...",
|
||||||
"next": "Nächste",
|
"next": "Nächste",
|
||||||
"of": "von",
|
"of": "von",
|
||||||
"previous": "Vorherige",
|
"previous": "Vorherige"
|
||||||
"to": "bis",
|
|
||||||
"showing": "Zeige"
|
|
||||||
},
|
},
|
||||||
"dont-have-your-email-connected": "Deine E-Mail ist nicht verknüpft?",
|
|
||||||
"dont-panic-were-resetting-it": "Keine Panik, wir setzen es zurück ✌",
|
|
||||||
"e-mail-adress": "E-Mail-Adresse",
|
|
||||||
"email_address_or_username": "E-Mail-Addresse/ Benutzername",
|
|
||||||
"error_on_login": "😢Fehler beim Login",
|
|
||||||
"forgot_password?": "Passwort vergessen?",
|
|
||||||
"general-stats": "Allgemeine Statistiken",
|
|
||||||
"goback": "Zur Startseite",
|
|
||||||
"hallo": "hallo",
|
|
||||||
"invalid-mail-reset": "Das ist keine gültige E-Mail",
|
|
||||||
"lfk-is-os": "Das \"Lauf für Kaya!\" Frontend ist (wie alle anderen Projekte für den \"LfK!\" auch) ein OpenSource Projekt.",
|
"lfk-is-os": "Das \"Lauf für Kaya!\" Frontend ist (wie alle anderen Projekte für den \"LfK!\" auch) ein OpenSource Projekt.",
|
||||||
"log_in": "Anmelden",
|
|
||||||
"log_in_to_your_account": "Bitte melde dich an",
|
|
||||||
"login_is_checked": "Login wird überprüft",
|
|
||||||
"oss_credit_description": "Wir verwenden eine Menge Open Source-Software bei diesen Projekten und möchten uns bei den folgenden Projekten und Mitwirkenden bedanken, die dazu beitragen, Open Source großartig zu machen!",
|
"oss_credit_description": "Wir verwenden eine Menge Open Source-Software bei diesen Projekten und möchten uns bei den folgenden Projekten und Mitwirkenden bedanken, die dazu beitragen, Open Source großartig zu machen!",
|
||||||
"password": "Passwort",
|
"about": "Über",
|
||||||
"register": "Registrieren",
|
"by": "von",
|
||||||
"reset-my-password": "Passwort zurücksetzen",
|
"hallo": "hallo",
|
||||||
"runners": "Läufer",
|
|
||||||
"send-a-mail-to-lfk-odit-services": "Sende eine Mail an lfk@odit.services",
|
|
||||||
"settings": "Einstellungen",
|
|
||||||
"signout": "Abmelden",
|
|
||||||
"total-distance": "gelaufene Strecke",
|
|
||||||
"total-donations": "Spendensumme",
|
|
||||||
"total-scans": "gesamte Scans",
|
"total-scans": "gesamte Scans",
|
||||||
"welcome_wavinghand": "Willkommen 👋",
|
"total-donations": "Spendensumme",
|
||||||
"your_profile": "Dein Profil"
|
"credits": "",
|
||||||
|
"runners": "Läufer",
|
||||||
|
"total-distance": "gelaufene Strecke"
|
||||||
}
|
}
|
@ -1,19 +1,34 @@
|
|||||||
{
|
{
|
||||||
|
"forgot_password?": "Forgot your password?",
|
||||||
|
"register": "Register",
|
||||||
|
"log_in": "Log in",
|
||||||
|
"password": "Password",
|
||||||
|
"log_in_to_your_account": "Log in to your account",
|
||||||
|
"welcome_wavinghand": "Welcome 👋",
|
||||||
|
"login_is_checked": "Login is being checked...",
|
||||||
|
"error_on_login": "Error on login",
|
||||||
|
"settings": "Settings",
|
||||||
|
"your_profile": "Your Profile",
|
||||||
|
"email_address_or_username": "Email / username",
|
||||||
|
"tracks": "Tracks",
|
||||||
|
"signout": "Sign out",
|
||||||
|
"hallo": "hello",
|
||||||
"404message": "Sorry, the page you are looking for could not be found.",
|
"404message": "Sorry, the page you are looking for could not be found.",
|
||||||
"404title": "Error 404",
|
"404title": "Error 404",
|
||||||
"about": "About",
|
"goback": "Go Home",
|
||||||
"action": "Action",
|
|
||||||
"add-your-first-track": "Add your first track",
|
|
||||||
"application_name": "Lauf für Kaya! - Admin",
|
"application_name": "Lauf für Kaya! - Admin",
|
||||||
"by": "by",
|
"reset-my-password": "Reset my password",
|
||||||
"cannot-reset-your-password-directly": "Bummer. We unfortunately cannot reset your password directly. Please send us a mail and confirm your identity",
|
"cannot-reset-your-password-directly": "Bummer. We unfortunately cannot reset your password directly. Please send us a mail and confirm your identity",
|
||||||
"changelog": "Changelog",
|
"send-a-mail-to-lfk-odit-services": "send a mail to lfk@odit.services",
|
||||||
"count_organizations": "# Organizations",
|
"dont-have-your-email-connected": "Don't have your email connected?",
|
||||||
"count_teams": "# Teams",
|
"dont-panic-were-resetting-it": "Don't panic, we're resetting it ✌",
|
||||||
"create-a-new-track": "Create a new Track",
|
"e-mail-adress": "E-Mail Adress",
|
||||||
"credits": "Credits",
|
"mail-validation-in-progress": "mail validation in progress...",
|
||||||
"dashboard-greeting": "hello there",
|
"invalid-mail-reset": "the provided email is invalid",
|
||||||
"dashboard-title": "Dashboard",
|
"runners": "runners",
|
||||||
|
"total-scans": "total scans",
|
||||||
|
"total-donations": "total donations",
|
||||||
|
"total-distance": "total distance",
|
||||||
"datatable": {
|
"datatable": {
|
||||||
"search": "🔍 Search...",
|
"search": "🔍 Search...",
|
||||||
"sort_column_ascending": "Sort column ascending",
|
"sort_column_ascending": "Sort column ascending",
|
||||||
@ -29,49 +44,12 @@
|
|||||||
"no_matching_records_found": "No matching records found",
|
"no_matching_records_found": "No matching records found",
|
||||||
"an_error_happened_while_fetching_the_data": "An error happened while fetching the data"
|
"an_error_happened_while_fetching_the_data": "An error happened while fetching the data"
|
||||||
},
|
},
|
||||||
"dont-have-your-email-connected": "Don't have your email connected?",
|
"about": "About",
|
||||||
"dont-panic-were-resetting-it": "Don't panic, we're resetting it ✌",
|
"by": "by",
|
||||||
"e-mail-adress": "E-Mail Adress",
|
|
||||||
"email_address_or_username": "Email / username",
|
|
||||||
"error_on_login": "Error on login",
|
|
||||||
"faq": "FAQ",
|
|
||||||
"forgot_password?": "Forgot your password?",
|
|
||||||
"general-stats": "General Stats",
|
|
||||||
"general_promise_error": "😢 Error",
|
|
||||||
"goback": "Go Home",
|
|
||||||
"hallo": "hello",
|
|
||||||
"invalid-mail-reset": "the provided email is invalid",
|
|
||||||
"lfk-is-os": "The \"Lauf für Kaya!\" Frontend is (like all other projects for the \"LfK!\" Also) an open source project.",
|
"lfk-is-os": "The \"Lauf für Kaya!\" Frontend is (like all other projects for the \"LfK!\" Also) an open source project.",
|
||||||
"log_in": "Log in",
|
|
||||||
"log_in_to_your_account": "Log in to your account",
|
|
||||||
"login_is_checked": "Login is being checked...",
|
|
||||||
"logout": "Logout",
|
|
||||||
"mail-validation-in-progress": "mail validation in progress...",
|
|
||||||
"minimum-lap-time-in-s": "minimum lap time in s",
|
|
||||||
"no-tracks-added-yet": "there are no tracks added yet.",
|
|
||||||
"orgs": "Orgs",
|
|
||||||
"oss_credit_description": "We use a lot of open source software on these projects, and would like to thank the following projects and contributors who help make open source great!",
|
"oss_credit_description": "We use a lot of open source software on these projects, and would like to thank the following projects and contributors who help make open source great!",
|
||||||
"password": "Password",
|
"credits": "Credits",
|
||||||
"please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.",
|
"count_organizations": "# Organizations",
|
||||||
"register": "Register",
|
"count_teams": "# Teams",
|
||||||
"reset-my-password": "Reset my password",
|
"general_promise_error": "😢 Error"
|
||||||
"runners": "Runners",
|
|
||||||
"send-a-mail-to-lfk-odit-services": "send a mail to lfk@odit.services",
|
|
||||||
"settings": "Settings",
|
|
||||||
"signout": "Sign out",
|
|
||||||
"stats-are-being-loaded": "stats are being loaded...",
|
|
||||||
"teams": "Teams",
|
|
||||||
"this-might-take-a-moment": "This might take a moment 👀",
|
|
||||||
"total-distance": "total distance",
|
|
||||||
"total-donations": "total donations",
|
|
||||||
"total-scans": "total scans",
|
|
||||||
"track-added": "Track added",
|
|
||||||
"track-data-is-being-loaded": "Track data is being loaded",
|
|
||||||
"track-is-being-added": "Track is being added...",
|
|
||||||
"track-length-in-m": "Track Length in m",
|
|
||||||
"track-name": "Track name",
|
|
||||||
"tracks": "Tracks",
|
|
||||||
"users": "Users",
|
|
||||||
"welcome_wavinghand": "Welcome 👋",
|
|
||||||
"your_profile": "Your Profile"
|
|
||||||
}
|
}
|
@ -1,7 +1,5 @@
|
|||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
|
|
||||||
export let users = writable([]);
|
|
||||||
export let tracks = writable([]);
|
|
||||||
const store = () => {
|
const store = () => {
|
||||||
const state = {
|
const state = {
|
||||||
access_token: undefined,
|
access_token: undefined,
|
||||||
@ -13,6 +11,7 @@ const store = () => {
|
|||||||
|
|
||||||
const methods = {
|
const methods = {
|
||||||
init() {
|
init() {
|
||||||
|
console.log('*: playerStore -> init()');
|
||||||
update((state) => {
|
update((state) => {
|
||||||
state.isLoggedIn = false;
|
state.isLoggedIn = false;
|
||||||
return state;
|
return state;
|
||||||
@ -23,7 +22,7 @@ const store = () => {
|
|||||||
state.access_token = access_token;
|
state.access_token = access_token;
|
||||||
state.jwtinfo = jwtinfo;
|
state.jwtinfo = jwtinfo;
|
||||||
state.isLoggedIn = true;
|
state.isLoggedIn = true;
|
||||||
// console.log('login performed');
|
console.log('login performed');
|
||||||
return state;
|
return state;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -43,4 +42,5 @@ const store = () => {
|
|||||||
...methods
|
...methods
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default store();
|
export default store();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
globDirectory: 'public',
|
"globDirectory": "public/",
|
||||||
globPatterns: [ '**/*.{js,ico,png,svg,html,webmanifest,txt}' ],
|
"globPatterns": [
|
||||||
globIgnores: [ 'env.js', 'env.sample.js' ],
|
"**/*.{js,ico,png,svg,html,txt}"
|
||||||
swDest: 'public/sw.js'
|
],
|
||||||
|
"swDest": "public/sw.js"
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user