From f43cb514b03086f0f1a8d1f7d8191404e0335832 Mon Sep 17 00:00:00 2001 From: Hazel K Date: Wed, 2 Oct 2024 12:41:08 -0400 Subject: [PATCH] add menu to toggle user replies / boosts --- .../frontend/src/pages/following-feed.vue | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/pages/following-feed.vue b/packages/frontend/src/pages/following-feed.vue index 9a78cbdadf..042eb7864f 100644 --- a/packages/frontend/src/pages/following-feed.vue +++ b/packages/frontend/src/pages/following-feed.vue @@ -63,6 +63,7 @@ import MkNotes from '@/components/MkNotes.vue'; import MkUserInfo from '@/components/MkUserInfo.vue'; import { misskeyApi } from '@/scripts/misskey-api.js'; import { useRouter } from '@/router/supplier.js'; +import * as os from '@/os.js'; const props = withDefaults(defineProps<{ initialTab?: FollowingFeedTab, @@ -156,15 +157,15 @@ const latestNotesPagination: Paging<'notes/following'> = { })), }; +const withUserRenotes = ref(false); +const withUserReplies = ref(true); const userNotesPagination: Paging<'users/notes'> = { endpoint: 'users/notes' as const, limit: 10, params: computed(() => ({ userId: selectedUserId.value, - withRenotes: false, - withReplies: true, - withChannelNotes: false, - withFiles: false, + withRenotes: withUserRenotes.value, + withReplies: withUserReplies.value, })), }; @@ -174,6 +175,24 @@ const headerActions: PageHeaderItem[] = [ text: i18n.ts.reload, handler: () => reload(), }, + { + icon: 'ti ti-dots', + text: i18n.ts.options, + handler: (ev) => { + os.popupMenu([ + { + type: 'switch', + text: i18n.ts.showRenotes, + ref: withUserRenotes, + }, { + type: 'switch', + text: i18n.ts.showRepliesToOthersInTimeline, + ref: withUserReplies, + }, + ], ev.currentTarget ?? ev.target); + }, + }, + ]; const headerTabs = computed(() => [