From d3f17f867fc362f26c6961155313c1f20a8014a8 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sun, 7 Feb 2021 12:35:55 +0100 Subject: [PATCH] add recalling of last project when navigating out from and into quest log. --- svelte-ui/src/components/Menu.svelte | 20 ++++++-------------- svelte-ui/src/components/ParentEntry.svelte | 5 ++++- svelte-ui/src/components/ProjectEntry.svelte | 4 +++- svelte-ui/src/components/QLListItem.svelte | 1 - svelte-ui/src/components/QuestLog.svelte | 19 ++++++++++++++++++- svelte-ui/src/stores/selection.ts | 4 ++++ 6 files changed, 35 insertions(+), 18 deletions(-) diff --git a/svelte-ui/src/components/Menu.svelte b/svelte-ui/src/components/Menu.svelte index fc983dd..296d4a1 100644 --- a/svelte-ui/src/components/Menu.svelte +++ b/svelte-ui/src/components/Menu.svelte @@ -2,14 +2,6 @@ import { link } from "svelte-routing"; import selectionStore from "../stores/selection"; - export let location: string = window.location.pathname.split("?")[0]; - - function updateLocation() { - setTimeout(() => { - location = window.location.pathname.split("?")[0]; - }, 0); - } - $: selected = { home: $selectionStore.path === "/", goals: $selectionStore.path.startsWith("/goals"), @@ -21,12 +13,12 @@