mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
chore(core): add event tracking for attachments (#9198)
Part of: [AF-1678](https://linear.app/affine-design/issue/AF-1678/添加埋点)
This commit is contained in:
@@ -116,6 +116,15 @@ type PaymentEvents =
|
||||
| 'confirmResumingSubscription';
|
||||
// END SECTION
|
||||
|
||||
// SECTION: attachment
|
||||
type AttachmentEvents =
|
||||
| 'openAttachmentInFullscreen'
|
||||
| 'openAttachmentInNewTab'
|
||||
| 'openAttachmentInPeekView'
|
||||
| 'openAttachmentInSplitView'
|
||||
| 'openPDFRendererFail';
|
||||
// END SECTION
|
||||
|
||||
type UserEvents =
|
||||
| GeneralEvents
|
||||
| AppEvents
|
||||
@@ -130,7 +139,8 @@ type UserEvents =
|
||||
| AuthEvents
|
||||
| AccountEvents
|
||||
| PaymentEvents
|
||||
| DNDEvents;
|
||||
| DNDEvents
|
||||
| AttachmentEvents;
|
||||
interface PageDivision {
|
||||
[page: string]: {
|
||||
[segment: string]: {
|
||||
@@ -284,6 +294,15 @@ const PageEvents = {
|
||||
importModal: ['open'],
|
||||
snapshot: ['import', 'export'],
|
||||
},
|
||||
attachment: {
|
||||
$: [
|
||||
'openAttachmentInFullscreen',
|
||||
'openAttachmentInNewTab',
|
||||
'openAttachmentInPeekView',
|
||||
'openAttachmentInSplitView',
|
||||
'openPDFRendererFail',
|
||||
],
|
||||
},
|
||||
},
|
||||
doc: {
|
||||
editor: {
|
||||
@@ -353,6 +372,10 @@ type PaymentEventArgs = {
|
||||
recurring: string;
|
||||
};
|
||||
|
||||
type AttachmentEventArgs = {
|
||||
type: string; // file type
|
||||
};
|
||||
|
||||
type TabActionControlType =
|
||||
| 'click'
|
||||
| 'dnd'
|
||||
@@ -435,6 +458,10 @@ export type EventArgs = {
|
||||
linkDoc: { type: string; journal: boolean };
|
||||
drop: { type: string };
|
||||
dragStart: { type: string };
|
||||
openAttachmentInFullscreen: AttachmentEventArgs;
|
||||
openAttachmentInNewTab: AttachmentEventArgs;
|
||||
openAttachmentInPeekView: AttachmentEventArgs;
|
||||
openAttachmentInSplitView: AttachmentEventArgs;
|
||||
};
|
||||
|
||||
// for type checking
|
||||
|
||||
Reference in New Issue
Block a user