Fix error message when saving email prefs fails
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled

This commit is contained in:
Agent 2026-08-25 10:32:51 -04:00
parent bced45814b
commit 49df66a58a

View file

@ -61,15 +61,12 @@
await Mail.enable() await Mail.enable()
} catch (e) { } catch (e) {
settings.email = false settings.email = false
console.error(e)
await sleep(300) await sleep(300)
return pushToast({ return pushToast({
theme: "error", theme: "error",
message: `Failed to enable email notifications.`, message: `Failed to enable email notifications.`,
action: { action: {message: "Details", onclick: () => {}},
message: "Details",
onclick: () =>
emailNotificationState.set({...emailNotificationState.get(), error: undefined}),
},
}) })
} }
} else if (!settings.email) { } else if (!settings.email) {
@ -198,7 +195,7 @@
</FieldInline> </FieldInline>
{/if} {/if}
{#if $emailNotificationState.error} {#if $emailNotificationState.error}
<div class="text-sm text-red-500 bg-red-50 rounded-lg p-3"> <div class="text-sm text-error p-3">
{$emailNotificationState.error} {$emailNotificationState.error}
</div> </div>
{/if} {/if}