From c9d57e5d495ef921b2327eb7ab79f29d490b7924 Mon Sep 17 00:00:00 2001 From: Froggo Date: Sat, 6 May 2023 00:43:34 +0000 Subject: [PATCH] Remove clutter from repost dialog by removing repost icon for non-default visibility (#10015) The repost dialog is pretty cluttered, and the extra repeat icon next to the visibility icon seems to be a source of the clutter. This PR removes those icons next to the visibility icon, making it so that only the icon correlating to the visibility will show. Reviewed-on: https://codeberg.org/calckey/calckey/pulls/10015 Co-authored-by: Froggo Co-committed-by: Froggo --- packages/client/src/components/MkMenu.vue | 28 ------------------- .../client/src/components/MkRenoteButton.vue | 12 ++------ packages/client/src/types/menu.ts | 15 ---------- 3 files changed, 3 insertions(+), 52 deletions(-) diff --git a/packages/client/src/components/MkMenu.vue b/packages/client/src/components/MkMenu.vue index e976eee4d0..e47f32e45d 100644 --- a/packages/client/src/components/MkMenu.vue +++ b/packages/client/src/components/MkMenu.vue @@ -37,13 +37,6 @@ class="ph-fw ph-lg" :class="item.icon" > - - - - - - {{ item.text }} @@ -130,13 +116,6 @@ class="ph-fw ph-lg" :class="item.icon" > - - - {{ item.text }} @@ -160,13 +139,6 @@ class="ph-fw ph-lg" :class="item.icon" > - - - { if (["public", "home"].includes(props.note.visibility)) { buttonActions.push({ text: `${i18n.ts.renote} (${i18n.ts._visibility.home})`, - icons: ["ph-repeat ph-bold ph-lg", "ph-house ph-bold ph-lg"], + icon: "ph-house ph-bold ph-lg", danger: false, action: () => { os.api("notes/create", { @@ -131,10 +131,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { if (props.note.visibility === "specified") { buttonActions.push({ text: `${i18n.ts.renote} (${i18n.ts.recipient})`, - icons: [ - "ph-repeat ph-bold ph-lg", - "ph-envelope-simple-open ph-bold ph-lg", - ], + icon: "ph-envelope-simple-open ph-bold ph-lg", danger: false, action: () => { os.api("notes/create", { @@ -159,10 +156,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { } else { buttonActions.push({ text: `${i18n.ts.renote} (${i18n.ts._visibility.followers})`, - icons: [ - "ph-repeat ph-bold ph-lg", - "ph-lock-simple-open ph-bold ph-lg", - ], + icon: "ph-lock-simple-open ph-bold ph-lg", danger: false, action: () => { os.api("notes/create", { diff --git a/packages/client/src/types/menu.ts b/packages/client/src/types/menu.ts index 4a0a9061e9..57751d0370 100644 --- a/packages/client/src/types/menu.ts +++ b/packages/client/src/types/menu.ts @@ -56,18 +56,6 @@ export type MenuButton = { avatar?: Misskey.entities.User; action: MenuAction; }; -export type MenuButtonMultipleIcons = { - type?: "button"; - text: string; - textStyle?: string; - icons: string[]; - indicate?: boolean; - danger?: boolean; - active?: boolean; - hidden?: boolean; - avatar?: Misskey.entities.User; - action: MenuAction; -}; export type MenuParent = { type: "parent"; text: string; @@ -87,7 +75,6 @@ type OuterMenuItem = | MenuUser | MenuSwitch | MenuButton - | MenuButtonMultipleIcons | MenuParent; type OuterPromiseMenuItem = Promise< | MenuLabel @@ -96,7 +83,6 @@ type OuterPromiseMenuItem = Promise< | MenuUser | MenuSwitch | MenuButton - | MenuButtonMultipleIcons | MenuParent >; export type MenuItem = OuterMenuItem | OuterPromiseMenuItem; @@ -109,5 +95,4 @@ export type InnerMenuItem = | MenuUser | MenuSwitch | MenuButton - | MenuButtonMultipleIcons | MenuParent;