From d95530c5958e2ab17c608300874f64984b599443 Mon Sep 17 00:00:00 2001 From: ditatompel Date: Wed, 8 May 2024 20:27:06 +0700 Subject: [PATCH] Remove dashboard page --- .../lib/components/navigation/AdminNav.svelte | 19 +++---------------- .../src/lib/components/navigation/navs.js | 1 - .../(loggedin)/app/dashboard/+page.svelte | 3 --- frontend/src/routes/login/+page.svelte | 2 +- 4 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 frontend/src/routes/(loggedin)/app/dashboard/+page.svelte diff --git a/frontend/src/lib/components/navigation/AdminNav.svelte b/frontend/src/lib/components/navigation/AdminNav.svelte index 40145e1..e4bedc4 100644 --- a/frontend/src/lib/components/navigation/AdminNav.svelte +++ b/frontend/src/lib/components/navigation/AdminNav.svelte @@ -4,18 +4,7 @@ import { apiUri } from '$lib/utils/common'; const drawerStore = getDrawerStore(); - function drawerOpen() { - drawerStore.open({}); - } - - /** - * @typedef formResult - * @type {object} - * @property {string} status - * @property {string} message - * @property {null | object} data - */ - /** @type {formResult} */ + /** @type {ApiResponse} */ let formResult; /** @param {{ currentTarget: EventTarget & HTMLFormElement}} event */ @@ -34,7 +23,6 @@ formResult = await response.json(); if (formResult.status === 'ok') { - // rerun all `load` functions, following the successful update await invalidateAll(); goto('/login/'); } @@ -48,7 +36,7 @@ - - + diff --git a/frontend/src/lib/components/navigation/navs.js b/frontend/src/lib/components/navigation/navs.js index 1d21099..ee5c840 100644 --- a/frontend/src/lib/components/navigation/navs.js +++ b/frontend/src/lib/components/navigation/navs.js @@ -1,5 +1,4 @@ export const adminNavs = [ - { name: 'Dashboard', path: '/app/dashboard/' }, { name: 'Prober', path: '/app/prober/' }, { name: 'Crons', path: '/app/crons/' } ]; diff --git a/frontend/src/routes/(loggedin)/app/dashboard/+page.svelte b/frontend/src/routes/(loggedin)/app/dashboard/+page.svelte deleted file mode 100644 index d711cf4..0000000 --- a/frontend/src/routes/(loggedin)/app/dashboard/+page.svelte +++ /dev/null @@ -1,3 +0,0 @@ -
-

Dashboard

-
diff --git a/frontend/src/routes/login/+page.svelte b/frontend/src/routes/login/+page.svelte index 6634a28..e37c4f8 100644 --- a/frontend/src/routes/login/+page.svelte +++ b/frontend/src/routes/login/+page.svelte @@ -35,7 +35,7 @@ if (formResult.status === 'ok') { // rerun all `load` functions, following the successful update await invalidateAll(); - goto('/app/dashboard/'); + goto('/app/prober/'); } }