Fix paused project modal mobile upgrade action

This commit is contained in:
harsh mahajan
2026-05-05 18:52:15 +05:30
parent 524d89d1e7
commit b9f74b67d1
@@ -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 {
@@ -73,14 +74,24 @@
})
);
}
const upgradeHref = 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}
@@ -103,7 +114,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>