mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Merge branch '1.4.x' of https://github.com/appwrite/appwrite-console-poc into 1.4.x
This commit is contained in:
commit
25ce7a4b7e
5 files changed
+57
-26
No files matched your search
Generated
+7
-7
@@ -8,7 +8,7 @@
|
||||
"dependencies": {
|
||||
"@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/console": "npm:matej-appwrite-console@7.1.130",
|
||||
"@appwrite.io/pink": "0.1.0-next.7",
|
||||
"@appwrite.io/pink-icons": "^0.1.0-next.7",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
@@ -170,9 +170,9 @@
|
||||
},
|
||||
"node_modules/@appwrite.io/console": {
|
||||
"name": "matej-appwrite-console",
|
||||
"version": "7.1.128",
|
||||
"resolved": "https://registry.npmjs.org/matej-appwrite-console/-/matej-appwrite-console-7.1.128.tgz",
|
||||
"integrity": "sha512-3cgJ9eDv3BpHCNVN5WGWLUytJl/P5Q/vm1GaBGNCp2jFK4ZMH6L5PzT4xejeqkQ4G9aKHw6SDU7cU2mZt3xCjg==",
|
||||
"version": "7.1.130",
|
||||
"resolved": "https://registry.npmjs.org/matej-appwrite-console/-/matej-appwrite-console-7.1.130.tgz",
|
||||
"integrity": "sha512-XsaGxuUNznKKiQpbYAy7VYtj5f0CitrMcIh+9UiHzI0dVXe4ck8humDv6l8XVFp0aQZWxc6RfiPuHo9oreEKuw==",
|
||||
"dependencies": {
|
||||
"cross-fetch": "3.1.5",
|
||||
"isomorphic-form-data": "2.0.0"
|
||||
@@ -8985,9 +8985,9 @@
|
||||
"integrity": "sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg=="
|
||||
},
|
||||
"@appwrite.io/console": {
|
||||
"version": "npm:matej-appwrite-console@7.1.128",
|
||||
"resolved": "https://registry.npmjs.org/matej-appwrite-console/-/matej-appwrite-console-7.1.128.tgz",
|
||||
"integrity": "sha512-3cgJ9eDv3BpHCNVN5WGWLUytJl/P5Q/vm1GaBGNCp2jFK4ZMH6L5PzT4xejeqkQ4G9aKHw6SDU7cU2mZt3xCjg==",
|
||||
"version": "npm:matej-appwrite-console@7.1.130",
|
||||
"resolved": "https://registry.npmjs.org/matej-appwrite-console/-/matej-appwrite-console-7.1.130.tgz",
|
||||
"integrity": "sha512-XsaGxuUNznKKiQpbYAy7VYtj5f0CitrMcIh+9UiHzI0dVXe4ck8humDv6l8XVFp0aQZWxc6RfiPuHo9oreEKuw==",
|
||||
"requires": {
|
||||
"cross-fetch": "3.1.5",
|
||||
"isomorphic-form-data": "2.0.0"
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
"dependencies": {
|
||||
"@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/console": "npm:matej-appwrite-console@7.1.130",
|
||||
"@appwrite.io/pink": "0.1.0-next.7",
|
||||
"@appwrite.io/pink-icons": "^0.1.0-next.7",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
export let readonly = false;
|
||||
export let autofocus = false;
|
||||
export let autocomplete = false;
|
||||
export let tooltip: string = null;
|
||||
|
||||
let element: HTMLInputElement;
|
||||
let error: string;
|
||||
@@ -55,7 +56,7 @@
|
||||
</script>
|
||||
|
||||
<FormItem>
|
||||
<Label {required} {optionalText} hide={!showLabel} for={id}>
|
||||
<Label {required} {optionalText} {tooltip} hide={!showLabel} for={id}>
|
||||
{label}
|
||||
</Label>
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
$project.$id,
|
||||
$emailTemplate.type,
|
||||
$emailTemplate.locale,
|
||||
$emailTemplate.senderName,
|
||||
$emailTemplate.senderEmail,
|
||||
$emailTemplate.subject,
|
||||
$emailTemplate.message,
|
||||
$emailTemplate.senderName,
|
||||
$emailTemplate.senderEmail,
|
||||
$emailTemplate.replyTo ? $emailTemplate.replyTo : undefined
|
||||
);
|
||||
|
||||
@@ -94,12 +94,16 @@
|
||||
id="senderName"
|
||||
label="Sender name"
|
||||
bind:value={$emailTemplate.senderName}
|
||||
placeholder={'{{project}}'} />
|
||||
tooltip="Set up an SMTP server to edit the sender name"
|
||||
placeholder={'{{project}}'}
|
||||
readonly={!$project.smtpEnabled} />
|
||||
<InputEmail
|
||||
bind:value={$emailTemplate.senderEmail}
|
||||
id="senderEmail"
|
||||
label="Sender email"
|
||||
placeholder="Enter sender email" />
|
||||
tooltip="Set up an SMTP server to edit the sender email"
|
||||
placeholder="Enter sender email"
|
||||
readonly={!$project.smtpEnabled} />
|
||||
<InputEmail id="replyTo" label="Reply to" placeholder="noreply@appwrite.io" />
|
||||
{#if $$slots.default}
|
||||
<li style="margin-block: 1rem;">
|
||||
|
||||
@@ -22,19 +22,25 @@
|
||||
import deepEqual from 'deep-equal';
|
||||
|
||||
let enabled = false;
|
||||
let sender: string;
|
||||
let senderName: string;
|
||||
let senderEmail: string;
|
||||
let replyTo: string;
|
||||
let host: string;
|
||||
let port: number;
|
||||
let username: string;
|
||||
let password: string;
|
||||
let secure = false;
|
||||
|
||||
onMount(() => {
|
||||
enabled = $project.smtpEnabled ?? false;
|
||||
sender = $project.smtpSender;
|
||||
senderName = $project.smtpSenderName;
|
||||
senderEmail = $project.smtpSenderEmail;
|
||||
replyTo = $project.smtpReplyTo;
|
||||
host = $project.smtpHost;
|
||||
port = $project.smtpPort;
|
||||
username = $project.smtpUsername;
|
||||
password = $project.smtpPassword;
|
||||
secure = $project.smtpSecure === 'tls';
|
||||
});
|
||||
|
||||
async function updateSmtp() {
|
||||
@@ -42,11 +48,14 @@
|
||||
await sdk.forConsole.projects.updateSmtpConfiguration(
|
||||
$project.$id,
|
||||
enabled,
|
||||
sender,
|
||||
host,
|
||||
port,
|
||||
username,
|
||||
password
|
||||
enabled ? senderName : undefined,
|
||||
enabled ? senderEmail : undefined,
|
||||
enabled ? replyTo : undefined,
|
||||
enabled ? host : undefined,
|
||||
enabled ? port : undefined,
|
||||
enabled ? username : undefined,
|
||||
enabled ? password : undefined,
|
||||
enabled ? (secure ? 'tls' : '') : undefined
|
||||
);
|
||||
|
||||
invalidate(Dependencies.PROJECT);
|
||||
@@ -65,23 +74,29 @@
|
||||
}
|
||||
|
||||
$: isButtonDisabled = deepEqual(
|
||||
{ enabled, sender, host, port, username, password },
|
||||
{ enabled, senderName, senderEmail, replyTo, host, port, username, password, secure },
|
||||
{
|
||||
enabled: $project.smtpEnabled,
|
||||
sender: $project.smtpSender,
|
||||
senderName: $project.smtpSenderName,
|
||||
senderEmail: $project.smtpSenderEmail,
|
||||
replyTo: $project.smtpReplyTo,
|
||||
host: $project.smtpHost,
|
||||
port: $project.smtpPort,
|
||||
username: $project.smtpUsername,
|
||||
password: $project.smtpPassword
|
||||
password: $project.smtpPassword,
|
||||
secure: $project.smtpSecure === 'tls'
|
||||
}
|
||||
);
|
||||
|
||||
$: if (!enabled) {
|
||||
sender = undefined;
|
||||
senderName = undefined;
|
||||
senderEmail = undefined;
|
||||
replyTo = undefined;
|
||||
host = undefined;
|
||||
port = undefined;
|
||||
username = undefined;
|
||||
password = undefined;
|
||||
secure = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -107,12 +122,23 @@
|
||||
</InputChoice>
|
||||
|
||||
{#if enabled}
|
||||
<InputText
|
||||
id="senderName"
|
||||
label="Sender name"
|
||||
bind:value={senderName}
|
||||
required
|
||||
placeholder="Enter sender name" />
|
||||
<InputEmail
|
||||
id="senderEmail"
|
||||
label="Sender email"
|
||||
bind:value={sender}
|
||||
bind:value={senderEmail}
|
||||
required
|
||||
placeholder="user@example.io" />
|
||||
<InputEmail
|
||||
id="replyTo"
|
||||
label="Reply to"
|
||||
bind:value={replyTo}
|
||||
placeholder="user@example.io" />
|
||||
<InputText
|
||||
id="serverHost"
|
||||
label="Server host"
|
||||
@@ -139,7 +165,7 @@
|
||||
required
|
||||
placeholder="Enter password" />
|
||||
|
||||
<InputChoice id="tls" label="TLS secure protocol">
|
||||
<InputChoice bind:value={secure} id="tls" label="TLS secure protocol">
|
||||
Enable if TLS is supported on your SMTP server.
|
||||
</InputChoice>
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user