From 75fefa315e4958c33a1bc6acca07db6383689cdc Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Fri, 3 Nov 2023 08:21:58 +0000 Subject: [PATCH 1/2] fix: Open last opened workspace if no workspace id is present in url on first load --- packages/nc-gui/composables/useGlobal/state.ts | 1 + packages/nc-gui/composables/useGlobal/types.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/nc-gui/composables/useGlobal/state.ts b/packages/nc-gui/composables/useGlobal/state.ts index eaaf413932..92827b5fc3 100644 --- a/packages/nc-gui/composables/useGlobal/state.ts +++ b/packages/nc-gui/composables/useGlobal/state.ts @@ -67,6 +67,7 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State { latestRelease: null, hiddenRelease: null, isMobileMode: null, + lastUsedWorkspaceId: null, } /** saves a reactive state, any change to these values will write/delete to localStorage */ diff --git a/packages/nc-gui/composables/useGlobal/types.ts b/packages/nc-gui/composables/useGlobal/types.ts index 8549fd2e01..7cd5747345 100644 --- a/packages/nc-gui/composables/useGlobal/types.ts +++ b/packages/nc-gui/composables/useGlobal/types.ts @@ -44,6 +44,7 @@ export interface StoredState { latestRelease: string | null hiddenRelease: string | null isMobileMode: boolean | null + lastUsedWorkspaceId: string | null } export type State = ToRefs> & { From 2b5adf619baebe7f8d5f06d2be4b436615e7b285 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Fri, 3 Nov 2023 08:21:59 +0000 Subject: [PATCH 2/2] fix: Open last opened workspace if no workspace id is present in url on first load --- packages/nc-gui/composables/useGlobal/state.ts | 2 +- packages/nc-gui/composables/useGlobal/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/composables/useGlobal/state.ts b/packages/nc-gui/composables/useGlobal/state.ts index 92827b5fc3..4fab0a5c72 100644 --- a/packages/nc-gui/composables/useGlobal/state.ts +++ b/packages/nc-gui/composables/useGlobal/state.ts @@ -67,7 +67,7 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State { latestRelease: null, hiddenRelease: null, isMobileMode: null, - lastUsedWorkspaceId: null, + lastOpenedWorkspaceId: null, } /** saves a reactive state, any change to these values will write/delete to localStorage */ diff --git a/packages/nc-gui/composables/useGlobal/types.ts b/packages/nc-gui/composables/useGlobal/types.ts index 7cd5747345..4a4f9caeb1 100644 --- a/packages/nc-gui/composables/useGlobal/types.ts +++ b/packages/nc-gui/composables/useGlobal/types.ts @@ -44,7 +44,7 @@ export interface StoredState { latestRelease: string | null hiddenRelease: string | null isMobileMode: boolean | null - lastUsedWorkspaceId: string | null + lastOpenedWorkspaceId: string | null } export type State = ToRefs> & {