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()
} catch (e) {
settings.email = false
console.error(e)
await sleep(300)
return pushToast({
theme: "error",
message: `Failed to enable email notifications.`,
action: {
message: "Details",
onclick: () =>
emailNotificationState.set({...emailNotificationState.get(), error: undefined}),
},
action: {message: "Details", onclick: () => {}},
})
}
} else if (!settings.email) {
@ -198,7 +195,7 @@
</FieldInline>
{/if}
{#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}
</div>
{/if}