mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 21:27:46 +02:00
Create global inbox actions (#4903)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -634,6 +634,67 @@ export function createModel (builder: Builder): void {
|
||||
},
|
||||
notification.ids.MentionCommonNotificationType
|
||||
)
|
||||
|
||||
createAction(
|
||||
builder,
|
||||
{
|
||||
action: notification.actionImpl.ArchiveAll,
|
||||
label: notification.string.ArchiveAll,
|
||||
icon: view.icon.Archive,
|
||||
keyBinding: [],
|
||||
input: 'none',
|
||||
category: notification.category.Notification,
|
||||
target: core.class.Doc,
|
||||
context: {
|
||||
mode: ['browser'],
|
||||
group: 'edit'
|
||||
}
|
||||
},
|
||||
notification.action.ArchiveAll
|
||||
)
|
||||
|
||||
createAction(
|
||||
builder,
|
||||
{
|
||||
action: notification.actionImpl.ReadAll,
|
||||
label: notification.string.MarkReadAll,
|
||||
icon: notification.icon.ReadAll,
|
||||
keyBinding: [],
|
||||
input: 'none',
|
||||
category: notification.category.Notification,
|
||||
target: core.class.Doc,
|
||||
context: {
|
||||
mode: ['browser'],
|
||||
group: 'edit'
|
||||
}
|
||||
},
|
||||
notification.action.ReadAll
|
||||
)
|
||||
|
||||
createAction(
|
||||
builder,
|
||||
{
|
||||
action: notification.actionImpl.UnreadAll,
|
||||
label: notification.string.MarkUnreadAll,
|
||||
icon: notification.icon.UnreadAll,
|
||||
keyBinding: [],
|
||||
input: 'none',
|
||||
category: notification.category.Notification,
|
||||
target: core.class.Doc,
|
||||
context: {
|
||||
mode: ['browser'],
|
||||
group: 'edit'
|
||||
}
|
||||
},
|
||||
notification.action.UnreadAll
|
||||
)
|
||||
|
||||
builder.createDoc(
|
||||
view.class.ActionCategory,
|
||||
core.space.Model,
|
||||
{ label: notification.string.Inbox, visible: true },
|
||||
notification.category.Notification
|
||||
)
|
||||
}
|
||||
|
||||
export function generateClassNotificationTypes (
|
||||
|
||||
@@ -64,7 +64,10 @@ export default mergeIds(notificationId, notification, {
|
||||
},
|
||||
groups: {},
|
||||
action: {
|
||||
Unsubscribe: '' as Ref<Action>
|
||||
Unsubscribe: '' as Ref<Action>,
|
||||
ArchiveAll: '' as Ref<Action>,
|
||||
ReadAll: '' as Ref<Action>,
|
||||
UnreadAll: '' as Ref<Action>
|
||||
},
|
||||
actionImpl: {
|
||||
Unsubscribe: '' as ViewAction,
|
||||
@@ -77,6 +80,9 @@ export default mergeIds(notificationId, notification, {
|
||||
UnHideDocNotifyContext: '' as ViewAction,
|
||||
UnReadNotifyContext: '' as ViewAction,
|
||||
ReadNotifyContext: '' as ViewAction,
|
||||
DeleteContextNotifications: '' as ViewAction
|
||||
DeleteContextNotifications: '' as ViewAction,
|
||||
ArchiveAll: '' as ViewAction,
|
||||
ReadAll: '' as ViewAction,
|
||||
UnreadAll: '' as ViewAction
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user