refactor(frontend): use Symbol for vue provide/inject
This commit is contained in:
parent
9998cb84e8
commit
9e91f85370
10 changed files with 39 additions and 18 deletions
|
|
@ -116,6 +116,7 @@ import { useScrollPositionManager } from '@/nirax.js';
|
|||
import { mainRouter } from '@/router/main.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
import { shouldSuggestRestoreBackup } from '@/preferences/utility.js';
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
const XWidgets = defineAsyncComponent(() => import('./universal.widgets.vue'));
|
||||
const XSidebar = defineAsyncComponent(() => import('@/ui/_common_/navbar.vue'));
|
||||
|
|
@ -140,7 +141,7 @@ const widgetsShowing = ref(false);
|
|||
const navFooter = shallowRef<HTMLElement>();
|
||||
const contents = shallowRef<InstanceType<typeof MkStickyContainer>>();
|
||||
|
||||
provide('router', mainRouter);
|
||||
provide(DI.router, mainRouter);
|
||||
provideMetadataReceiver((metadataGetter) => {
|
||||
const info = metadataGetter();
|
||||
pageMetadata.value = info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue