mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: templates layout
This commit is contained in:
1 parent
4466cdd7a6
commit
84679cc4f3
14 files changed
+48
-46
No files matched your search
Generated
+4
-4
@@ -8,7 +8,7 @@
|
||||
"dependencies": {
|
||||
"@analytics/google-analytics": "^1.0.5",
|
||||
"@appwrite.io/console": "npm:@aw-labs/sdk-console-smtp@^0.1.0",
|
||||
"@appwrite.io/pink": "0.0.6-rc.11",
|
||||
"@appwrite.io/pink": "0.0.6-rc.12",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"@sentry/svelte": "^7.44.2",
|
||||
"@sentry/tracing": "^7.44.2",
|
||||
@@ -147,9 +147,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@appwrite.io/pink": {
|
||||
"version": "0.0.6-rc.11",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.0.6-rc.11.tgz",
|
||||
"integrity": "sha512-wHuWZM1SbBV7GQymBcBGDgtN5teu2OeMl9vB+IM6Ctg+Jkqjlc8QyO8Ef6Om8EFuSJCEzxCugMQPM0Ohtt/V2g==",
|
||||
"version": "0.0.6-rc.12",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.0.6-rc.12.tgz",
|
||||
"integrity": "sha512-NZ/ozrkFwv7U9jBaxdBljOT9/TEBvnzkWQGAd/A5SK2xHEgw3M85ndv2ZzIqKEaxMDEoeRsg76Ym0MmUILDmdg==",
|
||||
"dependencies": {
|
||||
"@appwrite.io/pink-icons": "*",
|
||||
"normalize.css": "^8.0.1",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
"dependencies": {
|
||||
"@analytics/google-analytics": "^1.0.5",
|
||||
"@appwrite.io/console": "npm:@aw-labs/sdk-console-smtp@^0.1.0",
|
||||
"@appwrite.io/pink": "0.0.6-rc.11",
|
||||
"@appwrite.io/pink": "0.0.6-rc.12",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"@sentry/svelte": "^7.44.2",
|
||||
"@sentry/tracing": "^7.44.2",
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
export let dismissible = false;
|
||||
export let type: 'info' | 'success' | 'warning' | 'error' = 'info';
|
||||
export let buttons: Buttons[] = [];
|
||||
export let fullWidth = false;
|
||||
export let isAction = false;
|
||||
export let isStandalone = false;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
</script>
|
||||
|
||||
<section
|
||||
class="alert"
|
||||
class:is-action={fullWidth}
|
||||
class:is-action={isAction}
|
||||
class:is-standalone={isStandalone}
|
||||
class:is-success={type === 'success'}
|
||||
class:is-warning={type === 'warning'}
|
||||
class:is-danger={type === 'error'}
|
||||
@@ -41,7 +43,7 @@
|
||||
</h6>
|
||||
{/if}
|
||||
<p class="alert-message"><slot /></p>
|
||||
{#if buttons?.length && !fullWidth}
|
||||
{#if buttons?.length && !isAction}
|
||||
<div class="alert-buttons u-flex">
|
||||
{#each buttons as button}
|
||||
<button class="button is-text" on:click={button.method}>
|
||||
@@ -51,7 +53,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if buttons?.length && fullWidth}
|
||||
{#if buttons?.length && isAction}
|
||||
<div class="alert-buttons u-flex u-gap-16 u-cross-child-center">
|
||||
{#each buttons as button}
|
||||
<button class="button is-text" on:click={button.method}>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<Container>
|
||||
{#if !$project.smtpEnabled}
|
||||
<Alert
|
||||
fullWidth
|
||||
isStandalone
|
||||
dismissible
|
||||
type="info"
|
||||
buttons={[
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="box u-margin-block-start-16" style:--box-border-radius="var(--border-radius-small)">
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<EmailTemplate />
|
||||
</div>
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="box u-margin-block-start-16" style:--box-border-radius="var(--border-radius-small)">
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<EmailTemplate />
|
||||
</div>
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="box u-margin-block-start-16" style:--box-border-radius="var(--border-radius-small)">
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<EmailTemplate />
|
||||
</div>
|
||||
@@ -51,16 +51,16 @@
|
||||
$: isButtonDisabled = deepEqual($emailTemplate, $baseEmailTemplate);
|
||||
</script>
|
||||
|
||||
{#if loading}
|
||||
<div
|
||||
class="u-width-full-100 u-flex u-flex-vertical u-main-center u-cross-center u-gap-16 u-margin-block-start-32">
|
||||
<div class="loader" />
|
||||
<p class="text">Loading template...</p>
|
||||
</div>
|
||||
{/if}
|
||||
<div class:u-opacity-0={loading} style={loading ? 'pointer-events: none' : ''}>
|
||||
<Form onSubmit={saveEmailTemplate}>
|
||||
<div class="box">
|
||||
<div class="box">
|
||||
{#if loading}
|
||||
<div
|
||||
class="u-width-full-100 u-flex u-flex-vertical u-main-center u-cross-center u-gap-16 u-margin-block-start-32">
|
||||
<div class="loader" />
|
||||
<p class="text">Loading template...</p>
|
||||
</div>
|
||||
{/if}
|
||||
<div class:u-opacity-0={loading} style={loading ? 'pointer-events: none' : ''}>
|
||||
<Form onSubmit={saveEmailTemplate}>
|
||||
<FormList gap={8}>
|
||||
<InputText
|
||||
id="senderName"
|
||||
@@ -99,15 +99,13 @@
|
||||
tooltip="Set up an SMTP server to edit the message body"
|
||||
readonly={!$project.smtpEnabled} />
|
||||
</FormList>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="u-sep-block-start u-margin-block-start-24" />
|
||||
<div class="u-flex u-gap-32 u-main-end u-margin-block-start-24">
|
||||
<Button on:click={() => (openResetModal = true)} text>Reset changes</Button>
|
||||
<Button submit disabled={isButtonDisabled}>Update</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ResetEmail bind:show={openResetModal} />
|
||||
+1
-3
@@ -32,9 +32,7 @@
|
||||
</script>
|
||||
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<div class="box" style:--box-border-radius="var(--border-radius-small)">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
</div>
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
|
||||
<EmailTemplate bind:loading>
|
||||
<Id value={'{{name}}'}>{'{{name}}'}</Id>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
[];
|
||||
</script>
|
||||
|
||||
<div class="u-flex u-gap-16">
|
||||
<div class="box u-flex u-gap-16" style:--box-border-radius="var(--border-radius-small)">
|
||||
<div class="u-un-break-text">
|
||||
<span class="icon-translate" />
|
||||
<span class="text">Template language</span>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="box u-margin-block-start-16" style:--box-border-radius="var(--border-radius-small)">
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<SmsTemplate />
|
||||
</div>
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="box u-margin-block-start-16" style:--box-border-radius="var(--border-radius-small)">
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<SmsTemplate />
|
||||
</div>
|
||||
@@ -40,18 +40,22 @@
|
||||
$: isButtonDisabled = deepEqual($smsTemplate, $baseSmsTemplate);
|
||||
</script>
|
||||
|
||||
<Form onSubmit={saveSmsTemplate}>
|
||||
<FormList gap={8}>
|
||||
<InputTextarea
|
||||
bind:value={$smsTemplate.message}
|
||||
id="message"
|
||||
label="Message"
|
||||
placeholder="Enter your message" />
|
||||
<div class="u-flex u-gap-32 u-main-end">
|
||||
<div class="box">
|
||||
<Form onSubmit={saveSmsTemplate}>
|
||||
<FormList gap={8}>
|
||||
<InputTextarea
|
||||
bind:value={$smsTemplate.message}
|
||||
id="message"
|
||||
label="Message"
|
||||
placeholder="Enter your message" />
|
||||
</FormList>
|
||||
|
||||
<div class="u-sep-block-start u-margin-block-start-24" />
|
||||
|
||||
<div class="u-flex u-gap-32 u-main-end u-margin-block-start-24">
|
||||
<Button on:click={() => (openResetModal = true)} text>Reset changes</Button>
|
||||
<Button submit disabled={isButtonDisabled}>Update</Button>
|
||||
</div>
|
||||
</FormList>
|
||||
</Form>
|
||||
|
||||
</Form>
|
||||
</div>
|
||||
<ResetSms bind:show={openResetModal} />
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="box u-margin-block-start-16" style:--box-border-radius="var(--border-radius-small)">
|
||||
<div class="boxes-wrapper u-margin-block-start-16">
|
||||
<LocaleOptions {localeCodes} on:select={onLocaleChange} bind:value={locale} />
|
||||
<SmsTemplate />
|
||||
</div>
|
||||
Reference in new issue
Block a user