diff --git a/AquaNet/src/App.svelte b/AquaNet/src/App.svelte index 2bc7afa1..f0f2599c 100644 --- a/AquaNet/src/App.svelte +++ b/AquaNet/src/App.svelte @@ -7,6 +7,8 @@ import Home from "./pages/Home.svelte"; import Ranking from "./pages/Ranking.svelte"; import { USER } from "./libs/sdk"; + import type { UserMe } from "./libs/generalTypes"; + import { DEFAULT_PFP, IMG_HOST } from "./libs/config"; console.log(`%c ┏━┓ ┳━┓━┓┏━ @@ -20,6 +22,9 @@ -webkit-text-fill-color: transparent;`) export let url = ""; + let me: UserMe + + if (USER.isLoggedIn()) USER.me().then(m => me = m).catch(e => console.error(e)) let path = window.location.pathname; @@ -34,7 +39,11 @@ home
maps
rankings -
+ {#if me} + + profile + + {/if} @@ -61,6 +70,16 @@ z-index: 10 position: relative + img + width: 1.5rem + height: 1.5rem + border-radius: 50% + object-fit: cover + + .pfp + width: 2rem + height: 2rem + .logo display: flex align-items: center @@ -70,11 +89,6 @@ letter-spacing: 0.2em flex: 1 - img - width: 1.5rem - height: 1.5rem - border-radius: 50% - @media (max-width: $w-mobile) > span display: none @@ -82,4 +96,4 @@ @media (max-width: $w-mobile) justify-content: center - \ No newline at end of file +