mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
TSK-976: Hide preview action (#2847)
Signed-off-by: Denis Maslennikov <denis.maslennikov@gmail.com>
This commit is contained in:
parent
a95242f740
commit
b7f8fb68ba
@ -18,7 +18,6 @@ import { DOMAIN_MODEL } from '@hcengineering/core'
|
||||
import { Builder, Mixin, Model } from '@hcengineering/model'
|
||||
import core, { TClass, TDoc } from '@hcengineering/model-core'
|
||||
import preference, { TPreference } from '@hcengineering/model-preference'
|
||||
import presenation from '@hcengineering/model-presentation'
|
||||
import type { Asset, IntlString, Resource, Status } from '@hcengineering/platform'
|
||||
import { DOMAIN_PREFERENCE } from '@hcengineering/preference'
|
||||
import type { AnyComponent, Location } from '@hcengineering/ui'
|
||||
@ -744,22 +743,26 @@ export function createModel (builder: Builder): void {
|
||||
|
||||
classPresenter(builder, core.class.EnumOf, view.component.EnumPresenter, view.component.EnumEditor)
|
||||
|
||||
createAction(builder, {
|
||||
action: view.actionImpl.ShowPopup,
|
||||
actionProps: {
|
||||
component: view.component.IndexedDocumentPreview,
|
||||
fillProps: {
|
||||
_id: 'objectId'
|
||||
}
|
||||
},
|
||||
label: presenation.string.DocumentPreview,
|
||||
keyBinding: [''],
|
||||
input: 'focus',
|
||||
icon: view.icon.Open,
|
||||
category: view.category.GeneralNavigation,
|
||||
target: core.class.Doc,
|
||||
context: { mode: ['context', 'browser', 'editor'] }
|
||||
})
|
||||
// createAction(
|
||||
// builder,
|
||||
// {
|
||||
// action: view.actionImpl.ShowPopup,
|
||||
// actionProps: {
|
||||
// component: view.component.IndexedDocumentPreview,
|
||||
// fillProps: {
|
||||
// _id: 'objectId'
|
||||
// }
|
||||
// },
|
||||
// label: presenation.string.DocumentPreview,
|
||||
// keyBinding: [''],
|
||||
// input: 'focus',
|
||||
// icon: view.icon.Open,
|
||||
// category: view.category.GeneralNavigation,
|
||||
// target: core.class.Doc,
|
||||
// context: { mode: ['context', 'browser', 'editor'] }
|
||||
// },
|
||||
// view.action.Preview
|
||||
// )
|
||||
|
||||
createAction(
|
||||
builder,
|
||||
|
@ -35,6 +35,7 @@ export default mergeIds(viewId, view, {
|
||||
|
||||
ShowPreview: '' as ViewAction,
|
||||
ShowActions: '' as ViewAction,
|
||||
Preview: '' as ViewAction,
|
||||
|
||||
Open: '' as ViewAction
|
||||
},
|
||||
|
@ -54,7 +54,9 @@
|
||||
resActions = [...newActions, ...actions].sort(
|
||||
(a, b) => (order as any)[a.group ?? 'other'] - (order as any)[b.group ?? 'other']
|
||||
)
|
||||
loaded = true
|
||||
if (resActions.length > 0) {
|
||||
loaded = true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
@ -629,6 +629,7 @@ const view = plugin(viewId, {
|
||||
|
||||
ShowPreview: '' as Ref<Action>,
|
||||
ShowActions: '' as Ref<Action>,
|
||||
Preview: '' as Ref<Action>,
|
||||
|
||||
// Edit document
|
||||
Open: '' as Ref<Action>
|
||||
|
Loading…
Reference in New Issue
Block a user