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:
parent
695cb87052
commit
c9d57e5d49
3 changed files with 3 additions and 52 deletions
|
@ -37,13 +37,6 @@
|
||||||
class="ph-fw ph-lg"
|
class="ph-fw ph-lg"
|
||||||
:class="item.icon"
|
:class="item.icon"
|
||||||
></i>
|
></i>
|
||||||
<span v-else-if="item.icons">
|
|
||||||
<i
|
|
||||||
v-for="icon in item.icons"
|
|
||||||
class="ph-fw ph-lg"
|
|
||||||
:class="icon"
|
|
||||||
></i>
|
|
||||||
</span>
|
|
||||||
<MkAvatar
|
<MkAvatar
|
||||||
v-if="item.avatar"
|
v-if="item.avatar"
|
||||||
:user="item.avatar"
|
:user="item.avatar"
|
||||||
|
@ -72,13 +65,6 @@
|
||||||
class="ph-fw ph-lg"
|
class="ph-fw ph-lg"
|
||||||
:class="item.icon"
|
:class="item.icon"
|
||||||
></i>
|
></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 || ''">{{
|
<span :style="item.textStyle || ''">{{
|
||||||
item.text
|
item.text
|
||||||
}}</span>
|
}}</span>
|
||||||
|
@ -130,13 +116,6 @@
|
||||||
class="ph-fw ph-lg"
|
class="ph-fw ph-lg"
|
||||||
:class="item.icon"
|
:class="item.icon"
|
||||||
></i>
|
></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 || ''">{{
|
<span :style="item.textStyle || ''">{{
|
||||||
item.text
|
item.text
|
||||||
}}</span>
|
}}</span>
|
||||||
|
@ -160,13 +139,6 @@
|
||||||
class="ph-fw ph-lg"
|
class="ph-fw ph-lg"
|
||||||
:class="item.icon"
|
:class="item.icon"
|
||||||
></i>
|
></i>
|
||||||
<span v-else-if="item.icons">
|
|
||||||
<i
|
|
||||||
v-for="icon in item.icons"
|
|
||||||
class="ph-fw ph-lg"
|
|
||||||
:class="icon"
|
|
||||||
></i>
|
|
||||||
</span>
|
|
||||||
<MkAvatar
|
<MkAvatar
|
||||||
v-if="item.avatar"
|
v-if="item.avatar"
|
||||||
:user="item.avatar"
|
:user="item.avatar"
|
||||||
|
|
|
@ -105,7 +105,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
||||||
if (["public", "home"].includes(props.note.visibility)) {
|
if (["public", "home"].includes(props.note.visibility)) {
|
||||||
buttonActions.push({
|
buttonActions.push({
|
||||||
text: `${i18n.ts.renote} (${i18n.ts._visibility.home})`,
|
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,
|
danger: false,
|
||||||
action: () => {
|
action: () => {
|
||||||
os.api("notes/create", {
|
os.api("notes/create", {
|
||||||
|
@ -131,10 +131,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
||||||
if (props.note.visibility === "specified") {
|
if (props.note.visibility === "specified") {
|
||||||
buttonActions.push({
|
buttonActions.push({
|
||||||
text: `${i18n.ts.renote} (${i18n.ts.recipient})`,
|
text: `${i18n.ts.renote} (${i18n.ts.recipient})`,
|
||||||
icons: [
|
icon: "ph-envelope-simple-open ph-bold ph-lg",
|
||||||
"ph-repeat ph-bold ph-lg",
|
|
||||||
"ph-envelope-simple-open ph-bold ph-lg",
|
|
||||||
],
|
|
||||||
danger: false,
|
danger: false,
|
||||||
action: () => {
|
action: () => {
|
||||||
os.api("notes/create", {
|
os.api("notes/create", {
|
||||||
|
@ -159,10 +156,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
||||||
} else {
|
} else {
|
||||||
buttonActions.push({
|
buttonActions.push({
|
||||||
text: `${i18n.ts.renote} (${i18n.ts._visibility.followers})`,
|
text: `${i18n.ts.renote} (${i18n.ts._visibility.followers})`,
|
||||||
icons: [
|
icon: "ph-lock-simple-open ph-bold ph-lg",
|
||||||
"ph-repeat ph-bold ph-lg",
|
|
||||||
"ph-lock-simple-open ph-bold ph-lg",
|
|
||||||
],
|
|
||||||
danger: false,
|
danger: false,
|
||||||
action: () => {
|
action: () => {
|
||||||
os.api("notes/create", {
|
os.api("notes/create", {
|
||||||
|
|
|
@ -56,18 +56,6 @@ export type MenuButton = {
|
||||||
avatar?: Misskey.entities.User;
|
avatar?: Misskey.entities.User;
|
||||||
action: MenuAction;
|
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 = {
|
export type MenuParent = {
|
||||||
type: "parent";
|
type: "parent";
|
||||||
text: string;
|
text: string;
|
||||||
|
@ -87,7 +75,6 @@ type OuterMenuItem =
|
||||||
| MenuUser
|
| MenuUser
|
||||||
| MenuSwitch
|
| MenuSwitch
|
||||||
| MenuButton
|
| MenuButton
|
||||||
| MenuButtonMultipleIcons
|
|
||||||
| MenuParent;
|
| MenuParent;
|
||||||
type OuterPromiseMenuItem = Promise<
|
type OuterPromiseMenuItem = Promise<
|
||||||
| MenuLabel
|
| MenuLabel
|
||||||
|
@ -96,7 +83,6 @@ type OuterPromiseMenuItem = Promise<
|
||||||
| MenuUser
|
| MenuUser
|
||||||
| MenuSwitch
|
| MenuSwitch
|
||||||
| MenuButton
|
| MenuButton
|
||||||
| MenuButtonMultipleIcons
|
|
||||||
| MenuParent
|
| MenuParent
|
||||||
>;
|
>;
|
||||||
export type MenuItem = OuterMenuItem | OuterPromiseMenuItem;
|
export type MenuItem = OuterMenuItem | OuterPromiseMenuItem;
|
||||||
|
@ -109,5 +95,4 @@ export type InnerMenuItem =
|
||||||
| MenuUser
|
| MenuUser
|
||||||
| MenuSwitch
|
| MenuSwitch
|
||||||
| MenuButton
|
| MenuButton
|
||||||
| MenuButtonMultipleIcons
|
|
||||||
| MenuParent;
|
| MenuParent;
|
||||||
|
|
Loading…
Reference in a new issue