Omit email digest UI if env variable is not set.
This commit is contained in:
parent
8047a4f084
commit
a7b948740c
1 changed files with 42 additions and 39 deletions
|
|
@ -17,6 +17,7 @@
|
||||||
import {Mail} from "@app/mail"
|
import {Mail} from "@app/mail"
|
||||||
import {notificationSettings, publishSettings, userSettingsValues} from "@app/settings"
|
import {notificationSettings, publishSettings, userSettingsValues} from "@app/settings"
|
||||||
import {emailNotificationState} from "@app/push/adapters/common"
|
import {emailNotificationState} from "@app/push/adapters/common"
|
||||||
|
import {EMAIL_NOTIFICATION_SERVER} from "@app/env"
|
||||||
|
|
||||||
const clearError = () => {
|
const clearError = () => {
|
||||||
if ($emailNotificationState.error) {
|
if ($emailNotificationState.error) {
|
||||||
|
|
@ -185,6 +186,7 @@
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</FieldInline>
|
</FieldInline>
|
||||||
</div>
|
</div>
|
||||||
|
{#if EMAIL_NOTIFICATION_SERVER}
|
||||||
<div class="card bg-surface flex flex-col gap-4 shadow-md">
|
<div class="card bg-surface flex flex-col gap-4 shadow-md">
|
||||||
<strong class="text-lg">Email Digest Settings</strong>
|
<strong class="text-lg">Email Digest Settings</strong>
|
||||||
<FieldInline>
|
<FieldInline>
|
||||||
|
|
@ -230,6 +232,7 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
<div class="card sticky -bottom-3 shadow-md flex flex-row items-center justify-between gap-4">
|
<div class="card sticky -bottom-3 shadow-md flex flex-row items-center justify-between gap-4">
|
||||||
<Button class="button button-neutral" onclick={reset} disabled={loading}
|
<Button class="button button-neutral" onclick={reset} disabled={loading}
|
||||||
>Discard Changes</Button>
|
>Discard Changes</Button>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue