From 3901a9d7b15750b2e495f13583b7fb3dd4ec3e57 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 11 Mar 2025 14:14:58 +0530 Subject: [PATCH 01/17] update: database backups > pink2 migration [wip] --- package.json | 6 +- pnpm-lock.yaml | 38 +-- .../components/billing/planSelection.svelte | 37 ++- src/lib/components/modal.svelte | 7 + .../elements/forms/inputSelectCheckbox.svelte | 53 +++- src/lib/elements/forms/inputSwitch.svelte | 4 +- src/lib/layout/headerAlert.svelte | 54 +--- .../change-plan/+page.svelte | 4 +- .../project-[project]/databases/create.svelte | 47 ++-- .../database-[database]/backups/+page.svelte | 17 +- .../database-[database]/backups/+page.ts | 5 +- .../backups/containerHeader.svelte | 68 ++--- .../backups/createPolicy.svelte | 251 +++++++++--------- .../database-[database]/backups/policy.svelte | 165 +++++++----- .../backups/restoreModal.svelte | 109 +++----- .../database-[database]/backups/table.svelte | 249 +++++++++-------- .../database-[database]/table.svelte | 2 +- .../project-[project]/databases/table.svelte | 12 +- 18 files changed, 562 insertions(+), 566 deletions(-) diff --git a/package.json b/package.json index 42eb7d03d6..7331eb9ec0 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,11 @@ "e2e:ui": "playwright test tests/e2e --ui" }, "dependencies": { - "@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@640f09c", + "@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb", "@appwrite.io/pink-icons": "0.25.0", - "@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@525e5be8", + "@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a", "@appwrite.io/pink-legacy": "^1.0.2", - "@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@30b0f25", + "@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a", "@popperjs/core": "^2.11.8", "@sentry/sveltekit": "^8.38.0", "@stripe/stripe-js": "^3.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8ed5a1672..88a59b853e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,20 +9,20 @@ importers: .: dependencies: '@appwrite.io/console': - specifier: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@640f09c - version: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@640f09c + specifier: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb + version: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb '@appwrite.io/pink-icons': specifier: 0.25.0 version: 0.25.0 '@appwrite.io/pink-icons-svelte': - specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@525e5be8 - version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@525e5be8(svelte@4.2.19) + specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a + version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a(svelte@4.2.19) '@appwrite.io/pink-legacy': specifier: ^1.0.2 version: 1.0.2 '@appwrite.io/pink-svelte': - specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@30b0f25 - version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@30b0f25(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19) + specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a + version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19) '@popperjs/core': specifier: ^2.11.8 version: 2.11.8 @@ -211,18 +211,18 @@ packages: '@analytics/type-utils@0.6.2': resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==} - '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@640f09c': - resolution: {tarball: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@640f09c} + '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb': + resolution: {tarball: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb} version: 1.2.1 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@30b0f25a639a53ffae787fda44a57e1335cc2d1c': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@30b0f25a639a53ffae787fda44a57e1335cc2d1c} + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a} version: 1.0.0-next.7 peerDependencies: svelte: ^4.0.0 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@525e5be8': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@525e5be8} + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a00b71d85d8b630f22953d28aa28ae0050': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a00b71d85d8b630f22953d28aa28ae0050} version: 1.0.0-next.7 peerDependencies: svelte: ^4.0.0 @@ -236,8 +236,8 @@ packages: '@appwrite.io/pink-legacy@1.0.2': resolution: {integrity: sha512-1AYNcfbV+x0Tyj56CoieSq5g7+u+7F5/LDVN/z+Hx1kp9gj7xc1eT39Dy832xxfihImF6ksjp0FXEMVSBR8cew==} - '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@30b0f25': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@30b0f25} + '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a} version: 1.0.0-next.85 peerDependencies: react-dom: ^18.0.0 @@ -4097,13 +4097,13 @@ snapshots: '@analytics/type-utils@0.6.2': {} - '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@640f09c': {} + '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb': {} - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@30b0f25a639a53ffae787fda44a57e1335cc2d1c(svelte@4.2.19)': + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a(svelte@4.2.19)': dependencies: svelte: 4.2.19 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@525e5be8(svelte@4.2.19)': + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a00b71d85d8b630f22953d28aa28ae0050(svelte@4.2.19)': dependencies: svelte: 4.2.19 @@ -4116,9 +4116,9 @@ snapshots: '@appwrite.io/pink-icons': 1.0.0 the-new-css-reset: 1.11.3 - '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@30b0f25(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19)': + '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19)': dependencies: - '@appwrite.io/pink-icons-svelte': https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@30b0f25a639a53ffae787fda44a57e1335cc2d1c(svelte@4.2.19) + '@appwrite.io/pink-icons-svelte': https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a00b71d85d8b630f22953d28aa28ae0050(svelte@4.2.19) '@floating-ui/dom': 1.6.13 '@melt-ui/pp': 0.3.2(@melt-ui/svelte@0.86.3(svelte@4.2.19))(svelte@4.2.19) '@melt-ui/svelte': 0.86.3(svelte@4.2.19) diff --git a/src/lib/components/billing/planSelection.svelte b/src/lib/components/billing/planSelection.svelte index f016c6871c..8d95cfa6f8 100644 --- a/src/lib/components/billing/planSelection.svelte +++ b/src/lib/components/billing/planSelection.svelte @@ -21,7 +21,6 @@ diff --git a/src/lib/components/modal.svelte b/src/lib/components/modal.svelte index 9bd18b068a..c56b55132f 100644 --- a/src/lib/components/modal.svelte +++ b/src/lib/components/modal.svelte @@ -64,3 +64,10 @@ + + diff --git a/src/lib/elements/forms/inputSelectCheckbox.svelte b/src/lib/elements/forms/inputSelectCheckbox.svelte index 57c0fd4402..dc32cd2c5b 100644 --- a/src/lib/elements/forms/inputSelectCheckbox.svelte +++ b/src/lib/elements/forms/inputSelectCheckbox.svelte @@ -1,6 +1,8 @@ - + + + diff --git a/src/lib/layout/headerAlert.svelte b/src/lib/layout/headerAlert.svelte index 44d15f046d..ccd62d5987 100644 --- a/src/lib/layout/headerAlert.svelte +++ b/src/lib/layout/headerAlert.svelte @@ -1,49 +1,13 @@ -
-
-
-
- - + + + + diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index f17e1b9cc2..13029b641e 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -42,7 +42,7 @@ import { user } from '$lib/stores/user'; import { VARS } from '$lib/system'; import { IconPlus } from '@appwrite.io/pink-icons-svelte'; - import { Icon } from '@appwrite.io/pink-svelte'; + import { Icon, Link } from '@appwrite.io/pink-svelte'; import { onMount } from 'svelte'; import { writable } from 'svelte/store'; @@ -260,7 +260,7 @@

For more details on our plans, visit our - . + pricing page.

{#if !selfService} import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; - import { Alert, CustomId, Modal } from '$lib/components'; + import { CustomId, Modal } from '$lib/components'; import { Button, InputText } from '$lib/elements/forms'; import { addNotification } from '$lib/stores/notifications'; import { sdk } from '$lib/stores/sdk'; @@ -12,7 +12,7 @@ import { upgradeURL } from '$lib/stores/billing'; import CreatePolicy from './database-[database]/backups/createPolicy.svelte'; import { cronExpression, type UserBackupPolicy } from '$lib/helpers/backups'; - import { Icon, Tag } from '@appwrite.io/pink-svelte'; + import { Alert, Icon, Tag } from '@appwrite.io/pink-svelte'; import { IconPencil } from '@appwrite.io/pink-icons-svelte'; export let showCreate = false; @@ -122,33 +122,30 @@ }}> Database ID {/if} + {#if isCloud} -
- {#if $organization?.billingPlan === BillingPlan.FREE} - {#if showPlanUpgradeAlert} - (showPlanUpgradeAlert = false)}> - - This database won't be backed up - - Upgrade your plan to ensure your data stays safe and backed up. - - - - - {/if} - {:else} - + {#if $organization?.billingPlan === BillingPlan.FREE} + {#if showPlanUpgradeAlert} + (showPlanUpgradeAlert = false)}> + Upgrade your plan to ensure your data stays safe and backed up. + + + + {/if} -
+ {:else} + + {/if} {/if} diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.svelte index 0f9e39322e..515a1a5109 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.svelte @@ -21,6 +21,7 @@ import { showCreateBackup, showCreatePolicy } from './store'; import { getProjectId } from '$lib/helpers/project'; import { trackEvent } from '$lib/actions/analytics'; + import { Layout } from '@appwrite.io/pink-svelte'; let policyCreateError: string; let totalPolicies: UserBackupPolicy[] = []; @@ -132,6 +133,7 @@ ? `Backup policies have been created` : `${totalPolicies[0].label} policy has been created`; + // TODO: html isn't yet supported on Toast. addNotification({ isHtml: true, type: 'success', @@ -168,15 +170,15 @@
{#if !isDisabled} -
+
{ $showCreatePolicy = true; trackEvent('click_policy_create'); @@ -188,7 +190,7 @@ lastBackupDates={data.lastBackupDates} />
-
+
{#if data.backups.total} -
+ {#if data.backups.total > 6} @@ -211,11 +213,10 @@ offset={data.offset} total={data.backups.total} /> {/if} - + {:else}
-
+
No backups yet
@@ -264,7 +265,7 @@ @media (min-width: 768px) { .policies-holder-card { - max-width: 21.5rem; + min-width: 330px; } } diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.ts b/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.ts index 16d4c39b9e..f6fddf94a2 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.ts +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.ts @@ -1,5 +1,5 @@ import { getLimit, getPage, getView, pageToOffset, View } from '$lib/helpers/load'; -import { CARD_LIMIT, Dependencies } from '$lib/constants'; +import { Dependencies, PAGE_LIMIT } from '$lib/constants'; import { sdk } from '$lib/stores/sdk'; import { Query } from '@appwrite.io/console'; import type { BackupArchive, BackupArchiveList, BackupPolicyList } from '$lib/sdk/backups'; @@ -7,8 +7,9 @@ import { isCloud } from '$lib/system'; export const load = async ({ params, url, route, depends }) => { depends(Dependencies.BACKUPS); + const page = getPage(url); - const limit = getLimit(url, route, CARD_LIMIT); + const limit = getLimit(url, route, PAGE_LIMIT); const view = getView(url, route, View.Grid); const offset = pageToOffset(page, limit); diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/containerHeader.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/containerHeader.svelte index 0034aa8531..fc2f53f569 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/containerHeader.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/containerHeader.svelte @@ -1,11 +1,11 @@
@@ -191,85 +198,82 @@ {@const dailyPolicy = $presetPolicies[1]} {#if isFromBackupsTab} -
- -
- - Daily backup - - Runs every day and is retained for 7 days -
-
- - to upgrade your plan and add customized backup + }}>Contact support to upgrade your plan and add customized backup policies. - -
+ + {:else} -
+ markPolicyChecked(event, dailyPolicy)}> - - - Daily backups are retained for 7 days. - - to upgrade your plan and add customized backup policies. - - + + Daily backups are retained for 7 days. + + { + isShowing = false; + wizard.start(SupportWizard); + }}>Contact support + to upgrade your plan and add customized backup policies. + -
+ {/if} {:else} -
+
{#each $presetPolicies as policy, index (index)} {/each}
{#if listOfCustomPolicies.length} -
+ {#each listOfCustomPolicies as policy} -
-
-
-

{policy.label}

- -
+ + + + {policy.label} + +
-
+ }}> + + + + {customPolicyDescription(policy)} -
-
+
+ {/each} -
+
{/if} {#if showCustomPolicy || policyInEdit} - + {:else}
- +
{/if} -
+ {/if}
@@ -541,13 +549,14 @@ border: solid 0.0625rem #d7d7da; } - .custom-policy-text { - color: #19191c; - text-decoration: underline; - } - - .custom-policy-card { - background-color: #f9f9fa !important; + /* taken from pink 2 */ + :global(.timing-label) { + font-style: normal; + font-weight: 500; + line-height: 140%; + display: flex; + align-items: center; + gap: var(--space-2); } :global(.theme-dark) .preset-label-card { @@ -558,39 +567,27 @@ border: solid 0.0625rem #424248; } - :global(.theme-dark) .custom-policy-text { - color: #fff; - } - - :global(.theme-dark) .custom-policy-card { - background: #2c2c2f !important; - } - :global(.height-fit-content) { height: fit-content; } + :global(.time-holder .input-time input[type='time']) { + padding-block: 0.34rem !important; + } + @media (max-width: 767.99px) { .time-holder { - gap: 0; + gap: 1rem; flex-direction: column; } - :global(.time-holder .input-time.hide > li label) { - display: none; + .input-time { + margin-block-start: 0 !important; } - } - - /** the modal, for some reason has issues with inner padding on smaller devices. */ - @media (max-width: 409px) { - .modal { - --p-modal-padding: 0.95rem; - } - } - @media (max-width: 315px) { - .modal { - --p-modal-padding: 0.9rem; + /* week days selector */ + :global(.tags-input) { + padding-right: unset !important; } } diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/policy.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/policy.svelte index 9feb4a7927..f7bf52fa7f 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/policy.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/policy.svelte @@ -1,6 +1,6 @@
- +
{#each policies.policies as policy, index (policy.$id)} {@const policyDescription = getPolicyDescription(policy.schedule)} @@ -146,39 +151,37 @@ class:opacity-gradient-bottom={index === 2} class:u-padding-block-start-10={index !== 0} class:u-padding-block-end-10={index === 0 && policies.policies.length > 1}> -
-
-

{policy.name}

- - - - - { - showDelete = true; - selectedPolicy = policy; - showDropdown[index] = false; - trackEvent(Click.PolicyDeleteClick); - }}> - Delete - + + + {policy.name} + + + + + + { + toggle(e); + showDelete = true; + selectedPolicy = policy; + trackEvent(Click.PolicyDeleteClick); + }}> + Delete + + - -
- -
+ + + + {#if shouldUseTooltip} @@ -190,21 +193,37 @@ {policyDescription} {/if} - + + + + + {formatRetentionMessage(policy.retention)} -
-
+ + +
+ class="policy-cycles u-flex u-gap-24 u-padding-block-2 policy-item-subtitles">
Previous
- + + + {#if lastBackupDates[policy.$id]} {toLocaleDateTime(lastBackupDates[policy.$id])} @@ -215,7 +234,9 @@
-
+
+ +
Next @@ -232,6 +253,10 @@
+ + {#if index !== policies.total - 1} + + {/if} {:else}
{#if $app.themeInUse === 'dark'} @@ -286,6 +311,7 @@
+
@@ -314,29 +340,21 @@ - diff --git a/src/lib/components/confirm.svelte b/src/lib/components/confirm.svelte index 6e37223d5b..c791ffe732 100644 --- a/src/lib/components/confirm.svelte +++ b/src/lib/components/confirm.svelte @@ -15,6 +15,11 @@ let confirm = false; let checkboxId = `delete_${title.replaceAll(' ', '_').toLowerCase()}`; + + // reset checkbox status + $: if (open && confirmDeletion) { + confirm = false; + }
diff --git a/src/routes/(console)/project-[project]/+layout.svelte b/src/routes/(console)/project-[project]/+layout.svelte index 1abdc5523f..9faa9c742a 100644 --- a/src/routes/(console)/project-[project]/+layout.svelte +++ b/src/routes/(console)/project-[project]/+layout.svelte @@ -122,6 +122,7 @@ diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/policy.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/policy.svelte index 7de8464792..1f7e705bca 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/policy.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/policy.svelte @@ -26,6 +26,7 @@ } from '@appwrite.io/pink-svelte'; import { IconDotsHorizontal, IconPlus, IconTrash } from '@appwrite.io/pink-icons-svelte'; import { Confirm } from '$lib/components/index.js'; + import Ellipse from './components/Ellipse.svelte'; let showDelete = false; let selectedPolicy: BackupPolicy = null; @@ -186,16 +187,7 @@ {policyDescription} {/if} - - - - - + {formatRetentionMessage(policy.retention)} @@ -207,15 +199,10 @@
Previous
- - - + {#if lastBackupDates[policy.$id]} @@ -326,18 +313,6 @@ } } - :global(.small-ellipse) { - line-height: 0; - } - - :global(.ellipse) { - line-height: 8px; - - &.success { - color: hsl(var(--color-success-100)); - } - } - :global(.u-gap-6) { gap: 0.375rem; } diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte index 6fdab0755a..8cf0491327 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte @@ -18,12 +18,14 @@ import { ActionMenu, Icon, + Layout, Popover, Selector, Status, Table, Tag, - Tooltip + Tooltip, + Typography } from '@appwrite.io/pink-svelte'; import { IconDotsHorizontal, @@ -33,6 +35,7 @@ IconTrash } from '@appwrite.io/pink-icons-svelte'; import { capitalize } from '$lib/helpers/string'; + import Ellipse from './components/Ellipse.svelte'; export let data: PageData; @@ -290,25 +293,23 @@ -
- + + {cleanBackupName(selectedBackup)} - -
- - Completed - - - {calculateSize(selectedBackup.size)} - - - - {timeFromNow(selectedBackup.$createdAt)} -
-
+ + + + + Completed + + {calculateSize(selectedBackup.size)} + + {timeFromNow(selectedBackup.$createdAt)} + + +
From dc8e0493ad7e7f4456959c058703e46ee21c8981 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 12 Mar 2025 16:26:33 +0530 Subject: [PATCH 05/17] updates: use pink side colors. --- src/lib/components/backupRestoreBox.svelte | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/lib/components/backupRestoreBox.svelte b/src/lib/components/backupRestoreBox.svelte index c318ee46b3..f9b6b4cf75 100644 --- a/src/lib/components/backupRestoreBox.svelte +++ b/src/lib/components/backupRestoreBox.svelte @@ -196,7 +196,7 @@
{/if} - From 80a989000f94b8e74e543405d2321e781a4e3a9d Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 13 Mar 2025 19:35:29 +0530 Subject: [PATCH 06/17] ci: empty commit From 319638fc89b381c1d7156b5e0429d3529b3211ce Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 16 Mar 2025 10:29:19 +0530 Subject: [PATCH 07/17] fix: header covering the content section. --- src/lib/layout/headerAlert.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/layout/headerAlert.svelte b/src/lib/layout/headerAlert.svelte index 0d315853ed..e8f7d8af29 100644 --- a/src/lib/layout/headerAlert.svelte +++ b/src/lib/layout/headerAlert.svelte @@ -5,18 +5,23 @@ export let title: string; export let type: 'info' | 'success' | 'warning' | 'error' | 'default' = 'info'; - let container; + let container: HTMLElement | null = null; function setNavigationHeight() { const alertHeight = container ? container.getBoundingClientRect().height : 0; const header: HTMLHeadingElement = document.querySelector('main > header'); const sidebar: HTMLElement = document.querySelector('main > div > nav'); + const contentSection: HTMLElement = document.querySelector('main > div > section'); + if (header) { header.style.top = `${alertHeight}px`; } if (sidebar) { sidebar.style.top = `${alertHeight + ($isTabletViewport ? 0 : header.getBoundingClientRect().height)}px`; } + if (contentSection) { + contentSection.style.paddingBlockStart = `${alertHeight}px`; + } } onMount(() => { @@ -30,6 +35,7 @@ +
Date: Sun, 16 Mar 2025 10:44:05 +0530 Subject: [PATCH 08/17] bump: console sdk, misc. --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src/lib/helpers/notifications.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7331eb9ec0..ae5971040f 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "e2e:ui": "playwright test tests/e2e --ui" }, "dependencies": { - "@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb", + "@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464", "@appwrite.io/pink-icons": "0.25.0", "@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a", "@appwrite.io/pink-legacy": "^1.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 88a59b853e..153b2a6212 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@appwrite.io/console': - specifier: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb - version: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb + specifier: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464 + version: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464 '@appwrite.io/pink-icons': specifier: 0.25.0 version: 0.25.0 @@ -211,8 +211,8 @@ packages: '@analytics/type-utils@0.6.2': resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==} - '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb': - resolution: {tarball: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb} + '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464': + resolution: {tarball: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464} version: 1.2.1 '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a': @@ -4097,7 +4097,7 @@ snapshots: '@analytics/type-utils@0.6.2': {} - '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@ac51fcb': {} + '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464': {} '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a(svelte@4.2.19)': dependencies: diff --git a/src/lib/helpers/notifications.ts b/src/lib/helpers/notifications.ts index 706f67ecd4..65b40d9325 100644 --- a/src/lib/helpers/notifications.ts +++ b/src/lib/helpers/notifications.ts @@ -19,7 +19,7 @@ const userPreferences = () => get(user)?.prefs; const notificationPrefs = (): Record => { const prefs = userPreferences(); - // due to php backend, empty object can be returnd as an empty array + // due to php backend, empty object can be returned as an empty array. if (!prefs?.notificationPrefs || Array.isArray(prefs.notificationPrefs)) { return {}; } From 994b12c142df3f7604447518e6108498799a47b8 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 16 Mar 2025 11:19:04 +0530 Subject: [PATCH 09/17] fix: missing target. --- src/routes/(console)/account/organizations/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/(console)/account/organizations/+page.svelte b/src/routes/(console)/account/organizations/+page.svelte index b5286b08d8..94272b6dc9 100644 --- a/src/routes/(console)/account/organizations/+page.svelte +++ b/src/routes/(console)/account/organizations/+page.svelte @@ -107,7 +107,7 @@ {:else} - +

Create a new organization

{/if} From dfeda0c2ff0d281b05f4b2d2070137687ef68d2b Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 16 Mar 2025 11:19:18 +0530 Subject: [PATCH 10/17] update: dependency for dismissible toasts. --- package.json | 4 ++-- pnpm-lock.yaml | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index ae5971040f..c630ea1929 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ "dependencies": { "@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464", "@appwrite.io/pink-icons": "0.25.0", - "@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a", + "@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300", "@appwrite.io/pink-legacy": "^1.0.2", - "@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a", + "@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300", "@popperjs/core": "^2.11.8", "@sentry/sveltekit": "^8.38.0", "@stripe/stripe-js": "^3.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 153b2a6212..02d6099f8a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,14 +15,14 @@ importers: specifier: 0.25.0 version: 0.25.0 '@appwrite.io/pink-icons-svelte': - specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a - version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a(svelte@4.2.19) + specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300 + version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300(svelte@4.2.19) '@appwrite.io/pink-legacy': specifier: ^1.0.2 version: 1.0.2 '@appwrite.io/pink-svelte': - specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a - version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19) + specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300 + version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19) '@popperjs/core': specifier: ^2.11.8 version: 2.11.8 @@ -215,14 +215,14 @@ packages: resolution: {tarball: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464} version: 1.2.1 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a} + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300} version: 1.0.0-next.7 peerDependencies: svelte: ^4.0.0 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a00b71d85d8b630f22953d28aa28ae0050': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a00b71d85d8b630f22953d28aa28ae0050} + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b6b87ee8bf094d90ee75e658c28493795b80e1f2': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b6b87ee8bf094d90ee75e658c28493795b80e1f2} version: 1.0.0-next.7 peerDependencies: svelte: ^4.0.0 @@ -236,8 +236,8 @@ packages: '@appwrite.io/pink-legacy@1.0.2': resolution: {integrity: sha512-1AYNcfbV+x0Tyj56CoieSq5g7+u+7F5/LDVN/z+Hx1kp9gj7xc1eT39Dy832xxfihImF6ksjp0FXEMVSBR8cew==} - '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a} + '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300} version: 1.0.0-next.85 peerDependencies: react-dom: ^18.0.0 @@ -4099,11 +4099,11 @@ snapshots: '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464': {} - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a(svelte@4.2.19)': + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300(svelte@4.2.19)': dependencies: svelte: 4.2.19 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a00b71d85d8b630f22953d28aa28ae0050(svelte@4.2.19)': + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b6b87ee8bf094d90ee75e658c28493795b80e1f2(svelte@4.2.19)': dependencies: svelte: 4.2.19 @@ -4116,9 +4116,9 @@ snapshots: '@appwrite.io/pink-icons': 1.0.0 the-new-css-reset: 1.11.3 - '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@3fd919a(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19)': + '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19)': dependencies: - '@appwrite.io/pink-icons-svelte': https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@3fd919a00b71d85d8b630f22953d28aa28ae0050(svelte@4.2.19) + '@appwrite.io/pink-icons-svelte': https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b6b87ee8bf094d90ee75e658c28493795b80e1f2(svelte@4.2.19) '@floating-ui/dom': 1.6.13 '@melt-ui/pp': 0.3.2(@melt-ui/svelte@0.86.3(svelte@4.2.19))(svelte@4.2.19) '@melt-ui/svelte': 0.86.3(svelte@4.2.19) From f10b044535c243c08d6caca63d9c29e8752d2082 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 16 Mar 2025 11:26:57 +0530 Subject: [PATCH 11/17] fix: dependencies after merges. --- package.json | 4 ++-- pnpm-lock.yaml | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 62476588fb..02fb71ea3c 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ "dependencies": { "@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464", "@appwrite.io/pink-icons": "0.25.0", - "@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@bcb8ad2b", + "@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300", "@appwrite.io/pink-legacy": "^1.0.3", - "@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@c962928", + "@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300", "@popperjs/core": "^2.11.8", "@sentry/sveltekit": "^8.38.0", "@stripe/stripe-js": "^3.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ffd6caeebf..67641c28fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,14 +15,14 @@ importers: specifier: 0.25.0 version: 0.25.0 '@appwrite.io/pink-icons-svelte': - specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@bcb8ad2b - version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@bcb8ad2b(svelte@4.2.19) + specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300 + version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300(svelte@4.2.19) '@appwrite.io/pink-legacy': specifier: ^1.0.3 version: 1.0.3 '@appwrite.io/pink-svelte': - specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@c962928 - version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@c962928(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19) + specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300 + version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19) '@popperjs/core': specifier: ^2.11.8 version: 2.11.8 @@ -215,14 +215,14 @@ packages: resolution: {tarball: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464} version: 1.2.1 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@bcb8ad2b': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@bcb8ad2b} + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300} version: 1.0.0-next.7 peerDependencies: svelte: ^4.0.0 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@c962928eeee5cfc960cc1070d469e613e096b7e1': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@c962928eeee5cfc960cc1070d469e613e096b7e1} + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b6b87ee8bf094d90ee75e658c28493795b80e1f2': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b6b87ee8bf094d90ee75e658c28493795b80e1f2} version: 1.0.0-next.7 peerDependencies: svelte: ^4.0.0 @@ -236,8 +236,8 @@ packages: '@appwrite.io/pink-legacy@1.0.3': resolution: {integrity: sha512-GGde5fmPhs+s6/3aFeMPc/kKADG/gTFkYQSy6oBN8pK0y0XNCLrZZgBv+EBbdhwdtqVEWXa0X85Mv9w7jcIlwQ==} - '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@c962928': - resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@c962928} + '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300': + resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300} version: 1.0.0-next.85 peerDependencies: react-dom: ^18.0.0 @@ -4099,11 +4099,11 @@ snapshots: '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@74f9464': {} - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@bcb8ad2b(svelte@4.2.19)': + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@300(svelte@4.2.19)': dependencies: svelte: 4.2.19 - '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@c962928eeee5cfc960cc1070d469e613e096b7e1(svelte@4.2.19)': + '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b6b87ee8bf094d90ee75e658c28493795b80e1f2(svelte@4.2.19)': dependencies: svelte: 4.2.19 @@ -4116,9 +4116,9 @@ snapshots: '@appwrite.io/pink-icons': 1.0.0 the-new-css-reset: 1.11.3 - '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@c962928(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19)': + '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@300(react-dom@18.3.1(react@18.3.1))(svelte@4.2.19)': dependencies: - '@appwrite.io/pink-icons-svelte': https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@c962928eeee5cfc960cc1070d469e613e096b7e1(svelte@4.2.19) + '@appwrite.io/pink-icons-svelte': https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b6b87ee8bf094d90ee75e658c28493795b80e1f2(svelte@4.2.19) '@floating-ui/dom': 1.6.13 '@melt-ui/pp': 0.3.2(@melt-ui/svelte@0.86.3(svelte@4.2.19))(svelte@4.2.19) '@melt-ui/svelte': 0.86.3(svelte@4.2.19) From 6ffaec5d193972153c49207f60f40d3365fc16b0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 16 Mar 2025 11:31:03 +0530 Subject: [PATCH 12/17] remove: unnecessary footer. --- .../organization-[organization]/createProjectCloud.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/routes/(console)/organization-[organization]/createProjectCloud.svelte b/src/routes/(console)/organization-[organization]/createProjectCloud.svelte index 9eeeeb96df..f60fdb9038 100644 --- a/src/routes/(console)/organization-[organization]/createProjectCloud.svelte +++ b/src/routes/(console)/organization-[organization]/createProjectCloud.svelte @@ -60,11 +60,12 @@ }); - + + {regions} /> + From b0329e28098c299d061824ab47c70c52aa44974b Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 16 Mar 2025 12:36:10 +0530 Subject: [PATCH 13/17] update: center spinner in payments modal; remove: unneeded imports. --- src/lib/components/billing/paymentModal.svelte | 10 +++++++++- src/lib/components/billing/selectPaymentMethod.svelte | 2 +- .../createProjectCloud.svelte | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lib/components/billing/paymentModal.svelte b/src/lib/components/billing/paymentModal.svelte index 10b7ae6b75..d21584f22e 100644 --- a/src/lib/components/billing/paymentModal.svelte +++ b/src/lib/components/billing/paymentModal.svelte @@ -77,7 +77,9 @@
{#if isLoading} - +
+ +
{/if}
@@ -99,5 +101,11 @@ .stripe-element { width: 100%; } + + .loader-element { + width: 100%; + align-self: center; + justify-items: end; + } } diff --git a/src/lib/components/billing/selectPaymentMethod.svelte b/src/lib/components/billing/selectPaymentMethod.svelte index dfd586ea75..6bc15f69f9 100644 --- a/src/lib/components/billing/selectPaymentMethod.svelte +++ b/src/lib/components/billing/selectPaymentMethod.svelte @@ -1,5 +1,5 @@ - {#if showBackupRestoreBox}
{#each Object.keys(backupRestoreItems) as key} From 501f8809eaf86c2520cd4924f7bff7fd106c6f2a Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 19 Mar 2025 17:44:42 +0530 Subject: [PATCH 15/17] update: tables to pink2. --- src/lib/components/backupRestoreBox.svelte | 23 +- .../database-[database]/backups/store.ts | 10 +- .../database-[database]/backups/table.svelte | 272 ++++++++---------- .../database-[database]/table.svelte | 2 +- 4 files changed, 141 insertions(+), 166 deletions(-) diff --git a/src/lib/components/backupRestoreBox.svelte b/src/lib/components/backupRestoreBox.svelte index bf44a5704b..a879f65262 100644 --- a/src/lib/components/backupRestoreBox.svelte +++ b/src/lib/components/backupRestoreBox.svelte @@ -12,6 +12,7 @@ import { base } from '$app/paths'; import { getProjectId } from '$lib/helpers/project'; import { toLocaleDate } from '$lib/helpers/date'; + import { Typography } from '@appwrite.io/pink-svelte'; const backupRestoreItems: { archives: Map; @@ -146,7 +147,9 @@

- {titleText} ({items.size}) + + {titleText} ({items.size}) +

@@ -239,7 +259,7 @@ - + {/each} @@ -259,11 +279,11 @@ {/if} - -

+ Are you sure you want to delete {#if selectedBackups.length} {selectedBackups.length} {selectedBackups.length > 1 ? 'backups' : 'backup'}? @@ -271,18 +291,11 @@ the {cleanBackupName(selectedBackup)} backup? {/if}
This action is irreversible. -

- - - - - -
+ + - + {cleanBackupName(selectedBackup)} @@ -301,7 +314,7 @@ -
+ {#each restoreOptions as restoreOption}
{/each} -
+ {#if selectedRestoreOption === 'new'} -
+ {#if !showCustomId} -
- { - showCustomId = true; - }}> Database ID -
+ { + showCustomId = true; + }}> Database ID {:else} -
- -
+ {/if} -
+ {:else} -
- - -
+ + {/if}
@@ -369,36 +376,3 @@
- - diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/table.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/table.svelte index 4a56affa2e..19c65b32e1 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/table.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/table.svelte @@ -3,7 +3,7 @@ import { base } from '$app/paths'; import { page } from '$app/stores'; import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; - import { Id, Modal } from '$lib/components'; + import { Id } from '$lib/components'; import { Dependencies } from '$lib/constants'; import { Button } from '$lib/elements/forms'; import { toLocaleDateTime } from '$lib/helpers/date'; From 047c9ebdd919d310d38c3efc7b44a46ce4536188 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 19 Mar 2025 17:47:29 +0530 Subject: [PATCH 16/17] update: use `DualTimeView`. --- .../databases/database-[database]/backups/table.svelte | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte index 45d0bf926b..a81b0dfb27 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte @@ -15,6 +15,8 @@ import { Click, trackEvent } from '$lib/actions/analytics'; import { copy } from '$lib/helpers/copy'; import { LabelCard } from '$lib/components/index.js'; + import DualTimeView from '$lib/components/dualTimeView.svelte'; + import { Dependencies } from '$lib/constants'; import { ActionMenu, @@ -181,10 +183,9 @@ {@const formattedRetainedUntil = `${retainedUntil.getDate()} ${retainedUntil.toLocaleString('en-US', { month: 'short' })}, ${retainedUntil.getFullYear()} ${retainedUntil.toLocaleTimeString('en-US', { hour12: false })}`} - - {cleanBackupName(backup)} - {timeFromNow(backup.$createdAt)} - + + {cleanBackupName(backup)} + {#if backup.status === 'completed'} From fd8a6f03921fed71bc53b1b760a2dc019c8b66cc Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 19 Mar 2025 19:51:21 +0530 Subject: [PATCH 17/17] address comments: `lol`. --- .../databases/database-[database]/backups/restoreModal.svelte | 2 +- .../databases/database-[database]/backups/table.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/restoreModal.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/restoreModal.svelte index 0bee7c3eab..52c75d0fd4 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/restoreModal.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/restoreModal.svelte @@ -2,7 +2,7 @@ import { Card, Icon, Input, Layout, Typography } from '@appwrite.io/pink-svelte'; import { Click, trackEvent } from '$lib/actions/analytics'; import { IconX } from '@appwrite.io/pink-icons-svelte'; - import Button from '../../../../../../lib/elements/forms/button.svelte'; + import Button from '$lib/elements/forms/button.svelte'; export let id: string; export let show = false; diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte index a81b0dfb27..9c61f23efe 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/table.svelte @@ -40,7 +40,7 @@ } from '@appwrite.io/pink-icons-svelte'; import { capitalize } from '$lib/helpers/string'; import Ellipse from './components/Ellipse.svelte'; - import Confirm from '../../../../../../lib/components/confirm.svelte'; + import Confirm from '$lib/components/confirm.svelte'; export let data: PageData;