diff --git a/src/lib/components/backupRestoreBox.svelte b/src/lib/components/backupRestoreBox.svelte index 69d3dd60ff..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}) +

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..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 @@ -1,7 +1,6 @@ -
- -
+ + +
{#each policies.policies as policy, index (policy.$id)} {@const policyDescription = getPolicyDescription(policy.schedule)} {@const policyDescriptionShort = getTruncatedPolicyDescription(policyDescription)} @@ -146,81 +150,78 @@ 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} - - + + + {#if shouldUseTooltip} + {policyDescriptionShort} - - {policyDescription} - - {:else} - {policyDescription} - {/if} + {policyDescription} + + {:else} + {policyDescription} + {/if} - + - {formatRetentionMessage(policy.retention)} -
-
+ {formatRetentionMessage(policy.retention)} + + + -
+ +
Previous -
- - +
+ + + {#if lastBackupDates[policy.$id]} {toLocaleDateTime(lastBackupDates[policy.$id])} {:else} No backups yet {/if} - +
-
+
+ +
Next -
+ + {toLocaleDateTime( parseExpression(policy.schedule, { utc: true @@ -228,10 +229,14 @@ .next() .toString() )} -
+
+ + {#if index !== policies.total - 1} + + {/if} {:else}
{#if $app.themeInUse === 'dark'} @@ -284,59 +289,28 @@
{/if} -
- - - -
-

- Are you sure you want to delete the {selectedPolicy.name} policy? -

- -

- This will also delete all backups associated with this policy. This action is - irreversible. -

- -
- -
-
-
- - - - -
- - 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'; diff --git a/src/routes/(console)/project-[project]/databases/table.svelte b/src/routes/(console)/project-[project]/databases/table.svelte index fdf299d05d..996b556eed 100644 --- a/src/routes/(console)/project-[project]/databases/table.svelte +++ b/src/routes/(console)/project-[project]/databases/table.svelte @@ -47,7 +47,10 @@ ?.map((policy) => getPolicyDescription(policy.schedule)) .join(', ')} - + {#if !policies} No backup policies @@ -55,7 +58,9 @@ {description} {/if} - {`Last backup: ${lastBackup}`} + + {`Last backup: ${lastBackup}`} + {:else} {toLocaleDateTime(database[column.id])}