|
2 | 2 | import { Button } from '$lib/elements/forms'; |
3 | 3 | import { sdk } from '$lib/stores/sdk'; |
4 | 4 | import { goto, invalidate } from '$app/navigation'; |
5 | | - import { resolve } from '$app/paths'; |
| 5 | + import { base, resolve } from '$app/paths'; |
6 | 6 | import { Dependencies } from '$lib/constants'; |
7 | 7 | import { addNotification } from '$lib/stores/notifications'; |
8 | 8 | import { Submit, trackError } from '$lib/actions/analytics'; |
|
57 | 57 | loading = false; |
58 | 58 | } |
59 | 59 | } |
| 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 | + } |
60 | 76 | </script> |
61 | 77 |
|
62 | | -<Modal title="Project paused" bind:open={show} size="s" dismissible={false}> |
| 78 | +<Modal title="Project paused" bind:open={show} size="big" dismissible={false}> |
63 | 79 | <Layout.Stack gap="m"> |
64 | 80 | <Typography.Text>This project has been paused due to inactivity.</Typography.Text> |
65 | 81 | <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. |
67 | 84 | </Typography.Text> |
68 | 85 |
|
69 | 86 | {#if error} |
|
75 | 92 |
|
76 | 93 | <svelte:fragment slot="footer"> |
77 | 94 | <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 |
| 95 | + <Button text disabled={loading} on:click={handleBackToOrganization}> |
| 96 | + Back to organization |
88 | 97 | </Button> |
89 | | - <Button disabled={loading} on:click={handleResume}> |
| 98 | + <Button secondary disabled={loading} on:click={handleResume}> |
90 | 99 | {#if loading} |
91 | | - Resuming... |
| 100 | + Restoring... |
92 | 101 | {:else} |
93 | | - Resume project |
| 102 | + Restore project |
94 | 103 | {/if} |
95 | 104 | </Button> |
| 105 | + <Button disabled={loading} on:click={handleUpgrade}> |
| 106 | + Upgrade |
| 107 | + </Button> |
96 | 108 | </Layout.Stack> |
97 | 109 | </svelte:fragment> |
98 | 110 | </Modal> |
0 commit comments