auth templates component

This commit is contained in:
Damodar Lohani
2023-04-10 07:40:33 +05:45
parent a948cb0528
commit 2116a7f67e
3 changed files with 39 additions and 1 deletions
@@ -19,6 +19,12 @@
hasChildren: true,
event: 'teams'
},
{
href: `${path}/templates`,
title: 'Templates',
hasChildren: false,
event: 'templates'
},
{
href: `${path}/usage`,
title: 'Usage',
@@ -0,0 +1,29 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { base } from '$app/paths';
import Alert from '$lib/components/alert.svelte';
import Container from '$lib/layout/container.svelte';
import { project } from '../../store';
</script>
<Container>
{#if !$project.smtpEnabled}
<Alert
dismissible
info
buttons={[
{
name: 'Add SMTP server',
method: () => {
goto(base + '/console/project-' + $project.$id + '/settings/smtp');
}
}
]}>
<svelte:fragment slot="title">
Custom SMTP server is required for customizing emails
</svelte:fragment>
Configure a custom SMTP server to enable custom email templates and prevent emails from being
labeled as spam.
</Alert>
{/if}
</Container>
@@ -11,6 +11,7 @@
import { addNotification } from '$lib/stores/notifications';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import InputNumber from '$lib/elements/forms/inputNumber.svelte';
import { base } from '$app/paths';
let enabled = false;
let sender: string;
@@ -68,7 +69,9 @@
<Heading tag="h6" size="7">SMTP Server</Heading>
<p class="text">
You can customize the email service by providing your own SMTP server. View your
email templates here
email templates <a
href="{base}/console/project-{$project.$id}/auth/templates"
class="link">here</a>
</p>
<svelte:fragment slot="aside">
<FormList>