This commit is contained in:
syuilo 2025-02-16 20:54:16 +09:00
parent 83fc29f138
commit c88c18fdf4
2 changed files with 30 additions and 10 deletions

View File

@ -14,9 +14,11 @@ import { onMounted, onUnmounted, ref, shallowRef } from 'vue';
const props = defineProps<{ const props = defineProps<{
markerId: string; markerId: string;
children?: string[];
}>(); }>();
const highlighted = window.location.hash.slice(1) === props.markerId; const hash = window.location.hash.slice(1);
const highlighted = hash === props.markerId || (props.children && props.children.includes(hash));
</script> </script>
<style lang="scss" module> <style lang="scss" module>

View File

@ -5,16 +5,33 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<div class="_gaps_m"> <div class="_gaps_m">
<MkFolder> <MkSearchMarker
<template #icon><i class="ti ti-message-off"></i></template> markerId="test"
<template #label>{{ i18n.ts.wordMute }}</template> :locationLabel="[i18n.ts.muteAndBlock]"
icon="ti ti-ban"
:keywords="['mute', i18n.ts.wordMute]"
:children="['test2']"
>
<MkFolder>
<template #icon><i class="ti ti-message-off"></i></template>
<template #label>{{ i18n.ts.wordMute }}</template>
<div class="_gaps_m"> <div class="_gaps_m">
<MkInfo>{{ i18n.ts.wordMuteDescription }}</MkInfo> <MkInfo>{{ i18n.ts.wordMuteDescription }}</MkInfo>
<MkSwitch v-model="showSoftWordMutedWord">{{ i18n.ts.showMutedWord }}</MkSwitch>
<XWordMute :muted="$i.mutedWords" @save="saveMutedWords"/> <MkSearchMarker
</div> markerId="test2"
</MkFolder> :locationLabel="[i18n.ts.muteAndBlock, i18n.ts.wordMute]"
icon="ti ti-ban"
:keywords="['showMutedWord', i18n.ts.showMutedWord]"
>
<MkSwitch v-model="showSoftWordMutedWord">{{ i18n.ts.showMutedWord }}</MkSwitch>
</MkSearchMarker>
<XWordMute :muted="$i.mutedWords" @save="saveMutedWords"/>
</div>
</MkFolder>
</MkSearchMarker>
<MkFolder> <MkFolder>
<template #icon><i class="ti ti-message-off"></i></template> <template #icon><i class="ti ti-message-off"></i></template>
@ -149,6 +166,7 @@ import MkFolder from '@/components/MkFolder.vue';
import MkSwitch from '@/components/MkSwitch.vue'; import MkSwitch from '@/components/MkSwitch.vue';
import { defaultStore } from '@/store'; import { defaultStore } from '@/store';
import { reloadAsk } from '@/scripts/reload-ask.js'; import { reloadAsk } from '@/scripts/reload-ask.js';
import MkSearchMarker from '@/components/MkSearchMarker.vue';
const $i = signinRequired(); const $i = signinRequired();