Fix formatting issues

This commit is contained in:
codingneko 2024-10-07 21:51:55 +02:00
parent 347dc25bb8
commit 3defc831c3

View file

@ -37,7 +37,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup> <script lang="ts" setup>
import { computed, watch, provide, shallowRef, ref, onMounted, onActivated } from 'vue'; import { computed, watch, provide, shallowRef, ref, onMounted, onActivated } from 'vue';
import type { Tab } from '@/components/global/MkPageHeader.tabs.vue'; import type { Tab } from '@/components/global/MkPageHeader.tabs.vue';
import type { BasicTimelineType } from '@/timelines.js';
import MkTimeline from '@/components/MkTimeline.vue'; import MkTimeline from '@/components/MkTimeline.vue';
import MkInfo from '@/components/MkInfo.vue'; import MkInfo from '@/components/MkInfo.vue';
import MkPostForm from '@/components/MkPostForm.vue'; import MkPostForm from '@/components/MkPostForm.vue';
@ -55,6 +54,7 @@ import { deepMerge } from '@/scripts/merge.js';
import { MenuItem } from '@/types/menu.js'; import { MenuItem } from '@/types/menu.js';
import { miLocalStorage } from '@/local-storage.js'; import { miLocalStorage } from '@/local-storage.js';
import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js'; import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
import type { BasicTimelineType } from '@/timelines.js';
provide('shouldOmitHeaderTitle', true); provide('shouldOmitHeaderTitle', true);
@ -264,33 +264,29 @@ const headerActions = computed(() => {
icon: 'ti ti-dots', icon: 'ti ti-dots',
text: i18n.ts.options, text: i18n.ts.options,
handler: (ev) => { handler: (ev) => {
os.popupMenu([ os.popupMenu([{
{ type: 'switch',
type: 'switch', text: i18n.ts.showRenotes,
text: i18n.ts.showRenotes, ref: withRenotes,
ref: withRenotes, }, {
}, type: 'switch',
{ text: i18n.ts.showBots,
type: 'switch', ref: withBots,
text: i18n.ts.showBots, }, isBasicTimeline(src.value) && hasWithReplies(src.value) ? {
ref: withBots, type: 'switch',
}, text: i18n.ts.showRepliesToOthersInTimeline,
isBasicTimeline(src.value) && hasWithReplies(src.value) ? { ref: withReplies,
type: 'switch', disabled: onlyFiles,
text: i18n.ts.showRepliesToOthersInTimeline, } : undefined, {
ref: withReplies, type: 'switch',
disabled: onlyFiles, text: i18n.ts.withSensitive,
} : undefined, { ref: withSensitive,
type: 'switch', }, {
text: i18n.ts.withSensitive, type: 'switch',
ref: withSensitive, text: i18n.ts.fileAttachedOnly,
}, { ref: onlyFiles,
type: 'switch', disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false,
text: i18n.ts.fileAttachedOnly, }], ev.currentTarget ?? ev.target);
ref: onlyFiles,
disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false,
},
], ev.currentTarget ?? ev.target);
}, },
}, },
]; ];