Add workbench tabs (#6788)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-10-03 01:49:49 +07:00
committed by GitHub
parent ce2621d472
commit b5fed4879f
36 changed files with 794 additions and 69 deletions
+12 -2
View File
@@ -13,11 +13,12 @@
// limitations under the License.
//
import { type Doc, type Space } from '@hcengineering/core'
import { type Doc, type Ref, type Space } from '@hcengineering/core'
import { type IntlString, type Resource, mergeIds } from '@hcengineering/platform'
import { type AnyComponent } from '@hcengineering/ui/src/types'
import { workbenchId } from '@hcengineering/workbench'
import workbench from '@hcengineering/workbench-resources/src/plugin'
import type { ActionCategory, ViewActionAvailabilityFunction } from '@hcengineering/view'
export default mergeIds(workbenchId, workbench, {
component: {
@@ -30,6 +31,15 @@ export default mergeIds(workbenchId, workbench, {
},
function: {
HasArchiveSpaces: '' as Resource<(spaces: Space[]) => Promise<boolean>>,
IsOwner: '' as Resource<(docs: Doc[]) => Promise<boolean>>
IsOwner: '' as Resource<(docs: Doc[]) => Promise<boolean>>,
CanCloseTab: '' as Resource<ViewActionAvailabilityFunction<Doc>>
},
category: {
Workbench: '' as Ref<ActionCategory>
},
actionImpl: {
PinTab: '' as Resource<(doc?: Doc | Doc[]) => Promise<void>>,
UnpinTab: '' as Resource<(doc?: Doc | Doc[]) => Promise<void>>,
CloseTab: '' as Resource<(doc?: Doc | Doc[]) => Promise<void>>
}
})