From 91d38ccf732555c20e4f65d667f0a774331ba44a Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:47:21 +0100 Subject: [PATCH 1/2] feat: add session alert template --- .../auth/templates/+page.svelte | 16 ++++++- .../emailSessionAlertTemplate.svelte | 46 +++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 src/routes/console/project-[project]/auth/templates/emailSessionAlertTemplate.svelte diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index cc4d83c4da..b36728ef51 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -44,6 +44,9 @@ import EmailMagicUrlTemplate from './emailMagicUrlTemplate.svelte'; import EmailRecoveryTemplate from './emailRecoveryTemplate.svelte'; import EmailInviteTemplate from './emailInviteTemplate.svelte'; + import Email2FaTemplate from './email2FATemplate.svelte'; + import EmailSessionAlertTemplate from './emailSessionAlertTemplate.svelte'; + // import SmsVerificationTemplate from './smsVerificationTemplate.svelte'; // import SmsLoginTemplate from './smsLoginTemplate.svelte'; // import { baseEmailTemplate, baseSmsTemplate, emailTemplate, smsTemplate } from './store'; @@ -59,7 +62,7 @@ EmailTemplateType, EmailTemplateLocale } from '@appwrite.io/console'; - import Email2FaTemplate from './email2FATemplate.svelte'; + import { b } from 'vitest/dist/suite-IbNSsUWN'; const projectId = $page.params.project; @@ -69,6 +72,7 @@ $: emailResetPassword = emailOpen === 'recovery'; $: emailInviteUser = emailOpen === 'invitation'; $: email2FAVerificationOpen = emailOpen === 'mfaChallenge'; + $: emailSessionAlertOpen = emailOpen === 'sessionAlert'; // let smsOpen = 'verification'; // $: smsVerificationOpen = smsOpen === 'verification'; @@ -189,6 +193,16 @@
Send a two-factor authentication email to a user.
Send an email to users when a new session is created.
+