Compare commits
18 Commits
ab45fc144e
...
0.8.7
| Author | SHA1 | Date | |
|---|---|---|---|
| 0af2647965 | |||
| 08442154f4 | |||
| c3c95bf291 | |||
| d2050b5948 | |||
| 6b92405bae | |||
| 49e87ccb15 | |||
| 50fffef13b | |||
| 82b1811971 | |||
| aeadef60bb | |||
| a1ab65a0e9 | |||
| 17e0805fe6 | |||
| ddd9c396b6 | |||
| ef49e507c1 | |||
| fbe74a5d80 | |||
| 076893981f | |||
| e838e6f321 | |||
| ca983c72d4 | |||
| 91dd5256e9 |
@@ -1,2 +0,0 @@
|
|||||||
ARG VARIANT="14-buster"
|
|
||||||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Node.js",
|
|
||||||
"build": {
|
|
||||||
"dockerfile": "Dockerfile",
|
|
||||||
"args": {
|
|
||||||
"VARIANT": "14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"terminal.integrated.shell.linux": "/bin/bash"
|
|
||||||
},
|
|
||||||
"extensions": [
|
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"2gua.rainbow-brackets",
|
|
||||||
"christian-kohler.npm-intellisense",
|
|
||||||
"remimarsal.prettier-now",
|
|
||||||
"svelte.svelte-vscode",
|
|
||||||
"lokalise.i18n-ally",
|
|
||||||
"fivethree.vscode-svelte-snippets",
|
|
||||||
"voorjaar.windicss-intellisense"
|
|
||||||
],
|
|
||||||
"postCreateCommand": "yarn",
|
|
||||||
"remoteUser": "node"
|
|
||||||
}
|
|
||||||
@@ -1 +1,3 @@
|
|||||||
public/env.sample.js
|
public/env.sample.js
|
||||||
|
public/workbox-*.js
|
||||||
|
public/workbox-*.js.map
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,7 +1,11 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
build
|
||||||
package-lock.json
|
package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
*.map
|
*.map
|
||||||
public/env.js
|
public/env.js
|
||||||
|
public/sw.js
|
||||||
|
public/index.html
|
||||||
|
public/workbox-*.js
|
||||||
|
svelte.config.js
|
||||||
public/index.html
|
public/index.html
|
||||||
/dist
|
|
||||||
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@@ -5,8 +5,7 @@
|
|||||||
"remimarsal.prettier-now",
|
"remimarsal.prettier-now",
|
||||||
"svelte.svelte-vscode",
|
"svelte.svelte-vscode",
|
||||||
"lokalise.i18n-ally",
|
"lokalise.i18n-ally",
|
||||||
"fivethree.vscode-svelte-snippets",
|
"fivethree.vscode-svelte-snippets"
|
||||||
"voorjaar.windicss-intellisense"
|
|
||||||
],
|
],
|
||||||
"unwantedRecommendations": [
|
"unwantedRecommendations": [
|
||||||
"antfu.i18n-ally"
|
"antfu.i18n-ally"
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"i18n-ally.localesPaths": "src/locales",
|
"i18n-ally.localesPaths": "src/locales",
|
||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested"
|
||||||
"windicss.enableCodeFolding": false,
|
|
||||||
}
|
}
|
||||||
32
CHANGELOG.md
32
CHANGELOG.md
@@ -2,9 +2,41 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
||||||
|
|
||||||
|
#### [0.8.7](https://git.odit.services/lfk/frontend/compare/0.8.6...0.8.7)
|
||||||
|
|
||||||
|
- Fixed listen on wrong permission🐞 [`0844215`](https://git.odit.services/lfk/frontend/commit/08442154f4bf94fc1101808b4585dc1f95afe8b2)
|
||||||
|
|
||||||
|
#### [0.8.6](https://git.odit.services/lfk/frontend/compare/0.8.5...0.8.6)
|
||||||
|
|
||||||
|
> 25 March 2021
|
||||||
|
|
||||||
|
- 🚀RELEASE v0.8.6 [`c3c95bf`](https://git.odit.services/lfk/frontend/commit/c3c95bf2916618efe6764a33d9a42d35764d15be)
|
||||||
|
- Merge pull request 'Know Production Bugs 🐞' (#109) from bugfix/107-prod_issues into dev [`d2050b5`](https://git.odit.services/lfk/frontend/commit/d2050b5948890a6077cbb41d82d1a6a1d1106652)
|
||||||
|
- Errors now toast errors❌ [`17e0805`](https://git.odit.services/lfk/frontend/commit/17e0805fe64f6d181f55b81afa502ee6443ebabe)
|
||||||
|
- Sorted translations 👀 [`82b1811`](https://git.odit.services/lfk/frontend/commit/82b1811971b974b686e7618b8a381e1589c168f6)
|
||||||
|
- Fixed missing translations for scanstations🌍 [`aeadef6`](https://git.odit.services/lfk/frontend/commit/aeadef60bbe71da09bb569d20ca7377645beba7f)
|
||||||
|
- Sorted translations🌍 [`a1ab65a`](https://git.odit.services/lfk/frontend/commit/a1ab65a0e975c02c01c603bf6d95a79ada1caa0b)
|
||||||
|
- Fixed runner import getting triggered with invalid information [`ddd9c39`](https://git.odit.services/lfk/frontend/commit/ddd9c396b6bfd39a7b1627d4975151943b367ebf)
|
||||||
|
- Removed middlename search from all files that had it [`6b92405`](https://git.odit.services/lfk/frontend/commit/6b92405bae21e78d694601cbc0b33eed56ef4533)
|
||||||
|
- Fixed mail login bug🐞📧 [`0768939`](https://git.odit.services/lfk/frontend/commit/076893981ff4f7f17330746c561acc570339adac)
|
||||||
|
- Now disabled search by middlename as a quick workaround 🐞 [`49e87cc`](https://git.odit.services/lfk/frontend/commit/49e87ccb15a7ed5edea22a3c3e235f7bee07d3f4)
|
||||||
|
- Fixed conflicting css [`50fffef`](https://git.odit.services/lfk/frontend/commit/50fffef13b8fce885964d8ac277b4ca24d944b2b)
|
||||||
|
- Commented out the buggy runner search to prevent bad UX [`fbe74a5`](https://git.odit.services/lfk/frontend/commit/fbe74a5d8090553a35576a17c97019939cf4f386)
|
||||||
|
- Fixed outsideclick not clearing import modal🛠 [`ef49e50`](https://git.odit.services/lfk/frontend/commit/ef49e507c175510eeb466d33f222755fac8a2a0b)
|
||||||
|
|
||||||
|
#### [0.8.5](https://git.odit.services/lfk/frontend/compare/0.8.4...0.8.5)
|
||||||
|
|
||||||
|
> 20 March 2021
|
||||||
|
|
||||||
|
- 🚀RELEASE v0.8.5 [`e838e6f`](https://git.odit.services/lfk/frontend/commit/e838e6f321bef1565a7e4316890a3c600b242e5a)
|
||||||
|
- Fixed dupliacate mutation 🐞 [`91dd525`](https://git.odit.services/lfk/frontend/commit/91dd5256e9545f62e4342ae5477c36262d6e3401)
|
||||||
|
|
||||||
#### [0.8.4](https://git.odit.services/lfk/frontend/compare/0.8.3...0.8.4)
|
#### [0.8.4](https://git.odit.services/lfk/frontend/compare/0.8.3...0.8.4)
|
||||||
|
|
||||||
|
> 20 March 2021
|
||||||
|
|
||||||
- CONFIG: default_username + default_password [`cc926e8`](https://git.odit.services/lfk/frontend/commit/cc926e84fb8bd9d6c9fd37349e25eb802e1bb324)
|
- CONFIG: default_username + default_password [`cc926e8`](https://git.odit.services/lfk/frontend/commit/cc926e84fb8bd9d6c9fd37349e25eb802e1bb324)
|
||||||
|
- 🚀RELEASE v0.8.4 [`3d4dc2d`](https://git.odit.services/lfk/frontend/commit/3d4dc2d72b129f0134ae9f230810c3301dbd5caa)
|
||||||
- CONFIG: add 'demo' as default username/password [`ba34710`](https://git.odit.services/lfk/frontend/commit/ba3471068ab00e2d5dbe21d6d763094e662f8347)
|
- CONFIG: add 'demo' as default username/password [`ba34710`](https://git.odit.services/lfk/frontend/commit/ba3471068ab00e2d5dbe21d6d763094e662f8347)
|
||||||
|
|
||||||
#### [0.8.3](https://git.odit.services/lfk/frontend/compare/0.8.2...0.8.3)
|
#### [0.8.3](https://git.odit.services/lfk/frontend/compare/0.8.2...0.8.3)
|
||||||
|
|||||||
12
Dockerfile
12
Dockerfile
@@ -1,14 +1,18 @@
|
|||||||
FROM node:15.5.1-alpine3.12
|
FROM node:15.5.1-alpine3.12
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
RUN npm i -g pnpm
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN yarn
|
RUN pnpm i
|
||||||
COPY package.json *.config.js index.html ./
|
COPY package.json *.config.js workbox-config.js template-copy.js index.template.html s-config.template.js ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY public ./public
|
COPY public ./public
|
||||||
RUN yarn build
|
RUN pnpm run build
|
||||||
# final image
|
# final image
|
||||||
FROM alpine
|
FROM alpine
|
||||||
COPY --from=0 /app/dist /app
|
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=1 /app /usr/share/nginx/html
|
||||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||||
22
README.md
22
README.md
@@ -1,22 +0,0 @@
|
|||||||
# @odit/lfk-frontend
|
|
||||||
|
|
||||||
## ✒️ Overview
|
|
||||||
This is an API client for [https://git.odit.services/lfk/backend](@lfk/backend)
|
|
||||||
- WebApp built with [Svelte](https://svelte.dev), [WindiCSS](https://windicss.org/) (to compile [TailwindCSS](https://tailwindcss.com/)) and [Vite](https://vitejs.dev).
|
|
||||||
|
|
||||||
This application is intended for use by admin users/ members only.
|
|
||||||
|
|
||||||
## 🚀 Getting Started
|
|
||||||
```
|
|
||||||
yarn
|
|
||||||
```
|
|
||||||
## Development
|
|
||||||
```
|
|
||||||
yarn dev
|
|
||||||
/
|
|
||||||
yarn dev --open
|
|
||||||
```
|
|
||||||
## Build
|
|
||||||
```
|
|
||||||
yarn build
|
|
||||||
```
|
|
||||||
@@ -10,13 +10,14 @@
|
|||||||
<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" />
|
||||||
<title>Lauf für Kaya! - Admin</title>
|
<title>Lauf für Kaya! - Admin</title>
|
||||||
|
__TAILWIND_INSERT__
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.8.4-RELEASE_INFO</span>
|
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.8.7-RELEASE_INFO</span>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<script src="/env.js"></script>
|
<script src="/env.js"></script>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script defer type="module" src="/_dist_/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -6,15 +6,6 @@ http {
|
|||||||
server {
|
server {
|
||||||
error_page 404 /index.html;
|
error_page 404 /index.html;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
location = /index.html {
|
|
||||||
add_header Cache-Control 'no-store';
|
|
||||||
}
|
|
||||||
location = / {
|
|
||||||
add_header Cache-Control 'no-store';
|
|
||||||
}
|
|
||||||
location = /env.js {
|
|
||||||
add_header Cache-Control 'no-store';
|
|
||||||
}
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|||||||
56
package.json
56
package.json
@@ -1,39 +1,45 @@
|
|||||||
{
|
{
|
||||||
"name": "@odit/lfk-frontend",
|
"name": "@odit/lfk-frontend",
|
||||||
"version": "0.8.4",
|
"version": "0.8.7",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n-order": "node order.js",
|
"i18n-order": "node order.js",
|
||||||
"dev": "vite",
|
"dev:all": "yarn prebuild && snowpack dev",
|
||||||
"build": "vite build",
|
"dev": "cross-env NODE_ENV_ODIT=development_fast node template-copy.js && yarn build:sw && snowpack dev",
|
||||||
|
"build": "yarn prebuild && snowpack build",
|
||||||
|
"prebuild": "cross-env NODE_ENV_ODIT=production node template-copy.js && yarn build:sw",
|
||||||
|
"build:sw": "workbox generateSW workbox-config.js",
|
||||||
"release": "release-it",
|
"release": "release-it",
|
||||||
"licenses:export": "license-exporter --json -o public"
|
"licenses:export": "license-exporter --json -o public"
|
||||||
},
|
},
|
||||||
"license": "CC-BY-NC-SA-4.0",
|
"license": "CC-BY-NC-SA-4.0",
|
||||||
"devDependencies": {
|
"dependencies": {
|
||||||
"@odit/lfk-client-js": "0.9.2",
|
"@odit/lfk-client-js": "0.6.4",
|
||||||
"csvtojson": "2.0.10",
|
"csvtojson": "^2.0.10",
|
||||||
"gridjs": "3.4.0",
|
"gridjs": "3.3.0",
|
||||||
"localforage": "1.9.0",
|
"localforage": "1.9.0",
|
||||||
"marked": "2.0.1",
|
"marked": "^2.0.1",
|
||||||
"svelte-focus-trap": "1.2.0",
|
"svelte-focus-trap": "1.0.1",
|
||||||
"svelte-i18n": "3.3.9",
|
"svelte-i18n": "3.3.7",
|
||||||
"svelte-select": "3.17.0",
|
"svelte-select": "^3.17.0",
|
||||||
"tailwindcss": "2.0.4",
|
"tailwindcss": "2.0.3",
|
||||||
"tinro": "0.6.1",
|
"tinro": "0.6.1",
|
||||||
"toastify-js": "1.10.0",
|
"toastify-js": "1.9.3",
|
||||||
"validator": "13.5.2",
|
"validator": "13.5.2",
|
||||||
"xlsx": "0.16.9",
|
"xlsx": "^0.16.9"
|
||||||
"@odit/license-exporter": "0.0.11",
|
},
|
||||||
"auto-changelog": "2.2.1",
|
"devDependencies": {
|
||||||
|
"@odit/license-exporter": "^0.0.11",
|
||||||
|
"@snowpack/plugin-svelte": "3.5.2",
|
||||||
|
"auto-changelog": "^2.2.1",
|
||||||
"autoprefixer": "10.2.5",
|
"autoprefixer": "10.2.5",
|
||||||
"release-it": "14.5.1",
|
"cross-env": "^7.0.3",
|
||||||
"svelte": "3.37.0",
|
"postcss": "8.2.8",
|
||||||
"svelte-preprocess": "4.7.0",
|
"postcss-load-config": "3.0.1",
|
||||||
"vite": "2.1.5",
|
"release-it": "^14.4.1",
|
||||||
"vite-plugin-windicss": "0.12.1",
|
"snowpack": "3.0.13",
|
||||||
"@svitejs/vite-plugin-svelte": "0.11.1",
|
"svelte": "3.35.0",
|
||||||
"@types/html-minifier": "4.0.0",
|
"svelte-preprocess": "4.6.9",
|
||||||
"html-minifier": "4.0.0"
|
"workbox-cli": "6.1.2"
|
||||||
},
|
},
|
||||||
"release-it": {
|
"release-it": {
|
||||||
"git": {
|
"git": {
|
||||||
@@ -49,7 +55,7 @@
|
|||||||
"publish": false
|
"publish": false
|
||||||
},
|
},
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node versionbuilder.js && git add index.html && node order.js && git add src/locales"
|
"after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node versionbuilder.js && git add index.template.html && node order.js && git add src/locales"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Nostrud tempor dolor aute ea excepteur aute mollit elit eiusmod exercitation. Magna laborum pariatur adipisicing pariatur cupidatat exercitation duis aliquip pariatur sint exercitation deserunt labore. Consectetur id laboris dolore nostrud do velit ipsum. Eu laboris velit do commodo ad ea sint ex cillum. Cillum ipsum qui eiusmod laborum mollit sunt dolore incididunt. Cillum sunt culpa veniam voluptate et qui ut magna anim occaecat ut mollit dolor. Duis irure proident eu incididunt dolore sunt nisi aute dolore amet eu fugiat laboris quis.
|
|
||||||
File diff suppressed because one or more lines are too long
6
s-config.template.js
Normal file
6
s-config.template.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
const sveltePreprocess = require('svelte-preprocess');
|
||||||
|
const preprocess = sveltePreprocess(__insert__);
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preprocess
|
||||||
|
};
|
||||||
26
snowpack.config.js
Normal file
26
snowpack.config.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/** @type {import("snowpack").SnowpackUserConfig } */
|
||||||
|
module.exports = {
|
||||||
|
mount: {
|
||||||
|
public: '/',
|
||||||
|
src: '/_dist_'
|
||||||
|
},
|
||||||
|
plugins: [ '@snowpack/plugin-svelte' ],
|
||||||
|
routes: [
|
||||||
|
/* Enable an SPA Fallback in development: */
|
||||||
|
{ match: 'routes', src: '.*', dest: '/index.html' }
|
||||||
|
],
|
||||||
|
packageOptions: {
|
||||||
|
/* ... */
|
||||||
|
sourceMap: false
|
||||||
|
},
|
||||||
|
devOptions: {
|
||||||
|
/* ... */
|
||||||
|
},
|
||||||
|
buildOptions: {
|
||||||
|
/* ... */
|
||||||
|
},
|
||||||
|
alias: {
|
||||||
|
/* ... */
|
||||||
|
},
|
||||||
|
optimize: { bundle: true, minify: true }
|
||||||
|
};
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import "./TailwindStyles.svelte";
|
||||||
|
import "toastify-js/src/toastify.css";
|
||||||
|
import "gridjs/dist/theme/mermaid.css";
|
||||||
import { Route, router } from "tinro";
|
import { Route, router } from "tinro";
|
||||||
router.subscribe((routeInfo) => {
|
router.subscribe((routeInfo) => {
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
@@ -50,6 +53,7 @@
|
|||||||
import { OpenAPI } from "@odit/lfk-client-js";
|
import { OpenAPI } from "@odit/lfk-client-js";
|
||||||
import UserDetail from "./components/users/UserDetail.svelte";
|
import UserDetail from "./components/users/UserDetail.svelte";
|
||||||
OpenAPI.BASE = config.baseurl;
|
OpenAPI.BASE = config.baseurl;
|
||||||
|
import { register as registerSW } from "./swmodule";
|
||||||
import TeamDetail from "./components/teams/TeamDetail.svelte";
|
import TeamDetail from "./components/teams/TeamDetail.svelte";
|
||||||
import UserPermissions from "./components/users/UserPermissions.svelte";
|
import UserPermissions from "./components/users/UserPermissions.svelte";
|
||||||
import GroupPermissions from "./components/groups/GroupPermissions.svelte";
|
import GroupPermissions from "./components/groups/GroupPermissions.svelte";
|
||||||
@@ -71,6 +75,7 @@
|
|||||||
import Scans from "./components/scans/Scans.svelte";
|
import Scans from "./components/scans/Scans.svelte";
|
||||||
import ScanDetail from "./components/scans/ScanDetail.svelte";
|
import ScanDetail from "./components/scans/ScanDetail.svelte";
|
||||||
store.init();
|
store.init();
|
||||||
|
registerSW();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Route>
|
<Route>
|
||||||
|
|||||||
6
src/TailwindStyles.svelte
Normal file
6
src/TailwindStyles.svelte
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<style global>
|
||||||
|
/*! @import */
|
||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
</style>
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
store.init();
|
store.init();
|
||||||
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
||||||
import Footer from "../general/Footer.svelte";
|
import Footer from "../general/Footer.svelte";
|
||||||
|
import isEmail from "validator/es/lib/isEmail";
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
// ------
|
// ------
|
||||||
let username = config.default_username || "";
|
let username = config.default_username || "";
|
||||||
@@ -36,10 +37,19 @@
|
|||||||
text: $_("login_is_checked"),
|
text: $_("login_is_checked"),
|
||||||
duration: 500,
|
duration: 500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
AuthService.authControllerLogin({
|
let postdata = {};
|
||||||
|
if (isEmail(username)) {
|
||||||
|
postdata = {
|
||||||
|
email: username,
|
||||||
|
password,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
postdata = {
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
})
|
};
|
||||||
|
}
|
||||||
|
AuthService.authControllerLogin(postdata)
|
||||||
.then(async (result) => {
|
.then(async (result) => {
|
||||||
await localForage.setItem("logindata", result);
|
await localForage.setItem("logindata", result);
|
||||||
OpenAPI.TOKEN = result.access_token;
|
OpenAPI.TOKEN = result.access_token;
|
||||||
|
|||||||
@@ -71,10 +71,6 @@
|
|||||||
<tbody class="divide-y divide-gray-200">
|
<tbody class="divide-y divide-gray-200">
|
||||||
{#each current_donations as donation}
|
{#each current_donations as donation}
|
||||||
{#if donation.donor.firstname
|
{#if donation.donor.firstname
|
||||||
.toLowerCase()
|
|
||||||
.includes(
|
|
||||||
searchvalue.toLowerCase()
|
|
||||||
) || donation.donor.middlename
|
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(
|
.includes(
|
||||||
searchvalue.toLowerCase()
|
searchvalue.toLowerCase()
|
||||||
@@ -84,10 +80,6 @@
|
|||||||
searchvalue.toLowerCase()
|
searchvalue.toLowerCase()
|
||||||
) || donation.runner?.firstname
|
) || donation.runner?.firstname
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(
|
|
||||||
searchvalue.toLowerCase()
|
|
||||||
) || donation.runner?.middlename
|
|
||||||
.toLowerCase()
|
|
||||||
.includes(
|
.includes(
|
||||||
searchvalue.toLowerCase()
|
searchvalue.toLowerCase()
|
||||||
) || donation.runner?.lastname
|
) || donation.runner?.lastname
|
||||||
|
|||||||
@@ -85,10 +85,6 @@
|
|||||||
<tbody class="divide-y divide-gray-200">
|
<tbody class="divide-y divide-gray-200">
|
||||||
{#each current_donors as donor}
|
{#each current_donors as donor}
|
||||||
{#if donor.firstname
|
{#if donor.firstname
|
||||||
.toLowerCase()
|
|
||||||
.includes(
|
|
||||||
searchvalue.toLowerCase()
|
|
||||||
) || donor.middlename
|
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(
|
.includes(
|
||||||
searchvalue.toLowerCase()
|
searchvalue.toLowerCase()
|
||||||
|
|||||||
@@ -6,13 +6,15 @@
|
|||||||
let html = "";
|
let html = "";
|
||||||
async function load() {
|
async function load() {
|
||||||
let md = await fetch("/imprint_" + getLocaleFromNavigator() + ".md");
|
let md = await fetch("/imprint_" + getLocaleFromNavigator() + ".md");
|
||||||
if((await md.text()).includes("<meta")){
|
let text = (await md.text()).toString();
|
||||||
|
if(text.includes("<meta")){
|
||||||
md.ok=false
|
md.ok=false
|
||||||
}
|
}
|
||||||
if (!md.ok) {
|
if (!md.ok) {
|
||||||
md = await fetch("/imprint_en.md");
|
md = await fetch("/imprint_en.md");
|
||||||
|
text = await md.text();
|
||||||
}
|
}
|
||||||
html = marked(await md.text());
|
html = marked(text);
|
||||||
}
|
}
|
||||||
const promise = load();
|
const promise = load();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,13 +6,15 @@
|
|||||||
let html = "";
|
let html = "";
|
||||||
async function load() {
|
async function load() {
|
||||||
let md = await fetch("/privacy_" + getLocaleFromNavigator() + ".md");
|
let md = await fetch("/privacy_" + getLocaleFromNavigator() + ".md");
|
||||||
if((await md.text()).includes("<meta")){
|
let text = (await md.text()).toString();
|
||||||
|
if(text.includes("<meta")){
|
||||||
md.ok=false
|
md.ok=false
|
||||||
}
|
}
|
||||||
if (!md.ok) {
|
if (!md.ok) {
|
||||||
md = await fetch("/privacy_en.md");
|
md = await fetch("/privacy_en.md");
|
||||||
|
text = await md.text();
|
||||||
}
|
}
|
||||||
html = marked(await md.text());
|
html = marked(text);
|
||||||
}
|
}
|
||||||
const promise = load();
|
const promise = load();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
duration: -1,
|
duration: -1,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
let count = 0;
|
let count = 0;
|
||||||
for (const o of orgs) {
|
for await (const o of orgs) {
|
||||||
const runners = await RunnerOrganizationService.runnerOrganizationControllerGetRunners(
|
const runners = await RunnerOrganizationService.runnerOrganizationControllerGetRunners(
|
||||||
o.id
|
o.id
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,6 +19,11 @@
|
|||||||
export let current_runners;
|
export let current_runners;
|
||||||
export let import_modal_open;
|
export let import_modal_open;
|
||||||
$: searchvalue = "";
|
$: searchvalue = "";
|
||||||
|
$: importButtonEnabled =
|
||||||
|
recent_processed &&
|
||||||
|
(!(selected_org_or_team == "" || selected_org_or_team == null) ||
|
||||||
|
!(passed_org?.id == null || passed_org?.id == 0) ||
|
||||||
|
!(passed_team?.id == null || passed_team?.id == 0));
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
function cancelModal() {
|
function cancelModal() {
|
||||||
json_output = [];
|
json_output = [];
|
||||||
@@ -44,7 +49,10 @@
|
|||||||
groups = groups.concat(orgs);
|
groups = groups.concat(orgs);
|
||||||
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
||||||
const teams = val.map((r) => {
|
const teams = val.map((r) => {
|
||||||
return { label: `${r.parentGroup.name} > ${r.name}`, value: `TEAM_${r.id}` };
|
return {
|
||||||
|
label: `${r.parentGroup.name} > ${r.name}`,
|
||||||
|
value: `TEAM_${r.id}`,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
groups = groups.concat(teams);
|
groups = groups.concat(teams);
|
||||||
});
|
});
|
||||||
@@ -120,6 +128,13 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
recent_processed = true;
|
recent_processed = true;
|
||||||
|
Toastify({
|
||||||
|
text: $_("error-during-import"),
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (opened_from === "TeamDetail") {
|
if (opened_from === "TeamDetail") {
|
||||||
@@ -137,6 +152,13 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
recent_processed = true;
|
recent_processed = true;
|
||||||
|
Toastify({
|
||||||
|
text: $_("error-during-import"),
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (opened_from === "RunnerOverview") {
|
if (opened_from === "RunnerOverview") {
|
||||||
@@ -160,6 +182,13 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
recent_processed = true;
|
recent_processed = true;
|
||||||
|
Toastify({
|
||||||
|
text: $_("error-during-import"),
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (selected_org_or_team.includes("TEAM_")) {
|
if (selected_org_or_team.includes("TEAM_")) {
|
||||||
@@ -182,6 +211,13 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
recent_processed = true;
|
recent_processed = true;
|
||||||
|
Toastify({
|
||||||
|
text: $_("error-during-import"),
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -195,7 +231,7 @@
|
|||||||
use:focusTrap
|
use:focusTrap
|
||||||
use:clickOutside
|
use:clickOutside
|
||||||
on:click_outside={() => {
|
on:click_outside={() => {
|
||||||
import_modal_open = false;
|
cancelModal();
|
||||||
}}>
|
}}>
|
||||||
<div
|
<div
|
||||||
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
@@ -349,6 +385,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
disabled={!importButtonEnabled}
|
||||||
|
class:opacity-50={!importButtonEnabled}
|
||||||
on:click={importAction}
|
on:click={importAction}
|
||||||
type="button"
|
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">
|
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">
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
generateSponsoringContract('de');
|
generateSponsoringContract('de');
|
||||||
}}
|
}}
|
||||||
type="submit"
|
type="submit"
|
||||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900 inline-flex"
|
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
|
||||||
role="menuitem">
|
role="menuitem">
|
||||||
{$_('german')}
|
{$_('german')}
|
||||||
</button>
|
</button>
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
generateSponsoringContract('en');
|
generateSponsoringContract('en');
|
||||||
}}
|
}}
|
||||||
type="submit"
|
type="submit"
|
||||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900 inline-flex"
|
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
|
||||||
role="menuitem">
|
role="menuitem">
|
||||||
{$_('english')}
|
{$_('english')}
|
||||||
</button>
|
</button>
|
||||||
@@ -246,10 +246,6 @@
|
|||||||
<tbody class="divide-y divide-gray-200">
|
<tbody class="divide-y divide-gray-200">
|
||||||
{#each current_runners as runner}
|
{#each current_runners as runner}
|
||||||
{#if runner.firstname
|
{#if runner.firstname
|
||||||
.toLowerCase()
|
|
||||||
.includes(
|
|
||||||
searchvalue.toLowerCase()
|
|
||||||
) || runner.middlename
|
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(
|
.includes(
|
||||||
searchvalue.toLowerCase()
|
searchvalue.toLowerCase()
|
||||||
|
|||||||
@@ -81,10 +81,6 @@
|
|||||||
.includes(
|
.includes(
|
||||||
searchvalue.toLowerCase()
|
searchvalue.toLowerCase()
|
||||||
) || scan.runner?.firstname
|
) || scan.runner?.firstname
|
||||||
.toLowerCase()
|
|
||||||
.includes(
|
|
||||||
searchvalue.toLowerCase()
|
|
||||||
) || scan.runner?.middlename
|
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(
|
.includes(
|
||||||
searchvalue.toLowerCase()
|
searchvalue.toLowerCase()
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
<div class="mt-2 mb-6">
|
<div class="mt-2 mb-6">
|
||||||
<label
|
<label
|
||||||
for="token"
|
for="token"
|
||||||
class="block text-sm font-medium text-gray-700">Token</label>
|
class="block text-sm font-medium text-gray-700">{$_('token')}</label>
|
||||||
<div on:click={copy} class="inline-flex">
|
<div on:click={copy} class="inline-flex">
|
||||||
<p
|
<p
|
||||||
name="token"
|
name="token"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<section class="container p-5">
|
<section class="container p-5">
|
||||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||||
{$_('teams')}
|
{$_('teams')}
|
||||||
{#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')}
|
{#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:CREATE')}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
modal_open = true;
|
modal_open = true;
|
||||||
@@ -27,6 +27,6 @@
|
|||||||
<TeamsOverview bind:current_teams />
|
<TeamsOverview bind:current_teams />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')}
|
{#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:CREATE')}
|
||||||
<AddTeamModal bind:current_teams bind:modal_open />
|
<AddTeamModal bind:current_teams bind:modal_open />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
duration: -1,
|
duration: -1,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
let count = 0;
|
let count = 0;
|
||||||
for (const t of teams) {
|
for await (const t of teams) {
|
||||||
count++;
|
count++;
|
||||||
const runners = await RunnerTeamService.runnerTeamControllerGetRunners(
|
const runners = await RunnerTeamService.runnerTeamControllerGetRunners(
|
||||||
t.id
|
t.id
|
||||||
|
|||||||
14
src/index.js
Normal file
14
src/index.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import App from './App.svelte';
|
||||||
|
|
||||||
|
const app = new App({
|
||||||
|
target: document.body
|
||||||
|
});
|
||||||
|
|
||||||
|
export default app;
|
||||||
|
// HMR
|
||||||
|
if (import.meta.hot) {
|
||||||
|
import.meta.hot.accept();
|
||||||
|
import.meta.hot.dispose(() => {
|
||||||
|
app.$destroy();
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
"change-your-password-here": "Hier kannst du dein Passwort ändern",
|
"change-your-password-here": "Hier kannst du dein Passwort ändern",
|
||||||
"changing-your-password": "Passwort wird geändert",
|
"changing-your-password": "Passwort wird geändert",
|
||||||
"city": "Stadt",
|
"city": "Stadt",
|
||||||
|
"click-to-copy-token-to-clipboard": "Klicke auf den Token, um ihn in deine Zwischenablage zu kopieren",
|
||||||
"close": "Schließen",
|
"close": "Schließen",
|
||||||
"configure-the-tracks-and-minimum-lap-times": "Bearbeite die Tracks und ihre minimale Rundenzeit",
|
"configure-the-tracks-and-minimum-lap-times": "Bearbeite die Tracks und ihre minimale Rundenzeit",
|
||||||
"confirm": "Bestätigen",
|
"confirm": "Bestätigen",
|
||||||
@@ -62,6 +63,7 @@
|
|||||||
"contact-is-not-a-member-in-any-group": "Kontakt gehört zu keiner Gruppe",
|
"contact-is-not-a-member-in-any-group": "Kontakt gehört zu keiner Gruppe",
|
||||||
"contacts": "Kontakte",
|
"contacts": "Kontakte",
|
||||||
"contacts-are-being-loaded": "Kontakte werden geladen ...",
|
"contacts-are-being-loaded": "Kontakte werden geladen ...",
|
||||||
|
"copied-token-to-clipboard": "Token wurde in die Zwischenablage kopiert",
|
||||||
"count_organizations": "Organisationen (Anzahl)",
|
"count_organizations": "Organisationen (Anzahl)",
|
||||||
"count_teams": "Teams (Anzahl)",
|
"count_teams": "Teams (Anzahl)",
|
||||||
"create": "Erstellen",
|
"create": "Erstellen",
|
||||||
@@ -124,6 +126,7 @@
|
|||||||
"description-optional": "Beschreibung (optional)",
|
"description-optional": "Beschreibung (optional)",
|
||||||
"deselect-all": "Alle abwählen",
|
"deselect-all": "Alle abwählen",
|
||||||
"details": "Details",
|
"details": "Details",
|
||||||
|
"disabled": "deaktiviert",
|
||||||
"distance": "Distanz",
|
"distance": "Distanz",
|
||||||
"distance-donation": "Sponsoring",
|
"distance-donation": "Sponsoring",
|
||||||
"distance-in-km": "Distanz (in KM)",
|
"distance-in-km": "Distanz (in KM)",
|
||||||
@@ -151,7 +154,10 @@
|
|||||||
"edit-permissions": "Berechtigungen bearbeiten",
|
"edit-permissions": "Berechtigungen bearbeiten",
|
||||||
"email_address_or_username": "E-Mail-Adresse/ Benutzername",
|
"email_address_or_username": "E-Mail-Adresse/ Benutzername",
|
||||||
"enabled": "aktiviert",
|
"enabled": "aktiviert",
|
||||||
|
"enabled_large": "Disabled",
|
||||||
"english": "Englisch",
|
"english": "Englisch",
|
||||||
|
"error-during-import": "Fehler beim Importieren",
|
||||||
|
"error-whyile-copying-to-clipboard": "Fehler beim Kopieren in die Zwischenablage",
|
||||||
"error_on_login": "😢Fehler beim Login",
|
"error_on_login": "😢Fehler beim Login",
|
||||||
"erteilte": "Direkt erteilte",
|
"erteilte": "Direkt erteilte",
|
||||||
"everything-concerning-your-profile": "Alles zu deinem Profil",
|
"everything-concerning-your-profile": "Alles zu deinem Profil",
|
||||||
@@ -256,6 +262,7 @@
|
|||||||
"permissions": "Berechtigungen",
|
"permissions": "Berechtigungen",
|
||||||
"permissions-updated": "Berechtigungen aktualisiert!",
|
"permissions-updated": "Berechtigungen aktualisiert!",
|
||||||
"phone": "Telefon",
|
"phone": "Telefon",
|
||||||
|
"please-copy-the-token-and-store-it-somewhere-save": "Bitte kopiere dir den Token und bewahre ihn gut auf.",
|
||||||
"please-provide-a-password": "Bitte gebe ein Passwort an...",
|
"please-provide-a-password": "Bitte gebe ein Passwort an...",
|
||||||
"please-provide-the-nessecary-information-to-add-a-new-donor": "Bitte mach die Notwendigen Angaben, um eine neue Sponsor:in zu erstellen",
|
"please-provide-the-nessecary-information-to-add-a-new-donor": "Bitte mach die Notwendigen Angaben, um eine neue Sponsor:in zu erstellen",
|
||||||
"please-provide-the-nessecary-information-to-create-a-new-donation": "Bitte gebe alle für das Sponsoring notwendigen Daten an.",
|
"please-provide-the-nessecary-information-to-create-a-new-donation": "Bitte gebe alle für das Sponsoring notwendigen Daten an.",
|
||||||
@@ -268,6 +275,7 @@
|
|||||||
"please-provide-the-required-information-to-add-a-new-team": "Bitte gebe alle nötigen Informationen an, im das neue Team zu erstellen.",
|
"please-provide-the-required-information-to-add-a-new-team": "Bitte gebe alle nötigen Informationen an, im das neue Team zu erstellen.",
|
||||||
"please-provide-the-required-information-to-add-a-new-track": "Bitte die benötigten Informationen angeben.",
|
"please-provide-the-required-information-to-add-a-new-track": "Bitte die benötigten Informationen angeben.",
|
||||||
"please-provide-the-required-information-to-add-a-new-user": "Bitte gebe alle nötigen Informationen an, im die neue Benutzer:in zu erstellen.",
|
"please-provide-the-required-information-to-add-a-new-user": "Bitte gebe alle nötigen Informationen an, im die neue Benutzer:in zu erstellen.",
|
||||||
|
"please-provide-the-required-information-to-create-a-new-scanstation": "Bitte gebe alle für eine Scannerstation notwendigen Informationen an",
|
||||||
"please-request-a-new-reset-mail": "Bitte eine neue Passwortreset-Mail anfordern...",
|
"please-request-a-new-reset-mail": "Bitte eine neue Passwortreset-Mail anfordern...",
|
||||||
"privacy": "Datenschutz",
|
"privacy": "Datenschutz",
|
||||||
"privacy-loading": "Datenschutzerklärung lädt...",
|
"privacy-loading": "Datenschutzerklärung lädt...",
|
||||||
@@ -297,6 +305,8 @@
|
|||||||
"scans": "Scans",
|
"scans": "Scans",
|
||||||
"scans-are-being-loaded": "Scans werden geladen",
|
"scans-are-being-loaded": "Scans werden geladen",
|
||||||
"scanstation": "Scanner Station",
|
"scanstation": "Scanner Station",
|
||||||
|
"scanstation-added": "Station wurde erstellt",
|
||||||
|
"scanstation-is-being-added": "Scannerstation wird angelegt...",
|
||||||
"scanstations": "Scanner Stationen",
|
"scanstations": "Scanner Stationen",
|
||||||
"scanstations-are-being-loaded": "Scannerstationen werden geladen...",
|
"scanstations-are-being-loaded": "Scannerstationen werden geladen...",
|
||||||
"search-for-an-organization-by-name-or-id": "Suche eine Organisation (via Name oder Id)",
|
"search-for-an-organization-by-name-or-id": "Suche eine Organisation (via Name oder Id)",
|
||||||
@@ -323,6 +333,7 @@
|
|||||||
"teams-are-being-loaded": "Teams werden geladen ...",
|
"teams-are-being-loaded": "Teams werden geladen ...",
|
||||||
"the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number": "Die angegebene Telefonnummer ist nicht korrekt. <br /> Bitte gebe eine Telefonnummer im internationalen Format an...",
|
"the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number": "Die angegebene Telefonnummer ist nicht korrekt. <br /> Bitte gebe eine Telefonnummer im internationalen Format an...",
|
||||||
"the-scans-distance-must-be-greater-than-0m": "Die Distanz muss größer als 0m sein.",
|
"the-scans-distance-must-be-greater-than-0m": "Die Distanz muss größer als 0m sein.",
|
||||||
|
"the-scanstations-api-token-will-only-get-displayed-once-you-wont-be-able-to-change-or-view-it-again": "Der Scannerstation Token wird nur einmal angezeigt - du kannst ihn nicht ändern oder ihn dir nochmal anzeigen lassen!",
|
||||||
"there-are-no-contacts-added-yet": "Es wurden noch keine Kontakte hinzugefügt.",
|
"there-are-no-contacts-added-yet": "Es wurden noch keine Kontakte hinzugefügt.",
|
||||||
"there-are-no-donations-yet": "Es gibt noch keine Sponsorings",
|
"there-are-no-donations-yet": "Es gibt noch keine Sponsorings",
|
||||||
"there-are-no-donors-yet": "Es gibt noch keine Sponsor:innen",
|
"there-are-no-donors-yet": "Es gibt noch keine Sponsor:innen",
|
||||||
@@ -334,6 +345,7 @@
|
|||||||
"there-are-no-users-added-yet": "Es wurden noch keine Benutzer hinzugefügt.",
|
"there-are-no-users-added-yet": "Es wurden noch keine Benutzer hinzugefügt.",
|
||||||
"this-might-take-a-moment": "Das könnte einen kleinen Moment dauern",
|
"this-might-take-a-moment": "Das könnte einen kleinen Moment dauern",
|
||||||
"this-scanstation-is": "Diese Station ist",
|
"this-scanstation-is": "Diese Station ist",
|
||||||
|
"token": "Token",
|
||||||
"total-distance": "gelaufene Strecke",
|
"total-distance": "gelaufene Strecke",
|
||||||
"total-donation-amount": "Gesamtbetrag",
|
"total-donation-amount": "Gesamtbetrag",
|
||||||
"total-donations": "Spendensumme",
|
"total-donations": "Spendensumme",
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
"change-your-password-here": "Change your password here",
|
"change-your-password-here": "Change your password here",
|
||||||
"changing-your-password": "Changing your password",
|
"changing-your-password": "Changing your password",
|
||||||
"city": "City",
|
"city": "City",
|
||||||
|
"click-to-copy-token-to-clipboard": "Click to copy the token to your clipboard",
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
"configure-the-tracks-and-minimum-lap-times": "configure the tracks & minimum lap times",
|
"configure-the-tracks-and-minimum-lap-times": "configure the tracks & minimum lap times",
|
||||||
"confirm": "Confirm",
|
"confirm": "Confirm",
|
||||||
@@ -62,6 +63,7 @@
|
|||||||
"contact-is-not-a-member-in-any-group": "Contact is not a member in any group",
|
"contact-is-not-a-member-in-any-group": "Contact is not a member in any group",
|
||||||
"contacts": "Contacts",
|
"contacts": "Contacts",
|
||||||
"contacts-are-being-loaded": "contacts are being loaded...",
|
"contacts-are-being-loaded": "contacts are being loaded...",
|
||||||
|
"copied-token-to-clipboard": "Copied token to clipboard",
|
||||||
"count_organizations": "# Organizations",
|
"count_organizations": "# Organizations",
|
||||||
"count_teams": "# Teams",
|
"count_teams": "# Teams",
|
||||||
"create": "Create",
|
"create": "Create",
|
||||||
@@ -124,6 +126,7 @@
|
|||||||
"description-optional": "Description (optional)",
|
"description-optional": "Description (optional)",
|
||||||
"deselect-all": "deselect all",
|
"deselect-all": "deselect all",
|
||||||
"details": "Details",
|
"details": "Details",
|
||||||
|
"disabled": "disabled",
|
||||||
"distance": "Distance",
|
"distance": "Distance",
|
||||||
"distance-donation": "distance donation",
|
"distance-donation": "distance donation",
|
||||||
"distance-in-km": "Distance in km",
|
"distance-in-km": "Distance in km",
|
||||||
@@ -151,7 +154,10 @@
|
|||||||
"edit-permissions": "edit permissions",
|
"edit-permissions": "edit permissions",
|
||||||
"email_address_or_username": "Email / username",
|
"email_address_or_username": "Email / username",
|
||||||
"enabled": "enabled",
|
"enabled": "enabled",
|
||||||
|
"enabled_large": "Enabled",
|
||||||
"english": "English",
|
"english": "English",
|
||||||
|
"error-during-import": "Error during import",
|
||||||
|
"error-whyile-copying-to-clipboard": "Error while copying to clipboard",
|
||||||
"error_on_login": "Error on login",
|
"error_on_login": "Error on login",
|
||||||
"erteilte": "Directly granted",
|
"erteilte": "Directly granted",
|
||||||
"everything-concerning-your-profile": "Everything concerning your profile",
|
"everything-concerning-your-profile": "Everything concerning your profile",
|
||||||
@@ -256,6 +262,7 @@
|
|||||||
"permissions": "Permissions",
|
"permissions": "Permissions",
|
||||||
"permissions-updated": "Permissions updated!",
|
"permissions-updated": "Permissions updated!",
|
||||||
"phone": "Phone",
|
"phone": "Phone",
|
||||||
|
"please-copy-the-token-and-store-it-somewhere-save": "Please copy the token and store it somewhere safe.",
|
||||||
"please-provide-a-password": "Please provide a password...",
|
"please-provide-a-password": "Please provide a password...",
|
||||||
"please-provide-the-nessecary-information-to-add-a-new-donor": "Please provide the nessecary information to add a new donor",
|
"please-provide-the-nessecary-information-to-add-a-new-donor": "Please provide the nessecary information to add a new donor",
|
||||||
"please-provide-the-nessecary-information-to-create-a-new-donation": "Please provide the nessecary information to create a new donation",
|
"please-provide-the-nessecary-information-to-create-a-new-donation": "Please provide the nessecary information to create a new donation",
|
||||||
@@ -268,6 +275,7 @@
|
|||||||
"please-provide-the-required-information-to-add-a-new-team": "Please provide the required information to add a new team.",
|
"please-provide-the-required-information-to-add-a-new-team": "Please provide the required information to add a new team.",
|
||||||
"please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.",
|
"please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.",
|
||||||
"please-provide-the-required-information-to-add-a-new-user": "Please provide the required information to add a new user.",
|
"please-provide-the-required-information-to-add-a-new-user": "Please provide the required information to add a new user.",
|
||||||
|
"please-provide-the-required-information-to-create-a-new-scanstation": "Please provide the required information to create a new scanstation",
|
||||||
"please-request-a-new-reset-mail": "Please request a new reset mail...",
|
"please-request-a-new-reset-mail": "Please request a new reset mail...",
|
||||||
"privacy": "Privacy",
|
"privacy": "Privacy",
|
||||||
"privacy-loading": "Privacy loading...",
|
"privacy-loading": "Privacy loading...",
|
||||||
@@ -297,6 +305,8 @@
|
|||||||
"scans": "Scans",
|
"scans": "Scans",
|
||||||
"scans-are-being-loaded": "Scans are being loaded",
|
"scans-are-being-loaded": "Scans are being loaded",
|
||||||
"scanstation": "Scanstation",
|
"scanstation": "Scanstation",
|
||||||
|
"scanstation-added": "Scanstation added",
|
||||||
|
"scanstation-is-being-added": "Adding scanstation...",
|
||||||
"scanstations": "Scanstations",
|
"scanstations": "Scanstations",
|
||||||
"scanstations-are-being-loaded": "Loading scanstations...",
|
"scanstations-are-being-loaded": "Loading scanstations...",
|
||||||
"search-for-an-organization-by-name-or-id": "Search for an organization (by name or id)",
|
"search-for-an-organization-by-name-or-id": "Search for an organization (by name or id)",
|
||||||
@@ -323,6 +333,7 @@
|
|||||||
"teams-are-being-loaded": "teams are being loaded...",
|
"teams-are-being-loaded": "teams are being loaded...",
|
||||||
"the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number": "the provided phone number is invalid.<br />please enter a valid international number...",
|
"the-provided-phone-number-is-invalid-less-than-br-greater-than-please-enter-a-valid-international-number": "the provided phone number is invalid.<br />please enter a valid international number...",
|
||||||
"the-scans-distance-must-be-greater-than-0m": "The scan's distance must be greater than 0m",
|
"the-scans-distance-must-be-greater-than-0m": "The scan's distance must be greater than 0m",
|
||||||
|
"the-scanstations-api-token-will-only-get-displayed-once-you-wont-be-able-to-change-or-view-it-again": "The scanstation api token will only get displayed once - you won't be able to change or view it again!",
|
||||||
"there-are-no-contacts-added-yet": "There are no contacts added yet.",
|
"there-are-no-contacts-added-yet": "There are no contacts added yet.",
|
||||||
"there-are-no-donations-yet": "There are no donations yet",
|
"there-are-no-donations-yet": "There are no donations yet",
|
||||||
"there-are-no-donors-yet": "There are no donors yet",
|
"there-are-no-donors-yet": "There are no donors yet",
|
||||||
@@ -334,6 +345,7 @@
|
|||||||
"there-are-no-users-added-yet": "There are no users added yet.",
|
"there-are-no-users-added-yet": "There are no users added yet.",
|
||||||
"this-might-take-a-moment": "This might take a moment 👀",
|
"this-might-take-a-moment": "This might take a moment 👀",
|
||||||
"this-scanstation-is": "This scanstation is",
|
"this-scanstation-is": "This scanstation is",
|
||||||
|
"token": "Token",
|
||||||
"total-distance": "total distance",
|
"total-distance": "total distance",
|
||||||
"total-donation-amount": "total donation amount",
|
"total-donation-amount": "total donation amount",
|
||||||
"total-donations": "total donations",
|
"total-donations": "total donations",
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
import 'windi.css';
|
|
||||||
import "toastify-js/src/toastify.css";
|
|
||||||
import "gridjs/dist/theme/mermaid.css";
|
|
||||||
import App from './App.svelte';
|
|
||||||
|
|
||||||
const app = new App({
|
|
||||||
target: document.body
|
|
||||||
});
|
|
||||||
export default app;
|
|
||||||
14
src/swmodule.js
Normal file
14
src/swmodule.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
export const register = () => {
|
||||||
|
if ('serviceWorker' in navigator) {
|
||||||
|
window.addEventListener('load', () => {
|
||||||
|
navigator.serviceWorker.register('/sw.js').then(
|
||||||
|
(registration) => {
|
||||||
|
// console.log(`sw successful with scope: ${registration.scope}`);
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
// console.log(`sw failed: ${err}`);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
purge: {
|
||||||
|
content: [ './src/**/*.svelte' ]
|
||||||
|
},
|
||||||
|
// darkMode: 'media',
|
||||||
|
variants: {},
|
||||||
|
plugins: [],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
container: {
|
||||||
colors: {
|
center: true,
|
||||||
reepolee: {
|
padding: '1.5rem'
|
||||||
500: '#b40000',
|
|
||||||
600: '#9c0000',
|
|
||||||
700: '#750000'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
19
template-copy.js
Normal file
19
template-copy.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
let content_svelteconfig = fs.readFileSync('./s-config.template.js', { encoding: 'utf8' });
|
||||||
|
let content_html = fs.readFileSync('./index.template.html', { encoding: 'utf8' });
|
||||||
|
if (process.env.NODE_ENV_ODIT == 'development_fast') {
|
||||||
|
content_html = content_html.replace(
|
||||||
|
'__TAILWIND_INSERT__',
|
||||||
|
'<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2.0.2/dist/tailwind.min.css">'
|
||||||
|
);
|
||||||
|
content_svelteconfig = content_svelteconfig.replace('__insert__', '{postcss:{}}');
|
||||||
|
} else {
|
||||||
|
content_html = content_html.replace('__TAILWIND_INSERT__', '');
|
||||||
|
content_svelteconfig = content_svelteconfig.replace(
|
||||||
|
'__insert__',
|
||||||
|
"{postcss:{plugins:[require('tailwindcss'),require('autoprefixer')]}}"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
fs.writeFileSync('./public/index.html', content_html);
|
||||||
|
fs.writeFileSync('./svelte.config.js', content_svelteconfig);
|
||||||
|
console.info('dev setup script done');
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const package = JSON.parse(fs.readFileSync(`./package.json`, { encoding: 'utf-8' }));
|
const package = JSON.parse(fs.readFileSync(`./package.json`, { encoding: 'utf-8' }));
|
||||||
const original = fs.readFileSync(`./index.html`, { encoding: 'utf-8' });
|
const original = fs.readFileSync(`./index.template.html`, { encoding: 'utf-8' });
|
||||||
let out = original.replace(/RELEASE_INFO-(\S)+-RELEASE_INFO/gi, 'RELEASE_INFO-' + package.version + '-RELEASE_INFO');
|
let out = original.replace(/RELEASE_INFO-(\S)+-RELEASE_INFO/gi, 'RELEASE_INFO-' + package.version + '-RELEASE_INFO');
|
||||||
fs.writeFileSync(`./index.html`, out);
|
fs.writeFileSync(`./index.template.html`, out);
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
import svelte from '@svitejs/vite-plugin-svelte';
|
|
||||||
import windiCSS from 'vite-plugin-windicss';
|
|
||||||
import { minify } from 'html-minifier';
|
|
||||||
import { defineConfig } from 'vite';
|
|
||||||
//
|
|
||||||
const indexReplace = () => {
|
|
||||||
return {
|
|
||||||
name: 'html-transform',
|
|
||||||
transformIndexHtml(html) {
|
|
||||||
return minify(html, {
|
|
||||||
collapseWhitespace: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export default defineConfig(({ command, mode }) => {
|
|
||||||
const isProduction = mode === 'production';
|
|
||||||
return {
|
|
||||||
// base: './',
|
|
||||||
build: {
|
|
||||||
polyfillDynamicImport: false,
|
|
||||||
cssCodeSplit: false,
|
|
||||||
minify: isProduction
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
windiCSS({
|
|
||||||
//@ts-ignore
|
|
||||||
verbose: true,
|
|
||||||
silent: false,
|
|
||||||
debug: true,
|
|
||||||
config: 'tailwind.config.js', // tailwind config file path (optional)
|
|
||||||
compile: false, // false: interpretation mode; true: compilation mode
|
|
||||||
prefix: 'windi-', // set compilation mode style prefix
|
|
||||||
globalPreflight: true, // set preflight style is global or scoped
|
|
||||||
globalUtility: true // set utility style is global or scoped
|
|
||||||
}),
|
|
||||||
svelte({
|
|
||||||
//@ts-ignore
|
|
||||||
hot: !isProduction,
|
|
||||||
emitCss: true,
|
|
||||||
extensions: [ '.md', '.svx', '.svelte' ],
|
|
||||||
preprocess: [
|
|
||||||
//
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
indexReplace()
|
|
||||||
]
|
|
||||||
};
|
|
||||||
});
|
|
||||||
9
workbox-config.js
Normal file
9
workbox-config.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
module.exports = {
|
||||||
|
globDirectory: 'public',
|
||||||
|
globPatterns: [ '**/*.{js,ico,png,svg,html,webmanifest,txt,json}' ],
|
||||||
|
globIgnores: [ 'env.js', 'env.sample.js' ],
|
||||||
|
swDest: 'public/sw.js',
|
||||||
|
cleanupOutdatedCaches: true,
|
||||||
|
mode: 'production',
|
||||||
|
sourcemap: false
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user