1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-28 08:54:42 +02:00
This commit is contained in:
syuilo
2025-04-08 08:28:17 +09:00
parent 547d6361b7
commit 3374a587a1
5 changed files with 10 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ import {
useTemplateRef,
inject,
} from 'vue';
import type { Ref } from 'vue';
import { DI } from '@/di.js';
const props = defineProps<{
markerId?: string;
@@ -36,7 +36,7 @@ const rootEl = useTemplateRef('root');
const rootElMutationObserver = new MutationObserver(() => {
checkChildren();
});
const injectedSearchMarkerId = inject<Ref<string | null> | null>('inAppSearchMarkerId', null);
const injectedSearchMarkerId = inject(DI.inAppSearchMarkerId, null);
const searchMarkerId = computed(() => injectedSearchMarkerId?.value ?? window.location.hash.slice(1));
const highlighted = ref(props.markerId === searchMarkerId.value);