diff --git a/src/lib/helpers/waitlist.ts b/src/lib/helpers/waitlist.ts index d89d12646..d3c0f1c37 100644 --- a/src/lib/helpers/waitlist.ts +++ b/src/lib/helpers/waitlist.ts @@ -1,12 +1,12 @@ import { get } from 'svelte/store'; import { user } from '$lib/stores/user'; import { sdk } from '$lib/stores/sdk'; +const userPreferences = () => get(user)?.prefs; export const joinWaitlistSites = () => { - const currentPrefs = () => get(user)?.prefs; - + const prefs = userPreferences(); const newPrefs = { - ...currentPrefs, + ...prefs, joinWaitlistSites: true }; @@ -14,8 +14,7 @@ export const joinWaitlistSites = () => { }; export const isOnWaitlistSites = (): boolean => { - const currentPrefs = () => get(user)?.prefs; - - console.log('load from prefs', 'joinWaitlistSites' in currentPrefs); - return 'joinWaitlistSites' in currentPrefs; + const prefs = userPreferences(); + console.log('prefs', prefs); + return 'joinWaitlistSites' in prefs; }; diff --git a/src/routes/(console)/project-[region]-[project]/sites/+page.svelte b/src/routes/(console)/project-[region]-[project]/sites/+page.svelte index aa3e9b7e5..de300ee9e 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/+page.svelte @@ -2,13 +2,13 @@ import { Container } from '$lib/layout'; import { Button } from '$lib/elements/forms'; import { app } from '$lib/stores/app'; - import { Heading, Empty } from '$lib/components'; - import EmptyLight from '$lib/images/empty-light.svg'; - import EmptyDark from '$lib/images/empty-dark.svg'; + import { Heading } from '$lib/components'; + import EmptyLight from './empty-sites-light.svg'; + import EmptyDark from './empty-sites-dark.svg'; import { isOnWaitlistSites, joinWaitlistSites } from '$lib/helpers/waitlist'; - import { page } from '$app/stores'; + import { addNotification } from '$lib/stores/notifications'; - $: isOnWaitlist = isOnWaitlistSites($page.url.pathname); + $: isOnWaitlist = isOnWaitlistSites(); @@ -22,54 +22,47 @@ {/if} -
- Appwrite Sites is in high demand. -

- We have a waiting list to ensure a great experience for all of you. Please - join the waiting list to get access. -

-
-
- {#if isOnWaitlist} - We can't wait for you to try out Sites on Cloud. - {:else} + {#if isOnWaitlist} +
+ You've successfully joined the Sites waitlist + +

+ We can't wait for you to try out Sites on Cloud. You will get access + soon. +

+
+ {:else} +
+ Appwrite Sites is in high demand +

+ To ensure a smooth experience for everyone, we’re rolling out access + gradually. Join the waitlist and be one of the first to deploy with + Sites. +

+
+
- {/if} -
+
+ {/if}
- - - - - - - - - - - - - - - - - -
diff --git a/src/routes/(console)/project-[region]-[project]/sites/empty-sites-dark.svg b/src/routes/(console)/project-[region]-[project]/sites/empty-sites-dark.svg new file mode 100644 index 000000000..b0aa7ccc1 --- /dev/null +++ b/src/routes/(console)/project-[region]-[project]/sites/empty-sites-dark.svg @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/src/routes/(console)/project-[region]-[project]/sites/empty-sites-light.svg b/src/routes/(console)/project-[region]-[project]/sites/empty-sites-light.svg new file mode 100644 index 000000000..50d59eed9 --- /dev/null +++ b/src/routes/(console)/project-[region]-[project]/sites/empty-sites-light.svg @@ -0,0 +1,321 @@ + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file