Fix workbench switcher (#2454)

Signed-off-by: Denis Maslennikov <denis.maslennikov@gmail.com>
This commit is contained in:
Denis Maslennikov
2022-12-21 13:04:22 +07:00
committed by GitHub
parent 9d3f3bd2a7
commit 8b6741bd21
2 changed files with 15 additions and 10 deletions
@@ -14,13 +14,26 @@
-->
<script lang="ts">
import login from '@hcengineering/login'
import { navigateToWorkspace, selectWorkspace, setLoginInfo, Workspace } from '@hcengineering/login-resources'
import {
getWorkspaces,
navigateToWorkspace,
selectWorkspace,
setLoginInfo,
Workspace
} from '@hcengineering/login-resources'
import { getEmbeddedLabel } from '@hcengineering/platform'
import { Loading, locationToUrl, Menu, navigate } from '@hcengineering/ui'
import { workbenchId } from '@hcengineering/workbench'
import { onMount } from 'svelte'
import workbench from '../plugin'
export let workspaces: Workspace[]
let workspaces: Workspace[] = []
onMount(() => {
getWorkspaces().then((ws: Workspace[]) => {
workspaces = ws
})
})
$: actions = [
...workspaces.map((w) => ({