From 26642f82c4261a9e352317376c51ab4da9b6e0c6 Mon Sep 17 00:00:00 2001 From: yuriha-chan Date: Tue, 5 Dec 2023 07:30:45 +0900 Subject: [PATCH 1/2] [frontend] Fix renote toggle switch --- packages/frontend/src/pages/timeline.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index b390d1931ddc..69b33b86598d 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -158,6 +158,7 @@ const headerActions = $computed(() => { type: 'switch', text: i18n.ts.showRenotes, ref: $$(withRenotes), + disabled: false, }, src === 'local' || src === 'social' ? { type: 'switch', text: i18n.ts.showRepliesToOthersInTimeline, From 29b729eae5d7f9515703f02d0e0aef03b991bc5c Mon Sep 17 00:00:00 2001 From: Yuriha Date: Tue, 5 Dec 2023 12:49:45 +0000 Subject: [PATCH 2/2] Fix MkMenu rather than usage --- packages/frontend/src/components/MkMenu.vue | 2 +- packages/frontend/src/pages/timeline.vue | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index 4fafd35f72c2..736f48ea3c29 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -202,7 +202,7 @@ function focusDown() { } function switchItem(item: MenuSwitch & { ref: any }) { - if (typeof item.disabled === 'boolean' ? item.disabled : item.disabled.value) return; + if (item.disabled !== undefined && (typeof item.disabled === 'boolean' ? item.disabled : item.disabled.value)) return; item.ref = !item.ref; } diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 69b33b86598d..b390d1931ddc 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -158,7 +158,6 @@ const headerActions = $computed(() => { type: 'switch', text: i18n.ts.showRenotes, ref: $$(withRenotes), - disabled: false, }, src === 'local' || src === 'social' ? { type: 'switch', text: i18n.ts.showRepliesToOthersInTimeline,