Compare commits

..

No commits in common. "9aeb99d775e1bb7a8a26d68836dd8d4a4b085406" and "be440684b3da953e19bf9d52c8a65a4d08ee11f8" have entirely different histories.

9 changed files with 56 additions and 66 deletions

View File

@ -6,19 +6,16 @@ http {
server { server {
error_page 404 /index.html; error_page 404 /index.html;
root /usr/share/nginx/html; root /usr/share/nginx/html;
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 1y; expires 1y;
add_header Pragma public; add_header Pragma public;
add_header Cache-Control "public"; add_header Cache-Control "public";
} }
# --- Brotli # --- Brotli
brotli on; # brotli on;
brotli_comp_level 6; # brotli_comp_level 6;
brotli_static on; # brotli_static on;
brotli_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml; # brotli_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
# --- GZIP # --- GZIP
gzip on; gzip on;
gzip_disable "msie6"; gzip_disable "msie6";

View File

@ -9,7 +9,7 @@
"licenses:export": "license-exporter --md" "licenses:export": "license-exporter --md"
}, },
"dependencies": { "dependencies": {
"@odit/lfk-client-js": "0.0.9", "@odit/lfk-client-js": "0.0.8",
"filepond": "^4.25.1", "filepond": "^4.25.1",
"gridjs": "^3.2.1", "gridjs": "^3.2.1",
"localforage": "^1.9.0", "localforage": "^1.9.0",

View File

@ -47,8 +47,6 @@
import TracksOverview from "./components/TracksOverview.svelte"; import TracksOverview from "./components/TracksOverview.svelte";
import OrgDetail from "./components/OrgDetail.svelte"; import OrgDetail from "./components/OrgDetail.svelte";
import Teams from "./components/Teams.svelte"; import Teams from "./components/Teams.svelte";
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
OpenAPI.BASE = config.baseurl;
store.init(); store.init();
if ("serviceWorker" in navigator) { if ("serviceWorker" in navigator) {

View File

@ -1,6 +1,5 @@
<script> <script>
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
import { clickOutside } from "./outsideclick";
import { focusTrap } from "svelte-focus-trap"; import { focusTrap } from "svelte-focus-trap";
import { tracks as tracksstore } from "../store.js"; import { tracks as tracksstore } from "../store.js";
import { TrackService } from "@odit/lfk-client-js"; import { TrackService } from "@odit/lfk-client-js";
@ -77,19 +76,11 @@
</script> </script>
{#if modal_open} {#if modal_open}
<div <div class="fixed z-10 inset-0 overflow-y-auto" use:focusTrap>
class="fixed z-10 inset-0 overflow-y-auto"
use:focusTrap
use:clickOutside
on:click_outside={() => {
modal_open = false;
}}>
<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">
<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" />
</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"

View File

@ -538,7 +538,7 @@
stroke-linejoin="round" size="18" height="18" width="18" xmlns="http://www.w3.org/2000/svg"> stroke-linejoin="round" size="18" height="18" width="18" xmlns="http://www.w3.org/2000/svg">
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path> <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
</svg><span </svg><span
class="absolute uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 items-center justify-center rounded-full bg-blue-500 text-white" class="absolute uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 inline-flex items-center justify-center rounded-full bg-blue-500 text-white"
style="top:14px;right:8px">5</span></button> style="top:14px;right:8px">5</span></button>
<div class="dropdown absolute top-0 right-0 mt-16 "> <div class="dropdown absolute top-0 right-0 mt-16 ">
<div class="dropdown-content w-64 bottom-start"> <div class="dropdown-content w-64 bottom-start">
@ -659,7 +659,7 @@
<div class="relative"><button class="flex h-16 w-8 rounded-full ml-2 relative"><span <div class="relative"><button class="flex h-16 w-8 rounded-full ml-2 relative"><span
class="absolute top-0 left-0 pt-4"><img class="h-8 w-8 rounded-full shadow" src="/images/faces/m1.png" class="absolute top-0 left-0 pt-4"><img class="h-8 w-8 rounded-full shadow" src="/images/faces/m1.png"
alt="avatar"><span alt="avatar"><span
class="absolute uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 items-center justify-center rounded-full bg-red-500 text-white shadow-outline-white" class="absolute uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 inline-flex items-center justify-center rounded-full bg-red-500 text-white shadow-outline-white"
style="top:10px;right:-4px">2</span></span></button> style="top:10px;right:-4px">2</span></span></button>
<div class="dropdown absolute top-0 right-0 mt-16 "> <div class="dropdown absolute top-0 right-0 mt-16 ">
<div class="dropdown-content w-48 bottom-end"> <div class="dropdown-content w-48 bottom-end">
@ -672,7 +672,7 @@
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path> <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
<polyline points="22,6 12,13 2,6"></polyline> <polyline points="22,6 12,13 2,6"></polyline>
</svg><span class="mx-2">Inbox</span><span </svg><span class="mx-2">Inbox</span><span
class="uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 items-center justify-center rounded-full bg-red-500 text-white ml-auto">2</span></a> class="uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 inline-flex items-center justify-center rounded-full bg-red-500 text-white ml-auto">2</span></a>
</li> </li>
<li class="dropdown-item"><a class="flex flex-row items-center justify-start h-10 w-full px-2" <li class="dropdown-item"><a class="flex flex-row items-center justify-start h-10 w-full px-2"
href="/"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" href="/"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24"
@ -682,7 +682,7 @@
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"> points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2">
</polygon> </polygon>
</svg><span class="mx-2">Messages</span><span </svg><span class="mx-2">Messages</span><span
class="uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 items-center justify-center rounded-full bg-blue-500 text-white ml-auto">3</span></a> class="uppercase font-bold inline-flex text-center p-0 leading-none text-2xs h-4 w-4 inline-flex items-center justify-center rounded-full bg-blue-500 text-white ml-auto">3</span></a>
</li> </li>
<li class="dropdown-item"><a class="flex flex-row items-center justify-start h-10 w-full px-2" <li class="dropdown-item"><a class="flex flex-row items-center justify-start h-10 w-full px-2"
href="/extras/user-profile"><svg stroke="currentColor" fill="none" stroke-width="2" href="/extras/user-profile"><svg stroke="currentColor" fill="none" stroke-width="2"

View File

@ -2,14 +2,20 @@
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
</script> </script>
<footer class="container"> <footer class="block py-4">
<hr class="mt-2 mb-4 border-b-1 border-gray-300" /> <div class="container mx-auto px-4">
<p class="text-sm text-gray-500 mt-4"> <hr class="mb-4 border-b-1 border-gray-300" />
Lauf für Kaya! Läufersystem - Copyright © 2020 + proudly powered by <footer class="text-gray-700 body-font">
<a <div class="container mx-auto flex items-center sm:flex-row flex-col">
class="underline" <p class="text-sm text-gray-500 mt-4">
href="https://odit.services" Lauf für Kaya! Läufersystem - Copyright © 2020 + proudly powered by
rel="noopener,noreferrer" <a
target="_blank">ODIT.Services</a> class="underline"
</p> href="https://odit.services"
rel="noopener,noreferrer"
target="_blank">ODIT.Services</a>
</p>
</div>
</footer>
</div>
</footer> </footer>

View File

@ -1,28 +1,23 @@
<script> <script>
import { ApiError, AuthService } from "@odit/lfk-client-js";
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
import Toastify from "toastify-js"; import store from "../store.js";
import "toastify-js/src/toastify.css"; store.init();
//
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
import isEmail from "validator/es/lib/isEmail"; import isEmail from "validator/es/lib/isEmail";
//
import Toastify from "toastify-js";
import "toastify-js/src/toastify.css";
let reset_mail_sent = false; let reset_mail_sent = false;
let usersEmail = ""; let usersEmail = "";
function reset() { function reset() {
if (isEmail(usersEmail)) { if (isEmail(usersEmail)) {
AuthService.authControllerGetResetToken({ email: usersEmail }) Toastify({
.then((resp) => { text: $_("mail-validation-in-progress"),
console.log(resp); duration: 3500,
console.log(resp.resetToken); }).showToast();
Toastify({ reset_mail_sent = true;
text: $_("mail-validation-in-progress"),
duration: 3500,
}).showToast();
reset_mail_sent = true;
})
.catch((err) => {
console.log(err.body.name);
console.log(err.body.message);
});
} else { } else {
Toastify({ Toastify({
text: $_("invalid-mail-reset"), text: $_("invalid-mail-reset"),
@ -35,7 +30,11 @@
{#if reset_mail_sent} {#if reset_mail_sent}
<div class="min-h-screen flex items-center justify-center bg-gray-100"> <div class="min-h-screen flex items-center justify-center bg-gray-100">
<div class="max-w-md w-full py-12 px-6"> <div class="max-w-md w-full py-12 px-6">
<img style="height:10rem;" class="mx-auto" src="/lfk-logo.png" alt="" /> <img
style="height:10rem;"
class="mx-auto"
src="/lfk-logo.png"
alt="" />
<p class="mt-6 text-lg text-center font-bold text-gray-900"> <p class="mt-6 text-lg text-center font-bold text-gray-900">
{$_('application_name')} {$_('application_name')}
</p> </p>
@ -58,7 +57,11 @@
{:else} {:else}
<div class="min-h-screen flex items-center justify-center bg-gray-100"> <div class="min-h-screen flex items-center justify-center bg-gray-100">
<div class="max-w-md w-full py-12 px-6"> <div class="max-w-md w-full py-12 px-6">
<img style="height:10rem;" class="mx-auto" src="/lfk-logo.png" alt="" /> <img
style="height:10rem;"
class="mx-auto"
src="/lfk-logo.png"
alt="" />
<p class="mt-6 text-lg text-center font-bold text-gray-900"> <p class="mt-6 text-lg text-center font-bold text-gray-900">
{$_('application_name')} {$_('application_name')}
</p> </p>

View File

@ -4,6 +4,7 @@
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
store.init(); store.init();
import { OpenAPI, AuthService } from "@odit/lfk-client-js"; import { OpenAPI, AuthService } from "@odit/lfk-client-js";
OpenAPI.BASE = config.baseurl;
import Toastify from "toastify-js"; import Toastify from "toastify-js";
// ------ // ------
let username = "demo"; let username = "demo";
@ -81,8 +82,12 @@
<div <div
class="min-h-screen flex items-center justify-center bg-gray-100 text-gray-900"> class="min-h-screen flex items-center justify-center bg-gray-100 text-gray-900">
<div class="max-w-md w-full py-12 px-6" role="main"> <div class="max-w-md w-full py-12 px-6">
<img style="height:10rem;" class="mx-auto" src="/lfk-logo.png" alt="" /> <img
style="height:10rem;"
class="mx-auto"
src="/lfk-logo.png"
alt="" />
<p class="mt-6 text-lg text-center font-bold">{$_('application_name')}</p> <p class="mt-6 text-lg text-center font-bold">{$_('application_name')}</p>
<p class="mt-6 text-sm text-center">{$_('log_in_to_your_account')}</p> <p class="mt-6 text-sm text-center">{$_('log_in_to_your_account')}</p>
<div> <div>

View File

@ -1,10 +0,0 @@
/** Dispatch event on click outside of node */
export function clickOutside(node) {
const handleClick = (event) => {
if (event.target.getAttribute('data-id') === 'modal_backdrop') {
node.dispatchEvent(new CustomEvent('click_outside', node));
}
};
document.removeEventListener('click', handleClick, true);
document.addEventListener('click', handleClick, true);
}