diff --git a/plugins/workbench-resources/src/components/navigator/SpacesNav.svelte b/plugins/workbench-resources/src/components/navigator/SpacesNav.svelte index 893816ce55..74929a37f7 100644 --- a/plugins/workbench-resources/src/components/navigator/SpacesNav.svelte +++ b/plugins/workbench-resources/src/components/navigator/SpacesNav.svelte @@ -18,6 +18,7 @@ import type { Asset, IntlString } from '@anticrm/platform' import type { Ref, Space, Doc } from '@anticrm/core' + import core from '@anticrm/core' import type { SpacesNavModel } from '@anticrm/workbench' import { Action, navigate, getCurrentLocation, location, IconAdd, IconMoreH, IconEdit } from '@anticrm/ui' @@ -65,7 +66,8 @@ } } - function selectSpace(id: Ref) { + + function selectSpace (id: Ref) { const loc = getCurrentLocation() loc.path[2] = id loc.path.length = 3 @@ -75,12 +77,20 @@ onDestroy(location.subscribe(async (loc) => { selected = loc.path[2] as Ref })) + + function getActions (space: Space): Action[] { + const result = [editSpace] + if (client.getHierarchy().isDerived(space._class, core.class.SpaceWithStates)) { + result.push(editStatuses) + } + return result + }
{#each spaces as space} - { selectSpace(space._id) }}/> + { selectSpace(space._id) }}/> {/each}