fix: copy

This commit is contained in:
Arman
2024-03-10 17:45:30 +01:00
committed by Torsten Dittmann
parent f74b39d189
commit 86441d73df
2 changed files with 18 additions and 6 deletions
+2 -2
View File
@@ -124,7 +124,7 @@
<slot name="tooltip" {limit} {tier} {title} {upgradeMethod} {hasUsageFees}>
{#if hasProjectLimitation}
<p class="text">
Your are limited to {limit}
You are limited to {limit}
{title.toLocaleLowerCase()} per project on the {tier} plan.
{#if $organization?.billingPlan === BillingPlan.STARTER}<Button
link
@@ -134,7 +134,7 @@
from: 'button',
source: 'resource_limit_tag'
})}>Upgrade</Button>
for addtional {title.toLocaleLowerCase()}.
for additional {title.toLocaleLowerCase()}.
{/if}
</p>
{:else if hasUsageFees}
@@ -33,17 +33,23 @@
TableRowLink
} from '$lib/elements/table';
import { toLocaleDate } from '$lib/helpers/date';
import { bytesToSize, calculateSize } from '$lib/helpers/sizeConvertion';
import {
bytesToSize,
calculateSize,
humanFileSize,
sizeToBytes
} from '$lib/helpers/sizeConvertion';
import { Container, ContainerHeader } from '$lib/layout';
import type { Models } from '@appwrite.io/console';
import { addNotification } from '$lib/stores/notifications';
import { uploader } from '$lib/stores/uploader';
import { wizard } from '$lib/stores/wizard';
import { tooltip } from '$lib/actions/tooltip';
import { showUsageRatesModal } from '$lib/stores/billing';
import { getServiceLimit, showUsageRatesModal } from '$lib/stores/billing';
import { sdk } from '$lib/stores/sdk.js';
import Create from './create-file/create.svelte';
import DeleteFile from './deleteFile.svelte';
import { isCloud } from '$lib/system';
export let data;
@@ -77,6 +83,10 @@
trackError(error, Submit.FileDelete);
}
}
$: maxFileSize = isCloud
? humanFileSize(sizeToBytes(getServiceLimit('fileSize'), 'MB', 1000))
: null;
</script>
<Container>
@@ -101,10 +111,12 @@
<svelte:fragment slot="tooltip" let:limit let:tier let:upgradeMethod>
{#if tier === 'Starter'}
<p class="text">
You are limited to {limit} GB of storage on the {tier} plan.
You are limited to {limit} GB of total storage and {Math.floor(
parseInt(maxFileSize.value)
)}{maxFileSize.unit} on the {tier} plan.
<button class="link" type="button" on:click|preventDefault={upgradeMethod}
>Upgrade</button>
for addtional storage.
for additional storage.
</p>
{:else}
<p class="text">