sync - 0.12.3 #127

Manually merged
philipp merged 122 commits from dev into main 2021-04-08 17:28:32 +00:00
Showing only changes of commit 5fa9939696 - Show all commits

View File

@ -2,13 +2,28 @@
import { getLocaleFromNavigator, _ } from "svelte-i18n";
import { passwordStrength } from "check-password-strength";
export let password_change;
export let password_confirm;
$: strength = passwordStrength(password_change);
$: passwords_match = (!password_confirm || (password_confirm === password_change))
</script>
<div>
<ul>
<div class="ml-4">
{(passwords_match)}
<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>
<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 letter!</li>
{/if}
{#if !(strength.length>9)}
<li>Must be at least 10 characters long!</li>
{/if}
{#if !(passwords_match==true)}
<li>Passwords don't match!</li>
{/if}
</ul>
</div>