Fix error message when saving email prefs fails
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled
This commit is contained in:
parent
bced45814b
commit
49df66a58a
1 changed files with 3 additions and 6 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue