diff --git a/dashboard/src/pages/Dash.svelte b/dashboard/src/pages/Dash.svelte index cbf09b83..ca3208d7 100644 --- a/dashboard/src/pages/Dash.svelte +++ b/dashboard/src/pages/Dash.svelte @@ -12,7 +12,7 @@ // get the state from the navigator so that we know which tab to start on let location = useLocation(); let params = $location.search && new URLSearchParams($location.search); - let tabPane: string; + let tabPane: string|number; if (params) { tabPane = params.get("tab"); } @@ -21,6 +21,14 @@ tabPane = "system"; } + + + // change the URL when changing tabs + function navigateTo(tab: string|number) { + navigate(`./dash?tab=${tab}`); + tabPane = tab; + } + // subscribe to the cached user in the store let current; currentUser.subscribe(value => { @@ -77,7 +85,7 @@

Viewing your own system

- + navigateTo(e.detail)}> diff --git a/dashboard/src/pages/Profile.svelte b/dashboard/src/pages/Profile.svelte index 986a1427..dad974eb 100644 --- a/dashboard/src/pages/Profile.svelte +++ b/dashboard/src/pages/Profile.svelte @@ -1,6 +1,6 @@