From 4b6dc03b136e3d19662f1f87eb09753c655d5c27 Mon Sep 17 00:00:00 2001 From: SauceyRed Date: Wed, 9 Jul 2025 07:30:46 +0200 Subject: [PATCH] feat: refresh page when email is changed and instance requires verification --- components/Settings/UserSettings/Account.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/Settings/UserSettings/Account.vue b/components/Settings/UserSettings/Account.vue index 85589e7..a08cffc 100644 --- a/components/Settings/UserSettings/Account.vue +++ b/components/Settings/UserSettings/Account.vue @@ -43,6 +43,14 @@ async function changeEmail() { body: formData }) + const apiBase = useCookie("api_base").value; + + if (apiBase) { + const stats = await useApi().fetchInstanceStats(apiBase); + if (stats.email_verification_required) { + return window.location.reload(); + } + } alert('success!!') } catch (error: any) { if (error?.response?.status !== 200) {