From ad599ae3f43db73d196af7743e8c95df3f67789e Mon Sep 17 00:00:00 2001 From: Alex <$(pass /github/email)> Date: Fri, 28 Feb 2025 08:51:35 +0100 Subject: [PATCH] frontend: disabled button while processing password reset --- .../src/lib/components/SubscriptionEditForm.svelte | 2 +- frontend/src/lib/components/UserEditForm.svelte | 8 ++++---- frontend/src/lib/locales/de.js | 4 +++- frontend/src/routes/auth/password/change/+page.svelte | 10 +++++++++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/frontend/src/lib/components/SubscriptionEditForm.svelte b/frontend/src/lib/components/SubscriptionEditForm.svelte index 17ff19f..89e6d12 100644 --- a/frontend/src/lib/components/SubscriptionEditForm.svelte +++ b/frontend/src/lib/components/SubscriptionEditForm.svelte @@ -127,7 +127,7 @@
{#if isUpdating} - + {:else} - {#if localUser.role_id === 8} + {#if role_id === 8} - {#if localUser.role_id > 0} + {#if role_id > 0}
{#if isUpdating} - + {:else} import { applyAction, enhance } from '$app/forms'; + import SmallLoader from '$lib/components/SmallLoader.svelte'; import { receive, send } from '$lib/utils/helpers'; import { t } from 'svelte-i18n'; /** @type {import('./$types').ActionData} */ export let form; + let loading = false; /** @type {import('./$types').SubmitFunction} */ const handleRequestChange = async () => { + loading = true; return async ({ result }) => { await applyAction(result); + loading = false; }; }; @@ -40,6 +44,10 @@ required />
- + {#if loading} + + {:else} + + {/if}