mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 14:05:05 +02:00
Add workbench tabs (#6788)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -23,7 +23,9 @@ import WorkbenchApp from './components/WorkbenchApp.svelte'
|
||||
import { doNavigate } from './utils'
|
||||
import Workbench from './components/Workbench.svelte'
|
||||
import ServerManager from './components/ServerManager.svelte'
|
||||
import WorkbenchTabs from './components/WorkbenchTabs.svelte'
|
||||
import { isAdminUser } from '@hcengineering/presentation'
|
||||
import { canCloseTab, closeTab, pinTab, unpinTab } from './workbench'
|
||||
|
||||
async function hasArchiveSpaces (spaces: Space[]): Promise<boolean> {
|
||||
return spaces.find((sp) => sp.archived) !== undefined
|
||||
@@ -46,13 +48,18 @@ export default async (): Promise<Resources> => ({
|
||||
SpacePanel,
|
||||
SpecialView,
|
||||
Workbench,
|
||||
ServerManager
|
||||
ServerManager,
|
||||
WorkbenchTabs
|
||||
},
|
||||
function: {
|
||||
HasArchiveSpaces: hasArchiveSpaces,
|
||||
IsOwner: async (docs: Space[]) => getCurrentAccount().role === AccountRole.Owner || isAdminUser()
|
||||
IsOwner: async (docs: Space[]) => getCurrentAccount().role === AccountRole.Owner || isAdminUser(),
|
||||
CanCloseTab: canCloseTab
|
||||
},
|
||||
actionImpl: {
|
||||
Navigate: doNavigate
|
||||
Navigate: doNavigate,
|
||||
PinTab: pinTab,
|
||||
UnpinTab: unpinTab,
|
||||
CloseTab: closeTab
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user