diff --git a/plugins/login-resources/src/utils.ts b/plugins/login-resources/src/utils.ts index b4ce288d0a..7c32e569d2 100644 --- a/plugins/login-resources/src/utils.ts +++ b/plugins/login-resources/src/utils.ts @@ -277,7 +277,6 @@ export async function selectWorkspace (workspace: string): Promise<[Status, Work } export function setLoginInfo (loginInfo: WorkspaceLoginInfo): void { - setMetadata(login.metadata.LoginToken, loginInfo.token) const tokens: Record = fetchMetadataLocalStorage(login.metadata.LoginTokens) ?? {} tokens[loginInfo.workspace] = loginInfo.token @@ -290,6 +289,7 @@ export function navigateToWorkspace (workspace: string, loginInfo?: WorkspaceLog if (loginInfo == null) { return } + setMetadata(login.metadata.LoginToken, loginInfo.token) setLoginInfo(loginInfo) if (navigateUrl !== undefined) { diff --git a/plugins/workbench-resources/src/components/SelectWorkspaceMenu.svelte b/plugins/workbench-resources/src/components/SelectWorkspaceMenu.svelte index e24106ca10..cee1484f53 100644 --- a/plugins/workbench-resources/src/components/SelectWorkspaceMenu.svelte +++ b/plugins/workbench-resources/src/components/SelectWorkspaceMenu.svelte @@ -14,33 +14,16 @@ --> - +{#if workspaces.length} + +{:else} + +{/if}