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()
|
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}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue