mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: session plan limit WIP
This commit is contained in:
+18
-1
@@ -357,7 +357,7 @@ export const usageRates = {
|
||||
]
|
||||
};
|
||||
|
||||
//resources: bandwidth, buckets, file size limit, functions, executions, users,teams, members, platforms, webhooks, databases, connections, messages
|
||||
//resources: bandwidth, buckets, file size limit, functions, executions, users,teams,logs, members, platforms, webhooks, databases, connections, messages
|
||||
export const limitRates = {
|
||||
'tier-0': [
|
||||
{
|
||||
@@ -396,6 +396,13 @@ export const limitRates = {
|
||||
amount: 1,
|
||||
unit: ''
|
||||
},
|
||||
|
||||
{
|
||||
id: 'logs',
|
||||
amount: 1,
|
||||
unit: ''
|
||||
},
|
||||
|
||||
{
|
||||
id: 'members',
|
||||
amount: 1,
|
||||
@@ -464,6 +471,11 @@ export const limitRates = {
|
||||
amount: 1,
|
||||
unit: ''
|
||||
},
|
||||
{
|
||||
id: 'logs',
|
||||
amount: 1,
|
||||
unit: ''
|
||||
},
|
||||
{
|
||||
id: 'members',
|
||||
amount: 1,
|
||||
@@ -532,6 +544,11 @@ export const limitRates = {
|
||||
amount: 1,
|
||||
unit: ''
|
||||
},
|
||||
{
|
||||
id: 'logs',
|
||||
amount: 1,
|
||||
unit: ''
|
||||
},
|
||||
{
|
||||
id: 'members',
|
||||
amount: 1,
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class:u-flex={isFlex} class=" u-gap-12 common-section u-main-space-between">
|
||||
<div class="u-flex u-cross-child-center u-gap-16">
|
||||
<Heading tag={titleTag} size={titleSize}>{title}</Heading>
|
||||
{#if isCloud}
|
||||
{#if isCloud && limit !== 'unlimited' && limit < Infinity}
|
||||
<div
|
||||
use:tooltip={{
|
||||
interactive: true,
|
||||
@@ -67,19 +67,21 @@
|
||||
</div>
|
||||
|
||||
<slot>
|
||||
<div
|
||||
use:tooltip={{
|
||||
content: `Upgrade to add more ${title.toLocaleLowerCase()}`,
|
||||
disabled: total < limit || limit === 'unlimited'
|
||||
}}>
|
||||
<Button
|
||||
on:click={buttonMethod}
|
||||
event={buttonEvent}
|
||||
disabled={limit !== 'unlimited' && total >= limit}>
|
||||
<span class="icon-plus" aria-hidden="true" />
|
||||
<span class="text">{buttonText}</span>
|
||||
</Button>
|
||||
</div>
|
||||
{#if buttonText}
|
||||
<div
|
||||
use:tooltip={{
|
||||
content: `Upgrade to add more ${title.toLocaleLowerCase()}`,
|
||||
disabled: total < limit || limit === 'unlimited'
|
||||
}}>
|
||||
<Button
|
||||
on:click={buttonMethod}
|
||||
event={buttonEvent}
|
||||
disabled={limit !== 'unlimited' && total >= limit}>
|
||||
<span class="icon-plus" aria-hidden="true" />
|
||||
<span class="text">{buttonText}</span>
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
</slot>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
TableHeader,
|
||||
TableRow
|
||||
} from '$lib/elements/table';
|
||||
import { Container } from '$lib/layout';
|
||||
import { Container, ContainerHeader } from '$lib/layout';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import DeleteAllSessions from '../deleteAllSessions.svelte';
|
||||
import DeleteSessions from '../deleteSession.svelte';
|
||||
@@ -28,12 +28,14 @@
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
{#if data.sessions.total}
|
||||
<div class="u-flex u-main-end common-section">
|
||||
<ContainerHeader title="Sessions" serviceId="logs">
|
||||
{#if data.sessions.total}
|
||||
<Button secondary on:click={() => (showDeleteAll = true)}>
|
||||
<span class="text">Delete All</span>
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
</ContainerHeader>
|
||||
{#if data.sessions.total}
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableCellHead width={140}>Browser and Device</TableCellHead>
|
||||
|
||||
Reference in New Issue
Block a user