mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-03 08:18:52 +02:00
Add workbench tabs (#6788)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -30,6 +30,15 @@ import { ViewAction } from '@hcengineering/view'
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
|
||||
export interface LocationData {
|
||||
name?: string
|
||||
nameIntl?: IntlString
|
||||
icon?: Asset
|
||||
iconComponent?: AnyComponent
|
||||
iconProps?: Record<string, any>
|
||||
}
|
||||
|
||||
export interface Application extends Doc {
|
||||
label: IntlString
|
||||
alias: string
|
||||
@@ -42,6 +51,7 @@ export interface Application extends Doc {
|
||||
aside?: AnyComponent
|
||||
|
||||
locationResolver?: Resource<(loc: Location) => Promise<ResolvedLocation | undefined>>
|
||||
locationDataResolver?: Resource<(loc: Location) => Promise<LocationData>>
|
||||
|
||||
// Component will be displayed in case navigator model is not defined, or nothing is selected in navigator model
|
||||
component?: AnyComponent
|
||||
@@ -102,6 +112,11 @@ export interface TxSidebarEvent<T extends Record<string, any> = Record<string, a
|
||||
params: T
|
||||
}
|
||||
|
||||
export interface WorkbenchTab extends Preference {
|
||||
location: string
|
||||
isPinned: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@@ -201,7 +216,8 @@ export default plugin(workbenchId, {
|
||||
HiddenApplication: '' as Ref<Class<HiddenApplication>>,
|
||||
Widget: '' as Ref<Class<Widget>>,
|
||||
WidgetPreference: '' as Ref<Class<WidgetPreference>>,
|
||||
TxSidebarEvent: '' as Ref<Class<TxSidebarEvent<Record<string, any>>>>
|
||||
TxSidebarEvent: '' as Ref<Class<TxSidebarEvent<Record<string, any>>>>,
|
||||
WorkbenchTab: '' as Ref<Class<WorkbenchTab>>
|
||||
},
|
||||
mixin: {
|
||||
SpaceView: '' as Ref<Mixin<SpaceView>>
|
||||
@@ -238,7 +254,8 @@ export default plugin(workbenchId, {
|
||||
NavigationExpandedDefault: '' as Metadata<boolean>
|
||||
},
|
||||
extensions: {
|
||||
WorkbenchExtensions: '' as ComponentExtensionId
|
||||
WorkbenchExtensions: '' as ComponentExtensionId,
|
||||
WorkbenchTabExtensions: '' as ComponentExtensionId
|
||||
},
|
||||
actionImpl: {
|
||||
Navigate: '' as ViewAction<{
|
||||
|
||||
Reference in New Issue
Block a user