From 1d8d377fd7bfd302924549db47a6e7ae6435683b Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sat, 15 Aug 2026 16:03:38 +0200 Subject: [PATCH] feat: add password reset page --- src/assets/css/auth.css | 11 +++++++++++ src/pages/account/forgot-password.vue | 2 +- src/pages/account/reset-password.vue | 27 ++++++++++++++++----------- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/assets/css/auth.css b/src/assets/css/auth.css index 7ac7fbe..bf06e6f 100644 --- a/src/assets/css/auth.css +++ b/src/assets/css/auth.css @@ -106,6 +106,9 @@ form.account a.register { z-index: 3; } +.banner-notice.success div { + background: var(--green-shade-0); +} .banner-notice.error div { background: var(--red-shade-1); } @@ -130,6 +133,14 @@ form.account.register div.buttons { grid-column: 1 / span 2; } +form.account.forgot-password div.h-captcha { + grid-column: 1 / span 2; + display: flex; + justify-content: center; +} + + + @media screen and (max-width: 720px) { form.account.register { grid-template-columns: 1fr; diff --git a/src/pages/account/forgot-password.vue b/src/pages/account/forgot-password.vue index 3042a60..7f94935 100644 --- a/src/pages/account/forgot-password.vue +++ b/src/pages/account/forgot-password.vue @@ -97,5 +97,5 @@ async function submit() { diff --git a/src/pages/account/reset-password.vue b/src/pages/account/reset-password.vue index c4bc4e6..ca2b53b 100644 --- a/src/pages/account/reset-password.vue +++ b/src/pages/account/reset-password.vue @@ -2,10 +2,10 @@ import type { ApiAuthResetPasswordRequest } from '~~/shared/api-types'; const route = useRoute(); +const { t } = useI18n(); const form = reactive({ password: '', passwordConfirm: '' }); const errorMessage = ref(); -// TODO style this entire page async function submit() { const resetToken = route.query.token?.toString(); try { @@ -20,8 +20,6 @@ async function submit() { resetToken } satisfies ApiAuthResetPasswordRequest }); - - alert('Success - your password has been changed'); await navigateTo('/account'); } catch (error: unknown) { const err = getApiError(error); @@ -37,29 +35,36 @@ async function submit() {