feat(core): add globalcontext info to mixpanel track (#7681)

This commit is contained in:
EYHN
2024-08-01 09:29:31 +00:00
parent bb767a6cdc
commit 553fbed60f
10 changed files with 126 additions and 74 deletions

View File

@@ -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);