mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: from QA
This commit is contained in:
1 parent
074d8d09b2
commit
f2edd6c99b
12 files changed
+38
-17
No files matched your search
@@ -8,7 +8,7 @@
|
||||
|
||||
<article class="card u-grid u-cross-center u-width-full-line">
|
||||
<div class="u-flex u-flex-vertical u-gap-24 u-main-center u-cross-center">
|
||||
<p class="text u-text-center">Upgrade your plan add more {service}</p>
|
||||
<p class="text u-text-center">Upgrade your plan to add more {service}</p>
|
||||
<Button secondary on:click={() => wizard.start(ChangeOrganizationTierCloud)}>
|
||||
Change plan
|
||||
</Button>
|
||||
|
||||
@@ -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}>
|
||||
<div class="u-flex u-cross-center u-flex-vertical u-main-center u-flex">
|
||||
<div class="common-section">
|
||||
<div class="button is-secondary is-only-icon">
|
||||
|
||||
@@ -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;
|
||||
</script>
|
||||
|
||||
{#if isCloud && total && limit !== 0 && total >= limit}
|
||||
{#if isCloud && showAlert && total && limit !== 0 && total >= limit}
|
||||
<slot name="alert" {limit} {tier} {title} {upgradeMethod}>
|
||||
<Alert type={alertType}>
|
||||
<Alert type={alertType} isStandalone>
|
||||
<span class="text">
|
||||
You've reached the maximum number of {title.toLowerCase()} for the {tier} plan.
|
||||
<button class="link" type="button" on:click|preventDefault={upgradeMethod}
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
let showCreate = false;
|
||||
|
||||
$: isCreationDisabled =
|
||||
$readOnly.bandwidth || ($organization.billingPlan === 'tier-0' && data.projects.total >= 1);
|
||||
$readOnly.bandwidth ||
|
||||
($organization?.billingPlan === 'tier-0' && data?.projects?.total >= 1);
|
||||
|
||||
const getPlatformInfo = (platform: string) => {
|
||||
let name: string, icon: string;
|
||||
@@ -189,7 +190,7 @@
|
||||
</svelte:fragment>
|
||||
</CardContainer>
|
||||
{:else}
|
||||
<Empty single on:click={handleCreateProject}>
|
||||
<Empty marginTop on:click={handleCreateProject}>
|
||||
<p>Create a new project</p>
|
||||
</Empty>
|
||||
{/if}
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
<h6 class="u-bold u-trim-1">
|
||||
{currentTier.name}
|
||||
</h6>
|
||||
{#if $organization.billingPlan !== 'tier-0' && $daysLeftInTrial}
|
||||
{#if $organization?.billingPlan !== 'tier-0' && $daysLeftInTrial}
|
||||
<Pill>FREE TRIAL</Pill>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<p class="text">
|
||||
{#if $organization.billingPlan !== 'tier-0' && !$daysLeftInTrial}
|
||||
{#if $organization?.billingPlan !== 'tier-0' && !$daysLeftInTrial}
|
||||
<span class="u-color-text-gray"> Esimated total: </span>
|
||||
{/if}
|
||||
<!-- TODO: add estimated total from aggregation -->
|
||||
|
||||
@@ -63,7 +63,8 @@
|
||||
total={data.organizationMembers.total}
|
||||
buttonText="Invite"
|
||||
buttonMethod={() => newMemberModal.set(true)}
|
||||
buttonDisabled={$readOnly.bandwidth} />
|
||||
buttonDisabled={$readOnly.bandwidth}
|
||||
showAlert={false} />
|
||||
|
||||
<TableScroll>
|
||||
<TableHeader>
|
||||
|
||||
@@ -41,9 +41,8 @@
|
||||
<Heading tag="h2" size="5">Usage</Heading>
|
||||
<div class="u-flex u-main-space-between common-section">
|
||||
<p class="text">
|
||||
If you exceed the limits of the Free plan, services for your projects may be disrupted. <a
|
||||
href={`${base}/console/`}>Upgrade for greater capacity</a
|
||||
>.
|
||||
If you exceed the limits of the Starter plan, services for your projects may be
|
||||
disrupted. <a href={`${base}/console/`}>Upgrade for greater capacity</a>.
|
||||
</p>
|
||||
<div class="u-flex u-gap-8">
|
||||
<p class="text">Usage period:</p>
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
</Pill>
|
||||
</div>
|
||||
{:else}
|
||||
<CustomId bind:show={showCustomId} name="Project" bind:id={$createProject.id} />
|
||||
<CustomId
|
||||
bind:show={showCustomId}
|
||||
name="Project"
|
||||
bind:id={$createProject.id}
|
||||
fullWidth />
|
||||
{/if}
|
||||
</FormList>
|
||||
</WizardStep>
|
||||
@@ -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.
|
||||
</Alert>
|
||||
{/if}
|
||||
<Collapsible>
|
||||
|
||||
@@ -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 @@
|
||||
<svelte:fragment slot="title">
|
||||
<h6 class="u-bold u-trim-1">{$project.name}</h6>
|
||||
</svelte:fragment>
|
||||
{#if isCloud && $project.region}
|
||||
<p>Region:{regions.regions.find((r) => r === $project?.region)}</p>
|
||||
{/if}
|
||||
<p>Last update: {toLocaleDateTime($project.$updatedAt)}</p>
|
||||
</BoxAvatar>
|
||||
</svelte:fragment>
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
{@const size = humanFileSize(service)}
|
||||
<Alert type="info">
|
||||
<p class="text">
|
||||
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.
|
||||
</p>
|
||||
<svelte:fragment slot="action">
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<Modal bind:show size="big" headerDivider={false} title="Usage rates">
|
||||
{#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}
|
||||
|
||||
Reference in new issue
Block a user