mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
feat(core): track web-clipper import (#12599)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added tracking for document creation when importing with the clipper tool. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
WorkspacesService,
|
||||
} from '@affine/core/modules/workspace';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import track from '@affine/track';
|
||||
import { AllDocsIcon } from '@blocksuite/icons/rc';
|
||||
import { LiveData, useLiveData, useService } from '@toeverything/infra';
|
||||
import { cssVar } from '@toeverything/theme';
|
||||
@@ -98,6 +99,7 @@ export const Component = () => {
|
||||
const handleSuccess = useCallback(() => {
|
||||
const arg = { type: 'affine-clipper:import:success' };
|
||||
const port = port$.value;
|
||||
track.clipper.$.$.createDoc();
|
||||
if (port) {
|
||||
port.postMessage(arg);
|
||||
} else {
|
||||
|
||||
@@ -544,6 +544,11 @@ interface PageEvents extends PageDivision {
|
||||
];
|
||||
};
|
||||
};
|
||||
clipper: {
|
||||
$: {
|
||||
$: ['createDoc'];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
type OrganizeItemType = 'doc' | 'folder' | 'collection' | 'tag' | 'favorite';
|
||||
|
||||
Reference in New Issue
Block a user