Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<script lang="ts">
import { Button } from '$lib/elements/forms';
import { sdk } from '$lib/stores/sdk';
import { isSmallViewport } from '$lib/stores/viewport';
import { goto, invalidate } from '$app/navigation';
import { resolve } from '$app/paths';
import { Dependencies } from '$lib/constants';
import { addNotification } from '$lib/stores/notifications';
import { Submit, trackError } from '$lib/actions/analytics';
import { generateFingerprintToken } from '$lib/helpers/fingerprint';
import { Alert, Layout, Modal, Typography } from '@appwrite.io/pink-svelte';
import { Alert, Layout, Link, Modal, Typography } from '@appwrite.io/pink-svelte';
import { Status } from '@appwrite.io/console';

let {
Expand Down Expand Up @@ -73,14 +74,26 @@
})
);
}

const upgradeHref = $derived(
resolve('/(console)/organization-[organization]/change-plan', {
organization: teamId
})
);
</script>

<Modal title="Project paused" bind:open={show} size="m" dismissible={false}>
<Layout.Stack gap="m">
<Typography.Text>This project has been paused due to inactivity.</Typography.Text>
<Typography.Text>
Your data is safe and will remain intact. Upgrade your plan to keep your projects
active, or restore the project to continue using it.
Your data is safe and will remain intact.
{#if $isSmallViewport}
<Link.Anchor href={upgradeHref}>Upgrade your plan</Link.Anchor> to keep your projects
active, or restore the project to continue using it.
{:else}
Upgrade your plan to keep your projects active, or restore the project to continue
using it.
{/if}
</Typography.Text>

{#if error}
Expand All @@ -103,7 +116,9 @@
Restore project
{/if}
</Button>
<Button disabled={loading} on:click={handleUpgrade}>Upgrade</Button>
{#if !$isSmallViewport}
<Button disabled={loading} on:click={handleUpgrade}>Upgrade</Button>
{/if}
</Layout.Stack>
</Layout.Stack>
</svelte:fragment>
Expand Down
Loading