Skip to content

Commit c255723

Browse files
Merge pull request #2915 from appwrite/claude/update-project-cta-dialog-PAUe6
Update paused project modal with upgrade option and improved UX
2 parents 943e224 + 0a2fa23 commit c255723

1 file changed

Lines changed: 35 additions & 21 deletions

File tree

src/routes/(console)/project-[region]-[project]/pausedProjectModal.svelte

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Button } from '$lib/elements/forms';
33
import { sdk } from '$lib/stores/sdk';
44
import { goto, invalidate } from '$app/navigation';
5-
import { resolve } from '$app/paths';
5+
import { base, resolve } from '$app/paths';
66
import { Dependencies } from '$lib/constants';
77
import { addNotification } from '$lib/stores/notifications';
88
import { Submit, trackError } from '$lib/actions/analytics';
@@ -57,13 +57,30 @@
5757
loading = false;
5858
}
5959
}
60+
61+
function handleUpgrade() {
62+
goto(
63+
resolve('/(console)/organization-[organization]/change-plan', {
64+
organization: teamId
65+
})
66+
);
67+
}
68+
69+
function handleBackToOrganization() {
70+
goto(
71+
resolve('/(console)/organization-[organization]', {
72+
organization: teamId
73+
})
74+
);
75+
}
6076
</script>
6177

62-
<Modal title="Project paused" bind:open={show} size="s" dismissible={false}>
78+
<Modal title="Project paused" bind:open={show} size="big" dismissible={false}>
6379
<Layout.Stack gap="m">
6480
<Typography.Text>This project has been paused due to inactivity.</Typography.Text>
6581
<Typography.Text>
66-
Your data is safe and will remain intact. Resume the project to continue using it.
82+
Your data is safe and will remain intact. Upgrade your plan to keep your projects active,
83+
or restore the project to continue using it.
6784
</Typography.Text>
6885

6986
{#if error}
@@ -74,25 +91,22 @@
7491
</Layout.Stack>
7592

7693
<svelte:fragment slot="footer">
77-
<Layout.Stack direction="row" justifyContent="flex-end">
78-
<Button
79-
text
80-
disabled={loading}
81-
on:click={() =>
82-
goto(
83-
resolve('/(console)/organization-[organization]', {
84-
organization: teamId
85-
})
86-
)}>
87-
Cancel
88-
</Button>
89-
<Button disabled={loading} on:click={handleResume}>
90-
{#if loading}
91-
Resuming...
92-
{:else}
93-
Resume project
94-
{/if}
94+
<Layout.Stack direction="row" justifyContent="space-between">
95+
<Button text disabled={loading} on:click={handleBackToOrganization}>
96+
Back to organization
9597
</Button>
98+
<Layout.Stack direction="row" justifyContent="flex-end">
99+
<Button secondary disabled={loading} on:click={handleResume}>
100+
{#if loading}
101+
Restoring...
102+
{:else}
103+
Restore project
104+
{/if}
105+
</Button>
106+
<Button disabled={loading} on:click={handleUpgrade}>
107+
Upgrade
108+
</Button>
109+
</Layout.Stack>
96110
</Layout.Stack>
97111
</svelte:fragment>
98112
</Modal>

0 commit comments

Comments
 (0)