mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
fix: passwort strength indicator (#5553)
This commit is contained in:
parent
1562437b98
commit
d6110f1a94
3 changed files with 8 additions and 24 deletions
|
@ -3,8 +3,8 @@
|
||||||
<div style="flex-basis: 500px">
|
<div style="flex-basis: 500px">
|
||||||
<strong> {{ $t("user.password-strength", { strength: pwStrength.strength.value }) }}</strong>
|
<strong> {{ $t("user.password-strength", { strength: pwStrength.strength.value }) }}</strong>
|
||||||
<v-progress-linear
|
<v-progress-linear
|
||||||
:value="pwStrength.score.value"
|
v-model="pwStrength.score.value"
|
||||||
class="rounded-lg"
|
rounded
|
||||||
:color="pwStrength.color.value"
|
:color="pwStrength.color.value"
|
||||||
height="15"
|
height="15"
|
||||||
/>
|
/>
|
||||||
|
@ -12,27 +12,11 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script setup lang="ts">
|
||||||
import { usePasswordStrength } from "~/composables/use-passwords";
|
import { usePasswordStrength } from "~/composables/use-passwords";
|
||||||
|
|
||||||
export default defineNuxtComponent({
|
const modelValue = defineModel<string>({ default: "" });
|
||||||
props: {
|
const i18n = useI18n();
|
||||||
modelValue: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
setup(props) {
|
|
||||||
const asRef = toRef(props, "modelValue");
|
|
||||||
const i18n = useI18n();
|
|
||||||
|
|
||||||
const pwStrength = usePasswordStrength(asRef, i18n);
|
const pwStrength = usePasswordStrength(modelValue, i18n);
|
||||||
|
|
||||||
return {
|
|
||||||
pwStrength,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
@click:append-inner="pwFields.togglePasswordShow"
|
@click:append-inner="pwFields.togglePasswordShow"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<UserPasswordStrength :value="credentials.password1.value" />
|
<UserPasswordStrength v-model="credentials.password1.value" />
|
||||||
|
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="credentials.password2.value"
|
v-model="credentials.password2.value"
|
||||||
|
|
|
@ -149,7 +149,7 @@
|
||||||
variant="underlined"
|
variant="underlined"
|
||||||
@click:append="showPassword = !showPassword"
|
@click:append="showPassword = !showPassword"
|
||||||
/>
|
/>
|
||||||
<UserPasswordStrength :value="password.newOne" />
|
<UserPasswordStrength v-model="password.newOne" />
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue