diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-08 08:43:56 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-08 08:43:56 +0900 |
| commit | 3d206d2a0fba14490b9c1e01a8bc1f1a1ecdcf40 (patch) | |
| tree | 74ea1aeeee48cf251f70f4aec435c6b91df5862b /packages/frontend/src/components/global | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | sharkey-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.vue | 5 |
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; } |