mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
@@ -113,19 +113,18 @@
|
||||
<DropList bind:show={showDropdown} width="16">
|
||||
{#if hasProjectLimitation}
|
||||
<Pill button on:click={() => (showDropdown = !showDropdown)}>
|
||||
<span class="icon-info" />{total}/{limit}
|
||||
{title} used
|
||||
<span class="icon-info" />{total}/{limit} created
|
||||
</Pill>
|
||||
{:else}
|
||||
<Pill button on:click={() => (showDropdown = !showDropdown)}>
|
||||
<span class="icon-info" />{title} limited
|
||||
<span class="icon-info" />Limits applied
|
||||
</Pill>
|
||||
{/if}
|
||||
<svelte:fragment slot="list">
|
||||
<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
|
||||
@@ -135,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">
|
||||
|
||||
Reference in New Issue
Block a user