summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/global
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-04-08 08:43:56 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-04-08 08:43:56 +0900
commit3d206d2a0fba14490b9c1e01a8bc1f1a1ecdcf40 (patch)
tree74ea1aeeee48cf251f70f4aec435c6b91df5862b /packages/frontend/src/components/global
parentMerge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff)
downloadsharkey-3d206d2a0fba14490b9c1e01a8bc1f1a1ecdcf40.tar.gz
sharkey-3d206d2a0fba14490b9c1e01a8bc1f1a1ecdcf40.tar.bz2
sharkey-3d206d2a0fba14490b9c1e01a8bc1f1a1ecdcf40.zip
enhance(frontend): 設定検索時に対象が含まれるMkFolderを自動で開いておくように
Diffstat (limited to 'packages/frontend/src/components/global')
-rw-r--r--packages/frontend/src/components/global/SearchMarker.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/frontend/src/components/global/SearchMarker.vue b/packages/frontend/src/components/global/SearchMarker.vue
index 1cffbe28b0..ded1f9a28b 100644
--- a/packages/frontend/src/components/global/SearchMarker.vue
+++ b/packages/frontend/src/components/global/SearchMarker.vue
@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<div ref="root" :class="[$style.root, { [$style.highlighted]: highlighted }]">
- <slot></slot>
+ <slot :isParentOfTarget="isParentOfTarget"></slot>
</div>
</template>
@@ -39,9 +39,10 @@ const rootElMutationObserver = new MutationObserver(() => {
const injectedSearchMarkerId = inject(DI.inAppSearchMarkerId, null);
const searchMarkerId = computed(() => injectedSearchMarkerId?.value ?? window.location.hash.slice(1));
const highlighted = ref(props.markerId === searchMarkerId.value);
+const isParentOfTarget = computed(() => props.children?.includes(searchMarkerId.value));
function checkChildren() {
- if (props.children?.includes(searchMarkerId.value)) {
+ if (isParentOfTarget.value) {
const el = window.document.querySelector(`[data-in-app-search-marker-id="${searchMarkerId.value}"]`);
highlighted.value = el == null;
}