1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 15:49:42 +02:00

fix: eslint errors and failing tests (#2078)

* fix eslint errors

* fix failing tests
This commit is contained in:
Hayden 2023-01-29 13:01:41 -09:00 committed by GitHub
parent 7c766af848
commit 5dc253799d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 29 deletions

View file

@ -1,9 +1,9 @@
import { computed, Ref, ref, useContext } from "@nuxtjs/composition-api";
import VueI18n from "vue-i18n";
import { scorePassword } from "~/lib/validators";
export function usePasswordField() {
const show = ref(false);
const { $globals } = useContext();
const passwordIcon = computed(() => {
@ -22,14 +22,8 @@ export function usePasswordField() {
};
}
export const usePasswordStrength = (password: Ref<string>) => {
const { i18n } = useContext();
const score = computed(() => {
return scorePassword(password.value);
});
export const usePasswordStrength = (password: Ref<string>, i18n: VueI18n) => {
const score = computed(() => scorePassword(password.value));
const strength = computed(() => {
if (score.value < 50) {
return i18n.tc("user.password-strength-values.weak");