Compare commits
54 Commits
Author | SHA1 | Date | |
---|---|---|---|
087c85e586 | |||
43df188df1 | |||
1d40c6d068 | |||
6614242df6 | |||
b25dc623cf | |||
9d3bb4e4e3 | |||
5dc11c285d | |||
575b4ce970 | |||
e23821a7cb | |||
e415258787 | |||
1451991d03 | |||
92fee08dc4 | |||
7b7e484091 | |||
e7291a31f3 | |||
2dc31912cc | |||
428a8a10ff | |||
8b2f1965e2 | |||
b18a99e4df | |||
1fac0c8640 | |||
f0be73c2cd | |||
42bd632539 | |||
f8014c6213 | |||
65f49489ad | |||
e9e24d5f2d | |||
369b09972c | |||
e4e2bdac72 | |||
ec0db39184 | |||
a02be78df5 | |||
3490abe9a7 | |||
b5013426e6 | |||
7dd0881d29 | |||
acf0562851 | |||
80c3a90d6f | |||
c6985087a8 | |||
ef50e2d5ce | |||
ed1dc6e8d5 | |||
c2d7a319a0 | |||
0e04298b7c | |||
3a5a73b02c | |||
901c7c1241 | |||
4e82369b16 | |||
945963db32 | |||
5741cbe756 | |||
6401aeb3a8 | |||
6a0c129d39 | |||
bbec9ffcdf | |||
541f1fa2e3 | |||
7897820632 | |||
0dd9de2abc | |||
7131ba99b6 | |||
c69026aa5b | |||
16ac96c64e | |||
1bb79b1c98 | |||
eeee272f03 |
56
CHANGELOG.md
56
CHANGELOG.md
@ -2,8 +2,63 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
||||
|
||||
#### [0.6.0](https://git.odit.services/lfk/frontend/compare/0.5.0...0.6.0)
|
||||
|
||||
- Merge pull request 'feature/52-runner-filters' (#63) from feature/52-runner-filters into dev [`#52`](https://git.odit.services/lfk/frontend/issues/52)
|
||||
- Merge pull request 'feature/43-password-reset' (#61) from feature/43-password-reset into dev [`#43`](https://git.odit.services/lfk/frontend/issues/43)
|
||||
- Merge pull request 'feature/51-teamoverview-badge-org' (#59) from feature/51-teamoverview-badge-org into dev [`#51`](https://git.odit.services/lfk/frontend/issues/51)
|
||||
- Merge pull request 'feature/47-sidebar-responsiveness' (#60) from feature/47-sidebar-responsiveness into dev [`#47`](https://git.odit.services/lfk/frontend/issues/47)
|
||||
- Merge pull request 'feature/15-runner-import' (#58) from feature/15-runner-import into dev [`#15`](https://git.odit.services/lfk/frontend/issues/15)
|
||||
- Merge pull request 'feature/56-footer-version-loading' (#57) from feature/56-footer-version-loading into dev [`#56`](https://git.odit.services/lfk/frontend/issues/56)
|
||||
- Merge pull request 'feature/46-imprint-privacy' (#55) from feature/46-imprint-privacy into dev [`#46`](https://git.odit.services/lfk/frontend/issues/46)
|
||||
- Merge pull request 'feature/44-require-mail-addresses' (#54) from feature/44-require-mail-addresses into dev [`#44`](https://git.odit.services/lfk/frontend/issues/44)
|
||||
- Merge pull request 'feature/45-component-drop' (#53) from feature/45-component-drop into dev [`#45`](https://git.odit.services/lfk/frontend/issues/45)
|
||||
- 🧹 drop old + unused components Dash + LoginAlt [`eeee272`](https://git.odit.services/lfk/frontend/commit/eeee272f0353cd543dca0efbdf23f5972a771f6c)
|
||||
- ✨ added basic UI for ResetPassword [`b18a99e`](https://git.odit.services/lfk/frontend/commit/b18a99e4df6111e137a8081c3e6619da6f5af30c)
|
||||
- 🧹 remove placeholder options from Dashboard sidebar [`16ac96c`](https://git.odit.services/lfk/frontend/commit/16ac96c64e86a6f97e179d70b586f20869ffe663)
|
||||
- 👀 ResetPassword - success and error states [`8b2f196`](https://git.odit.services/lfk/frontend/commit/8b2f1965e2a754da6e40a3051e8ae3e771d70336)
|
||||
- added Privacy page [`5741cbe`](https://git.odit.services/lfk/frontend/commit/5741cbe7562542ba2b81a9a6d6be7fb0f5145801)
|
||||
- ImportRunnerModal - differenciate between team and org import [`acf0562`](https://git.odit.services/lfk/frontend/commit/acf0562851a77b9122473ffb1753a94b4272e53b)
|
||||
- ✨ RunnersOverview - basic working filter [`575b4ce`](https://git.odit.services/lfk/frontend/commit/575b4ce9708625fbec23c49101f44825c6a75bce)
|
||||
- basic select filtering in RunnersOverview [`e415258`](https://git.odit.services/lfk/frontend/commit/e415258787c776d4a5291632f47c2fcceba9a040)
|
||||
- WIP on filter [`e23821a`](https://git.odit.services/lfk/frontend/commit/e23821a7cbe73fda420e4bcaaa2dbf5a89b56cc9)
|
||||
- ✨ layout for Import from RunnerOverview [`c698508`](https://git.odit.services/lfk/frontend/commit/c6985087a8b51d6e1d8fb71b1eb8a659b8ed34e6)
|
||||
- ✨ working Imprint page [`6401aeb`](https://git.odit.services/lfk/frontend/commit/6401aeb3a850b1dd9ec4eca5c181ebcf3ed8b7e9)
|
||||
- 🌍 i18n for ResetPassword [`428a8a1`](https://git.odit.services/lfk/frontend/commit/428a8a10ffa96ae2f04c718d678439d36e6cb857)
|
||||
- ⏫ dependency bump [`6614242`](https://git.odit.services/lfk/frontend/commit/6614242df6a9679f60bc3996c0317d0870a81ac4)
|
||||
- added Imprint route /imprint [`bbec9ff`](https://git.odit.services/lfk/frontend/commit/bbec9ffcdf0be2cf37501a355c5678ed9cd46a1d)
|
||||
- ⏫ general dependency bump [`369b099`](https://git.odit.services/lfk/frontend/commit/369b09972c786e5381d7bae667def6a15e21a45b)
|
||||
- AddUserModal - enforce email input [`7131ba9`](https://git.odit.services/lfk/frontend/commit/7131ba99b6917dc0fb99f93ab40495b9702024ab)
|
||||
- Org badge in TeamsOverview [`3490abe`](https://git.odit.services/lfk/frontend/commit/3490abe9a70ca3bd1725ae005c4031f25996f2a7)
|
||||
- RunnersOverview - support should_display_based_on_id search [`5dc11c2`](https://git.odit.services/lfk/frontend/commit/5dc11c285d4e2155a3945bc44cbfcf61fe02c5f3)
|
||||
- RunnersOverview badge to team/org [`a02be78`](https://git.odit.services/lfk/frontend/commit/a02be78df52f944d5842f8d0e9bbf62ba95e9ef0)
|
||||
- working import binding [`7dd0881`](https://git.odit.services/lfk/frontend/commit/7dd0881d293a7c46133cccd947e668178058ddd8)
|
||||
- Footer linking [`945963d`](https://git.odit.services/lfk/frontend/commit/945963db326e937456103f0092bbc684b0d0ec45)
|
||||
- UserDetail - invalid email UI feedback [`7897820`](https://git.odit.services/lfk/frontend/commit/7897820632c7b9e1e00fbf3f86a1eb7e01794fa5)
|
||||
- reactivity in import table [`b501342`](https://git.odit.services/lfk/frontend/commit/b5013426e6d4b92f56a8b7a42f4f13411c2cf61c)
|
||||
- 😬 use actual team id for RunnersOverview badge [`1fac0c8`](https://git.odit.services/lfk/frontend/commit/1fac0c8640460278bf6e2460e685e192e8a984f3)
|
||||
- 🐞 re-add sidebar component [`f8014c6`](https://git.odit.services/lfk/frontend/commit/f8014c62132eaafaa5edb486f3839b9502f3287f)
|
||||
- ⚡ load version on DOMContentLoaded [`901c7c1`](https://git.odit.services/lfk/frontend/commit/901c7c12418f09a29235afe8df5982f964fc61db)
|
||||
- UserDetail - enforce email input [`0dd9de2`](https://git.odit.services/lfk/frontend/commit/0dd9de2abc68ce10c4c763382945b92c0cd4e404)
|
||||
- use onMount event instead of DOMready [`c2d7a31`](https://git.odit.services/lfk/frontend/commit/c2d7a319a0761a77597fe365083b12c4c045a7ba)
|
||||
- new license file version [CI SKIP] [`43df188`](https://git.odit.services/lfk/frontend/commit/43df188df149401c966b8d7bb6e28fbbe39a83f1)
|
||||
- new license file version [CI SKIP] [`b25dc62`](https://git.odit.services/lfk/frontend/commit/b25dc623cf12aba88576cd8784a20b0fefc5466e)
|
||||
- ⏮decode base64 reset key [`92fee08`](https://git.odit.services/lfk/frontend/commit/92fee08dc40cf04fa1dc6d6e4aaf19f0b752031f)
|
||||
- 🧹 formatting [`7b7e484`](https://git.odit.services/lfk/frontend/commit/7b7e4840918b21951fa9e267044d623e9de7b0f5)
|
||||
- Merge commit '65f49489ad2e0cff30560e4c326ca7294d7f6190' into feature/51-teamoverview-badge-org [`f0be73c`](https://git.odit.services/lfk/frontend/commit/f0be73c2cd6c930273515a8773a2affd4068c92c)
|
||||
- 👀 only display navbar on sm devices / hide on md and up [`42bd632`](https://git.odit.services/lfk/frontend/commit/42bd63253916ab339a62f64762802750dc315b4c)
|
||||
- new license file version [CI SKIP] [`65f4948`](https://git.odit.services/lfk/frontend/commit/65f49489ad2e0cff30560e4c326ca7294d7f6190)
|
||||
- new license file version [CI SKIP] [`e4e2bda`](https://git.odit.services/lfk/frontend/commit/e4e2bdac724f40584bf1526fa59b0f380ba8cba0)
|
||||
- ⏫ client library bump [`80c3a90`](https://git.odit.services/lfk/frontend/commit/80c3a90d6fd14f1946b1e4ecd5e19314ca952c2d)
|
||||
- new license file version [CI SKIP] [`0e04298`](https://git.odit.services/lfk/frontend/commit/0e04298b7c53e2dfd447f51b75c7c32f0b730eea)
|
||||
- text selection color [`4e82369`](https://git.odit.services/lfk/frontend/commit/4e82369b160da3eaa5a32cf104aacc6250e7e31e)
|
||||
- added basic styling to Imprint component [`6a0c129`](https://git.odit.services/lfk/frontend/commit/6a0c129d39f5e659411c2358f30d425720229f16)
|
||||
- 🧹 remove ComponentDump from MainDashContent [`1bb79b1`](https://git.odit.services/lfk/frontend/commit/1bb79b1c98d166523b638a06ea9a354434ec1e08)
|
||||
|
||||
#### [0.5.0](https://git.odit.services/lfk/frontend/compare/0.4.0...0.5.0)
|
||||
|
||||
> 26 January 2021
|
||||
|
||||
- Merge pull request 'feature/12-user-management' (#39) from feature/12-user-management into dev [`#12`](https://git.odit.services/lfk/frontend/issues/12)
|
||||
- Merge pull request 'feature/13-runner-management' (#42) from feature/13-runner-management into dev [`#13`](https://git.odit.services/lfk/frontend/issues/13)
|
||||
- Merge pull request 'added permissions to dashboard sidebar' (#41) from feature/40-dynamic-sidebar-options into dev [`#41`](https://git.odit.services/lfk/frontend/issues/41)
|
||||
@ -18,6 +73,7 @@ All notable changes to this project will be documented in this file. Dates are d
|
||||
- UserPermissions - working edit [`10d7955`](https://git.odit.services/lfk/frontend/commit/10d7955f99b1a640eb1ac83764c114a25cfcc07b)
|
||||
- 🐞 ImportRunnerModal - table overflow fix [`dc1644e`](https://git.odit.services/lfk/frontend/commit/dc1644ed25b82afe6a51fbe0e1de69ddf54ef81d)
|
||||
- 🧹 general runner cleanup [`9240e0c`](https://git.odit.services/lfk/frontend/commit/9240e0c90380fc6b44a3dde480bd2d29476b2a0f)
|
||||
- 🚀RELEASE v0.5.0 [`2563e9d`](https://git.odit.services/lfk/frontend/commit/2563e9d1d6fe55544b04de8edd8c24cc1d3c9735)
|
||||
- ✨ formatting [`6e5a4bc`](https://git.odit.services/lfk/frontend/commit/6e5a4bcb39259fc376262c16ad95555fd9cf7a0b)
|
||||
- ✨ ImportRunnerModal usage in TeamDetail [`de0bd5f`](https://git.odit.services/lfk/frontend/commit/de0bd5fd57edba75faaa2ba097a2c7fb2f621f9a)
|
||||
- 💣 process breaking changes for lib v0.3.0 [`dadb806`](https://git.odit.services/lfk/frontend/commit/dadb80608a55980f7b647d41c91061055287a250)
|
||||
|
@ -14,7 +14,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.5.0-RELEASE_INFO</span>
|
||||
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.6.0-RELEASE_INFO</span>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<script src="/env.js"></script>
|
||||
<script defer type="module" src="/_dist_/index.js"></script>
|
||||
|
28
package.json
28
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@odit/lfk-frontend",
|
||||
"version": "0.5.0",
|
||||
"version": "0.6.0",
|
||||
"scripts": {
|
||||
"i18n-order": "node order.js",
|
||||
"dev:all": "yarn prebuild && snowpack dev",
|
||||
@ -12,17 +12,19 @@
|
||||
"licenses:export": "license-exporter --json -o public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@odit/lfk-client-js": "0.3.0",
|
||||
"@odit/lfk-client-js": "0.4.5",
|
||||
"csvtojson": "^2.0.10",
|
||||
"filepond": "4.25.1",
|
||||
"gridjs": "3.2.2",
|
||||
"gridjs": "3.3.0",
|
||||
"localforage": "1.9.0",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"marked": "^2.0.0",
|
||||
"svelte-filepond": "0.0.1",
|
||||
"svelte-focus-trap": "1.0.1",
|
||||
"svelte-i18n": "3.3.0",
|
||||
"tailwindcss": "2.0.2",
|
||||
"tinro": "0.5.9",
|
||||
"svelte-i18n": "3.3.2",
|
||||
"svelte-select": "^3.16.1",
|
||||
"tailwindcss": "2.0.3",
|
||||
"tinro": "0.5.12",
|
||||
"toastify-js": "1.9.3",
|
||||
"validator": "13.5.2",
|
||||
"xlsx": "^0.16.9"
|
||||
@ -31,15 +33,15 @@
|
||||
"@odit/license-exporter": "0.0.9",
|
||||
"@snowpack/plugin-svelte": "3.5.2",
|
||||
"auto-changelog": "^2.2.1",
|
||||
"autoprefixer": "10.2.3",
|
||||
"autoprefixer": "10.2.4",
|
||||
"cross-env": "^7.0.3",
|
||||
"postcss": "8.2.4",
|
||||
"postcss-load-config": "3.0.0",
|
||||
"release-it": "^14.2.2",
|
||||
"postcss": "8.2.6",
|
||||
"postcss-load-config": "3.0.1",
|
||||
"release-it": "^14.4.0",
|
||||
"snowpack": "3.0.11",
|
||||
"svelte": "3.32.0",
|
||||
"svelte-preprocess": "4.6.3",
|
||||
"workbox-cli": "6.0.2"
|
||||
"svelte": "3.32.3",
|
||||
"svelte-preprocess": "4.6.8",
|
||||
"workbox-cli": "6.1.0"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
|
1
public/imprint_en.md
Normal file
1
public/imprint_en.md
Normal file
@ -0,0 +1 @@
|
||||
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
1
public/privacy_en.md
Normal file
1
public/privacy_en.md
Normal file
@ -0,0 +1 @@
|
||||
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.
|
@ -50,6 +50,9 @@
|
||||
import TeamDetail from "./components/TeamDetail.svelte";
|
||||
import UserPermissions from "./components/UserPermissions.svelte";
|
||||
import RunnerDetail from "./components/RunnerDetail.svelte";
|
||||
import Imprint from "./components/Imprint.svelte";
|
||||
import Privacy from "./components/Privacy.svelte";
|
||||
import ResetPassword from "./components/ResetPassword.svelte";
|
||||
store.init();
|
||||
registerSW();
|
||||
</script>
|
||||
@ -59,10 +62,22 @@
|
||||
<Route path="/forgot_password">
|
||||
<ForgotPassword />
|
||||
</Route>
|
||||
{:else if $router.path.includes('/reset')}
|
||||
<Route path="/reset/:resetkey" let:params>
|
||||
<ResetPassword {params} />
|
||||
</Route>
|
||||
{:else if $router.path === '/about'}
|
||||
<Route path="/about">
|
||||
<About />
|
||||
</Route>
|
||||
{:else if $router.path === '/imprint'}
|
||||
<Route path="/imprint">
|
||||
<Imprint />
|
||||
</Route>
|
||||
{:else if $router.path === '/privacy'}
|
||||
<Route path="/privacy">
|
||||
<Privacy />
|
||||
</Route>
|
||||
{:else if $store.isLoggedIn}
|
||||
<Dashboard>
|
||||
<Transition>
|
||||
|
@ -28,10 +28,7 @@
|
||||
$: isLastnameValid = lastname_input_value.trim().length !== 0;
|
||||
$: isFirstnameValid = firstname_input_value.trim().length !== 0;
|
||||
$: createbtnenabled =
|
||||
isFirstnameValid &&
|
||||
isLastnameValid &&
|
||||
isPasswordValid &&
|
||||
!(!isEmailValid && username_input_value.trim().length === 0);
|
||||
isFirstnameValid && isLastnameValid && isPasswordValid && isEmailValid;
|
||||
(function () {
|
||||
document.onkeydown = function (e) {
|
||||
e = e || window.event;
|
||||
@ -241,17 +238,9 @@
|
||||
type="email"
|
||||
name="email"
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2" />
|
||||
<!-- {#if !isEmailValid}
|
||||
{#if !isEmailValid}
|
||||
<span
|
||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
||||
valid email or username is required
|
||||
</span>
|
||||
{/if} -->
|
||||
{#if !isEmailValid && username_input_value.trim().length === 0}
|
||||
<span
|
||||
class="mt-8 flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
||||
valid email or username is required
|
||||
</span>
|
||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">{$_('valid-email-is-required')}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -122,100 +122,6 @@
|
||||
<span>{$_('tracks')}</span>
|
||||
</a>
|
||||
{/if}
|
||||
<a
|
||||
class:bg-gray-100={false}
|
||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||
href="#">
|
||||
<svg
|
||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor">
|
||||
<path d="M9 2a1 1 0 000 2h2a1 1 0 100-2H9z" />
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
<span>Checklists</span>
|
||||
</a>
|
||||
<div>
|
||||
<div
|
||||
tabindex="0"
|
||||
class:bg-gray-100={false}
|
||||
class="flex items-center justify-between px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||
role="button"
|
||||
on:click={() => {
|
||||
dropdown1 = !dropdown1;
|
||||
}}>
|
||||
<div class="flex items-center">
|
||||
<svg
|
||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
<span>Integrations</span>
|
||||
</div>
|
||||
{#if dropdown1}
|
||||
<svg
|
||||
class="flex-shrink-0 w-4 h-4 ml-2 transition transform"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
style="transform:rotate(90deg)"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
{:else}
|
||||
<svg
|
||||
class="flex-shrink-0 w-4 h-4 ml-2 transition transform"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
{/if}
|
||||
</div>
|
||||
{#if dropdown1}
|
||||
<div class="mb-4">
|
||||
<a
|
||||
class="flex items-center py-2 pl-12 pr-4 transition cursor-pointer hover:bg-gray-100 hover:text-gray-900"
|
||||
href="#">Shopify</a>
|
||||
<a
|
||||
class="flex items-center py-2 pl-12 pr-4 transition cursor-pointer hover:bg-gray-100 hover:text-gray-900"
|
||||
href="#">Slack</a>
|
||||
<a
|
||||
class="flex items-center py-2 pl-12 pr-4 transition cursor-pointer hover:bg-gray-100 hover:text-gray-900"
|
||||
href="#">Zapier</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<a
|
||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||
href="#">
|
||||
<svg
|
||||
class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M5 5a3 3 0 015-2.236A3 3 0 0114.83 6H16a2 2 0 110 4h-5V9a1 1 0 10-2 0v1H4a2 2 0 110-4h1.17C5.06 5.687 5 5.35 5 5zm4 1V5a1 1 0 10-1 1h1zm3 0a1 1 0 10-1-1v1h1z"
|
||||
clip-rule="evenodd" />
|
||||
<path d="M9 11H3v5a2 2 0 002 2h4v-7zM11 18h4a2 2 0 002-2v-5h-6v7z" />
|
||||
</svg>
|
||||
<span>{$_('changelog')}</span>
|
||||
</a>
|
||||
<a
|
||||
class:bg-gray-100={$router.path === '/settings/'}
|
||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-100 hover:text-gray-900"
|
||||
@ -269,6 +175,10 @@
|
||||
</nav>
|
||||
</nav>
|
||||
<div class="ml-0 transition md:ml-60">
|
||||
<header on:click={() => {
|
||||
navOpen = true;
|
||||
}} class="flex items-center justify-between w-full px-4 bg-white border-b h-14 md:hidden"><button class="block btn btn-light md:hidden">
|
||||
<span class="sr-only">Menu</span><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentcolor"><path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4A1 1 0 013 5zm0 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path></svg></button></header>
|
||||
<slot>
|
||||
<NoComponentLoaded />
|
||||
</slot>
|
||||
|
@ -1,12 +1,13 @@
|
||||
<script>
|
||||
import { onMount } from "svelte";
|
||||
import { _ } from "svelte-i18n";
|
||||
$: releaseinfo = "";
|
||||
setTimeout(() => {
|
||||
onMount(() => {
|
||||
releaseinfo = document
|
||||
.getElementById("buildinfo")
|
||||
.textContent.replace("RELEASE_INFO-", "")
|
||||
.replace("-RELEASE_INFO", "");
|
||||
}, 1500);
|
||||
});
|
||||
const year = new Date().getFullYear();
|
||||
</script>
|
||||
|
||||
@ -31,5 +32,9 @@
|
||||
target="_blank"
|
||||
rel="noopener, noreferrer"
|
||||
href="https://git.odit.services/lfk/frontend/src/tag/{releaseinfo}">{releaseinfo}</a>
|
||||
-
|
||||
<a class="underline" href="/privacy">{$_('privacy')}</a>
|
||||
-
|
||||
<a class="underline" href="/imprint">{$_('imprint')}</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
@ -5,12 +5,17 @@
|
||||
import { clickOutside } from "./outsideclick";
|
||||
import { focusTrap } from "svelte-focus-trap";
|
||||
import Toastify from "toastify-js";
|
||||
import { ImportService } from "@odit/lfk-client-js";
|
||||
import {
|
||||
ImportService,
|
||||
RunnerTeamService,
|
||||
RunnerOrganizationService,
|
||||
} from "@odit/lfk-client-js";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
export let opened_from;
|
||||
export let passed_org;
|
||||
export let passed_orgs;
|
||||
export let passed_team;
|
||||
export let current_runners;
|
||||
export let import_modal_open;
|
||||
$: searchvalue = "";
|
||||
const dispatch = createEventDispatcher();
|
||||
@ -29,7 +34,16 @@
|
||||
}
|
||||
};
|
||||
})();
|
||||
let orgs = [];
|
||||
RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
|
||||
orgs = val;
|
||||
});
|
||||
let teams = [];
|
||||
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
||||
teams = val;
|
||||
});
|
||||
let selected_org;
|
||||
$: selected_org_or_team = "";
|
||||
let files;
|
||||
let recent_processed = true;
|
||||
$: json_output = [];
|
||||
@ -118,6 +132,52 @@
|
||||
recent_processed = true;
|
||||
});
|
||||
}
|
||||
if (opened_from === "RunnerOverview") {
|
||||
if (selected_org_or_team.includes("ORG_")) {
|
||||
selected_org_or_team = selected_org_or_team.split("_")[1];
|
||||
ImportService.importControllerPostOrgsJson(
|
||||
selected_org_or_team,
|
||||
mapped
|
||||
)
|
||||
.then((resp) => {
|
||||
current_runners = current_runners.concat(resp);
|
||||
toast.hideToast();
|
||||
recent_processed = true;
|
||||
Toastify({
|
||||
text: "Import finished",
|
||||
duration: 500,
|
||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
}).showToast();
|
||||
cancelModal();
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.hideToast();
|
||||
recent_processed = true;
|
||||
});
|
||||
}
|
||||
if (selected_org_or_team.includes("TEAM_")) {
|
||||
selected_org_or_team = selected_org_or_team.split("_")[1];
|
||||
ImportService.importControllerPostTeamsJson(
|
||||
selected_org_or_team,
|
||||
mapped
|
||||
)
|
||||
.then((resp) => {
|
||||
current_runners = current_runners.concat(resp);
|
||||
toast.hideToast();
|
||||
recent_processed = true;
|
||||
Toastify({
|
||||
text: "Import finished",
|
||||
duration: 500,
|
||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
}).showToast();
|
||||
cancelModal();
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.hideToast();
|
||||
recent_processed = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -192,6 +252,24 @@
|
||||
</select>
|
||||
<p>{$_('bitte-bestaetige-diese-laeufer-fuer-den-import')}</p>
|
||||
{/if}
|
||||
{#if opened_from === 'RunnerOverview'}
|
||||
<p>Group</p>
|
||||
<select
|
||||
name="team"
|
||||
bind:value={selected_org_or_team}
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2">
|
||||
{#each teams as team}
|
||||
<option value="TEAM_{team.id}">
|
||||
{team.parentGroup.name}
|
||||
>
|
||||
{team.name}
|
||||
</option>
|
||||
{/each}
|
||||
{#each orgs as org}
|
||||
<option value="ORG_{org.id}">{org.name}</option>
|
||||
{/each}
|
||||
</select>
|
||||
{/if}
|
||||
{#if opened_from === 'OrgDetail'}
|
||||
<p>
|
||||
{$_('runnerimport_verify_runners_org', {
|
||||
@ -225,7 +303,7 @@
|
||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
{$_('csv_import__lastname')}
|
||||
</th>
|
||||
{#if opened_from !== 'TeamDetail'}
|
||||
{#if (opened_from !== 'TeamDetail' && opened_from !== 'RunnerOverview') || (opened_from === 'RunnerOverview' && selected_org_or_team.includes('ORG_'))}
|
||||
<th
|
||||
scope="col"
|
||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
@ -250,7 +328,7 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
{runner[`${$_('csv_import__lastname')}`]}
|
||||
</td>
|
||||
{#if opened_from !== 'TeamDetail'}
|
||||
{#if (opened_from !== 'TeamDetail' && opened_from !== 'RunnerOverview') || (opened_from === 'RunnerOverview' && selected_org_or_team.includes('ORG_'))}
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
{runner[`${$_('csv_import__team')}`] || runner[`${$_('csv_import__class')}`] || '---'}
|
||||
</td>
|
||||
|
45
src/components/Imprint.svelte
Normal file
45
src/components/Imprint.svelte
Normal file
@ -0,0 +1,45 @@
|
||||
<script>
|
||||
import { _, getLocaleFromNavigator } from "svelte-i18n";
|
||||
import * as css from "./simple.css";
|
||||
import marked from "marked";
|
||||
import Footer from "./Footer.svelte";
|
||||
let html = "";
|
||||
async function load() {
|
||||
let md = await fetch("/imprint_" + getLocaleFromNavigator() + ".md");
|
||||
if (!md.ok) {
|
||||
md = await fetch("/imprint_en.md");
|
||||
}
|
||||
html = marked(await md.text());
|
||||
}
|
||||
const promise = load();
|
||||
</script>
|
||||
|
||||
<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
|
||||
class="mt-9 font-display text-4xl leading-none font-semibold text-white sm:text-5xl lg:text-6xl">
|
||||
{$_('imprint')}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pt-0 pb-16 overflow-hidden lg:pt-12 lg:py-24">
|
||||
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
||||
{#await promise}
|
||||
<p class="text-center w-full">{$_('imprint-loading')}</p>
|
||||
{:then}
|
||||
<div class="simplecontent">
|
||||
{@html html}
|
||||
</div>
|
||||
{: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>
|
||||
</div>
|
||||
<Footer />
|
@ -1,97 +0,0 @@
|
||||
<script>
|
||||
import store from "../store.js";
|
||||
store.init();
|
||||
const login = () => {
|
||||
store.login();
|
||||
};
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
|
||||
<div class="max-w-md w-full space-y-8">
|
||||
<div>
|
||||
<img
|
||||
class="mx-auto h-12 w-auto"
|
||||
src="/lfk-logo.png"
|
||||
alt="" />
|
||||
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
|
||||
Sign in to your account
|
||||
</h2>
|
||||
<p class="mt-2 text-center text-sm text-gray-600">
|
||||
Or
|
||||
<a href="#" class="font-medium text-indigo-600 hover:text-indigo-500">
|
||||
start your 14-day free trial
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" name="remember" value="true" />
|
||||
<div class="rounded-md shadow-sm -space-y-px">
|
||||
<div>
|
||||
<label for="email-address" class="sr-only">Email address</label>
|
||||
<input
|
||||
id="email-address"
|
||||
name="email"
|
||||
type="email"
|
||||
autocomplete="email"
|
||||
required
|
||||
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
|
||||
placeholder="Email address" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="password" class="sr-only">Password</label>
|
||||
<input
|
||||
id="password"
|
||||
name="password"
|
||||
type="password"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
|
||||
placeholder="Password" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<input
|
||||
id="remember_me"
|
||||
name="remember_me"
|
||||
type="checkbox"
|
||||
class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" />
|
||||
<label for="remember_me" class="ml-2 block text-sm text-gray-900">
|
||||
Remember me
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="text-sm">
|
||||
<a href="#" class="font-medium text-indigo-600 hover:text-indigo-500">
|
||||
Forgot your password?
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button
|
||||
on:click="{login}"
|
||||
type="submit"
|
||||
class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
|
||||
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
|
||||
<!-- Heroicon name: lock-closed -->
|
||||
<svg
|
||||
class="h-5 w-5 text-indigo-500 group-hover:text-indigo-400"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
Sign in
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -2,7 +2,6 @@
|
||||
import { _ } from "svelte-i18n";
|
||||
import StatCards from "./StatCards.svelte";
|
||||
import store from "../store";
|
||||
import ComponentDump from "./ComponentDump.svelte";
|
||||
let navOpen = false;
|
||||
</script>
|
||||
|
||||
@ -21,5 +20,4 @@
|
||||
👋</span>
|
||||
</h1>
|
||||
<StatCards />
|
||||
<ComponentDump />
|
||||
</div>
|
||||
|
@ -72,6 +72,7 @@
|
||||
on:cancelDelete={(event) => {
|
||||
import_modal_open = false;
|
||||
}}
|
||||
current_runners={[]}
|
||||
passed_team={{}}
|
||||
passed_orgs={[]}
|
||||
passed_org={orgdata}
|
||||
|
@ -47,5 +47,6 @@
|
||||
passed_org={{}}
|
||||
passed_orgs={current_organizations}
|
||||
opened_from="OrgOverview"
|
||||
current_runners={[]}
|
||||
bind:import_modal_open />
|
||||
{/if}
|
||||
|
45
src/components/Privacy.svelte
Normal file
45
src/components/Privacy.svelte
Normal file
@ -0,0 +1,45 @@
|
||||
<script>
|
||||
import { _, getLocaleFromNavigator } from "svelte-i18n";
|
||||
import * as css from "./simple.css";
|
||||
import marked from "marked";
|
||||
import Footer from "./Footer.svelte";
|
||||
let html = "";
|
||||
async function load() {
|
||||
let md = await fetch("/privacy_" + getLocaleFromNavigator() + ".md");
|
||||
if (!md.ok) {
|
||||
md = await fetch("/privacy_en.md");
|
||||
}
|
||||
html = marked(await md.text());
|
||||
}
|
||||
const promise = load();
|
||||
</script>
|
||||
|
||||
<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
|
||||
class="mt-9 font-display text-4xl leading-none font-semibold text-white sm:text-5xl lg:text-6xl">
|
||||
{$_('privacy')}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pt-0 pb-16 overflow-hidden lg:pt-12 lg:py-24">
|
||||
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
||||
{#await promise}
|
||||
<p class="text-center w-full">{$_('privacy-loading')}</p>
|
||||
{:then}
|
||||
<div class="simplecontent">
|
||||
{@html html}
|
||||
</div>
|
||||
{: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>
|
||||
</div>
|
||||
<Footer />
|
129
src/components/ResetPassword.svelte
Normal file
129
src/components/ResetPassword.svelte
Normal file
@ -0,0 +1,129 @@
|
||||
<script>
|
||||
import { AuthService } from "@odit/lfk-client-js";
|
||||
import { _ } from "svelte-i18n";
|
||||
import Toastify from "toastify-js";
|
||||
import "toastify-js/src/toastify.css";
|
||||
let state = "reset_in_progress";
|
||||
let password = "";
|
||||
export let params;
|
||||
function set_new_password() {
|
||||
if(password.trim() !== ""){
|
||||
Toastify({
|
||||
text: $_('password-reset-in-progress'),
|
||||
duration: 3500,
|
||||
}).showToast();
|
||||
AuthService.authControllerResetPassword(atob(params.resetkey),{ password })
|
||||
.then((resp) => {
|
||||
Toastify({
|
||||
text: $_('password-reset-successful'),
|
||||
duration: 3500,
|
||||
}).showToast();
|
||||
state="reset_success";
|
||||
})
|
||||
.catch((err) => {
|
||||
state="reset_error";
|
||||
});
|
||||
} else {
|
||||
Toastify({
|
||||
text: $_('please-provide-a-password'),
|
||||
duration: 3500,
|
||||
}).showToast();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if state==="reset_success"}
|
||||
<div class="min-h-screen flex items-center justify-center bg-gray-100">
|
||||
<div class="max-w-md w-full py-12 px-6">
|
||||
<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">
|
||||
{$_('application_name')}
|
||||
</p>
|
||||
<p class="mt-2 mb-2 text-sm text-center text-gray-900 font-bold">
|
||||
{$_('successful-password-reset')}
|
||||
</p>
|
||||
<p class="mt-2 mb-2 text-sm text-center text-gray-900">
|
||||
{$_('you-can-now-use-your-new-password-to-log-in-to-your-account')}
|
||||
</p>
|
||||
<div class="mt-6">
|
||||
<div class="mt-6">
|
||||
<a
|
||||
href="/login/"
|
||||
class="text-center relative block w-full py-2 px-3 border border-transparent rounded-md text-white font-semibold bg-gray-800 hover:bg-gray-700 focus:bg-gray-900 focus:outline-none focus:shadow-outline sm:text-sm">
|
||||
{$_('go-to-login')}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else if state==="reset_error"}
|
||||
<div class="min-h-screen flex items-center justify-center bg-gray-100">
|
||||
<div class="max-w-md w-full py-12 px-6">
|
||||
<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">
|
||||
{$_('application_name')}
|
||||
</p>
|
||||
<p class="mt-2 mb-2 text-sm text-center text-gray-900 font-bold">
|
||||
{$_('password-reset-failed')}
|
||||
</p>
|
||||
<p class="mt-2 mb-2 text-sm text-center text-gray-900">
|
||||
{$_('please-request-a-new-reset-mail')}
|
||||
</p>
|
||||
<div class="mt-6">
|
||||
<div class="mt-6">
|
||||
<a
|
||||
href="/forgot_password/"
|
||||
class="text-center relative block w-full py-2 px-3 border border-transparent rounded-md text-white font-semibold bg-gray-800 hover:bg-gray-700 focus:bg-gray-900 focus:outline-none focus:shadow-outline sm:text-sm">
|
||||
{$_('request-a-new-reset-mail')}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else if state==="reset_in_progress"}
|
||||
<div class="min-h-screen flex items-center justify-center bg-gray-100">
|
||||
<div class="max-w-md w-full py-12 px-6">
|
||||
<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">
|
||||
{$_('application_name')}
|
||||
</p>
|
||||
<p class="mt-2 mb-4 text-md text-center text-gray-900">
|
||||
{$_('reset-password')}
|
||||
</p>
|
||||
<div>
|
||||
<div class="rounded-md shadow-sm">
|
||||
<div>
|
||||
<input
|
||||
aria-label={$_('new-password')}
|
||||
name="password"
|
||||
type="password"
|
||||
required=""
|
||||
class="border-gray-300 placeholder-gray-500 appearance-none rounded-md relative block w-full px-3 py-2 border text-gray-900 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
||||
placeholder={$_('new-password')}
|
||||
bind:value={password} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-5">
|
||||
<button
|
||||
on:click={set_new_password}
|
||||
type="submit"
|
||||
class="relative block w-full py-2 px-3 border border-transparent rounded-md text-white font-semibold bg-gray-800 hover:bg-gray-700 focus:bg-gray-900 focus:outline-none focus:shadow-outline sm:text-sm">
|
||||
<span class="absolute left-0 inset-y pl-3">
|
||||
<svg
|
||||
class="h-5 w-5 text-gray-500"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 20 20">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
{$_('reset-my-password')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
@ -4,7 +4,7 @@
|
||||
import AddRunnerModal from "./AddRunnerModal.svelte";
|
||||
import ImportRunnerModal from "./ImportRunnerModal.svelte";
|
||||
import RunnersOverview from "./RunnersOverview.svelte";
|
||||
let current_runners = [];
|
||||
$: current_runners = [];
|
||||
export let modal_open = false;
|
||||
export let import_modal_open = false;
|
||||
</script>
|
||||
@ -43,6 +43,7 @@
|
||||
passed_team={{}}
|
||||
passed_orgs={[]}
|
||||
passed_org={{}}
|
||||
bind:current_runners
|
||||
opened_from="RunnerOverview"
|
||||
bind:import_modal_open />
|
||||
{/if}
|
||||
|
@ -1,14 +1,41 @@
|
||||
<script>
|
||||
import { _ } from "svelte-i18n";
|
||||
import { RunnerService } from "@odit/lfk-client-js";
|
||||
import { RunnerService,RunnerTeamService,
|
||||
RunnerOrganizationService, } from "@odit/lfk-client-js";
|
||||
import store from "../store";
|
||||
import RunnersEmptyState from "./RunnersEmptyState.svelte";
|
||||
import Select from 'svelte-select';
|
||||
$: searchvalue = "";
|
||||
$: active_deletes = [];
|
||||
export let current_runners = [];
|
||||
const runners_promise = RunnerService.runnerControllerGetAll().then((val) => {
|
||||
current_runners = val;
|
||||
});
|
||||
$: selectedFilter_teams = null;
|
||||
$: selectedFilter = null;
|
||||
$: filter__teams = selectedFilter_teams||[];
|
||||
$: filter__orgs = selectedFilter||[];
|
||||
$:filterGroupIDs=filter__teams.concat(filter__orgs).map(i=>i.value)
|
||||
$: teams = [];
|
||||
$: orgs = [];
|
||||
$:mappedteams=teams.map(function(g){
|
||||
return {value:g.id,label:g.parentGroup.name+" > "+g.name}
|
||||
})
|
||||
$:selectgroups=(orgs.map(function(g){
|
||||
return {value:g.id,label:g.name}
|
||||
})).concat(mappedteams)
|
||||
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
||||
teams = val;
|
||||
});
|
||||
RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
|
||||
orgs = val;
|
||||
});
|
||||
function should_display_based_on_id(id) {
|
||||
if(searchvalue.toString().slice(-1)==="*"){
|
||||
return id.toString().startsWith(searchvalue.replace("*",""))
|
||||
}
|
||||
return id.toString()===searchvalue;
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes('RUNNER:GET')}
|
||||
@ -29,6 +56,12 @@
|
||||
placeholder={$_('datatable.search')}
|
||||
aria-label={$_('datatable.search')}
|
||||
class="gridjs-input gridjs-search-input mb-4" />
|
||||
<div class="block mb-1">
|
||||
<label for="country" class="text-sm font-medium text-gray-700">Filter by Organization/ Team</label>
|
||||
<Select on:select={(event)=>{
|
||||
selectedFilter=event.detail
|
||||
}} selectedValue={selectedFilter} placeholder="Filter by Organization/ Team" containerClasses="mt-1 py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" items={selectgroups} isMulti={true}></Select>
|
||||
</div>
|
||||
<div
|
||||
class="shadow border-b border-gray-200 sm:rounded-lg overflow-x-scroll">
|
||||
<table class="divide-y divide-gray-200 w-full">
|
||||
@ -61,11 +94,9 @@
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
{#each current_runners as runner}
|
||||
{#if Object.values(runner)
|
||||
.toString()
|
||||
.toLowerCase()
|
||||
.includes(searchvalue)}
|
||||
<tr data-rowid="user_{runner.id}">
|
||||
{#if runner.firstname.toLowerCase().includes(searchvalue.toLowerCase())||runner.middlename.toLowerCase().includes(searchvalue.toLowerCase())||runner.lastname.toLowerCase().includes(searchvalue.toLowerCase())||should_display_based_on_id(runner.id)}
|
||||
{#if filterGroupIDs.includes(runner.group.id)||filterGroupIDs.includes(runner.group.parentGroup?.id)||filterGroupIDs.length===0}
|
||||
<tr data-rowid="user_{runner.id}" data-groupid={runner.group.id}>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-4">
|
||||
@ -86,7 +117,16 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
{runner.group.name}
|
||||
{#if runner.group.responseType === 'RUNNERTEAM'}
|
||||
<a
|
||||
href="../teams/{runner.group.id}"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{runner.group.name}</a>
|
||||
{/if}
|
||||
{#if runner.group.responseType === 'RUNNERORGANIZATION'}
|
||||
<a
|
||||
href="../orgs/{runner.group.id}"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{runner.group.name}</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">{runner.distance}</td>
|
||||
{#if active_deletes[runner.id] === true}
|
||||
@ -129,6 +169,7 @@
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{/each}
|
||||
</tbody>
|
||||
|
@ -74,6 +74,7 @@
|
||||
</script>
|
||||
|
||||
<ImportRunnerModal
|
||||
current_runners={[]}
|
||||
on:cancelDelete={(event) => {
|
||||
import_modal_open = false;
|
||||
}}
|
||||
|
@ -80,8 +80,7 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-4">
|
||||
<div
|
||||
class="text-sm font-medium text-gray-900">
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{t.name}
|
||||
</div>
|
||||
</div>
|
||||
@ -90,10 +89,11 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-4">
|
||||
<div
|
||||
class="text-sm font-medium text-gray-900">
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{#if t.parentGroup}
|
||||
{t.parentGroup.name}
|
||||
<a
|
||||
href="../orgs/{t.parentGroup.id}"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{t.parentGroup.name}</a>
|
||||
{:else}no organization specified{/if}
|
||||
</div>
|
||||
</div>
|
||||
@ -102,8 +102,7 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-4">
|
||||
<div
|
||||
class="text-sm font-medium text-gray-900">
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{#if t.contact}
|
||||
{JSON.stringify(t.contact)}
|
||||
{:else}no contact specified{/if}
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { _ } from "svelte-i18n";
|
||||
import lodashIsEqual from "lodash.isequal";
|
||||
import store from "../store";
|
||||
import isEmail from "validator/es/lib/isEmail";
|
||||
import { UserService, UserGroupService } from "@odit/lfk-client-js";
|
||||
import Toastify from "toastify-js";
|
||||
import PromiseError from "./PromiseError.svelte";
|
||||
@ -72,7 +73,8 @@
|
||||
$: groups_changed =
|
||||
JSON.stringify(usergroups_array) ===
|
||||
JSON.stringify(usergroups_array_original);
|
||||
$: save_enabled = changes_performed || !groups_changed;
|
||||
$: save_enabled =
|
||||
(changes_performed || !groups_changed) && isEmail(editable_userdata.email);
|
||||
function submit() {
|
||||
if (data_loaded === true && save_enabled) {
|
||||
editable_userdata.groups = usergroups_array;
|
||||
@ -263,6 +265,10 @@
|
||||
name="email"
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 dark:bg-gray-900 dark:text-gray-100 rounded-md p-2" />
|
||||
</div>
|
||||
{#if !isEmail(editable_userdata.email)}
|
||||
<span
|
||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">{$_('valid-email-is-required')}</span>
|
||||
{/if}
|
||||
<div class="text-sm w-full">
|
||||
<label
|
||||
for="username"
|
||||
|
1
src/components/simple.css
Normal file
1
src/components/simple.css
Normal file
File diff suppressed because one or more lines are too long
@ -89,6 +89,7 @@
|
||||
"forgot_password?": "Forgot your password?",
|
||||
"general-stats": "General Stats",
|
||||
"general_promise_error": "😢 Error",
|
||||
"go-to-login": "Go To Login",
|
||||
"goback": "Go Home",
|
||||
"group": "Group",
|
||||
"groups": "Groups",
|
||||
@ -96,6 +97,8 @@
|
||||
"icon-image-credits": "We also want to thank these projects for illustrations and icons:",
|
||||
"import-runners": "Import runners",
|
||||
"import__target-organization": "Target Organization",
|
||||
"imprint": "Imprint 🧾",
|
||||
"imprint-loading": "Imprint loading...",
|
||||
"installed-version": "Installed version",
|
||||
"invalid-mail-reset": "the provided email is invalid",
|
||||
"last-name": "Last name",
|
||||
@ -113,6 +116,7 @@
|
||||
"middle-name": "Middle name",
|
||||
"minimum-lap-time-in-s": "minimum lap time in s",
|
||||
"name": "Name",
|
||||
"new-password": "New password",
|
||||
"no-license-text-could-be-found": "No license text could be found 😢",
|
||||
"no-tracks-added-yet": "there are no tracks added yet.",
|
||||
"organization": "Organization",
|
||||
@ -121,16 +125,25 @@
|
||||
"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",
|
||||
"password-is-required": "Password is required",
|
||||
"password-reset-failed": "Password reset failed!",
|
||||
"password-reset-in-progress": "Password Reset in Progress...",
|
||||
"password-reset-successful": "Password Reset successful!",
|
||||
"permissions": "Permissions",
|
||||
"phone": "Phone",
|
||||
"please-provide-a-password": "Please provide a password...",
|
||||
"please-provide-the-required-csv-xlsx-file": "Please provide the required csv/ xlsx file",
|
||||
"please-provide-the-required-information-to-add-a-new-runner": "Please provide the required information to add a new runner.",
|
||||
"please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.",
|
||||
"please-request-a-new-reset-mail": "Please request a new reset mail...",
|
||||
"privacy": "Privacy 🔒",
|
||||
"privacy-loading": "Privacy loading...",
|
||||
"profile-picture": "Profile Picture",
|
||||
"read-license": "Read License",
|
||||
"register": "Register",
|
||||
"repo_link": "Link",
|
||||
"request-a-new-reset-mail": "Request a new reset mail",
|
||||
"reset-my-password": "Reset my password",
|
||||
"reset-password": "Reset your password",
|
||||
"runner-import": "Runner Import",
|
||||
"runner-updated": "Runner updated!",
|
||||
"runnerimport_verify_runners_org": "Please confirm these runners for import into the organization \"{org_name}\"",
|
||||
@ -140,6 +153,7 @@
|
||||
"settings": "Settings",
|
||||
"signout": "Sign out",
|
||||
"stats-are-being-loaded": "stats are being loaded...",
|
||||
"successful-password-reset": "Successful password reset!",
|
||||
"team": "Team",
|
||||
"team-name": "Team name",
|
||||
"teams": "Teams",
|
||||
@ -161,5 +175,6 @@
|
||||
"users": "Users",
|
||||
"valid-email-is-required": "valid email is required",
|
||||
"welcome_wavinghand": "Welcome 👋",
|
||||
"you-can-now-use-your-new-password-to-log-in-to-your-account": "You can now use your new password to log in to your account! 🎉",
|
||||
"your_profile": "Your Profile"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user