Merge branch 'dev' into feature/12-user-management

This commit is contained in:
2021-01-09 14:05:00 +01:00
6 changed files with 143 additions and 1072 deletions

View File

@@ -1,7 +1,93 @@
<script>
import { _ } from "svelte-i18n";
import { clickOutside } from "./outsideclick";
import { focusTrap } from "svelte-focus-trap";
export let modal_open;
(function () {
document.onkeydown = function (e) {
e = e || window.event;
if (e.key === "Escape") {
modal_open = false;
}
};
})();
const license_promise = fetch("/licenses.json");
let licenses = [];
$: currentlicense = "";
$: licensetext = "";
license_promise
.then((response) => response.json())
.then((json) => {
licenses = json;
console.log(json);
});
</script>
{#if modal_open}
<div
class="fixed z-10 inset-0 overflow-y-auto"
use:focusTrap
use:clickOutside
on:click_outside={() => {
modal_open = false;
}}>
<div
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
<div
class="absolute inset-0 bg-gray-500 opacity-75"
data-id="modal_backdrop" />
</div>
<span
class="hidden sm:inline-block sm:align-middle sm:h-screen"
aria-hidden="true">&#8203;</span>
<div
class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"
role="dialog"
aria-modal="true"
aria-labelledby="modal-headline">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div class="sm:flex sm:items-start">
<div
class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10">
<svg
class="h-6 w-6 text-blue-600"
fill="none"
width="24"
height="24"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 640 512"><path
fill="currentColor"
d="M635.7 167.2L556.1 31.7c-8.8-15-28.3-20.1-43.5-11.5l-69 39.1L503.3 161c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L416 75l-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L333.2 122 278 153.3 337.8 255c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-59.7-101.7-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-27.9-47.5-55.2 31.3 59.7 101.7c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L84.9 262.9l-69 39.1C.7 310.7-4.6 329.8 4.2 344.8l79.6 135.6c8.8 15 28.3 20.1 43.5 11.5L624.1 210c15.2-8.6 20.4-27.8 11.6-42.8z" /></svg>
</div>
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
<h3 class="text-lg leading-6 font-medium text-gray-900">
{$_('read-license')}
</h3>
<div class="mt-2 mb-6">
<p class="text-sm text-gray-500">{currentlicense}</p>
</div>
<div class="mt-2 mb-6">
<p class="text-sm text-gray-500">{licensetext}</p>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
<button
on:click={() => {
modal_open = false;
}}
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">
Close
</button>
</div>
</div>
</div>
</div>
{/if}
<!-- /// -->
<div class="pt-12 px-4 sm:px-6 lg:px-8 lg:pt-20 bg-gray-900 pb-12">
<div class="text-center mb-8">
<h1
@@ -32,142 +118,52 @@
<p class="text-center">{$_('oss_credit_description')}</p>
</div>
<div class="w-screen leading-8 pl-5 mt-5">
<!-- -->
<table>
<thead>
<tr>
<th>name</th>
<th>licenseType</th>
<th>link</th>
<th>installedVersion</th>
<th>author</th>
</tr>
</thead>
<tbody>
<tr>
<td>@odit/lfk-client-js</td>
<td>CC-BY-NC-SA-4.0</td>
<td>https://git.odit.services/lfk/lfk-client-js</td>
<td>0.0.5</td>
<td>ODIT.Services</td>
</tr>
<tr>
<td>filepond</td>
<td>MIT</td>
<td>https://github.com/pqina/filepond.git</td>
<td>4.25.1</td>
<td>PQINA</td>
</tr>
<tr>
<td>gridjs</td>
<td>MIT</td>
<td>https://github.com/grid-js/gridjs.git</td>
<td>3.2.0</td>
<td>Afshin Mehrabani</td>
</tr>
<tr>
<td>svelte-filepond</td>
<td>MIT</td>
<td>https://github.com/pqina/svelte-filepond.git</td>
<td>0.0.1</td>
<td>PQINA</td>
</tr>
<tr>
<td>svelte-i18n</td>
<td>MIT</td>
<td>https://github.com/kaisermann/svelte-i18n.git</td>
<td>3.3.0</td>
<td>Christian Kaisermann</td>
</tr>
<tr>
<td>tailwindcss</td>
<td>MIT</td>
<td>https://github.com/tailwindlabs/tailwindcss.git</td>
<td>2.0.2</td>
<td />
</tr>
<tr>
<td>toastify-js</td>
<td>MIT</td>
<td>https://github.com/apvarun/toastify-js.git</td>
<td>1.9.3</td>
<td>Varun A P</td>
</tr>
<tr>
<td>validator</td>
<td>MIT</td>
<td>https://github.com/chriso/validator.js.git</td>
<td>13.5.2</td>
<td>Chris O'Hara</td>
</tr>
<tr>
<td>@snowpack/plugin-svelte</td>
<td>MIT</td>
<td>https://github.com/snowpackjs/snowpack.git</td>
<td>3.4.1</td>
<td />
</tr>
<tr>
<td>autoprefixer</td>
<td>MIT</td>
<td>https://github.com/postcss/autoprefixer.git</td>
<td>10.1.0</td>
<td>Andrey Sitnik</td>
</tr>
<tr>
<td>postcss</td>
<td>MIT</td>
<td>https://github.com/postcss/postcss.git</td>
<td>8.2.1</td>
<td>Andrey Sitnik</td>
</tr>
<tr>
<td>postcss-load-config</td>
<td>MIT</td>
<td>https://github.com/postcss/postcss-load-config.git</td>
<td>3.0.0</td>
<td>Michael Ciniawky</td>
</tr>
<tr>
<td>snowpack</td>
<td>MIT</td>
<td>https://github.com/snowpackjs/snowpack.git</td>
<td>3.0.0-rc.2</td>
<td>Fred K. Schott</td>
</tr>
<tr>
<td>svelte</td>
<td>MIT</td>
<td>https://github.com/sveltejs/svelte.git</td>
<td>3.31.0</td>
<td>Rich Harris</td>
</tr>
<tr>
<td>svelte-preprocess</td>
<td>MIT</td>
<td>https://github.com/sveltejs/svelte-preprocess.git</td>
<td>4.6.1</td>
<td>Christian Kaisermann</td>
</tr>
</tbody>
</table>
<!-- -->
<!-- <ul class="list-disc text-gray-500">
<li>
Snowpack:
<a
class="underline"
href="https://snowpack.dev"
target="_blank">https://snowpack.dev</a>
</li>
<li>
SvelteJS:
<a
class="underline"
href="https://svelte.dev"
target="_blank">https://svelte.dev</a>
</li>
</ul> -->
{#await license_promise}
<p class="text-center w-full">Licenses are being loaded...</p>
{:then}
<table>
<thead>
<tr>
<th>{$_('dependency_name')}</th>
<th>{$_('license')}</th>
<th>{$_('repo_link')}</th>
<th>{$_('installed-version')}</th>
<th>{$_('author')}</th>
</tr>
</thead>
<tbody>
{#each licenses as l}
<tr>
<td>{l.name}</td>
<td>
{l.license || '?'}<br /><span
class="underline cursor-pointer"
on:click={() => {
modal_open = true;
currentlicense = l.name + '@' + l.version;
licensetext = l.licensetext || $_('no-license-text-could-be-found');
}}>{$_('read-license')}</span>
</td>
<td>
{(l.repo?.url || l.repo)
.replace('git+', '')
.replace('git://', '')}
</td>
<td>{l.version || '?'}</td>
<td>{l.author?.name || l.author || '?'}</td>
</tr>
{/each}
</tbody>
</table>
{:catch error}
<div
class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500">
<span class="inline-block align-middle mr-8">
<b class="capitalize">{$_('general_promise_error')}</b>
{error}
</span>
</div>
{/await}
</div>
<h2 class="text-4xl font-display font-semibold text-gray-900 md:text-5xl">
Fragen

View File

@@ -5,6 +5,7 @@
"action": "Action",
"add-your-first-track": "Add your first track",
"application_name": "Lauf für Kaya! - Admin",
"author": "Author",
"by": "by",
"cannot-reset-your-password-directly": "Bummer. We unfortunately cannot reset your password directly. Please send us a mail and confirm your identity",
"changelog": "Changelog",
@@ -29,6 +30,7 @@
"no_matching_records_found": "No matching records found",
"an_error_happened_while_fetching_the_data": "An error happened while fetching the data"
},
"dependency_name": "Name",
"dont-have-your-email-connected": "Don't have your email connected?",
"dont-panic-were-resetting-it": "Don't panic, we're resetting it ✌",
"e-mail-adress": "E-Mail Adress",
@@ -40,20 +42,25 @@
"general_promise_error": "😢 Error",
"goback": "Go Home",
"hallo": "hello",
"installed-version": "Installed version",
"invalid-mail-reset": "the provided email is invalid",
"lfk-is-os": "The \"Lauf für Kaya!\" Frontend is (like all other projects for the \"LfK!\" Also) an open source project.",
"license": "License",
"log_in": "Log in",
"log_in_to_your_account": "Log in to your account",
"login_is_checked": "Login is being checked...",
"logout": "Logout",
"mail-validation-in-progress": "mail validation in progress...",
"minimum-lap-time-in-s": "minimum lap time in s",
"no-license-text-could-be-found": "No license text could be found 😢",
"no-tracks-added-yet": "there are no tracks added yet.",
"orgs": "Orgs",
"oss_credit_description": "We use a lot of open source software on these projects, and would like to thank the following projects and contributors who help make open source great!",
"password": "Password",
"please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.",
"read-license": "Read License",
"register": "Register",
"repo_link": "Link",
"reset-my-password": "Reset my password",
"runners": "Runners",
"send-a-mail-to-lfk-odit-services": "send a mail to lfk@odit.services",