enhance: チャットが無効な場合はチャット関連の設定も隠すように

This commit is contained in:
kakkokari-gtyih 2025-04-06 17:05:30 +09:00
parent 3b768a59dd
commit 50351a0c30
2 changed files with 24 additions and 14 deletions

View File

@ -379,7 +379,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkFolder> </MkFolder>
</SearchMarker> </SearchMarker>
<SearchMarker :keywords="['chat', 'messaging']"> <SearchMarker v-if="$i.policies.chatAvailability !== 'unavailable'" :keywords="['chat', 'messaging']">
<MkFolder> <MkFolder>
<template #label><SearchLabel>{{ i18n.ts.chat }}</SearchLabel></template> <template #label><SearchLabel>{{ i18n.ts.chat }}</SearchLabel></template>
<template #icon><i class="ti ti-messages"></i></template> <template #icon><i class="ti ti-messages"></i></template>
@ -732,6 +732,9 @@ import MkFeatureBanner from '@/components/MkFeatureBanner.vue';
import { globalEvents } from '@/events.js'; import { globalEvents } from '@/events.js';
import { claimAchievement } from '@/utility/achievements.js'; import { claimAchievement } from '@/utility/achievements.js';
import { instance } from '@/instance.js'; import { instance } from '@/instance.js';
import { ensureSignin } from '@/i.js';
const $i = ensureSignin();
const lang = ref(miLocalStorage.getItem('lang')); const lang = ref(miLocalStorage.getItem('lang'));
const dataSaver = ref(prefer.s.dataSaver); const dataSaver = ref(prefer.s.dataSaver);

View File

@ -78,7 +78,12 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkSwitch> </MkSwitch>
</SearchMarker> </SearchMarker>
<SearchMarker :keywords="['chat']">
<FormSection> <FormSection>
<template #label><SearchLabel>{{ i18n.ts.chat }}</SearchLabel></template>
<div class="_gaps_m">
<MkInfo v-if="$i.policies.chatAvailability === 'unavailable'">{{ i18n.ts._chat.chatNotAvailableForThisAccountOrServer }}</MkInfo>
<SearchMarker :keywords="['chat']"> <SearchMarker :keywords="['chat']">
<MkSelect v-model="chatScope" @update:modelValue="save()"> <MkSelect v-model="chatScope" @update:modelValue="save()">
<template #label><SearchLabel>{{ i18n.ts._chat.chatAllowedUsers }}</SearchLabel></template> <template #label><SearchLabel>{{ i18n.ts._chat.chatAllowedUsers }}</SearchLabel></template>
@ -90,7 +95,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #caption>{{ i18n.ts._chat.chatAllowedUsers_note }}</template> <template #caption>{{ i18n.ts._chat.chatAllowedUsers_note }}</template>
</MkSelect> </MkSelect>
</SearchMarker> </SearchMarker>
</div>
</FormSection> </FormSection>
</SearchMarker>
<SearchMarker :keywords="['lockdown']"> <SearchMarker :keywords="['lockdown']">
<FormSection> <FormSection>