From 347dc25bb805b9453bd7f6f20e9b6146576a9d64 Mon Sep 17 00:00:00 2001 From: codingneko Date: Sun, 6 Oct 2024 02:08:26 +0000 Subject: [PATCH 1/3] Add show bots toggle --- packages/frontend/src/pages/timeline.vue | 50 ++++++++++++++---------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 20d8abccf6..03a945a3d5 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { computed, watch, provide, shallowRef, ref, onMounted, onActivated } from 'vue'; import type { Tab } from '@/components/global/MkPageHeader.tabs.vue'; +import type { BasicTimelineType } from '@/timelines.js'; import MkTimeline from '@/components/MkTimeline.vue'; import MkInfo from '@/components/MkInfo.vue'; import MkPostForm from '@/components/MkPostForm.vue'; @@ -54,7 +55,6 @@ import { deepMerge } from '@/scripts/merge.js'; import { MenuItem } from '@/types/menu.js'; import { miLocalStorage } from '@/local-storage.js'; import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js'; -import type { BasicTimelineType } from '@/timelines.js'; provide('shouldOmitHeaderTitle', true); @@ -264,25 +264,33 @@ const headerActions = computed(() => { icon: 'ti ti-dots', text: i18n.ts.options, handler: (ev) => { - os.popupMenu([{ - type: 'switch', - text: i18n.ts.showRenotes, - ref: withRenotes, - }, isBasicTimeline(src.value) && hasWithReplies(src.value) ? { - type: 'switch', - text: i18n.ts.showRepliesToOthersInTimeline, - ref: withReplies, - disabled: onlyFiles, - } : undefined, { - type: 'switch', - text: i18n.ts.withSensitive, - ref: withSensitive, - }, { - type: 'switch', - text: i18n.ts.fileAttachedOnly, - ref: onlyFiles, - disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false, - }], ev.currentTarget ?? ev.target); + os.popupMenu([ + { + type: 'switch', + text: i18n.ts.showRenotes, + ref: withRenotes, + }, + { + type: 'switch', + text: i18n.ts.showBots, + ref: withBots, + }, + isBasicTimeline(src.value) && hasWithReplies(src.value) ? { + type: 'switch', + text: i18n.ts.showRepliesToOthersInTimeline, + ref: withReplies, + disabled: onlyFiles, + } : undefined, { + type: 'switch', + text: i18n.ts.withSensitive, + ref: withSensitive, + }, { + type: 'switch', + text: i18n.ts.fileAttachedOnly, + ref: onlyFiles, + disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false, + }, + ], ev.currentTarget ?? ev.target); }, }, ]; From 3defc831c3ed9eeac8258e9ce5421a401535f1e0 Mon Sep 17 00:00:00 2001 From: codingneko Date: Mon, 7 Oct 2024 21:51:55 +0200 Subject: [PATCH 2/3] Fix formatting issues --- packages/frontend/src/pages/timeline.vue | 52 +++++++++++------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 03a945a3d5..75fa0b6b5b 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -37,7 +37,6 @@ SPDX-License-Identifier: AGPL-3.0-only