diff --git a/website/src/lib/components/self/AppSidebar.svelte b/website/src/lib/components/self/AppSidebar.svelte index ee0bfa9..1c00ec3 100644 --- a/website/src/lib/components/self/AppSidebar.svelte +++ b/website/src/lib/components/self/AppSidebar.svelte @@ -1,23 +1,29 @@ - +
@@ -120,21 +118,92 @@ {/snippet} - - {#if !$USER_DATA} - - - {#snippet child()} - - {/snippet} - - - {/if} + + {#if $USER_DATA} + + + + + + {#snippet child({ props })} + + + + CN + +
+ {$USER_DATA.name} + $35,674.34 + +
+ +
+ {/snippet} +
+ + +
+ + + CN + +
+ {$USER_DATA.name} + {$USER_DATA.email} +
+
+
+ + + + + Upgrade to Pro + + + + + + + Account + + + + Billing + + + + Notifications + + + + { + signOut().then(() => { + USER_DATA.set(null); + window.location.reload(); + }); + }} + > + + Log out + +
+
+
+
+
+ {/if} diff --git a/website/src/lib/components/self/SignInConfirmDialog.svelte b/website/src/lib/components/self/SignInConfirmDialog.svelte index 7c07a9d..56ee8bd 100644 --- a/website/src/lib/components/self/SignInConfirmDialog.svelte +++ b/website/src/lib/components/self/SignInConfirmDialog.svelte @@ -7,17 +7,25 @@ DialogDescription } from '$lib/components/ui/dialog'; import { Button } from '$lib/components/ui/button'; + import { signIn } from '$lib/auth-client'; + import { page } from '$app/state'; - let { open = $bindable(false), onConfirm } = $props<{ + async function onConfirm() { + await signIn.social({ + provider: 'google', + callbackURL: `${page.url.pathname}?signIn=1` + }); + } + + let { open = $bindable(false) } = $props<{ open?: boolean; - onConfirm: (provider: 'google') => void; }>(); - Sign in to Vyntr + Sign in to Rugplay Choose a service to sign in with. Your account will be created automatically if you don't have one. @@ -27,7 +35,7 @@ + or{' '} + to play. + {/if} +