From e63d50130b43ac49efaf4301777a4f9d4365d337 Mon Sep 17 00:00:00 2001 From: Kristina Date: Sat, 12 Oct 2024 21:33:54 +0400 Subject: [PATCH] Fix tabs nav (#6898) Signed-off-by: Kristina Fefelova --- .../view-resources/src/components/navigator/NavLink.svelte | 2 +- plugins/workbench-resources/src/components/Workbench.svelte | 4 ++-- plugins/workbench-resources/src/workbench.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/view-resources/src/components/navigator/NavLink.svelte b/plugins/view-resources/src/components/navigator/NavLink.svelte index b1bce747a3..62f047a630 100644 --- a/plugins/view-resources/src/components/navigator/NavLink.svelte +++ b/plugins/view-resources/src/components/navigator/NavLink.svelte @@ -38,7 +38,7 @@ if (last != null) { try { const newLocation: Location = JSON.parse(last) - if (newLocation.path[2] === app && newLocation.path[3] != null) { + if (newLocation.path[1] === loc.path[1] && newLocation.path[2] === app && newLocation.path[3] != null) { return newLocation } } catch (e) { diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index d528611a62..c5472ee237 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -175,7 +175,7 @@ const query = createQuery() $: query.query( workbench.class.WorkbenchTab, - {}, + { attachedTo: account._id }, (res) => { tabs = res tabsStore.set(tabs) @@ -788,7 +788,7 @@ /> - + { try { const last = localStorage.getItem(`${locationStorageKeyId}_${notificationId}`) const lastLocation: Location | undefined = last != null ? JSON.parse(last) : undefined - if (lastLocation != null && lastLocation.path[2] === notificationId) { + if (lastLocation != null && lastLocation.path[1] === loc.path[1] && lastLocation.path[2] === notificationId) { defaultUrl = locationToUrl(lastLocation) } } catch (e) {