Compare commits

..

No commits in common. "1.5.3" and "1.5.2" have entirely different histories.
1.5.3 ... 1.5.2

18 changed files with 378 additions and 5000 deletions

View File

@ -1,4 +1,2 @@
public/env.sample.js public/env.sample.js
.pnpm-store .pnpm-store
.yarn
.pnp.*

4
.gitignore vendored
View File

@ -3,6 +3,4 @@ node_modules
public/env.js public/env.js
public/index.html public/index.html
/dist /dist
.pnpm-store .pnpm-store
.yarn
.pnp.*

View File

@ -2,23 +2,39 @@ steps:
- name: run full license export - name: run full license export
image: registry.odit.services/hub/library/node:19.7.0-alpine3.16 image: registry.odit.services/hub/library/node:19.7.0-alpine3.16
commands: commands:
- npm i -g pnpm@8 - npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
- pnpm i - pnpm i
- pnpm licenses:export - pnpm licenses:export
- name: build dev secrets:
- source: odit-npm-cache-url
target: NPM_REGISTRY_URL
- name: push new licenses file to repo
image: appleboy/drone-git-push
settings:
branch: dev
commit: true
commit_message: new license file version [CI SKIP]
author_email: bot@odit.services
remote: git@git.odit.services:lfk/frontend.git
ssh_key:
from_secret: odit-git-bot-sshkey
- name: build edge
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: registry.odit.services/lfk/frontend repo: registry.odit.services/odit/website
tags: tags:
- dev - edge
- latest
registry: registry.odit.services registry: registry.odit.services
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
cache_from: registry.odit.services/lfk/frontend:dev cache_from: registry.odit.services/odit/website:edge
username: username:
from_secret: odit-registry-builder-username from_secret: odit-registry-builder-username
password: password:
from_secret: odit-registry-builder-password from_secret: odit-registry-builder-password
secrets:
- source: odit-npm-cache-url
target: NPM_REGISTRY_URL
when: when:
event: event:
- push - push

View File

@ -12,6 +12,9 @@ steps:
from_secret: odit-registry-builder-username from_secret: odit-registry-builder-username
password: password:
from_secret: odit-registry-builder-password from_secret: odit-registry-builder-password
secrets:
- source: odit-npm-cache-url
target: NPM_REGISTRY_URL
when: when:
event: event:
- tag - tag

View File

