{#if actions?.textContent}
diff --git a/src/routes/console/[project]/users/security.svelte b/src/routes/console/[project]/users/security.svelte
index e220206d8..6884f6146 100644
--- a/src/routes/console/[project]/users/security.svelte
+++ b/src/routes/console/[project]/users/security.svelte
@@ -76,7 +76,7 @@
method. You can still create users from your Appwrite console.
-
+
@@ -126,7 +126,7 @@
If you reduce the limit, users who are currently logged in will be logged out of the
application.
-
+
Enter a new password. A password must contain at least 8 characters.
-
+
-
+
From ac523d38c41f9c3ccd4cbc46e6f2ccf391403b71 Mon Sep 17 00:00:00 2001
From: Arman
Date: Wed, 29 Jun 2022 12:45:02 +0200
Subject: [PATCH 05/21] todo: explore other solutions compatible with testing
library
---
src/lib/components/modal.svelte | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/components/modal.svelte b/src/lib/components/modal.svelte
index c770ec075..e4b02785a 100644
--- a/src/lib/components/modal.svelte
+++ b/src/lib/components/modal.svelte
@@ -5,7 +5,7 @@
export let show = false;
let browser = false;
-
+ //TODO: explore other solutions compatible with testing library
onMount(() => {
browser = true;
});
From cce91dfae83ea9f8b89ccb1b106ad408a6ce1bb8 Mon Sep 17 00:00:00 2001
From: Arman
Date: Wed, 29 Jun 2022 12:45:53 +0200
Subject: [PATCH 06/21] fix: order #discussion_r909391209
---
src/lib/elements/forms/button.svelte | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/elements/forms/button.svelte b/src/lib/elements/forms/button.svelte
index 26e6112f5..1b17010d2 100644
--- a/src/lib/elements/forms/button.svelte
+++ b/src/lib/elements/forms/button.svelte
@@ -5,8 +5,8 @@
export let danger = false;
export let disabled = false;
export let round = false;
- export let href: string = null;
export let external = false;
+ export let href: string = null;
//TODO: add option to add aria-label to buttons that are only icons
From 703896cdfd1afbffe8f3fd2323e7c575b7f372c7 Mon Sep 17 00:00:00 2001
From: Arman
Date: Wed, 29 Jun 2022 13:32:57 +0200
Subject: [PATCH 07/21] fix: rename component
---
src/lib/components/copyInput.svelte | 34 +++++++++++++++++++
src/lib/components/index.ts | 2 +-
.../document/[document]/index.svelte | 4 +--
.../storage/bucket/[bucket]/_update.svelte | 4 +--
.../[project]/users/_appleOAuth.svelte | 4 +--
.../[project]/users/_auth0OAuth.svelte | 4 +--
.../console/[project]/users/_mainOAuth.svelte | 4 +--
.../[project]/users/_microsoftOAuth.svelte | 4 +--
.../console/[project]/users/_oktaOAuth.svelte | 4 +--
9 files changed, 49 insertions(+), 15 deletions(-)
create mode 100644 src/lib/components/copyInput.svelte
diff --git a/src/lib/components/copyInput.svelte b/src/lib/components/copyInput.svelte
new file mode 100644
index 000000000..7eb0900e7
--- /dev/null
+++ b/src/lib/components/copyInput.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+ {#if showTooltip}
+ Copied
+ {/if}
+
+
+
diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts
index b1ecf9f35..e261beb37 100644
--- a/src/lib/components/index.ts
+++ b/src/lib/components/index.ts
@@ -5,7 +5,7 @@ export { default as CardGrid } from './cardGrid.svelte';
export { default as Tile } from './tile.svelte';
export { default as Tiles } from './tiles.svelte';
export { default as Back } from './back.svelte';
-export { default as Copy } from './copy.svelte';
+export { default as CopyInput } from './copyInput.svelte';
export { default as UploadBox } from './uploadBox.svelte';
export { default as List } from './list.svelte';
export { default as ListItem } from './listItem.svelte';
diff --git a/src/routes/console/[project]/database/collection/[collection]/document/[document]/index.svelte b/src/routes/console/[project]/database/collection/[collection]/document/[document]/index.svelte
index 0767773f4..9222b68e6 100644
--- a/src/routes/console/[project]/database/collection/[collection]/document/[document]/index.svelte
+++ b/src/routes/console/[project]/database/collection/[collection]/document/[document]/index.svelte
@@ -1,6 +1,6 @@
-
-
-
-
-
- {#if showTooltip}
- Copied
- {/if}
-
-
-
+
+
+
diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts
index e261beb37..17ee9437a 100644
--- a/src/lib/components/index.ts
+++ b/src/lib/components/index.ts
@@ -5,6 +5,7 @@ export { default as CardGrid } from './cardGrid.svelte';
export { default as Tile } from './tile.svelte';
export { default as Tiles } from './tiles.svelte';
export { default as Back } from './back.svelte';
+export { default as Copy } from './copy.svelte';
export { default as CopyInput } from './copyInput.svelte';
export { default as UploadBox } from './uploadBox.svelte';
export { default as List } from './list.svelte';
diff --git a/src/lib/layout/shell.svelte b/src/lib/layout/shell.svelte
index b82975ba8..76f59b9eb 100644
--- a/src/lib/layout/shell.svelte
+++ b/src/lib/layout/shell.svelte
@@ -3,8 +3,8 @@
import { tabs, title, backButton, copyData } from '$lib/stores/layout';
import { fade } from 'svelte/transition';
import { Cover } from '.';
+ import { Copy } from '$lib/components';
import { Pill } from '$lib/elements';
- import { addNotification } from '$lib/stores/notifications';
export let isOpen = false;
@@ -52,21 +52,6 @@
}
};
};
-
- const copy = async (value: string) => {
- try {
- await navigator.clipboard.writeText(value);
- addNotification({
- message: 'Copied to clipboard.',
- type: 'success'
- });
- } catch (error) {
- addNotification({
- message: error.message,
- type: 'error'
- });
- }
- };
@@ -93,16 +78,16 @@
{$title}
{#if $copyData?.value}
- copy($copyData.value)}
- >{$copyData.text}
-
+
+ {$copyData.text}
+
{/if}
{:else}
{$title}
{#if $copyData?.value}
- copy($copyData.value)}
- >{$copyData.text}
-
+
+ {$copyData.text}
+
{/if}
{/if}
diff --git a/src/routes/console/[project]/storage/index.svelte b/src/routes/console/[project]/storage/index.svelte
index 16dfa0a43..8aa6d2268 100644
--- a/src/routes/console/[project]/storage/index.svelte
+++ b/src/routes/console/[project]/storage/index.svelte
@@ -3,13 +3,12 @@
import { goto } from '$app/navigation';
import { sdkForProject } from '$lib/stores/sdk';
import { Button } from '$lib/elements/forms';
- import { Empty, Pagination, Tiles, Tooltip } from '$lib/components';
+ import { Empty, Pagination, Tiles, Tooltip, Copy } from '$lib/components';
import { Pill } from '$lib/elements';
import type { Models } from 'src/sdk';
import Create from './_create.svelte';
import { Container } from '$lib/layout';
import { base } from '$app/paths';
- import { addNotification } from '$lib/stores/notifications';
let showCreate = false;
let search = '';
@@ -24,21 +23,6 @@
$: request = sdkForProject.storage.listBuckets(search, limit, offset);
$: if (search) offset = 0;
-
- const copy = async (value: string) => {
- try {
- await navigator.clipboard.writeText(value);
- addNotification({
- message: 'Copied to clipboard.',
- type: 'success'
- });
- } catch (error) {
- addNotification({
- message: error.message,
- type: 'error'
- });
- }
- };
@@ -66,9 +50,9 @@
{bucket.name}
- copy(bucket.$id)}
- >Bucket ID
-
+
+ Bucket ID
+