From 1418d7e7d2fc1db0c9497f816a4cd4813206422e Mon Sep 17 00:00:00 2001 From: Spectralitree <72747870+Spectralitree@users.noreply.github.com> Date: Sat, 11 Dec 2021 15:56:47 +0100 Subject: [PATCH] feat: add beginnings of settings page --- src/App.svelte | 4 +++ src/pages/Dash.svelte | 5 +++- src/pages/Settings.svelte | 52 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/pages/Settings.svelte diff --git a/src/App.svelte b/src/App.svelte index a9ebca60..1e4faf6f 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -3,6 +3,7 @@ import Navigation from "./lib/Navigation.svelte"; import Dash from "./pages/Dash.svelte"; import Home from "./pages/Home.svelte"; + import Settings from './pages/Settings.svelte'; // theme cdns (I might make some myself too) let light = "https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css"; @@ -44,5 +45,8 @@ + + + \ No newline at end of file diff --git a/src/pages/Dash.svelte b/src/pages/Dash.svelte index ddd55463..cb4568c7 100644 --- a/src/pages/Dash.svelte +++ b/src/pages/Dash.svelte @@ -30,6 +30,8 @@ navigate("/"); } + let settings = JSON.parse(localStorage.getItem("pk-settings")); + async function login(token: string) { const api = new PKAPI(); try { @@ -53,7 +55,8 @@ -{#if user && user.banner} + +{#if user && user.banner && settings && settings.appearance.banner_top}