Implemented a custom password strength component

ref #106
This commit is contained in:
Nicolai Ort 2021-03-26 18:47:24 +01:00
parent bc36411993
commit 4956bb0e9c
2 changed files with 15 additions and 0 deletions

View File

@ -14,6 +14,7 @@
"license": "CC-BY-NC-SA-4.0",
"dependencies": {
"@odit/lfk-client-js": "0.7.0",
"check-password-strength": "^2.0.2",
"csvtojson": "^2.0.10",
"gridjs": "3.3.0",
"localforage": "1.9.0",

View File

@ -0,0 +1,14 @@
<script>
import { getLocaleFromNavigator, _ } from "svelte-i18n";
import { passwordStrength } from "check-password-strength";
export let password_change;
$: strength = passwordStrength(password_change);
</script>
<div>
<ul>
{#if !strength.contains.includes('lowercase')}
<li>Must contain a lowercase letter</li>
{/if}
</ul>
</div>