From 52f0ffc376f47e464632cdc95d71496e09030a86 Mon Sep 17 00:00:00 2001 From: ArneBo Date: Fri, 31 Jan 2025 12:36:30 +0100 Subject: [PATCH] refactor(front): new password input --- front/src/components/forms/PasswordInput.vue | 36 +++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/front/src/components/forms/PasswordInput.vue b/front/src/components/forms/PasswordInput.vue index e0348a1db..c255f33a6 100644 --- a/front/src/components/forms/PasswordInput.vue +++ b/front/src/components/forms/PasswordInput.vue @@ -26,16 +26,12 @@ const props = withDefaults(defineProps(), { const value = useVModel(props, 'modelValue', emit) -const showPassword = ref(props.defaultShow) - const { t } = useI18n() const labels = computed(() => ({ title: t('components.forms.PasswordInput.title'), copy: t('components.forms.PasswordInput.button.copy') })) -const passwordInputType = computed(() => showPassword.value ? 'text' : 'password') - const store = useStore() const { isSupported: canCopy, copy } = useClipboard({ source: value }) const copyPassword = () => { @@ -49,28 +45,36 @@ const copyPassword = () => { + +