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 ad3bd312e9 - Show all commits

View File

@ -1,14 +1,18 @@
<script>
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))
$: passwords_match =
!password_confirm || password_confirm === password_change;
$: update_password_enabled =
strength?.contains.includes("lowercase") &&
strength?.contains.includes("uppercase") &&
strength?.contains.includes("number") &&
strength?.length > 9 &&
passwords_match == true;
</script>
<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>
@ -19,10 +23,10 @@
{#if !strength.contains.includes('number')}
<li>Must contain a number letter!</li>
{/if}
{#if !(strength.length>9)}
{#if !(strength.length > 9)}
<li>Must be at least 10 characters long!</li>
{/if}
{#if !(passwords_match==true)}
{#if !(passwords_match == true)}
<li>Passwords don't match!</li>
{/if}
</ul>