From 6c27b3957692709c9b134a8f21f8f6205df3f4d4 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Wed, 26 Aug 2026 22:48:21 -0400 Subject: [PATCH] Add Missing Context Menu Icons --- src/components/Icons.tsx | 98 +++++++++++++++++ src/equicordplugins/bypassStatus/index.tsx | 33 ++++-- .../components/BookmarkContainer.tsx | 104 +----------------- .../channelTabs/components/ChannelTab.tsx | 9 +- .../channelTabs/components/ContextMenus.tsx | 31 ++++++ src/equicordplugins/channelTabs/index.tsx | 3 + .../channelTabs/util/constants.tsx | 5 - .../copyProfileColors/index.tsx | 2 + src/equicordplugins/copyUserMention/index.tsx | 1 + .../customUserColors/index.tsx | 2 + src/equicordplugins/exportMessages/index.tsx | 15 ++- src/equicordplugins/hideMessages/index.tsx | 2 + .../iconViewer/components/Modals.tsx | 1 + src/equicordplugins/inRole/index.tsx | 2 + src/equicordplugins/lastActive/index.tsx | 2 + .../spotify/lyrics/components/ctxMenu.tsx | 1 + .../musicControls/tidal/TidalPlayer.tsx | 3 + .../tidal/lyrics/components/ctxMenu.tsx | 1 + src/equicordplugins/quoter/index.tsx | 1 + src/equicordplugins/remix/index.tsx | 1 + src/equicordplugins/repeatMessages/index.tsx | 1 + .../showMessageEmbeds/index.tsx | 2 + src/equicordplugins/showRolesInChat/index.tsx | 1 + .../ui/settings/SongList.tsx | 2 + .../ui/songs/ProfileSongs.tsx | 2 + .../songSpotlight.desktop/ui/songs/index.tsx | 5 + src/equicordplugins/statusPresets/index.tsx | 6 +- src/equicordplugins/translatePlus/index.tsx | 1 + src/equicordplugins/triviaAI/index.tsx | 1 + src/equicordplugins/userpfp/index.tsx | 1 + src/plugins/betterRoleContext/index.tsx | 3 + 31 files changed, 216 insertions(+), 126 deletions(-) diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx index 8cfb18d3b..3352ff1de 100644 --- a/src/components/Icons.tsx +++ b/src/components/Icons.tsx @@ -1282,3 +1282,101 @@ export function TopRightArrow(props: IconProps) { ); } + +export function CheckmarkLargeBoldIcon(props: IconProps) { + return ( + + + + ); +} + +export function XLargeBoldIcon(props: IconProps) { + return ( + + + + ); +} + +export function UnsendIcon(props: IconProps) { + return ( + + + + ); +} + +export function WindowTopOutlineIcon(props: IconProps) { + return ( + + + + + ); +} + +export function BookCheckIcon(props: IconProps) { + return ( + + + + ); +} + +export function TrashIcon(props: IconProps) { + return ( + + + + + ); +} diff --git a/src/equicordplugins/bypassStatus/index.tsx b/src/equicordplugins/bypassStatus/index.tsx index 04d6861a2..b58bed41d 100644 --- a/src/equicordplugins/bypassStatus/index.tsx +++ b/src/equicordplugins/bypassStatus/index.tsx @@ -24,14 +24,28 @@ interface IMessageCreate { const SILENT_PING_FLAG = 1 << 12; -function Icon(enabled?: boolean): JSX.Element { - return - - - ; +function DisabledIcon(): JSX.Element { + return ( + + + + + ); +} + +function EnabledIcon(): JSX.Element { + return ( + + + + + ); } function processIds(value: string): string { @@ -80,7 +94,8 @@ function ContextCallback(name: "guild" | "user" | "channel"): NavContextMenuPatc Icon(enabled)} + icon={enabled ? EnabledIcon : DisabledIcon} + leadingAccessory={{ type: "icon", icon: enabled ? EnabledIcon : DisabledIcon }} action={() => { let bypasses: string[] = settings.store[`${name}s`].split(", "); if (enabled) bypasses = bypasses.filter(id => id !== type.id); diff --git a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx index 16c46575e..d0ee359cf 100644 --- a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx +++ b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx @@ -5,13 +5,13 @@ */ import { BaseText } from "@components/BaseText"; -import { BasicChannelTabsProps, Bookmark, BookmarkFolder, BookmarkProps, getDiscordFolderIcon, isBookmarkFolder, isTabSelected, navigateToBookmark, openedTabs, settings, switchChannel, UseBookmarkMethods, useBookmarks } from "@equicordplugins/channelTabs/util"; +import { BasicChannelTabsProps, Bookmark, BookmarkFolder, BookmarkProps, getDiscordFolderIcon, isBookmarkFolder, isTabSelected, navigateToBookmark, openedTabs, settings, UseBookmarkMethods, useBookmarks } from "@equicordplugins/channelTabs/util"; import { CircleQuestionIcon, DiscoveryIcon, EnvelopeIcon, FriendsIcon, NitroIcon, QuestIcon, ShopIcon } from "@equicordplugins/channelTabs/util/icons"; import { classNameFactory } from "@utils/css"; import { getGuildAcronym, getIntlMessage } from "@utils/discord"; import { classes } from "@utils/misc"; import { findComponentByCodeLazy } from "@webpack"; -import { Avatar, ChannelStore, closeModal, ContextMenuApi, FluxDispatcher, GuildStore, Menu, openModal,React, ReadStateStore, ReadStateUtils, SelectedChannelStore, SelectedGuildStore, TextInput, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore, useState } from "@webpack/common"; +import { Avatar, ChannelStore, closeModal, ContextMenuApi, FluxDispatcher, GuildStore, Menu, openModal, React, ReadStateStore, ReadStateUtils, SelectedChannelStore, SelectedGuildStore, TextInput, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore, useState } from "@webpack/common"; import { NotificationDot } from "./ChannelTab"; import { BookmarkContextMenu, EditModal } from "./ContextMenus"; @@ -123,100 +123,6 @@ function BookmarkIcon({ bookmark }: { bookmark: Bookmark | BookmarkFolder; }) { ); } -function BookmarkFolderOpenMenu(props: BookmarkProps) { - const { bookmarks, index, methods } = props; - const bookmark = bookmarks[index] as BookmarkFolder; - const { bookmarkNotificationDot } = settings.use(["bookmarkNotificationDot"]); - - return ( - FluxDispatcher.dispatch({ type: "CONTEXT_MENU_CLOSE" })} - aria-label="Bookmark Folder Menu" - > - {bookmark.bookmarks.map((b, i) => ( - - - {b.name} - - {bookmarkNotificationDot && } - - } - icon={() => } - showIconFirst={true} - action={() => switchChannel(b)} - > - {bookmarkNotificationDot && ( - - ReadStateUtils.ackChannel(ChannelStore.getChannel(b.channelId))} - /> - - )} - - { - const key = openModal(modalProps => - { - const newBookmarks = [...bookmark.bookmarks]; - newBookmarks[i].name = name; - methods.editBookmark(index, { bookmarks: newBookmarks }); - closeModal(key); - }} - /> - ); - }} - /> - { - methods.deleteBookmark(i, index); - }} - /> - { - const newBookmarks = [...bookmark.bookmarks]; - newBookmarks.splice(i, 1); - methods.addBookmark(b); - methods.editBookmark(index, { bookmarks: newBookmarks }); - }} - /> - - - ))} - - ); -} - function FolderBookmarkItem({ bookmark, bookmarks, folderIndex, bookmarkIndex, methods, isCurrentChannel, searchActive }: { bookmark: Bookmark; bookmarks: (Bookmark | BookmarkFolder)[]; @@ -476,13 +382,11 @@ function Bookmark(props: BookmarkProps & { isExpanded?: boolean; onToggleFolder? if (item.isFromFolder) { // coming from a folder methods.deleteBookmark(item.index, item.folderIndex); + methods.addBookmark(sourceBookmark, index); } else { - // coming from bar level methods.deleteBookmark(item.index); + methods.addBookmark(sourceBookmark, item.index < index ? index - 1 : index); } - - // add to this folder - methods.addBookmark(sourceBookmark, index); } }, collect: monitor => ({ diff --git a/src/equicordplugins/channelTabs/components/ChannelTab.tsx b/src/equicordplugins/channelTabs/components/ChannelTab.tsx index bb950c975..198790cb8 100644 --- a/src/equicordplugins/channelTabs/components/ChannelTab.tsx +++ b/src/equicordplugins/channelTabs/components/ChannelTab.tsx @@ -9,7 +9,7 @@ import { ChannelTabsProps, closeTab, ensureUnreadFallbackCountsLoaded, getNotifi import { ActivityIcon, CircleQuestionIcon, DiscoveryIcon, EnvelopeIcon, FriendsIcon, ICYMIIcon, NitroIcon, QuestIcon, ShopIcon } from "@equicordplugins/channelTabs/util/icons"; import { getActiveAutoCompletes } from "@equicordplugins/questify/utils/completion"; import { classNameFactory } from "@utils/css"; -import { getGuildAcronym, getIntlMessage, getUniqueUsername } from "@utils/discord"; +import { getGuildAcronym, getIntlMessage } from "@utils/discord"; import { classes } from "@utils/misc"; import { Channel, Guild, User } from "@vencord/discord-types"; import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; @@ -174,9 +174,8 @@ function ChannelTabContent(props: ChannelTabsProps & { const userId = UserStore.getCurrentUser()?.id; const recipients = channel?.recipients; const { - noPomeloNames, showStatusIndicators - } = settings.use(["noPomeloNames", "showStatusIndicators"]); + } = settings.use(["showStatusIndicators"]); const [isTyping, status, isMobile] = useStateFromStores( [TypingStore, PresenceStore], @@ -233,9 +232,7 @@ function ChannelTabContent(props: ChannelTabsProps & { if (channel && recipients?.length) { if (recipients.length === 1) { const user = UserStore.getUser(recipients[0]) as User & { globalName: string; }; - const username = noPomeloNames - ? user.globalName || user.username - : getUniqueUsername(user); + const username = user.globalName || user.username; return ( <> diff --git a/src/equicordplugins/channelTabs/components/ContextMenus.tsx b/src/equicordplugins/channelTabs/components/ContextMenus.tsx index 6efab55d0..975b7d0f6 100644 --- a/src/equicordplugins/channelTabs/components/ContextMenus.tsx +++ b/src/equicordplugins/channelTabs/components/ContextMenus.tsx @@ -6,6 +6,7 @@ import { BaseText } from "@components/BaseText"; import { Heading } from "@components/Heading"; +import { BookCheckIcon, OpenExternalIcon, PencilIcon, StarFilled, StarOutlined, TrashIcon, UnsendIcon, WindowTopOutlineIcon, XLargeBoldIcon } from "@components/Icons"; import { Paragraph } from "@components/Paragraph"; import { bookmarkFolderColors, bookmarkPlaceholderName, closeOtherTabs, closeTab, closeTabsToTheLeft, closeTabsToTheRight, createTab, getDiscordFolderIcon, getDiscordFolderIconNames, hasClosedTabs, isBookmarkFolder, openedTabs, reopenClosedTab, settings, toggleCompactTab } from "@equicordplugins/channelTabs/util"; import { Bookmark, BookmarkFolder, Bookmarks, ChannelTabsProps, UseBookmarkMethods } from "@equicordplugins/channelTabs/util/types"; @@ -415,6 +416,8 @@ export function BookmarkContextMenu({ bookmarks, index, methods }: { bookmarks: {bookmarkNotificationDot && !isFolder && ReadStateUtils.ackChannel(ChannelStore.getChannel(bookmark.channelId))} @@ -424,11 +427,15 @@ export function BookmarkContextMenu({ bookmarks, index, methods }: { bookmarks: ? bookmark.bookmarks.forEach(b => createTab(b))} /> : < Menu.MenuItem id="open-in-tab" label={"Open in New Tab"} + icon={OpenExternalIcon} + leadingAccessory={{ type: "icon", icon: OpenExternalIcon }} action={() => createTab(bookmark)} /> } @@ -437,6 +444,8 @@ export function BookmarkContextMenu({ bookmarks, index, methods }: { bookmarks: { const key = openModal(modalProps => { if (isFolder) { const key = openModal(modalProps => @@ -476,6 +487,8 @@ export function BookmarkContextMenu({ bookmarks, index, methods }: { bookmarks: { const key = openModal(modalProps => @@ -503,6 +516,8 @@ export function BookmarkContextMenu({ bookmarks, index, methods }: { bookmarks: checked={showBookmarkBar} id="show-bookmark-bar" label="Bookmark Bar" + icon={StarOutlined} + leadingAccessory={{ type: "icon", icon: StarOutlined }} action={() => { settings.store.showBookmarkBar = !settings.store.showBookmarkBar; }} @@ -528,6 +543,8 @@ export function TabContextMenu({ tab }: { tab: ChannelTabsProps; }) { ReadStateUtils.ackChannel(channel)} /> @@ -536,6 +553,8 @@ export function TabContextMenu({ tab }: { tab: ChannelTabsProps; }) { checked={compact} id="toggle-compact-tab" label="Compact" + icon={WindowTopOutlineIcon} + leadingAccessory={{ type: "icon", icon: WindowTopOutlineIcon }} action={() => { setCompact(compact => !compact); toggleCompactTab(tab.id); @@ -546,28 +565,38 @@ export function TabContextMenu({ tab }: { tab: ChannelTabsProps; }) { closeTab(tab.id)} /> closeOtherTabs(tab.id)} /> closeTabsToTheRight(tab.id)} /> closeTabsToTheLeft(tab.id)} /> reopenClosedTab()} /> @@ -577,6 +606,8 @@ export function TabContextMenu({ tab }: { tab: ChannelTabsProps; }) { checked={showBookmarkBar} id="show-bookmark-bar" label="Bookmark Bar" + icon={StarOutlined} + leadingAccessory={{ type: "icon", icon: StarOutlined }} action={() => { settings.store.showBookmarkBar = !settings.store.showBookmarkBar; }} diff --git a/src/equicordplugins/channelTabs/index.tsx b/src/equicordplugins/channelTabs/index.tsx index 4cf053cb6..24a9d8218 100644 --- a/src/equicordplugins/channelTabs/index.tsx +++ b/src/equicordplugins/channelTabs/index.tsx @@ -8,6 +8,7 @@ import "./style.css"; import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu"; import ErrorBoundary from "@components/ErrorBoundary"; +import { LinkIcon } from "@components/Icons"; import { Devs, EquicordDevs } from "@utils/constants"; import definePlugin from "@utils/types"; import { Channel, Message } from "@vencord/discord-types"; @@ -25,6 +26,8 @@ const contextMenuPatch: NavContextMenuPatchCallback = (children, props: { channe createTab({ guildId: channel.guild_id || "@me", // Normalize for DMs/Group Chats channelId: channel.id diff --git a/src/equicordplugins/channelTabs/util/constants.tsx b/src/equicordplugins/channelTabs/util/constants.tsx index 02e4a66b7..97307efde 100644 --- a/src/equicordplugins/channelTabs/util/constants.tsx +++ b/src/equicordplugins/channelTabs/util/constants.tsx @@ -139,11 +139,6 @@ export const settings = definePluginSettings({ type: OptionType.COMPONENT, default: {} }, - noPomeloNames: { - description: "Use display names instead of usernames for DM's", - type: OptionType.BOOLEAN, - default: false - }, showStatusIndicators: { description: "Show status indicators for DM's", type: OptionType.BOOLEAN, diff --git a/src/equicordplugins/copyProfileColors/index.tsx b/src/equicordplugins/copyProfileColors/index.tsx index d6acd32e5..ecb94eefd 100644 --- a/src/equicordplugins/copyProfileColors/index.tsx +++ b/src/equicordplugins/copyProfileColors/index.tsx @@ -94,6 +94,7 @@ const userContextMenuPatch: NavContextMenuPatchCallback = (children, { user, gui copyProfileColors(user.id)} /> @@ -104,6 +105,7 @@ const userContextMenuPatch: NavContextMenuPatchCallback = (children, { user, gui copyProfileColors(user.id, effectiveGuildId)} /> diff --git a/src/equicordplugins/copyUserMention/index.tsx b/src/equicordplugins/copyUserMention/index.tsx index afcdaa55f..1a9d587e7 100644 --- a/src/equicordplugins/copyUserMention/index.tsx +++ b/src/equicordplugins/copyUserMention/index.tsx @@ -40,6 +40,7 @@ const UserContextMenuPatch: NavContextMenuPatchCallback = (children, { user }: U label="Copy User Mention" action={() => copyToClipboard(`<@${user.id}>`)} icon={MentionIcon} + leadingAccessory={{ type: "icon", icon: MentionIcon }} /> ); }; diff --git a/src/equicordplugins/customUserColors/index.tsx b/src/equicordplugins/customUserColors/index.tsx index 92cc03da8..f249fa832 100644 --- a/src/equicordplugins/customUserColors/index.tsx +++ b/src/equicordplugins/customUserColors/index.tsx @@ -48,6 +48,7 @@ const userContextMenuPatch: NavContextMenuPatchCallback = (children, { user }: { label="Set Color" id="set-color" icon={ColorIcon} + leadingAccessory={{ type: "icon", icon: ColorIcon }} action={async () => { await requireSettingsMenu(); openModal(modalProps => ); @@ -66,6 +67,7 @@ const channelContextMenuPatch: NavContextMenuPatchCallback = (children, { channe label="Set Color" id="set-color" icon={ColorIcon} + leadingAccessory={{ type: "icon", icon: ColorIcon }} action={async () => { await requireSettingsMenu(); openModal(modalProps => ); diff --git a/src/equicordplugins/exportMessages/index.tsx b/src/equicordplugins/exportMessages/index.tsx index 53b0ab91e..7e7c785f8 100644 --- a/src/equicordplugins/exportMessages/index.tsx +++ b/src/equicordplugins/exportMessages/index.tsx @@ -94,6 +94,14 @@ async function exportMessage(message: Message) { } } +function Icon() { + return ( + + + + ); +} + const messageContextMenuPatch = (children: Array | null>, props: { message: Message; }) => { const { message } = props; @@ -103,11 +111,8 @@ const messageContextMenuPatch = (children: Array | null> ( - - - - )} + icon={Icon} + leadingAccessory={{ type: "icon", icon: Icon }} action={() => exportMessage(message)} /> ); diff --git a/src/equicordplugins/hideMessages/index.tsx b/src/equicordplugins/hideMessages/index.tsx index 309e12190..d31329270 100644 --- a/src/equicordplugins/hideMessages/index.tsx +++ b/src/equicordplugins/hideMessages/index.tsx @@ -65,6 +65,7 @@ const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }: { m id="vc-hidemessages" label="Hide" icon={EyeIcon} + leadingAccessory={{ type: "icon", icon: EyeIcon }} action={() => hideMessage(message.id, message.channel_id)} /> )); @@ -84,6 +85,7 @@ const userCtxPatch: NavContextMenuPatchCallback = (children, { channel }: UserCo id="vc-hidemessages-dm" label={hidden ? "Unhide DM" : "Hide DM"} icon={EyeIcon} + leadingAccessory={{ type: "icon", icon: EyeIcon }} action={() => toggleDm(channel.id)} /> )); diff --git a/src/equicordplugins/iconViewer/components/Modals.tsx b/src/equicordplugins/iconViewer/components/Modals.tsx index 7dfa433fb..2d9e4b440 100644 --- a/src/equicordplugins/iconViewer/components/Modals.tsx +++ b/src/equicordplugins/iconViewer/components/Modals.tsx @@ -179,6 +179,7 @@ function OtherContextMenu({ iconName, Icon, color }: { iconName: string; Icon: I id="log-console" label="Log to Console" icon={BugIcon} + leadingAccessory={{ type: "icon", icon: BugIcon }} action={() => logger.info(Icon)} /> diff --git a/src/equicordplugins/inRole/index.tsx b/src/equicordplugins/inRole/index.tsx index 847688f73..7f5957182 100644 --- a/src/equicordplugins/inRole/index.tsx +++ b/src/equicordplugins/inRole/index.tsx @@ -95,6 +95,7 @@ export default definePlugin({ showInRoleModal(getMembersInRole(role.id, guild.id), role.id, channel.id); }} icon={InfoIcon} + leadingAccessory={{ type: "icon", icon: InfoIcon }} /> ); }, @@ -121,6 +122,7 @@ export default definePlugin({ showInRoleModal(getMembersInRole(role.id, guild.id), role.id, channel.id); }} icon={InfoIcon} + leadingAccessory={{ type: "icon", icon: InfoIcon }} /> ); } diff --git a/src/equicordplugins/lastActive/index.tsx b/src/equicordplugins/lastActive/index.tsx index 1e5fcc805..44d5ceb42 100644 --- a/src/equicordplugins/lastActive/index.tsx +++ b/src/equicordplugins/lastActive/index.tsx @@ -83,6 +83,7 @@ const ChannelContextMenuPatch: NavContextMenuPatchCallback = (children, { channe id="LastActive" label={Your Last Message} icon={LastActiveIcon} + leadingAccessory={{ type: "icon", icon: LastActiveIcon }} action={() => { jumpToLastActive(channel); }} @@ -98,6 +99,7 @@ const UserContextMenuPatch: NavContextMenuPatchCallback = (children, { user, cha id="LastActive" label={User's Last Message} icon={UserLastActiveIcon} + leadingAccessory={{ type: "icon", icon: UserLastActiveIcon }} action={() => { jumpToLastActive(channel, user.id); }} diff --git a/src/equicordplugins/musicControls/spotify/lyrics/components/ctxMenu.tsx b/src/equicordplugins/musicControls/spotify/lyrics/components/ctxMenu.tsx index 47ff4d171..8f4ac820d 100644 --- a/src/equicordplugins/musicControls/spotify/lyrics/components/ctxMenu.tsx +++ b/src/equicordplugins/musicControls/spotify/lyrics/components/ctxMenu.tsx @@ -34,6 +34,7 @@ export function LyricsContextMenu() { disabled={!currLyric?.text} action={() => copyWithToast(currLyric!.text!, "Lyric copied!")} icon={CopyIcon} + leadingAccessory={{ type: "icon", icon: CopyIcon }} /> copyWithToast(path.replace("http://", "https://"))} icon={LinkIcon} + leadingAccessory={{ type: "icon", icon: LinkIcon }} /> TidalStore.openExternal(path)} icon={OpenExternalIcon} + leadingAccessory={{ type: "icon", icon: OpenExternalIcon }} /> ); @@ -222,6 +224,7 @@ function AlbumContextMenu({ track }: { track: PlayerState["track"]; }) { label="View Album Cover" action={() => track?.imageSrc && openImageModal({ url: track.imageSrc })} icon={ImageIcon} + leadingAccessory={{ type: "icon", icon: ImageIcon }} /> copyWithToast(currLyric!.text!, "Lyric copied!")} icon={CopyIcon} + leadingAccessory={{ type: "icon", icon: CopyIcon }} /> ); diff --git a/src/equicordplugins/quoter/index.tsx b/src/equicordplugins/quoter/index.tsx index 6868ababf..af0175195 100644 --- a/src/equicordplugins/quoter/index.tsx +++ b/src/equicordplugins/quoter/index.tsx @@ -78,6 +78,7 @@ export default definePlugin({ id="vc-quote" label="Quote" icon={QuoteIcon} + leadingAccessory={{ type: "icon", icon: QuoteIcon }} action={() => openModal(props => )} /> ); diff --git a/src/equicordplugins/remix/index.tsx b/src/equicordplugins/remix/index.tsx index 514b4dbbc..b0fbab362 100644 --- a/src/equicordplugins/remix/index.tsx +++ b/src/equicordplugins/remix/index.tsx @@ -48,6 +48,7 @@ const MessageContextMenuPatch: NavContextMenuPatchCallback = (children, props) = id="vc-remix" label="Remix" icon={PaintbrushIcon} + leadingAccessory={{ type: "icon", icon: PaintbrushIcon }} action={() => { const key = openModal(modalProps => closeModal(key)} url={url} /> diff --git a/src/equicordplugins/repeatMessages/index.tsx b/src/equicordplugins/repeatMessages/index.tsx index 5bbcf3f2b..a70be2525 100644 --- a/src/equicordplugins/repeatMessages/index.tsx +++ b/src/equicordplugins/repeatMessages/index.tsx @@ -115,6 +115,7 @@ const messageCtxPatch: NavContextMenuPatchCallback = (children, { msg }: { msg: id="vc-repeat" label={shift ? "Repeat and Reply" : "Repeat"} icon={RepeatMessageIcon} + leadingAccessory={{ type: "icon", icon: RepeatMessageIcon }} action={async () => repeatMessage(msg)} /> )); diff --git a/src/equicordplugins/showMessageEmbeds/index.tsx b/src/equicordplugins/showMessageEmbeds/index.tsx index d503c2f77..84aabc02d 100644 --- a/src/equicordplugins/showMessageEmbeds/index.tsx +++ b/src/equicordplugins/showMessageEmbeds/index.tsx @@ -47,6 +47,7 @@ const addButton = (children, message, url) => { label="Show Embed" action={_ => unfurlEmbed(url, message)} icon={ImageVisible} + leadingAccessory={{ type: "icon", icon: ImageVisible }} key="vc-sme-show" />); } else if (isUrlInMessage(message, url)) { // check the url is actually in the message text so we know it's one people can actually add back children.splice(0, 0, @@ -55,6 +56,7 @@ const addButton = (children, message, url) => { label="Remove Embed" action={_ => removeEmbed(url, message)} icon={ImageInvisible} + leadingAccessory={{ type: "icon", icon: ImageInvisible }} key="vc-sme-remove" />); } }; diff --git a/src/equicordplugins/showRolesInChat/index.tsx b/src/equicordplugins/showRolesInChat/index.tsx index d13888e78..7e42bf3fa 100644 --- a/src/equicordplugins/showRolesInChat/index.tsx +++ b/src/equicordplugins/showRolesInChat/index.tsx @@ -53,6 +53,7 @@ function makeToggleRoleItem(roleId: string) { toggleRole(roleId)} /> diff --git a/src/equicordplugins/songSpotlight.desktop/ui/settings/SongList.tsx b/src/equicordplugins/songSpotlight.desktop/ui/settings/SongList.tsx index 4bf8b47a1..c9012034c 100644 --- a/src/equicordplugins/songSpotlight.desktop/ui/settings/SongList.tsx +++ b/src/equicordplugins/songSpotlight.desktop/ui/settings/SongList.tsx @@ -68,6 +68,7 @@ function EditableSong({ index, song, insert, setSongRef, onDrag, onDrop, onRemov id="copy-link" label="Copy link" icon={LinkIcon} + leadingAccessory={{ type: "icon", icon: LinkIcon }} action={() => render && copyWithToast(render.link)} disabled={!render} /> @@ -76,6 +77,7 @@ function EditableSong({ index, song, insert, setSongRef, onDrag, onDrop, onRemov color="danger" label="Remove song" icon={TrashIcon} + leadingAccessory={{ type: "icon", icon: TrashIcon }} action={() => onRemove(song)} /> diff --git a/src/equicordplugins/songSpotlight.desktop/ui/songs/ProfileSongs.tsx b/src/equicordplugins/songSpotlight.desktop/ui/songs/ProfileSongs.tsx index 9753f3651..9ca9598de 100644 --- a/src/equicordplugins/songSpotlight.desktop/ui/songs/ProfileSongs.tsx +++ b/src/equicordplugins/songSpotlight.desktop/ui/songs/ProfileSongs.tsx @@ -110,6 +110,7 @@ export default function ProfileSongs({ user, isSideBar }: ProfileSongsProps) { id="edit-songs" label="Edit songs" icon={PencilIcon} + leadingAccessory={{ type: "icon", icon: PencilIcon }} action={() => openSettingsModal()} /> )} @@ -117,6 +118,7 @@ export default function ProfileSongs({ user, isSideBar }: ProfileSongsProps) { id="copy-link" label="Copy JSON" icon={LinkIcon} + leadingAccessory={{ type: "icon", icon: LinkIcon }} action={() => copyWithToast(JSON.stringify(data))} /> diff --git a/src/equicordplugins/songSpotlight.desktop/ui/songs/index.tsx b/src/equicordplugins/songSpotlight.desktop/ui/songs/index.tsx index afa8ce15d..9fd736699 100644 --- a/src/equicordplugins/songSpotlight.desktop/ui/songs/index.tsx +++ b/src/equicordplugins/songSpotlight.desktop/ui/songs/index.tsx @@ -72,12 +72,14 @@ function SongEntry({ entry, number, isLoaded, isPlaying, big, onClick }: SongEnt id="copy-link" label="Copy link" icon={LinkIcon} + leadingAccessory={{ type: "icon", icon: LinkIcon }} action={() => copyWithToast(entry.link)} /> { const self = useSongStore.getState().self?.data ?? []; if (self.length >= apiConstants.songLimit) { @@ -186,6 +188,7 @@ function SongInfo({ owned, song, render, big }: SongInfoProps) { id="copy-link" label="Copy link" icon={LinkIcon} + leadingAccessory={{ type: "icon", icon: LinkIcon }} action={() => copyWithToast(render.link)} /> {!owned @@ -194,6 +197,7 @@ function SongInfo({ owned, song, render, big }: SongInfoProps) { id="steal-song" label="Steal song" icon={PuzzlePieceIcon} + leadingAccessory={{ type: "icon", icon: PuzzlePieceIcon }} action={() => { const self = useSongStore.getState().self?.data ?? []; if (self.length >= apiConstants.songLimit) { @@ -213,6 +217,7 @@ function SongInfo({ owned, song, render, big }: SongInfoProps) { color="danger" label="Remove song" icon={TrashIcon} + leadingAccessory={{ type: "icon", icon: TrashIcon }} action={() => { const self = useSongStore.getState().self?.data ?? []; diff --git a/src/equicordplugins/statusPresets/index.tsx b/src/equicordplugins/statusPresets/index.tsx index fd5fd04a0..674d5af17 100644 --- a/src/equicordplugins/statusPresets/index.tsx +++ b/src/equicordplugins/statusPresets/index.tsx @@ -26,7 +26,7 @@ import { proxyLazy } from "@utils/lazy"; import { useForceUpdater } from "@utils/react"; import definePlugin, { OptionType, StartAt } from "@utils/types"; import { extractAndLoadChunksLazy, findComponentByCodeLazy, findModuleId, wreq } from "@webpack"; -import { Menu, openModalLazy,OverridePremiumTypeStore, Toasts } from "@webpack/common"; +import { Menu, openModalLazy, OverridePremiumTypeStore, Toasts } from "@webpack/common"; interface Emoji { animated: boolean; @@ -91,6 +91,10 @@ const StatusSubMenuComponent = () => { ? () => : undefined } + leadingAccessory={status.emojiInfo != null + ? { type: "icon", icon: () => } + : undefined + } disabled={status.emojiInfo?.id != null && premiumType === 0} > id="ec-trans" label="Translate" icon={Icon} + leadingAccessory={{ type: "icon", icon: Icon }} action={() => handleTranslate(message)} /> )); diff --git a/src/equicordplugins/triviaAI/index.tsx b/src/equicordplugins/triviaAI/index.tsx index fb1d373f0..bbea72348 100644 --- a/src/equicordplugins/triviaAI/index.tsx +++ b/src/equicordplugins/triviaAI/index.tsx @@ -25,6 +25,7 @@ const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }: { m id="vc-trivia-ai" label="Answer With AI" icon={RobotIcon} + leadingAccessory={{ type: "icon", icon: RobotIcon }} action={async () => { const payload = await getPayload(message); if (!payload) return; diff --git a/src/equicordplugins/userpfp/index.tsx b/src/equicordplugins/userpfp/index.tsx index 810f9ddf0..1da08e07c 100644 --- a/src/equicordplugins/userpfp/index.tsx +++ b/src/equicordplugins/userpfp/index.tsx @@ -118,6 +118,7 @@ export default definePlugin({ label="Set Avatar" id="set-avatar" icon={PencilIcon} + leadingAccessory={{ type: "icon", icon: PencilIcon }} action={async () => { await requireSettingsModal(); openModal(modalProps => ); diff --git a/src/plugins/betterRoleContext/index.tsx b/src/plugins/betterRoleContext/index.tsx index d006b1dd4..ed53b55c0 100644 --- a/src/plugins/betterRoleContext/index.tsx +++ b/src/plugins/betterRoleContext/index.tsx @@ -251,6 +251,7 @@ export default definePlugin({ label="Copy Role Color" action={() => copyToClipboard(role.colorString!)} icon={AppearanceIcon} + leadingAccessory={{ type: "icon", icon: AppearanceIcon }} /> ); } @@ -265,6 +266,7 @@ export default definePlugin({ GuildSettingsActions.selectRole(id); }} icon={PencilIcon} + leadingAccessory={{ type: "icon", icon: PencilIcon }} /> ); } @@ -277,6 +279,7 @@ export default definePlugin({ label="View Role Icon" action={() => openRoleIconModal(role.id, roleIcon, role.name)} icon={ImageIcon} + leadingAccessory={{ type: "icon", icon: ImageIcon }} /> );