mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat(core): add globalcontext info to mixpanel track (#7681)
This commit is contained in:
@@ -8,19 +8,36 @@ export class GlobalContext extends Entity {
|
||||
|
||||
workspaceId = this.define<string>('workspaceId');
|
||||
|
||||
/**
|
||||
* is in doc page
|
||||
*/
|
||||
isDoc = this.define<boolean>('isDoc');
|
||||
isTrashDoc = this.define<boolean>('isTrashDoc');
|
||||
docId = this.define<string>('docId');
|
||||
docMode = this.define<DocMode>('docMode');
|
||||
|
||||
/**
|
||||
* is in collection page
|
||||
*/
|
||||
isCollection = this.define<boolean>('isCollection');
|
||||
collectionId = this.define<string>('collectionId');
|
||||
|
||||
/**
|
||||
* is in trash page
|
||||
*/
|
||||
isTrash = this.define<boolean>('isTrash');
|
||||
|
||||
docMode = this.define<DocMode>('docMode');
|
||||
|
||||
/**
|
||||
* is in tag page
|
||||
*/
|
||||
isTag = this.define<boolean>('isTag');
|
||||
tagId = this.define<string>('tagId');
|
||||
|
||||
/**
|
||||
* is in all docs page
|
||||
*/
|
||||
isAllDocs = this.define<boolean>('isAllDocs');
|
||||
|
||||
define<T>(key: string) {
|
||||
this.memento.set(key, null);
|
||||
const livedata$ = LiveData.from(this.memento.watch<T>(key), null);
|
||||
|
||||
Reference in New Issue
Block a user