From f2edd6c99b487971441383a7071883c898ed3f2b Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 17 Oct 2023 17:05:41 +0200 Subject: [PATCH] fix: from QA --- src/lib/components/cardPlanLimit.svelte | 2 +- src/lib/components/empty.svelte | 4 +++- src/lib/layout/containerHeader.svelte | 5 +++-- .../organization-[organization]/+page.svelte | 5 +++-- .../billing/planSummary.svelte | 4 ++-- .../members/+page.svelte | 3 ++- .../usage/[[period]]/+page.svelte | 5 ++--- .../organization-[organization]/wizard/step1.svelte | 6 +++++- .../project-[project]/auth/templates/+page.svelte | 4 ++-- .../project-[project]/settings/deleteProject.svelte | 13 +++++++++++++ .../settings/updateMaxFileSize.svelte | 2 +- .../wizard/cloudOrganization/usageRates.svelte | 2 +- 12 files changed, 38 insertions(+), 17 deletions(-) diff --git a/src/lib/components/cardPlanLimit.svelte b/src/lib/components/cardPlanLimit.svelte index 36c2ada1d..8f91006d7 100644 --- a/src/lib/components/cardPlanLimit.svelte +++ b/src/lib/components/cardPlanLimit.svelte @@ -8,7 +8,7 @@
-

Upgrade your plan add more {service}

+

Upgrade your plan to add more {service}

diff --git a/src/lib/components/empty.svelte b/src/lib/components/empty.svelte index fdf02c75a..c8bb95acc 100644 --- a/src/lib/components/empty.svelte +++ b/src/lib/components/empty.svelte @@ -9,6 +9,7 @@ export let single = false; export let target: string = null; export let href: string = null; + export let marginTop = false; function track() { if (target) { @@ -63,7 +64,8 @@ on:click={track} aria-label="create" type="button" - class="card u-grid u-cross-center u-width-full-line dashed"> + class="card u-grid u-cross-center u-width-full-line dashed" + class:common-section={marginTop}>
diff --git a/src/lib/layout/containerHeader.svelte b/src/lib/layout/containerHeader.svelte index d44e9d59d..288236b44 100644 --- a/src/lib/layout/containerHeader.svelte +++ b/src/lib/layout/containerHeader.svelte @@ -17,6 +17,7 @@ export let serviceId = title.toLocaleLowerCase(); export let total: number = null; export let alertType: 'info' | 'success' | 'warning' | 'error' | 'default' = 'warning'; + export let showAlert = true; export let buttonText: string = null; export let buttonMethod: () => void = null; @@ -31,9 +32,9 @@ $: tier = tierToPlan($organization?.billingPlan)?.name; -{#if isCloud && total && limit !== 0 && total >= limit} +{#if isCloud && showAlert && total && limit !== 0 && total >= limit} - + You've reached the maximum number of {title.toLowerCase()} for the {tier} plan.

- {#if $organization.billingPlan !== 'tier-0' && !$daysLeftInTrial} + {#if $organization?.billingPlan !== 'tier-0' && !$daysLeftInTrial} Esimated total: {/if} diff --git a/src/routes/console/organization-[organization]/members/+page.svelte b/src/routes/console/organization-[organization]/members/+page.svelte index c97699753..4898441c5 100644 --- a/src/routes/console/organization-[organization]/members/+page.svelte +++ b/src/routes/console/organization-[organization]/members/+page.svelte @@ -63,7 +63,8 @@ total={data.organizationMembers.total} buttonText="Invite" buttonMethod={() => newMemberModal.set(true)} - buttonDisabled={$readOnly.bandwidth} /> + buttonDisabled={$readOnly.bandwidth} + showAlert={false} /> diff --git a/src/routes/console/organization-[organization]/usage/[[period]]/+page.svelte b/src/routes/console/organization-[organization]/usage/[[period]]/+page.svelte index 8b920e5bc..e70a6099d 100644 --- a/src/routes/console/organization-[organization]/usage/[[period]]/+page.svelte +++ b/src/routes/console/organization-[organization]/usage/[[period]]/+page.svelte @@ -41,9 +41,8 @@ Usage

- If you exceed the limits of the Free plan, services for your projects may be disrupted. Upgrade for greater capacity. + If you exceed the limits of the Starter plan, services for your projects may be + disrupted. Upgrade for greater capacity.

Usage period:

diff --git a/src/routes/console/organization-[organization]/wizard/step1.svelte b/src/routes/console/organization-[organization]/wizard/step1.svelte index 7c609ef18..c148d82a7 100644 --- a/src/routes/console/organization-[organization]/wizard/step1.svelte +++ b/src/routes/console/organization-[organization]/wizard/step1.svelte @@ -26,7 +26,11 @@
{:else} - + {/if} diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index ee2f79fcc..6fc8c1349 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -125,8 +125,8 @@ method: () => wizard.start(ChangeOrganizationTierCloud) } ]}> - All emails sent using the Free plan will include attribution to Appwrite in the - signature. To send attribution-free emails, upgrade your plan. + All emails sent using the Starter plan will include attribution to Appwrite in + the signature. To send attribution-free emails, upgrade your plan. {/if} diff --git a/src/routes/console/project-[project]/settings/deleteProject.svelte b/src/routes/console/project-[project]/settings/deleteProject.svelte index c0476e764..2ebab2d9b 100644 --- a/src/routes/console/project-[project]/settings/deleteProject.svelte +++ b/src/routes/console/project-[project]/settings/deleteProject.svelte @@ -7,11 +7,21 @@ import { toLocaleDateTime } from '$lib/helpers/date'; import { addNotification } from '$lib/stores/notifications'; import { sdk } from '$lib/stores/sdk'; + import { isCloud } from '$lib/system'; + import { onMount } from 'svelte'; import { project } from '../store'; + import type { RegionList } from '$lib/sdk/billing'; let showDelete = false; let name: string = null; + let regions: RegionList; + onMount(async () => { + if (isCloud) { + regions = await sdk.forConsole.billing.listRegions(); + } + }); + const handleDelete = async () => { try { await sdk.forConsole.projects.delete($project.$id); @@ -45,6 +55,9 @@
{$project.name}
+ {#if isCloud && $project.region} +

Region:{regions.regions.find((r) => r === $project?.region)}

+ {/if}

Last update: {toLocaleDateTime($project.$updatedAt)}

diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte index f5e37cdf3..286c4c17c 100644 --- a/src/routes/console/project-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte +++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte @@ -39,7 +39,7 @@ {@const size = humanFileSize(service)}

- The Free plan has a maximum upload file size limit of {size.value}{size.unit}. + The Starter plan has a maximum upload file size limit of {size.value}{size.unit}. Upgrade to allow files of a larger size.

diff --git a/src/routes/console/wizard/cloudOrganization/usageRates.svelte b/src/routes/console/wizard/cloudOrganization/usageRates.svelte index ef560227a..9efdcd10c 100644 --- a/src/routes/console/wizard/cloudOrganization/usageRates.svelte +++ b/src/routes/console/wizard/cloudOrganization/usageRates.svelte @@ -56,7 +56,7 @@ {#if isFree} - Usage on the Free plan is limited for the following resources. Next billing period: {toLocaleDate( + Usage on the Starter plan is limited for the following resources. Next billing period: {toLocaleDate( nextDate )}. {:else}