mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
refactor: templates locale; chore: bump css, format
This commit is contained in:
1 parent
f390e0c6dd
commit
e9eea2cebd
15 files changed
+51
-60
No files matched your search
Generated
+16
-16
@@ -9,8 +9,8 @@
|
||||
"@analytics/google-analytics": "^1.0.5",
|
||||
"@analytics/google-tag-manager": "^0.5.3",
|
||||
"@appwrite.io/console": "npm:matej-appwrite-console@7.1.128",
|
||||
"@appwrite.io/pink": "0.1.0-next.5",
|
||||
"@appwrite.io/pink-icons": "^0.1.0-next.5",
|
||||
"@appwrite.io/pink": "0.1.0-next.6",
|
||||
"@appwrite.io/pink-icons": "^0.1.0-next.6",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"@sentry/svelte": "^7.44.2",
|
||||
"@sentry/tracing": "^7.44.2",
|
||||
@@ -177,19 +177,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@appwrite.io/pink": {
|
||||
"version": "0.1.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.1.0-next.5.tgz",
|
||||
"integrity": "sha512-Mwblf5mh6Mojlwc5QUVVJ+fuLl0ixEVsTVoTt7AGp9u5Gvu4yRIRXqppfjSuD/kfgjX1zP74sEM8jcwUQLL4QQ==",
|
||||
"version": "0.1.0-next.6",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.1.0-next.6.tgz",
|
||||
"integrity": "sha512-DlRgQQHAgeWW9oyjDUGENOoq0I7e3yXDdqUwzGNIQS7r8W+SnNj3JtZjQ4/hylwgECDPyzmsBI6rUfOvtV9gSg==",
|
||||
"dependencies": {
|
||||
"@appwrite.io/pink-icons": "0.1.0-next.5",
|
||||
"@appwrite.io/pink-icons": "0.1.0-next.6",
|
||||
"normalize.css": "^8.0.1",
|
||||
"the-new-css-reset": "^1.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@appwrite.io/pink-icons": {
|
||||
"version": "0.1.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink-icons/-/pink-icons-0.1.0-next.5.tgz",
|
||||
"integrity": "sha512-/YGA5MKTzOA3MEgoNOkv1iT5NaKXAv2oZyq8MA6N0iWnEgskKMSX+byzooTfwDqDIJ3J5/Hxrg/j2NttyZyppQ=="
|
||||
"version": "0.1.0-next.6",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink-icons/-/pink-icons-0.1.0-next.6.tgz",
|
||||
"integrity": "sha512-rRrDb5brMhAvBRZ/sqYF1uG+L73KiQ2CG/aBof1vNmc88k/vhn0StAojVlJgeCumoamReepysypdZ/0b9at6Kw=="
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.22.5",
|
||||
@@ -8917,19 +8917,19 @@
|
||||
}
|
||||
},
|
||||
"@appwrite.io/pink": {
|
||||
"version": "0.1.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.1.0-next.5.tgz",
|
||||
"integrity": "sha512-Mwblf5mh6Mojlwc5QUVVJ+fuLl0ixEVsTVoTt7AGp9u5Gvu4yRIRXqppfjSuD/kfgjX1zP74sEM8jcwUQLL4QQ==",
|
||||
"version": "0.1.0-next.6",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.1.0-next.6.tgz",
|
||||
"integrity": "sha512-DlRgQQHAgeWW9oyjDUGENOoq0I7e3yXDdqUwzGNIQS7r8W+SnNj3JtZjQ4/hylwgECDPyzmsBI6rUfOvtV9gSg==",
|
||||
"requires": {
|
||||
"@appwrite.io/pink-icons": "0.1.0-next.5",
|
||||
"@appwrite.io/pink-icons": "0.1.0-next.6",
|
||||
"normalize.css": "^8.0.1",
|
||||
"the-new-css-reset": "^1.7.3"
|
||||
}
|
||||
},
|
||||
"@appwrite.io/pink-icons": {
|
||||
"version": "0.1.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink-icons/-/pink-icons-0.1.0-next.5.tgz",
|
||||
"integrity": "sha512-/YGA5MKTzOA3MEgoNOkv1iT5NaKXAv2oZyq8MA6N0iWnEgskKMSX+byzooTfwDqDIJ3J5/Hxrg/j2NttyZyppQ=="
|
||||
"version": "0.1.0-next.6",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink-icons/-/pink-icons-0.1.0-next.6.tgz",
|
||||
"integrity": "sha512-rRrDb5brMhAvBRZ/sqYF1uG+L73KiQ2CG/aBof1vNmc88k/vhn0StAojVlJgeCumoamReepysypdZ/0b9at6Kw=="
|
||||
},
|
||||
"@babel/code-frame": {
|
||||
"version": "7.22.5",
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@
|
||||
"@analytics/google-analytics": "^1.0.5",
|
||||
"@analytics/google-tag-manager": "^0.5.3",
|
||||
"@appwrite.io/console": "npm:matej-appwrite-console@7.1.128",
|
||||
"@appwrite.io/pink": "0.1.0-next.5",
|
||||
"@appwrite.io/pink-icons": "^0.1.0-next.5",
|
||||
"@appwrite.io/pink": "0.1.0-next.6",
|
||||
"@appwrite.io/pink-icons": "^0.1.0-next.6",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"@sentry/svelte": "^7.44.2",
|
||||
"@sentry/tracing": "^7.44.2",
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
Send a verification email to users that sign in with their email and
|
||||
password.
|
||||
</p>
|
||||
<EmailVerificationTemplate localeCodes={data.localeCodes} />
|
||||
<EmailVerificationTemplate />
|
||||
</CollapsibleItem>
|
||||
<CollapsibleItem
|
||||
bind:open={emailMagicSessionOpen}
|
||||
@@ -139,7 +139,7 @@
|
||||
}}>
|
||||
<svelte:fragment slot="title">Magic URL</svelte:fragment>
|
||||
<p class="text">Send an email to users that sign in with a magic URL.</p>
|
||||
<EmailMagicUrlTemplate localeCodes={data.localeCodes} />
|
||||
<EmailMagicUrlTemplate />
|
||||
</CollapsibleItem>
|
||||
<CollapsibleItem
|
||||
bind:open={emailResetPassword}
|
||||
@@ -149,7 +149,7 @@
|
||||
}}>
|
||||
<svelte:fragment slot="title">Reset password</svelte:fragment>
|
||||
<p class="text">Send a recovery email to users that forget their password.</p>
|
||||
<EmailRecoveryTemplate localeCodes={data.localeCodes} />
|
||||
<EmailRecoveryTemplate />
|
||||
</CollapsibleItem>
|
||||
<CollapsibleItem
|
||||
bind:open={emailInviteUser}
|
||||
@@ -159,7 +159,7 @@
|
||||
}}>
|
||||
<svelte:fragment slot="title">Invite user</svelte:fragment>
|
||||
<p class="text">Send an invitation email to become a member of your project.</p>
|
||||
<EmailInviteTemplate localeCodes={data.localeCodes} />
|
||||
<EmailInviteTemplate />
|
||||
</CollapsibleItem>
|
||||
</Collapsible>
|
||||
</svelte:fragment>
|
||||
@@ -191,7 +191,7 @@
|
||||
<p class="text">
|
||||
Send a verification SMS to users that sign in with their phone
|
||||
</p>
|
||||
<SmsVerificationTemplate localeCodes={data.localeCodes} />
|
||||
<SmsVerificationTemplate />
|
||||
</CollapsibleItem>
|
||||
<CollapsibleItem
|
||||
bind:open={smsLoginOpen}
|
||||
@@ -203,7 +203,7 @@
|
||||
<p class="text">
|
||||
Send a one-time passcode to users' mobile phones to allow them to sign in.
|
||||
</p>
|
||||
<SmsLoginTemplate localeCodes={data.localeCodes} />
|
||||
<SmsLoginTemplate />
|
||||
</CollapsibleItem>
|
||||
<CollapsibleItem
|
||||
bind:open={smsInvitationOpen}
|
||||
@@ -213,7 +213,7 @@
|
||||
}}>
|
||||
<svelte:fragment slot="title">Invitation</svelte:fragment>
|
||||
<p class="text">Send an invitation SMS to become a member of your project.</p>
|
||||
<SmsLoginTemplate localeCodes={data.localeCodes} />
|
||||
<SmsLoginTemplate />
|
||||
</CollapsibleItem>
|
||||
</Collapsible>
|
||||
</svelte:fragment>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import EmailTemplate from './emailTemplate.svelte';
|
||||
import LocaleOptions from './localeOptions.svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { loadEmailTemplate } from './+page.svelte';
|
||||
import { page } from '$app/stores';
|
||||
import { baseEmailTemplate, emailTemplate } from './store';
|
||||
@@ -9,8 +8,6 @@
|
||||
import { Id } from '$lib/components';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let localeCodes: Models.LocaleCode[];
|
||||
|
||||
const projectId = $page.params.project;
|
||||
let locale = 'en';
|
||||
let loading = false;
|
||||
@@ -38,7 +35,7 @@
|
||||
</script>
|
||||
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<LocaleOptions on:select={onLocaleChange} bind:value={locale} />
|
||||
<EmailTemplate bind:loading>
|
||||
<Id value={'{{team}}'}>{'{{team}}'}</Id>
|
||||
<Id value={'{{user}}'}>{'{{user}}'}</Id>
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
import { loadEmailTemplate } from './+page.svelte';
|
||||
import EmailTemplate from './emailTemplate.svelte';
|
||||
import LocaleOptions from './localeOptions.svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { baseEmailTemplate, emailTemplate } from './store';
|
||||
import { page } from '$app/stores';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { Id } from '$lib/components';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let localeCodes: Models.LocaleCode[];
|
||||
const projectId = $page.params.project;
|
||||
|
||||
let locale = 'en';
|
||||
@@ -39,7 +37,7 @@
|
||||
</script>
|
||||
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<LocaleOptions on:select={onLocaleChange} bind:value={locale} />
|
||||
<EmailTemplate bind:loading>
|
||||
<Id value={'{{team}}'}>{'{{team}}'}</Id>
|
||||
<Id value={'{{user}}'}>{'{{user}}'}</Id>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import EmailTemplate from './emailTemplate.svelte';
|
||||
import LocaleOptions from './localeOptions.svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { baseEmailTemplate, emailTemplate } from './store';
|
||||
import { loadEmailTemplate } from './+page.svelte';
|
||||
import { page } from '$app/stores';
|
||||
@@ -9,7 +8,6 @@
|
||||
import { Id } from '$lib/components';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let localeCodes: Models.LocaleCode[];
|
||||
const projectId = $page.params.project;
|
||||
|
||||
let locale = 'en';
|
||||
@@ -38,7 +36,7 @@
|
||||
</script>
|
||||
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<LocaleOptions on:select={onLocaleChange} bind:value={locale} />
|
||||
<EmailTemplate bind:loading>
|
||||
<Id value={'{{team}}'}>{'{{team}}'}</Id>
|
||||
<Id value={'{{user}}'}>{'{{user}}'}</Id>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
import { baseEmailTemplate, emailTemplate } from './store';
|
||||
import { deepEqual } from '$lib/helpers/object';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
import { Box } from '$lib/components';
|
||||
|
||||
export let loading = false;
|
||||
let openResetModal = false;
|
||||
@@ -77,7 +78,7 @@
|
||||
$: isButtonDisabled = deepEqual($emailTemplate, $baseEmailTemplate);
|
||||
</script>
|
||||
|
||||
<div class="box u-position-relative">
|
||||
<Box class="u-position-relative">
|
||||
{#if loading}
|
||||
<div
|
||||
class="u-position-absolute u-width-full-line u-flex u-flex-vertical u-main-center u-cross-center u-gap-16 u-margin-block-start-32"
|
||||
@@ -133,6 +134,6 @@
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
</Box>
|
||||
|
||||
<ResetEmail bind:show={openResetModal} />
|
||||
+1
-3
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import EmailTemplate from './emailTemplate.svelte';
|
||||
import LocaleOptions from './localeOptions.svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { loadEmailTemplate } from './+page.svelte';
|
||||
import { baseEmailTemplate, emailTemplate } from './store';
|
||||
import { page } from '$app/stores';
|
||||
@@ -9,7 +8,6 @@
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let localeCodes: Models.LocaleCode[];
|
||||
const projectId = $page.params.project;
|
||||
|
||||
let locale = 'en';
|
||||
@@ -38,7 +36,7 @@
|
||||
</script>
|
||||
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<LocaleOptions on:select={onLocaleChange} bind:value={locale} />
|
||||
|
||||
<EmailTemplate bind:loading>
|
||||
<Id value={'{{team}}'}>{'{{team}}'}</Id>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { Box } from '$lib/components';
|
||||
import { InputSelectSearch } from '$lib/elements/forms';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { localeCodes } from './store';
|
||||
|
||||
export let localeCodes: Models.LocaleCode[];
|
||||
export let value = 'en';
|
||||
|
||||
let search = 'English';
|
||||
|
||||
$: options =
|
||||
localeCodes
|
||||
$localeCodes
|
||||
?.map((code) => ({
|
||||
label: code.name,
|
||||
value: code.code
|
||||
@@ -17,7 +17,7 @@
|
||||
[];
|
||||
</script>
|
||||
|
||||
<div class="box u-flex u-gap-16" style:--box-border-radius="var(--border-radius-small)">
|
||||
<Box radius="small" class="u-flex u-gap-16">
|
||||
<div class="u-un-break-text">
|
||||
<span class="icon-translate" />
|
||||
<span class="text">Template language</span>
|
||||
@@ -36,4 +36,4 @@
|
||||
showLabel={false}
|
||||
interactiveOutput
|
||||
{options} />
|
||||
</div>
|
||||
</Box>
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import SmsTemplate from './smsTemplate.svelte';
|
||||
import LocaleOptions from './localeOptions.svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { baseSmsTemplate, smsTemplate } from './store';
|
||||
import { page } from '$app/stores';
|
||||
import { loadSmsTemplate } from './+page.svelte';
|
||||
@@ -9,8 +8,6 @@
|
||||
import { Id } from '$lib/components';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let localeCodes: Models.LocaleCode[];
|
||||
|
||||
const projectId = $page.params.project;
|
||||
let locale = 'en';
|
||||
let loading = false;
|
||||
@@ -38,7 +35,7 @@
|
||||
</script>
|
||||
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<LocaleOptions on:select={onLocaleChange} bind:value={locale} />
|
||||
<SmsTemplate bind:loading>
|
||||
<Id value={'{{team}}'}>{'{{team}}'}</Id>
|
||||
<Id value={'{{user}}'}>{'{{user}}'}</Id>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import SmsTemplate from './smsTemplate.svelte';
|
||||
import LocaleOptions from './localeOptions.svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { page } from '$app/stores';
|
||||
import { loadSmsTemplate } from './+page.svelte';
|
||||
import { baseSmsTemplate, smsTemplate } from './store';
|
||||
@@ -9,8 +8,6 @@
|
||||
import { Id } from '$lib/components';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let localeCodes: Models.LocaleCode[];
|
||||
|
||||
const projectId = $page.params.project;
|
||||
let locale = 'en';
|
||||
let loading = false;
|
||||
@@ -39,7 +36,7 @@
|
||||
</script>
|
||||
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<LocaleOptions on:select={onLocaleChange} bind:value={locale} />
|
||||
<SmsTemplate bind:loading>
|
||||
<Id value={'{{team}}'}>{'{{team}}'}</Id>
|
||||
<Id value={'{{user}}'}>{'{{user}}'}</Id>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import SmsTemplate from './smsTemplate.svelte';
|
||||
import LocaleOptions from './localeOptions.svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { page } from '$app/stores';
|
||||
import { loadSmsTemplate } from './+page.svelte';
|
||||
import { baseSmsTemplate, smsTemplate } from './store';
|
||||
@@ -9,8 +8,6 @@
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let localeCodes: Models.LocaleCode[];
|
||||
|
||||
const projectId = $page.params.project;
|
||||
let locale = 'en';
|
||||
let loading = false;
|
||||
@@ -38,7 +35,7 @@
|
||||
</script>
|
||||
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<LocaleOptions on:select={onLocaleChange} bind:value={locale} />
|
||||
<SmsTemplate bind:loading>
|
||||
<Id value={'{{team}}'}>{'{{team}}'}</Id>
|
||||
<Id value={'{{user}}'}>{'{{user}}'}</Id>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { page } from '$app/stores';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { writable } from 'svelte/store';
|
||||
import { derived, writable } from 'svelte/store';
|
||||
|
||||
export const localeCodes = derived(page, ($page) => $page.data.localeCodes as Models.LocaleCode[]);
|
||||
|
||||
export const emailTemplate = writable<Models.EmailTemplate>({
|
||||
type: null,
|
||||
|
||||
@@ -67,7 +67,9 @@
|
||||
you push to that repository, your function will be deployed.
|
||||
</p>
|
||||
<div class="alert-buttons u-flex u-margin-inline-start-auto">
|
||||
<Button text href="https://appwrite.io/docs/functions-deploy#vcs" external>Learn more</Button>
|
||||
<Button text href="https://appwrite.io/docs/functions-deploy#vcs" external>
|
||||
Learn more
|
||||
</Button>
|
||||
<Button
|
||||
href={`${base}/console/project-${$page.params.project}/functions/function-${$page.params.function}/settings`}>
|
||||
Install Git
|
||||
|
||||
+4
-1
@@ -207,7 +207,10 @@
|
||||
<p>There are no repositories that match your search.</p>
|
||||
</div>
|
||||
<div class="u-flex u-gap-16 common-section u-main-center">
|
||||
<Button external href="https://appwrite.io/docs/functions-deploy#vcs" text>Documentation</Button>
|
||||
<Button
|
||||
external
|
||||
href="https://appwrite.io/docs/functions-deploy#vcs"
|
||||
text>Documentation</Button>
|
||||
<Button secondary on:click={() => (search = '')}>Clear search</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user