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 <froggo@noreply.codeberg.org>
Co-committed-by: Froggo <froggo@noreply.codeberg.org>
This commit is contained in:
Froggo 2023-05-06 00:43:34 +00:00 committed by Kainoa Kanter
parent 695cb87052
commit c9d57e5d49
3 changed files with 3 additions and 52 deletions

View File

@ -37,13 +37,6 @@
class="ph-fw ph-lg"
:class="item.icon"
></i>
<span v-else-if="item.icons">
<i
v-for="icon in item.icons"
class="ph-fw ph-lg"
:class="icon"
></i>
</span>
<MkAvatar
v-if="item.avatar"
:user="item.avatar"
@ -72,13 +65,6 @@
class="ph-fw ph-lg"
:class="item.icon"
></i>
<span v-else-if="item.icons">
<i
v-for="icon in item.icons"
class="ph-fw ph-lg"
:class="icon"
></i>
</span>
<span :style="item.textStyle || ''">{{
item.text
}}</span>
@ -130,13 +116,6 @@
class="ph-fw ph-lg"
:class="item.icon"
></i>
<span v-else-if="item.icons">
<i
v-for="icon in item.icons"
class="ph-fw ph-lg"
:class="icon"
></i>
</span>
<span :style="item.textStyle || ''">{{
item.text
}}</span>
@ -160,13 +139,6 @@
class="ph-fw ph-lg"
:class="item.icon"
></i>
<span v-else-if="item.icons">
<i
v-for="icon in item.icons"
class="ph-fw ph-lg"
:class="icon"
></i>
</span>
<MkAvatar
v-if="item.avatar"
:user="item.avatar"

View File

@ -105,7 +105,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
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", {

View File

@ -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;