feat(analytics): Google Analytics・同意モード・一部機能のトラッキング実装 (MisskeyIO#784)

This commit is contained in:
あわわわとーにゅ 2024-11-06 01:28:14 +09:00 committed by GitHub
parent 2f4c48bbe6
commit fcfd004c38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 805 additions and 113 deletions

View file

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