@ -2,31 +2,13 @@
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.
#### [1.5.3](https://git.odit.services/lfk/frontend/compare/1.5.2...1.5.3)
- feat(dx): Yarn support [`fc15c68`](https://git.odit.services/lfk/frontend/commit/fc15c68cba0d1986563eaf63da3a68784a685a9e)
- feat(about): cleanup ui [`84aa846`](https://git.odit.services/lfk/frontend/commit/84aa846b87186b52a2f8632724d4f2cb70af062b)
- feat(dashboard): reorder menu items [`e967d8d`](https://git.odit.services/lfk/frontend/commit/e967d8d20c6972b64b0096594a09043553e9c7e5)
- fix: unexpected/ missing props [`d803f3d`](https://git.odit.services/lfk/frontend/commit/d803f3d4905d6f792b77d17025467ac13c29068b)
- chore(deps): bump some [`68b4309`](https://git.odit.services/lfk/frontend/commit/68b4309164eac40b6fda969b60a7e238985d49f8)
- fix(ci): Switch over to new woodpecker version [`7ba890d`](https://git.odit.services/lfk/frontend/commit/7ba890dfd7ba908ebef0338f6faa5e7d804cb5ef)
- refactor(ci): Only build licences, don't export [`32b5f54`](https://git.odit.services/lfk/frontend/commit/32b5f5420bf9ff656b713d61b3a0113b9d6cb69f)
- feat: cleanup random page toasts [`ad4db88`](https://git.odit.services/lfk/frontend/commit/ad4db882f0f4d00a80ae5e0072e09c071c07ffa2)
- fix(ci): Update git pushb settings [`ee87f82`](https://git.odit.services/lfk/frontend/commit/ee87f82799ce559fd43d671ab412f2643eafeac6)
- fix(ci): Update relase machanism [`7c08f52`](https://git.odit.services/lfk/frontend/commit/7c08f522aa4b2986544a4c0e5d3261c4c7296121)
- fix(ci): Install pnpm [`e211554`](https://git.odit.services/lfk/frontend/commit/e211554579b1f27d13194eff4aad76f6f030141e)
- fix(orgs): ImportRunnerModal props [`5468766`](https://git.odit.services/lfk/frontend/commit/5468766d875a6278f01ed1fd9573688374befdd5)
#### [1.5.2](https://git.odit.services/lfk/frontend/compare/1.5.1...1.5.2) #### [1.5.2](https://git.odit.services/lfk/frontend/compare/1.5.1...1.5.2)
> 21 November 2024
- feat: improved dashboard titles ui + a11y [`21453ef`](https://git.odit.services/lfk/frontend/commit/21453ef272665c0b7c7b04009b7b74e110fbd988) - feat: improved dashboard titles ui + a11y [`21453ef`](https://git.odit.services/lfk/frontend/commit/21453ef272665c0b7c7b04009b7b74e110fbd988)
- feat: improved dashboard titles ui + a11y [`c883920`](https://git.odit.services/lfk/frontend/commit/c883920caaaaef30a8e54dd0e7eecd68943f3041) - feat: improved dashboard titles ui + a11y [`c883920`](https://git.odit.services/lfk/frontend/commit/c883920caaaaef30a8e54dd0e7eecd68943f3041)
- feat(dashboard): improved a11y of active sidebar menu item [`a50447f`](https://git.odit.services/lfk/frontend/commit/a50447f457ecc045995efb7b952b07ea09c91373) - feat(dashboard): improved a11y of active sidebar menu item [`a50447f`](https://git.odit.services/lfk/frontend/commit/a50447f457ecc045995efb7b952b07ea09c91373)
- feat: improved mobile buttons + search ui [`38fb111`](https://git.odit.services/lfk/frontend/commit/38fb111f7a2b5a1a01b17b00e89ee081e4b91bd9) - feat: improved mobile buttons + search ui [`38fb111`](https://git.odit.services/lfk/frontend/commit/38fb111f7a2b5a1a01b17b00e89ee081e4b91bd9)
- feat(i18n/de): rename "Track" to "Laufstrecke" [`1018243`](https://git.odit.services/lfk/frontend/commit/10182433f825968ee55298399b231173698a795c) - feat(i18n/de): rename "Track" to "Laufstrecke" [`1018243`](https://git.odit.services/lfk/frontend/commit/10182433f825968ee55298399b231173698a795c)
- 🚀RELEASE v1.5.2 [`3532968`](https://git.odit.services/lfk/frontend/commit/3532968b3399b985b1ed28ba6b89a13f35f9289b)
- feat(dashboard): improved mobile ui hamburger button [`b338f33`](https://git.odit.services/lfk/frontend/commit/b338f33a63ad8e98ab44deff2f80dbd5fe2a0fc2) - feat(dashboard): improved mobile ui hamburger button [`b338f33`](https://git.odit.services/lfk/frontend/commit/b338f33a63ad8e98ab44deff2f80dbd5fe2a0fc2)
- feat(dashboard): match greeting style with rest of titles [`b1a2044`](https://git.odit.services/lfk/frontend/commit/b1a20446314d1b25e9f653bd2767b072fd629f97) - feat(dashboard): match greeting style with rest of titles [`b1a2044`](https://git.odit.services/lfk/frontend/commit/b1a20446314d1b25e9f653bd2767b072fd629f97)
- feat(dashboard): add lfk icon and app name to mobile nav bar [`6bb49db`](https://git.odit.services/lfk/frontend/commit/6bb49db4eee95486f5a947d708b80a7a94d36933) - feat(dashboard): add lfk icon and app name to mobile nav bar [`6bb49db`](https://git.odit.services/lfk/frontend/commit/6bb49db4eee95486f5a947d708b80a7a94d36933)

View File

@ -13,7 +13,7 @@
<body> <body>
<span style="display: none; visibility: hidden" id="buildinfo" <span style="display: none; visibility: hidden" id="buildinfo"
>RELEASE_INFO-1.5.3-RELEASE_INFO</span >RELEASE_INFO-1.5.2-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>

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-frontend", "name": "@odit/lfk-frontend",
"version": "1.5.3", "version": "1.5.2",
"type": "module", "type": "module",
"scripts": { "scripts": {
"i18n-order": "node order.js", "i18n-order": "node order.js",
@ -51,10 +51,10 @@
"localforage": "1.10.0", "localforage": "1.10.0",
"marked": "4.3.0", "marked": "4.3.0",
"svelte": "3.58.0", "svelte": "3.58.0",
"svelte-french-toast": "1.2.0", "svelte-french-toast": "1.0.4-beta.0",
"svelte-i18n": "3.6.0", "svelte-i18n": "3.6.0",
"tinro": "0.6.12", "tinro": "0.6.12",
"validator": "13.12.0", "validator": "13.9.0",
"xlsx": "0.18.5" "xlsx": "0.18.5"
}, },
"volta": { "volta": {

32
pnpm-lock.yaml generated
View File

@ -36,8 +36,8 @@ importers:
specifier: 3.58.0 specifier: 3.58.0
version: 3.58.0 version: 3.58.0
svelte-french-toast: svelte-french-toast:
specifier: 1.2.0 specifier: 1.0.4-beta.0
version: 1.2.0(svelte@3.58.0) version: 1.0.4-beta.0(svelte@3.58.0)
svelte-i18n: svelte-i18n:
specifier: 3.6.0 specifier: 3.6.0
version: 3.6.0(svelte@3.58.0) version: 3.6.0(svelte@3.58.0)
@ -45,8 +45,8 @@ importers:
specifier: 0.6.12 specifier: 0.6.12
version: 0.6.12 version: 0.6.12
validator: validator:
specifier: 13.12.0 specifier: 13.9.0
version: 13.12.0 version: 13.9.0
xlsx: xlsx:
specifier: 0.18.5 specifier: 0.18.5
version: 0.18.5 version: 0.18.5
@ -1699,10 +1699,10 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
svelte-french-toast@1.2.0: svelte-french-toast@1.0.4-beta.0:
resolution: {integrity: sha512-5PW+6RFX3xQPbR44CngYAP1Sd9oCq9P2FOox4FZffzJuZI2mHOB7q5gJBVnOiLF5y3moVGZ7u2bYt7+yPAgcEQ==} resolution: {integrity: sha512-PkYNukEQAPZyV5ei+JzeYEsbaXFSbJS8/SDTdC8giYa5Atxp2SRepFnPDWx6mu7rV53g886FNLktPMLwRljkpw==}
peerDependencies: peerDependencies:
svelte: ^3.57.0 || ^4.0.0 svelte: ^3.57.0
svelte-hmr@0.15.1: svelte-hmr@0.15.1:
resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==} resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==}
@ -1720,10 +1720,10 @@ packages:
svelte-select@3.17.0: svelte-select@3.17.0:
resolution: {integrity: sha512-ITmX/XUiSdkaILmsTviKRkZPaXckM5/FA7Y8BhiUPoamaZG/ZDyOo6ydjFu9fDVFTbwoAUGUi6HBjs+ZdK2AwA==} resolution: {integrity: sha512-ITmX/XUiSdkaILmsTviKRkZPaXckM5/FA7Y8BhiUPoamaZG/ZDyOo6ydjFu9fDVFTbwoAUGUi6HBjs+ZdK2AwA==}
svelte-writable-derived@3.1.1: svelte-writable-derived@3.0.1:
resolution: {integrity: sha512-w4LR6/bYZEuCs7SGr+M54oipk/UQKtiMadyOhW0PTwAtJ/Ai12QS77sLngEcfBx2q4H8ZBQucc9ktSA5sUGZWw==} resolution: {integrity: sha512-zBWCS5c3MA9o4NT/UJHP3KoPOhtmH2ZQ/QRK31w9LzLdPP7MNncUcBGIu4iH2RVt17iRfR6agm7nEqwNvsYuMw==}
peerDependencies: peerDependencies:
svelte: ^3.2.1 || ^4.0.0-next.1 || ^5.0.0-next.94 svelte: ^3.2.1
svelte@3.58.0: svelte@3.58.0:
resolution: {integrity: sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==} resolution: {integrity: sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==}
@ -1821,8 +1821,8 @@ packages:
util-deprecate@1.0.2: util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
validator@13.12.0: validator@13.9.0:
resolution: {integrity: sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==} resolution: {integrity: sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==}
engines: {node: '>= 0.10'} engines: {node: '>= 0.10'}
vite@4.3.3: vite@4.3.3:
@ -3499,10 +3499,10 @@ snapshots:
supports-preserve-symlinks-flag@1.0.0: {} supports-preserve-symlinks-flag@1.0.0: {}
svelte-french-toast@1.2.0(svelte@3.58.0): svelte-french-toast@1.0.4-beta.0(svelte@3.58.0):
dependencies: dependencies:
svelte: 3.58.0 svelte: 3.58.0
svelte-writable-derived: 3.1.1(svelte@3.58.0) svelte-writable-derived: 3.0.1(svelte@3.58.0)
svelte-hmr@0.15.1(svelte@3.58.0): svelte-hmr@0.15.1(svelte@3.58.0):
dependencies: dependencies:
@ -3520,7 +3520,7 @@ snapshots:
svelte-select@3.17.0: {} svelte-select@3.17.0: {}
svelte-writable-derived@3.1.1(svelte@3.58.0): svelte-writable-derived@3.0.1(svelte@3.58.0):
dependencies: dependencies:
svelte: 3.58.0 svelte: 3.58.0
@ -3631,7 +3631,7 @@ snapshots:
util-deprecate@1.0.2: {} util-deprecate@1.0.2: {}
validator@13.12.0: {} validator@13.9.0: {}
vite@4.3.3: vite@4.3.3:
dependencies: dependencies:

View File

@ -20,6 +20,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, jwtinfo); store.login(value, jwtinfo);
toast($_("welcome_wavinghand"));
} }
} }
}); });
@ -49,6 +50,7 @@
store.login(result.access_token, jwtinfo); store.login(result.access_token, jwtinfo);
location.replace("/"); location.replace("/");
toast.dismiss(); toast.dismiss();
toast($_("welcome_wavinghand"));
}) })
.catch((err) => { .catch((err) => {
toast.dismiss(); toast.dismiss();

View File

@ -151,6 +151,7 @@
} }
onMount(async () => { onMount(async () => {
toast.loading($_("loading-cards"));
let page = 0; let page = 0;
let pagesize = 500; let pagesize = 500;
while (page >= 0) { while (page >= 0) {
@ -171,6 +172,8 @@
dataLoaded = true; dataLoaded = true;
page++; page++;
} }
toast.dismiss();
toast.success($_("all-cards-loaded"));
}); });
</script> </script>

View File

@ -40,6 +40,69 @@
</svg> </svg>
<span>{$_("dashboard-title")}</span> <span>{$_("dashboard-title")}</span>
</a> </a>
{#if store.state.jwtinfo.userdetails.permissions.includes("ORGANIZATION:GET")}
<a
class:activenav={$router.path.includes("/orgs/")}
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900"
href="/orgs/"
>
<svg
class="flex-shrink-0 w-5 h-5 mr-2 transition group-hover:text-gray-600"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="24"
height="24"
><path fill="none" d="M0 0h24v24H0z" />
<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
>
<span>{$_("orgs")}</span>
</a>
{/if}
{#if store.state.jwtinfo.userdetails.permissions.includes("USER:GET")}
<a
class:activenav={$router.path === "/users/"}
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900"
href="/users/"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
class="flex-shrink-0 w-5 h-5 mr-2 transition group-hover:text-gray-600"
fill="currentColor"
viewBox="0 0 24 24"
><path fill="none" d="M0 0h24v24H0z" />
<path
d="M12 14v8H4a8 8 0 018-8zm0-1a6 6 0 110-12 6 6 0 010 12zm2.6 5.81a3.51 3.51 0 010-1.62l-1-.57 1-1.74 1 .58a3.5 3.5 0 011.4-.82V13.5h2v1.15a3.5 3.5 0 011.4.8l1-.57 1 1.74-1 .57a3.51 3.51 0 010 1.62l1 .57-1 1.74-1-.58a3.5 3.5 0 01-1.4.82v1.14h-2v-1.15a3.5 3.5 0 01-1.4-.8l-1 .57-1-1.74 1-.57zM18 17a1 1 0 100 2 1 1 0 000-2z"
/></svg
>
<span>{$_("users")}</span>
</a>
{/if}
{#if store.state.jwtinfo.userdetails.permissions.includes("USERGROUP:GET")}
<a
class:activenav={$router.path === "/groups/"}
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900"
href="/groups/"
>
<svg
class="flex-shrink-0 w-5 h-5 mr-2 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>{$_("user-groups")}</span>
</a>
{/if}
{#if store.state.jwtinfo.userdetails.permissions.includes("RUNNER:GET")} {#if store.state.jwtinfo.userdetails.permissions.includes("RUNNER:GET")}
<a <a
class:activenav={$router.path === "/runners/"} class:activenav={$router.path === "/runners/"}
@ -82,27 +145,6 @@
<span>{$_("teams")}</span> <span>{$_("teams")}</span>
</a> </a>
{/if} {/if}
{#if store.state.jwtinfo.userdetails.permissions.includes("ORGANIZATION:GET")}
<a
class:activenav={$router.path.includes("/orgs/")}
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900"
href="/orgs/"
>
<svg
class="flex-shrink-0 w-5 h-5 mr-2 transition group-hover:text-gray-600"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="24"
height="24"
><path fill="none" d="M0 0h24v24H0z" />
<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
>
<span>{$_("orgs")}</span>
</a>
{/if}
{#if store.state.jwtinfo.userdetails.permissions.includes("DONOR:GET")} {#if store.state.jwtinfo.userdetails.permissions.includes("DONOR:GET")}
<a <a
class:activenav={$router.path.includes("/donors/")} class:activenav={$router.path.includes("/donors/")}
@ -276,48 +318,6 @@
<span>{$_("statsclients")}</span> <span>{$_("statsclients")}</span>
</a> </a>
{/if} {/if}
{#if store.state.jwtinfo.userdetails.permissions.includes("USER:GET")}
<a
class:activenav={$router.path === "/users/"}
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900"
href="/users/"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
class="flex-shrink-0 w-5 h-5 mr-2 transition group-hover:text-gray-600"
fill="currentColor"
viewBox="0 0 24 24"
><path fill="none" d="M0 0h24v24H0z" />
<path
d="M12 14v8H4a8 8 0 018-8zm0-1a6 6 0 110-12 6 6 0 010 12zm2.6 5.81a3.51 3.51 0 010-1.62l-1-.57 1-1.74 1 .58a3.5 3.5 0 011.4-.82V13.5h2v1.15a3.5 3.5 0 011.4.8l1-.57 1 1.74-1 .57a3.51 3.51 0 010 1.62l1 .57-1 1.74-1-.58a3.5 3.5 0 01-1.4.82v1.14h-2v-1.15a3.5 3.5 0 01-1.4-.8l-1 .57-1-1.74 1-.57zM18 17a1 1 0 100 2 1 1 0 000-2z"
/></svg
>
<span>{$_("users")}</span>
</a>
{/if}
{#if store.state.jwtinfo.userdetails.permissions.includes("USERGROUP:GET")}
<a
class:activenav={$router.path === "/groups/"}
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900"
href="/groups/"
>
<svg
class="flex-shrink-0 w-5 h-5 mr-2 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>{$_("user-groups")}</span>
</a>
{/if}
<a <a
class:activenav={$router.path === "/settings/"} class:activenav={$router.path === "/settings/"}
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900" class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900"

View File

@ -100,6 +100,7 @@
} }
onMount(async () => { onMount(async () => {
toast.loading($_("loading-donors"));
donors = (await DonorService.donorControllerGetAll()).map( donors = (await DonorService.donorControllerGetAll()).map(
(r) => { (r) => {
return { label: getDonorLabel(r), value: r }; return { label: getDonorLabel(r), value: r };
@ -110,6 +111,8 @@
return { label: getDonorLabel(r), value: r }; return { label: getDonorLabel(r), value: r };
} }
); );
toast.dismiss();
toast.success($_("all-donors-loaded"));
}); });
</script> </script>

View File

@ -1,196 +1,210 @@
<script> <script>
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
import { clickOutside } from "../base/outsideclick"; import { clickOutside } from "../base/outsideclick";
let modal_open = false; export let modal_open;
(function () { (function () {
document.onkeydown = function (e) { document.onkeydown = function (e) {
e = e || window.event; e = e || window.event;
if (e.key === "Escape") { if (e.key === "Escape") {
modal_open = false; modal_open = false;
} }
}; };
})(); })();
const license_promise = fetch("/licenses.json"); const license_promise = fetch("/licenses.json");
let licenses = []; let licenses = [];
$: currentlicense = ""; $: currentlicense = "";
$: licensetext = ""; $: licensetext = "";
license_promise license_promise
.then((response) => response.json()) .then((response) => response.json())
.then((json) => { .then((json) => {
licenses = json; licenses = json;
}); });
</script> </script>
{#if modal_open} {#if modal_open}
<div <div
class="fixed z-10 inset-0 overflow-y-auto" class="fixed z-10 inset-0 overflow-y-auto"
use:clickOutside use:clickOutside
on:click_outside={() => { on:click_outside={() => {
modal_open = false; modal_open = false;
}} }}
> >
<div <div
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 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"
> >
<div class="fixed inset-0 transition-opacity" aria-hidden="true"> <div class="fixed inset-0 transition-opacity" aria-hidden="true">
<div <div
class="absolute inset-0 bg-gray-500 opacity-75" class="absolute inset-0 bg-gray-500 opacity-75"
data-id="modal_backdrop" data-id="modal_backdrop"
/> />
</div> </div>
<span <span
class="hidden sm:inline-block sm:align-middle sm:h-screen" class="hidden sm:inline-block sm:align-middle sm:h-screen"
aria-hidden="true">&#8203;</span aria-hidden="true">&#8203;</span
> >
<div <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" 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" role="dialog"
aria-modal="true" aria-modal="true"
aria-labelledby="modal-headline" aria-labelledby="modal-headline"
> >
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> <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="sm:flex sm:items-start">
<div <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" 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 <svg
fill="currentColor" fill="currentColor"
class="h-6 w-6 text-blue-600" class="h-6 w-6 text-blue-600"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24" viewBox="0 0 24 24"
width="24" width="24"
height="24" height="24"
><path fill="none" d="M0 0h24v24H0z" /> ><path fill="none" d="M0 0h24v24H0z" />
<path <path
d="M14 20v2H2v-2h12zM14.586.686l7.778 7.778L20.95 9.88l-1.06-.354L17.413 12l5.657 5.657-1.414 1.414L16 13.414l-2.404 2.404.283 1.132-1.415 1.414-7.778-7.778 1.415-1.414 1.13.282 6.294-6.293-.353-1.06L14.586.686z" d="M14 20v2H2v-2h12zM14.586.686l7.778 7.778L20.95 9.88l-1.06-.354L17.413 12l5.657 5.657-1.414 1.414L16 13.414l-2.404 2.404.283 1.132-1.415 1.414-7.778-7.778 1.415-1.414 1.13.282 6.294-6.293-.353-1.06L14.586.686z"
/></svg /></svg
> >
</div> </div>
<div class="mt-3 sm:mt-0 sm:ml-4 sm:text-left"> <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
<h3 class="text-lg leading-6 font-medium"> <h3 class="text-lg leading-6 font-medium">
{$_("read-license")} {$_("read-license")}
</h3> </h3>
<div class="mt-2 mb-6"> <div class="mt-2 mb-6">
<p class="text-sm text-gray-500">{currentlicense}</p> <p class="text-sm text-gray-500">{currentlicense}</p>
</div> </div>
<div class="mt-2 mb-6"> <div class="mt-2 mb-6">
<p class="text-sm text-gray-500">{licensetext}</p> <p class="text-sm text-gray-500">{licensetext}</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"> <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
<button <button
on:click={() => { on:click={() => {
modal_open = false; modal_open = false;
}} }}
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: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:w-auto sm:text-sm"
> >
{$_("close")} {$_("close")}
</button> </button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{/if} {/if}
<!-- /// --> <!-- /// -->
<section class="container p-5"> <div class="pt-12 px-4 sm:px-6 lg:px-8 lg:pt-20 bg-gray-900 pb-12">
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono"> <div class="text-center mb-8">
{$_("about")} <h1
</h4> class="mt-9 font-display text-4xl leading-none font-semibold text-white sm:text-5xl lg:text-6xl"
<p class="mt-2 mb-2"> >
Lauf für Kaya! {$_("about")}
<strong class="font-medium"> 🧾
{$_("by")} </h1>
<a href="https://odit.services" class="underline">ODIT.Services</a> <p
</strong> class="mt-2 max-w-xl mx-auto text-xl lg:max-w-3xl lg:text-2xl text-gray-300"
<br /> >
<span>{$_("lfk-is-os")}</span> Lauf für Kaya!
</p> <strong class="text-white font-medium">
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono"> {$_("by")}
{$_("credits")} <a href="https://odit.services" class="underline">ODIT.Services</a>
</h4> </strong>
<p class="text-left">{$_("oss_credit_description")}</p> <br />
<div class="mt-5 overflow-x-auto"> <span class="text-lg">{$_("lfk-is-os")}</span>
{#await license_promise} </p>
<p>{$_("licenses-are-being-loaded")}</p> </div>
{:then} </div>
<table class="font-mono">
<thead class="border-b border-gray-400"> <div class="pt-0 pb-16 overflow-hidden lg:pt-12 lg:py-24">
<tr class="odd:bg-white even:bg-gray-100"> <div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
<th>{$_("dependency_name")}</th> <h2 class="text-4xl font-display font-semibold md:text-5xl">
<th>{$_("license")}</th> {$_("credits")}
<th>{$_("repo_link")}</th> </h2>
<th>{$_("installed-version")}</th> <div class="max-w-3xl mx-auto text-xl leading-8 font-medium mt-8">
<th>{$_("author")}</th> <p class="text-center">{$_("oss_credit_description")}</p>
</tr> </div>
</thead> <div class="w-screen leading-8 pl-5 mt-5">
<tbody> {#await license_promise}
{#each licenses as l} <p class="text-center w-full">{$_("licenses-are-being-loaded")}</p>
<tr class="odd:bg-white even:bg-gray-100 *:p-2"> {:then}
<td>{l.name}</td> <table>
<td> <thead class="border-b border-gray-400">
<button <tr class="odd:bg-white even:bg-gray-100">
class="underline cursor-pointer" <th>{$_("dependency_name")}</th>
on:click={() => { <th>{$_("license")}</th>
modal_open = true; <th>{$_("repo_link")}</th>
currentlicense = l.name + "@" + l.version; <th>{$_("installed-version")}</th>
licensetext = <th>{$_("author")}</th>
l.licensetext || $_("no-license-text-could-be-found"); </tr>
}}>{l.license || "?"}</button </thead>
> <tbody>
</td> {#each licenses as l}
<td> <tr class="odd:bg-white even:bg-gray-100">
{(l.repo?.url || l.repo) <td>{l.name}</td>
.replace("git+", "") <td>
.replace("git://", "")} {l.license || "?"}<br /><button
</td> class="underline cursor-pointer"
<td>{l.version || "?"}</td> on:click={() => {
<td>{l.author?.name || l.author || "?"}</td> modal_open = true;
</tr> currentlicense = l.name + "@" + l.version;
{/each} licensetext =
</tbody> l.licensetext || $_("no-license-text-could-be-found");
</table> }}>{$_("read-license")}</button
{:catch error} >
<div </td>
class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500" <td>
> {(l.repo?.url || l.repo)
<span class="inline-block align-middle mr-8"> .replace("git+", "")
<b class="capitalize">{$_("general_promise_error")}</b> .replace("git://", "")}
{error} </td>
</span> <td>{l.version || "?"}</td>
</div> <td>{l.author?.name || l.author || "?"}</td>
{/await} </tr>
</div> {/each}
<div class="w-full mt-8"> </tbody>
<p class="font-medium">{$_("icon-image-credits")}</p> </table>
<ul class="list-disc ml-6"> {:catch error}
<li> <div
<a class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500"
class="underline" >
target="_blank" <span class="inline-block align-middle mr-8">
rel="noopener noreferrer" <b class="capitalize">{$_("general_promise_error")}</b>
href="https://storyset.com">https://storyset.com</a {error}
> </span>
</li> </div>
<li> {/await}
<a </div>
class="underline" <div class="w-full leading-8 mt-8">
target="_blank" <p class="text-xl font-medium">{$_("icon-image-credits")}</p>
rel="noopener noreferrer" <ul class="list-disc">
href="https://undraw.co">https://undraw.co</a <li>
> <a
</li> class="underline"
<li> target="_blank"
<a rel="noopener noreferrer"
class="underline" href="https://storyset.com">https://storyset.com</a
target="_blank" >
rel="noopener noreferrer" </li>
href="https://remixicon.com">https://remixicon.com</a <li>
> <a
</li> class="underline"
</ul> target="_blank"
</div> rel="noopener noreferrer"
</section> href="https://undraw.co">https://undraw.co</a
>
</li>
<li>
<a
class="underline"
target="_blank"
rel="noopener noreferrer"
href="https://remixicon.com">https://remixicon.com</a
>
</li>
</ul>
</div>
</div>
</div>

View File

@ -48,6 +48,7 @@
passed_org={{}} passed_org={{}}
passed_orgs={current_organizations} passed_orgs={current_organizations}
opened_from="OrgOverview" opened_from="OrgOverview"
current_runners={[]}
bind:import_modal_open bind:import_modal_open
/> />
{/if} {/if}

View File

@ -1,26 +1,26 @@
<script> <script>
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
export let detailsLink = null; export let detailsLink;
export let detailsAction = null; export let detailsAction;
export let deleteEnabled; export let deleteEnabled;
export let deleteAction; export let deleteAction;
</script> </script>
{#if detailsLink} {#if detailsLink}
<a href={detailsLink} class="text-indigo-600 hover:text-indigo-900" <a href={detailsLink} class="text-indigo-600 hover:text-indigo-900"
>{$_("details")}</a >{$_("details")}</a
> >
{:else if detailsAction} {:else if detailsAction}
<button on:click={detailsAction} class="text-indigo-600 hover:text-indigo-900" <button on:click={detailsAction} class="text-indigo-600 hover:text-indigo-900"
>{$_("details")}</button >{$_("details")}</button
> >
{/if} {/if}
{#if deleteEnabled} {#if deleteEnabled}
<button <button
tabindex="0" tabindex="0"
on:click={deleteAction} on:click={deleteAction}
class="ml-4 text-red-600 hover:text-red-900 cursor-pointer" class="ml-4 text-red-600 hover:text-red-900 cursor-pointer"
>{$_("delete")}</button >{$_("delete")}</button
> >
{/if} {/if}

View File

@ -5,14 +5,14 @@
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";
import toast from "svelte-french-toast"; import toast from "svelte-french-toast";
export let modal_open; export let modal_open;
export let delete_client; export let delete_station;
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
function cancelDelete() { function cancelDelete() {
modal_open = false; modal_open = false;
dispatch("cancelDelete", { id: delete_client.id }); dispatch("cancelDelete", { id: delete_station.id });
} }
function deleteClient() { function deleteClient() {
StatsClientService.statsClientControllerRemove(delete_client.id, true) StatsClientService.statsClientControllerRemove(delete_station.id, true)
.then((resp) => { .then((resp) => {
toast($_("statsclient-deleted")); toast($_("statsclient-deleted"));
location.replace("./"); location.replace("./");

View File

@ -1,39 +1,44 @@
<script> <script>
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
import store from "../../store"; import store from "../../store";
import AddStatsClientModal from "./AddStatsClientModal.svelte"; import AddStatsClientModal from "./AddStatsClientModal.svelte";
import CopyStatsClientTokenModal from "./CopyStatsClientTokenModal.svelte"; import CopyStatsClientTokenModal from "./CopyStatsClientTokenModal.svelte";
import StatsClientsOverview from "./StatsClientsOverview.svelte"; import StatsClientsOverview from "./StatsClientsOverview.svelte";
export let modal_open = false; export let modal_open = false;
export let copy_modal_open = false; export let copy_modal_open = false;
export let new_client = {}; export let new_client = {};
let current_clients = []; let current_clients = [];
</script> </script>
<section class="container p-5"> <section class="container p-5">
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono"> <h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
{$_("statsclients")} {$_("statsclients")}
</h4> </h4>
{#if store.state.jwtinfo.userdetails.permissions.includes("STATSCLIENT:CREATE")} {#if store.state.jwtinfo.userdetails.permissions.includes("STATSCLIENT:CREATE")}
<button <button
on:click={() => { on:click={() => {
modal_open = true; modal_open = true;
}} }}
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: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:w-auto sm:text-sm"
> >
{$_("create-a-new-statsclient")} {$_("create-a-new-statsclient")}
</button> </button>
{/if} {/if}
<StatsClientsOverview bind:current_clients /> <StatsClientsOverview
bind:current_clients
bind:modal_open
bind:new_client
bind:copy_modal_open
/>
</section> </section>
{#if store.state.jwtinfo.userdetails.permissions.includes("STATSCLIENT:CREATE")} {#if store.state.jwtinfo.userdetails.permissions.includes("STATSCLIENT:CREATE")}
<AddStatsClientModal <AddStatsClientModal
bind:modal_open bind:modal_open
bind:current_clients bind:current_clients
bind:new_client bind:new_client
bind:copy_modal_open bind:copy_modal_open
/> />
<CopyStatsClientTokenModal bind:copy_modal_open bind:new_client /> <CopyStatsClientTokenModal bind:copy_modal_open bind:new_client />
{/if} {/if}

4647
yarn.lock

File diff suppressed because it is too large Load Diff