Compare commits

..

No commits in common. "ad4db882f0f4d00a80ae5e0072e09c071c07ffa2" and "3532968b3399b985b1ed28ba6b89a13f35f9289b" have entirely different histories.

4 changed files with 211 additions and 189 deletions

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

@ -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";
export let modal_open; 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>