mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat(core): track for notifications (#11298)
This commit is contained in:
@@ -145,6 +145,10 @@ type AttachmentEvents =
|
||||
type TemplateEvents = 'openTemplateListMenu';
|
||||
// END SECTION
|
||||
|
||||
// SECTION: notification
|
||||
type NotificationEvents = 'openInbox' | 'clickNotification';
|
||||
// END SECTION
|
||||
|
||||
type UserEvents =
|
||||
| GeneralEvents
|
||||
| AppEvents
|
||||
@@ -162,7 +166,9 @@ type UserEvents =
|
||||
| PaymentEvents
|
||||
| DNDEvents
|
||||
| AttachmentEvents
|
||||
| TemplateEvents;
|
||||
| TemplateEvents
|
||||
| NotificationEvents;
|
||||
|
||||
interface PageDivision {
|
||||
[page: string]: {
|
||||
[segment: string]: {
|
||||
@@ -346,6 +352,7 @@ const PageEvents = {
|
||||
sidebar: {
|
||||
newDoc: ['quickStart'],
|
||||
template: ['openTemplateListMenu', 'quickStart'],
|
||||
notifications: ['openInbox', 'clickNotification'],
|
||||
},
|
||||
splitViewIndicator: {
|
||||
$: ['splitViewAction', 'openInSplitView', 'openInPeekView'],
|
||||
@@ -543,6 +550,12 @@ export type EventArgs = {
|
||||
inviteUserDocRole: {
|
||||
control: 'member list';
|
||||
};
|
||||
openInbox: { unreadCount: number };
|
||||
clickNotification: {
|
||||
type: string;
|
||||
item: 'read' | 'button' | 'dismiss';
|
||||
button?: string;
|
||||
};
|
||||
};
|
||||
|
||||
// for type checking
|
||||
|
||||
Reference in New Issue
Block a user