feat(analytics): Google Analytics・同意モード・一部機能のトラッキング実装 (MisskeyIO#784)
This commit is contained in:
parent
2f4c48bbe6
commit
fcfd004c38
53 changed files with 805 additions and 113 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { ShallowRef } from 'vue';
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import { IRouter, Resolved, RouteDef, RouterEvent } from '@/nirax.js';
|
||||
import { AfterNavigationHook, IRouter, Resolved, RouteDef, RouterEvent } from '@/nirax.js';
|
||||
|
||||
function getMainRouter(): IRouter {
|
||||
const router = mainRouterHolder;
|
||||
|
@ -40,6 +40,10 @@ class MainRouterProxy implements IRouter {
|
|||
this.supplier = supplier;
|
||||
}
|
||||
|
||||
get options(): { [key: string]: any } {
|
||||
return {};
|
||||
}
|
||||
|
||||
get current(): Resolved {
|
||||
return this.supplier().current;
|
||||
}
|
||||
|
@ -60,6 +64,10 @@ class MainRouterProxy implements IRouter {
|
|||
this.supplier().navHook = value;
|
||||
}
|
||||
|
||||
isReady(): Promise<boolean> {
|
||||
return this.supplier().isReady();
|
||||
}
|
||||
|
||||
getCurrentKey(): string {
|
||||
return this.supplier().getCurrentKey();
|
||||
}
|
||||
|
@ -68,6 +76,10 @@ class MainRouterProxy implements IRouter {
|
|||
return this.supplier().getCurrentPath();
|
||||
}
|
||||
|
||||
afterEach(hook: AfterNavigationHook): AfterNavigationHook | undefined {
|
||||
return this.supplier().afterEach(hook);
|
||||
}
|
||||
|
||||
push(path: string, flag?: any): void {
|
||||
this.supplier().push(path, flag);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue