Compare commits
20 Commits
a5d25e7d92
...
0.10.0
| Author | SHA1 | Date | |
|---|---|---|---|
| f7fc1967a5 | |||
| aedb8a765b | |||
| cf58bd15c3 | |||
| 34f4f68524 | |||
| 09b8144080 | |||
| f1e6fb4ce7 | |||
| 2ca63fd1f6 | |||
| 4167819e7a | |||
| 5bd3a463f0 | |||
| 79c447b4c6 | |||
| 540304f947 | |||
| 75d8f7331b | |||
| b2509e9e53 | |||
| 7862f44653 | |||
| 962dd0c1bb | |||
| 5d5f7c7f5c | |||
| 6aaf838451 | |||
| ad3bd312e9 | |||
| 5fa9939696 | |||
| 4956bb0e9c |
41
CHANGELOG.md
41
CHANGELOG.md
@@ -2,8 +2,49 @@
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
#### [0.10.0](https://git.odit.services/lfk/frontend/compare/0.9.1...0.10.0)
|
||||||
|
|
||||||
|
- Added translations [`79c447b`](https://git.odit.services/lfk/frontend/commit/79c447b4c65e55ebb5af71fb0b09174c36e2cecf)
|
||||||
|
- Sorted translations 🌍 [`5bd3a46`](https://git.odit.services/lfk/frontend/commit/5bd3a463f00abaf2c98ab554f88e5542d01f364a)
|
||||||
|
- Reset can now only be triggered if pw is strong enoug [`75d8f73`](https://git.odit.services/lfk/frontend/commit/75d8f7331b6ae78f3979bb62148188a16f83cb8d)
|
||||||
|
- Module now exports functions that check if a password is strong enough and equal to a potential confirmation field [`b2509e9`](https://git.odit.services/lfk/frontend/commit/b2509e9e53ab6b51dfd55e26712e8928160cd64b)
|
||||||
|
- Added more cirteria to the password strength component [`5fa9939`](https://git.odit.services/lfk/frontend/commit/5fa9939696a35d60d762feb0cebef61d31869218)
|
||||||
|
- Now using pw strength component [`6aaf838`](https://git.odit.services/lfk/frontend/commit/6aaf8384512185a3a319ce6b3e2505e910468e64)
|
||||||
|
- Added a password strength verification [`ad3bd31`](https://git.odit.services/lfk/frontend/commit/ad3bd312e9a5785f81029ea2b7e302ea1addd988)
|
||||||
|
- Implemented a custom password strength component [`4956bb0`](https://git.odit.services/lfk/frontend/commit/4956bb0e9c3c1d22d60e849aea5664e35330f897)
|
||||||
|
- User creation can now only be triggered if pw is strong enoug [`540304f`](https://git.odit.services/lfk/frontend/commit/540304f947f60a7072c592ca8088996ce7e95cb4)
|
||||||
|
- Now using pw strength component for user creation [`7862f44`](https://git.odit.services/lfk/frontend/commit/7862f446532903f1a2eac7b21d5c80c3245785e5)
|
||||||
|
- Added missing exports [`962dd0c`](https://git.odit.services/lfk/frontend/commit/962dd0c1bbc0df7f20bcec5b4247188c8935c87e)
|
||||||
|
- new license file version [CI SKIP] [`aedb8a7`](https://git.odit.services/lfk/frontend/commit/aedb8a765ba053545adbba9eb014b3bb0e5aac8c)
|
||||||
|
- Bumped lfk-client version 🔝 [`cf58bd1`](https://git.odit.services/lfk/frontend/commit/cf58bd15c3541c417ab2be83d96135e931a2b6f6)
|
||||||
|
- new license file version [CI SKIP] [`34f4f68`](https://git.odit.services/lfk/frontend/commit/34f4f68524918fd3d1963966a1e259d5b60efaca)
|
||||||
|
- Merge pull request 'Implemented password strength test feature/106-password_strength' (#115) from feature/106-password_strength into dev [`09b8144`](https://git.odit.services/lfk/frontend/commit/09b81440804cf98303fcb723a9717d6d0f432da8)
|
||||||
|
- Formatting🛠 [`4167819`](https://git.odit.services/lfk/frontend/commit/4167819e7a864d3b1dd95ba48ab1525a454f7f30)
|
||||||
|
- Now using pw strength component for reset [`5d5f7c7`](https://git.odit.services/lfk/frontend/commit/5d5f7c7f5c6a69146f41996f4facfeff95791be0)
|
||||||
|
|
||||||
|
#### [0.9.1](https://git.odit.services/lfk/frontend/compare/0.9.0...0.9.1)
|
||||||
|
|
||||||
|
> 26 March 2021
|
||||||
|
|
||||||
|
- 🚀RELEASE v0.9.1 [`2ca63fd`](https://git.odit.services/lfk/frontend/commit/2ca63fd1f675f0da2b18ba43095074dd4823991d)
|
||||||
|
- Merge pull request 'Org selfservice Link feature/112-org_registration_links' (#114) from feature/112-org_registration_links into dev [`a5d25e7`](https://git.odit.services/lfk/frontend/commit/a5d25e7d92c7c37e90dbb4ba74b787873f920c6b)
|
||||||
|
- Added checkbox to enable registration [`f9fe793`](https://git.odit.services/lfk/frontend/commit/f9fe79357317653b46c09eb95b0db13845cddcf9)
|
||||||
|
- Sorted translations [`c074c12`](https://git.odit.services/lfk/frontend/commit/c074c12be75f285612f7a732c106404d9fb4538a)
|
||||||
|
- You can now copy the selfservice links to your clipboard [`fcd55f8`](https://git.odit.services/lfk/frontend/commit/fcd55f89d72e6ceb9bb2bdd194cc3420145d6d0d)
|
||||||
|
- Formatting [`f185d55`](https://git.odit.services/lfk/frontend/commit/f185d559c0d6476f2f2b9ea74aaad3297411801d)
|
||||||
|
- Copy now 100% worX [`a3921b4`](https://git.odit.services/lfk/frontend/commit/a3921b45c70b410293db593a75d2fdd34c131733)
|
||||||
|
- Fixed changes in wrong file [`73d95bc`](https://git.odit.services/lfk/frontend/commit/73d95bc0042f8f586ba2f2345342e25da1d280c2)
|
||||||
|
- Added check if key exists [`c2d29ff`](https://git.odit.services/lfk/frontend/commit/c2d29ff233f6b3e9dd2555b7e0b845592da2ba35)
|
||||||
|
- Added check if key exists [`2316baa`](https://git.odit.services/lfk/frontend/commit/2316baa8984832382be9f3b4549ca62cf9ccb5a3)
|
||||||
|
- Added translations [`ddbc293`](https://git.odit.services/lfk/frontend/commit/ddbc293e9ca0525910bf3d995de970ee2c35c56a)
|
||||||
|
- new license file version [CI SKIP] [`ded9b58`](https://git.odit.services/lfk/frontend/commit/ded9b589fe087915176c5b54f3c55e412541bc8f)
|
||||||
|
- Merge pull request 'first merge to main 🚀' (#71) from dev into main [`9aa8e7e`](https://git.odit.services/lfk/frontend/commit/9aa8e7edffa7e51b00a5ab7a8f16828b7a469181)
|
||||||
|
|
||||||
#### [0.9.0](https://git.odit.services/lfk/frontend/compare/0.8.7...0.9.0)
|
#### [0.9.0](https://git.odit.services/lfk/frontend/compare/0.8.7...0.9.0)
|
||||||
|
|
||||||
|
> 26 March 2021
|
||||||
|
|
||||||
|
- 🚀RELEASE v0.9.0 [`67c3732`](https://git.odit.services/lfk/frontend/commit/67c3732fad5a7c64ae11dcbebaaa095e1a2b387c)
|
||||||
- Merge pull request 'Runner cards feature/94-runnercard_mgnt' (#111) from feature/94-runnercard_mgnt into dev [`2932f45`](https://git.odit.services/lfk/frontend/commit/2932f4591e62187a4903511051d110e9679c0993)
|
- Merge pull request 'Runner cards feature/94-runnercard_mgnt' (#111) from feature/94-runnercard_mgnt into dev [`2932f45`](https://git.odit.services/lfk/frontend/commit/2932f4591e62187a4903511051d110e9679c0993)
|
||||||
- Sorted translations 🌍 [`1665a1a`](https://git.odit.services/lfk/frontend/commit/1665a1a093862a13be78ec65dcdf64eb7d855593)
|
- Sorted translations 🌍 [`1665a1a`](https://git.odit.services/lfk/frontend/commit/1665a1a093862a13be78ec65dcdf64eb7d855593)
|
||||||
- Added translations [`6b5945a`](https://git.odit.services/lfk/frontend/commit/6b5945add86a77630c500872545bb91724b2047f)
|
- Added translations [`6b5945a`](https://git.odit.services/lfk/frontend/commit/6b5945add86a77630c500872545bb91724b2047f)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.9.0-RELEASE_INFO</span>
|
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.10.0-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>
|
||||||
<script defer type="module" src="/_dist_/index.js"></script>
|
<script defer type="module" src="/_dist_/index.js"></script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@odit/lfk-frontend",
|
"name": "@odit/lfk-frontend",
|
||||||
"version": "0.9.0",
|
"version": "0.10.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n-order": "node order.js",
|
"i18n-order": "node order.js",
|
||||||
"dev:all": "yarn prebuild && snowpack dev",
|
"dev:all": "yarn prebuild && snowpack dev",
|
||||||
@@ -13,7 +13,8 @@
|
|||||||
},
|
},
|
||||||
"license": "CC-BY-NC-SA-4.0",
|
"license": "CC-BY-NC-SA-4.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@odit/lfk-client-js": "0.7.0",
|
"@odit/lfk-client-js": "0.8.0",
|
||||||
|
"check-password-strength": "^2.0.2",
|
||||||
"csvtojson": "^2.0.10",
|
"csvtojson": "^2.0.10",
|
||||||
"gridjs": "3.3.0",
|
"gridjs": "3.3.0",
|
||||||
"localforage": "1.9.0",
|
"localforage": "1.9.0",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
52
src/components/auth/PasswordStrength.svelte
Normal file
52
src/components/auth/PasswordStrength.svelte
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<script context="module">
|
||||||
|
import { passwordStrength } from "check-password-strength";
|
||||||
|
export function password_strong_enough(password_change) {
|
||||||
|
let strength = passwordStrength(password_change);
|
||||||
|
return (
|
||||||
|
strength?.contains.includes("lowercase") &&
|
||||||
|
strength?.contains.includes("uppercase") &&
|
||||||
|
strength?.contains.includes("number") &&
|
||||||
|
strength?.length > 9
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export function password_strong_enough_and_equal(
|
||||||
|
password_change,
|
||||||
|
password_confirm
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
password_strong_enough(password_change) &&
|
||||||
|
password_change === password_confirm
|
||||||
|
);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getLocaleFromNavigator, _ } from "svelte-i18n";
|
||||||
|
import { passwordStrength as Strength } from "check-password-strength";
|
||||||
|
export let password_change;
|
||||||
|
export let password_confirm;
|
||||||
|
|
||||||
|
$: strength = Strength(password_change);
|
||||||
|
$: passwords_match =
|
||||||
|
!password_confirm || password_confirm === password_change;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="ml-4">
|
||||||
|
<ul class="list-disc font-medium tracking-wide text-red-500 text-xs">
|
||||||
|
{#if !strength.contains.includes('lowercase')}
|
||||||
|
<li>{$_('must-contain-a-lowercase-letter')}</li>
|
||||||
|
{/if}
|
||||||
|
{#if !strength.contains.includes('uppercase')}
|
||||||
|
<li>{$_('must-contain-a-uppercase-letter')}</li>
|
||||||
|
{/if}
|
||||||
|
{#if !strength.contains.includes('number')}
|
||||||
|
<li>{$_('must-contain-a-number')}</li>
|
||||||
|
{/if}
|
||||||
|
{#if !(strength.length > 9)}
|
||||||
|
<li>{$_('must-be-at-least-10-characters-long')}</li>
|
||||||
|
{/if}
|
||||||
|
{#if !(passwords_match == true)}
|
||||||
|
<li>{$_('passwords-dont-match')}</li>
|
||||||
|
{/if}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
@@ -3,36 +3,41 @@
|
|||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
import "toastify-js/src/toastify.css";
|
import "toastify-js/src/toastify.css";
|
||||||
|
import PasswordStrength, {
|
||||||
|
password_strong_enough,
|
||||||
|
} from "../auth/PasswordStrength.svelte";
|
||||||
let state = "reset_in_progress";
|
let state = "reset_in_progress";
|
||||||
let password = "";
|
let password = "";
|
||||||
export let params;
|
export let params;
|
||||||
function set_new_password() {
|
function set_new_password() {
|
||||||
if(password.trim() !== ""){
|
if (password.trim() !== "") {
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_('password-reset-in-progress'),
|
text: $_("password-reset-in-progress"),
|
||||||
duration: 3500,
|
duration: 3500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
AuthService.authControllerResetPassword(atob(params.resetkey),{ password })
|
AuthService.authControllerResetPassword(atob(params.resetkey), {
|
||||||
|
password,
|
||||||
|
})
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_('password-reset-successful'),
|
text: $_("password-reset-successful"),
|
||||||
duration: 3500,
|
duration: 3500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
state="reset_success";
|
state = "reset_success";
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
state="reset_error";
|
state = "reset_error";
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_('please-provide-a-password'),
|
text: $_("please-provide-a-password"),
|
||||||
duration: 3500,
|
duration: 3500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if state==="reset_success"}
|
{#if state === 'reset_success'}
|
||||||
<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="" />
|
||||||
@@ -56,8 +61,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else if state==="reset_error"}
|
{:else if state === 'reset_error'}
|
||||||
<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">
|
||||||
@@ -79,8 +84,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else if state==="reset_in_progress"}
|
{:else if state === 'reset_in_progress'}
|
||||||
<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="" />
|
||||||
@@ -102,11 +107,14 @@
|
|||||||
placeholder={$_('new-password')}
|
placeholder={$_('new-password')}
|
||||||
bind:value={password} />
|
bind:value={password} />
|
||||||
</div>
|
</div>
|
||||||
|
<PasswordStrength bind:password_change={password} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-5">
|
<div class="mt-5">
|
||||||
<button
|
<button
|
||||||
on:click={set_new_password}
|
on:click={set_new_password}
|
||||||
|
disabled={!password_strong_enough(password)}
|
||||||
|
class:opacity-50={!password_strong_enough(password)}
|
||||||
type="submit"
|
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">
|
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">
|
<span class="absolute left-0 inset-y pl-3">
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getLocaleFromNavigator, _ } from "svelte-i18n";
|
import { getLocaleFromNavigator, _ } from "svelte-i18n";
|
||||||
import { RunnerOrganizationService, RunnerTeamService } from "@odit/lfk-client-js";
|
import {
|
||||||
|
RunnerOrganizationService,
|
||||||
|
RunnerTeamService,
|
||||||
|
} from "@odit/lfk-client-js";
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
export let sponsoring_contracts_show = false;
|
export let sponsoring_contracts_show = false;
|
||||||
export let generate_runners = [];
|
export let generate_runners = [];
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
import { MeService } from "@odit/lfk-client-js";
|
import { MeService } from "@odit/lfk-client-js";
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
import ConfirmProfileDeletion from "./ConfirmProfileDeletion.svelte";
|
import ConfirmProfileDeletion from "./ConfirmProfileDeletion.svelte";
|
||||||
|
import PasswordStrength, {
|
||||||
|
password_strong_enough_and_equal,
|
||||||
|
} from "../auth/PasswordStrength.svelte";
|
||||||
$: data_loaded = false;
|
$: data_loaded = false;
|
||||||
$: delete_triggered = false;
|
$: delete_triggered = false;
|
||||||
$: original_data = {};
|
$: original_data = {};
|
||||||
@@ -15,8 +18,10 @@
|
|||||||
JSON.stringify(editable) === JSON.stringify(original_data)
|
JSON.stringify(editable) === JSON.stringify(original_data)
|
||||||
);
|
);
|
||||||
$: save_enabled = changes_performed && isEmail(editable.email);
|
$: save_enabled = changes_performed && isEmail(editable.email);
|
||||||
$: update_password_enabled =
|
$: update_password_enabled = password_strong_enough_and_equal(
|
||||||
password_change.length > 0 && password_change === password_confirm;
|
password_change,
|
||||||
|
password_confirm
|
||||||
|
);
|
||||||
const user_promise = MeService.meControllerGet().then((data) => {
|
const user_promise = MeService.meControllerGet().then((data) => {
|
||||||
data_loaded = true;
|
data_loaded = true;
|
||||||
data.groups = data.groups.map((g) => g.id);
|
data.groups = data.groups.map((g) => g.id);
|
||||||
@@ -45,7 +50,7 @@
|
|||||||
function changePassword() {
|
function changePassword() {
|
||||||
if (data_loaded === true && update_password_enabled) {
|
if (data_loaded === true && update_password_enabled) {
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_('changing-your-password'),
|
text: $_("changing-your-password"),
|
||||||
duration: 2500,
|
duration: 2500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
let postdata = Object.assign({}, original_data);
|
let postdata = Object.assign({}, original_data);
|
||||||
@@ -56,7 +61,7 @@
|
|||||||
password_change = "";
|
password_change = "";
|
||||||
postdata = {};
|
postdata = {};
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_('password-changed'),
|
text: $_("password-changed"),
|
||||||
duration: 2500,
|
duration: 2500,
|
||||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||||
}).showToast();
|
}).showToast();
|
||||||
@@ -242,10 +247,7 @@
|
|||||||
class="border-gray-300 placeholder-gray-500 appearance-none rounded-md relative block w-full px-3 py-2 border focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
class="border-gray-300 placeholder-gray-500 appearance-none rounded-md relative block w-full px-3 py-2 border focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
||||||
placeholder={$_('password')} />
|
placeholder={$_('password')} />
|
||||||
</div>
|
</div>
|
||||||
{#if password_change != password_confirm && password_change.length > 0}
|
<PasswordStrength bind:password_change bind:password_confirm />
|
||||||
<span
|
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">{$_('passwords-dont-match')}</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
|
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
import { UserService } from "@odit/lfk-client-js";
|
import { UserService } 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 from "toastify-js";
|
||||||
|
import PasswordStrength, {
|
||||||
|
password_strong_enough,
|
||||||
|
} from "../auth/PasswordStrength.svelte";
|
||||||
export let modal_open;
|
export let modal_open;
|
||||||
export let current_users;
|
export let current_users;
|
||||||
let firstname_input;
|
let firstname_input;
|
||||||
@@ -28,7 +31,10 @@
|
|||||||
$: isLastnameValid = lastname_input_value.trim().length !== 0;
|
$: isLastnameValid = lastname_input_value.trim().length !== 0;
|
||||||
$: isFirstnameValid = firstname_input_value.trim().length !== 0;
|
$: isFirstnameValid = firstname_input_value.trim().length !== 0;
|
||||||
$: createbtnenabled =
|
$: createbtnenabled =
|
||||||
isFirstnameValid && isLastnameValid && isPasswordValid && isEmailValid;
|
isFirstnameValid &&
|
||||||
|
isLastnameValid &&
|
||||||
|
password_strong_enough(password_input_value) &&
|
||||||
|
isEmailValid;
|
||||||
(function () {
|
(function () {
|
||||||
document.onkeydown = function (e) {
|
document.onkeydown = function (e) {
|
||||||
e = e || window.event;
|
e = e || window.event;
|
||||||
@@ -203,12 +209,8 @@
|
|||||||
type="password"
|
type="password"
|
||||||
name="password"
|
name="password"
|
||||||
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" />
|
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 !isPasswordValid}
|
<PasswordStrength
|
||||||
<span
|
bind:password_change={password_input_value} />
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
|
||||||
{$_('password-is-required')}
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-6">
|
<div class="col-span-6">
|
||||||
<label
|
<label
|
||||||
|
|||||||
@@ -245,6 +245,10 @@
|
|||||||
"middle-name": "Mittelname",
|
"middle-name": "Mittelname",
|
||||||
"minimum-lap-time-in-s": "Minimale Rundenzeit (in Sekunden)",
|
"minimum-lap-time-in-s": "Minimale Rundenzeit (in Sekunden)",
|
||||||
"minimum-lap-time-must-be-a-positive-number-or-0": "Die minimale Rundenzeit muss eine positive Zahl oder 0 sein",
|
"minimum-lap-time-must-be-a-positive-number-or-0": "Die minimale Rundenzeit muss eine positive Zahl oder 0 sein",
|
||||||
|
"must-be-at-least-10-characters-long": "Passwort muss mindestens 10 Zeichen lang sein!",
|
||||||
|
"must-contain-a-lowercase-letter": "Passwort muss einen Großbuchstaben enthalten!",
|
||||||
|
"must-contain-a-number": "Passwort muss eine Zahl enthalten!",
|
||||||
|
"must-contain-a-uppercase-letter": "Passwort muss einen Kleinbuchstaben enthalten!",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"name-is-required": "Der Gruppenname muss angegeben werden",
|
"name-is-required": "Der Gruppenname muss angegeben werden",
|
||||||
"new-password": "Neues Passwort",
|
"new-password": "Neues Passwort",
|
||||||
@@ -276,7 +280,7 @@
|
|||||||
"password-reset-in-progress": "Passwort wird zurückgesetzt...",
|
"password-reset-in-progress": "Passwort wird zurückgesetzt...",
|
||||||
"password-reset-mail-sent": "Passwort-Reset Mail wurde an \"{usersEmail}\" geschickt.",
|
"password-reset-mail-sent": "Passwort-Reset Mail wurde an \"{usersEmail}\" geschickt.",
|
||||||
"password-reset-successful": "Passwort erfolgreich zurückgesetzt!",
|
"password-reset-successful": "Passwort erfolgreich zurückgesetzt!",
|
||||||
"passwords-dont-match": "Die Passwörter stimmen nicht überein.",
|
"passwords-dont-match": "Die Passwörter stimmen nicht überein!",
|
||||||
"pdf-generation-failed": "PDF Generierung fehlgeschlagen!",
|
"pdf-generation-failed": "PDF Generierung fehlgeschlagen!",
|
||||||
"pdf-successfully-generated": "PDF wurde erfolgreich generiert!",
|
"pdf-successfully-generated": "PDF wurde erfolgreich generiert!",
|
||||||
"pdfs-successfully-generated": "Alle PDFs wurden generiert!",
|
"pdfs-successfully-generated": "Alle PDFs wurden generiert!",
|
||||||
|
|||||||
@@ -245,6 +245,10 @@
|
|||||||
"middle-name": "Middle name",
|
"middle-name": "Middle name",
|
||||||
"minimum-lap-time-in-s": "minimum lap time in s",
|
"minimum-lap-time-in-s": "minimum lap time in s",
|
||||||
"minimum-lap-time-must-be-a-positive-number-or-0": "minimum lap time must be a positive number or 0",
|
"minimum-lap-time-must-be-a-positive-number-or-0": "minimum lap time must be a positive number or 0",
|
||||||
|
"must-be-at-least-10-characters-long": "Must be at least 10 characters long!",
|
||||||
|
"must-contain-a-lowercase-letter": "Must contain a lowercase letter!",
|
||||||
|
"must-contain-a-number": "Must contain a number!",
|
||||||
|
"must-contain-a-uppercase-letter": "Must contain a uppercase letter!",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"name-is-required": "Name is required",
|
"name-is-required": "Name is required",
|
||||||
"new-password": "New password",
|
"new-password": "New password",
|
||||||
@@ -276,7 +280,7 @@
|
|||||||
"password-reset-in-progress": "Password Reset in Progress...",
|
"password-reset-in-progress": "Password Reset in Progress...",
|
||||||
"password-reset-mail-sent": "Password reset mail was sent to \"{usersEmail}\".",
|
"password-reset-mail-sent": "Password reset mail was sent to \"{usersEmail}\".",
|
||||||
"password-reset-successful": "Password Reset successful!",
|
"password-reset-successful": "Password Reset successful!",
|
||||||
"passwords-dont-match": "Passwords don't match",
|
"passwords-dont-match": "Passwords don't match!",
|
||||||
"pdf-generation-failed": "PDF generation failed!",
|
"pdf-generation-failed": "PDF generation failed!",
|
||||||
"pdf-successfully-generated": "PDF successfully generated!",
|
"pdf-successfully-generated": "PDF successfully generated!",
|
||||||
"pdfs-successfully-generated": "PDFs successfully generated!",
|
"pdfs-successfully-generated": "PDFs successfully generated!",
|
||||||
|
|||||||
Reference in New Issue
Block a user