From e9a79dfaf8e6834178d476377b76613218a9c2d8 Mon Sep 17 00:00:00 2001 From: upsiflu Date: Thu, 2 Jan 2025 11:27:49 +0100 Subject: [PATCH] feat(ui): implement autofocus prop on input and link --- front/src/components/auth/LoginForm.vue | 6 ------ front/src/components/ui/Input.vue | 10 +++++++++- front/src/components/ui/Link.vue | 11 ++++++++++- front/src/composables/alignment.ts | 10 +++++----- front/src/ui/components/Sidebar.vue | 2 +- front/src/views/auth/PasswordReset.vue | 5 +---- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/front/src/components/auth/LoginForm.vue b/front/src/components/auth/LoginForm.vue index 1fe3f2e7f..a6bf4d8a5 100644 --- a/front/src/components/auth/LoginForm.vue +++ b/front/src/components/auth/LoginForm.vue @@ -48,12 +48,6 @@ const labels = computed(() => ({ usernamePlaceholder: t('components.auth.LoginForm.placeholder.username') })) -const username = ref() -onMounted(async () => { - await nextTick() - username.value?.focus() -}) - const isLoading = ref(false) const errors = ref([] as string[]) const submit = async () => { diff --git a/front/src/components/ui/Input.vue b/front/src/components/ui/Input.vue index 33944b975..3c791eb6f 100644 --- a/front/src/components/ui/Input.vue +++ b/front/src/components/ui/Input.vue @@ -1,5 +1,5 @@ diff --git a/front/src/components/ui/Link.vue b/front/src/components/ui/Link.vue index 795641fb4..086954710 100644 --- a/front/src/components/ui/Link.vue +++ b/front/src/components/ui/Link.vue @@ -1,5 +1,5 @@