diff --git a/src/equicordplugins/channelTabs/components/ChannelTab.tsx b/src/equicordplugins/channelTabs/components/ChannelTab.tsx index b2d823787..3481edd6e 100644 --- a/src/equicordplugins/channelTabs/components/ChannelTab.tsx +++ b/src/equicordplugins/channelTabs/components/ChannelTab.tsx @@ -12,16 +12,16 @@ import { classNameFactory } from "@utils/css"; import { getGuildAcronym, getIntlMessage, getUniqueUsername } from "@utils/discord"; import { classes } from "@utils/misc"; import { Channel, Guild, User } from "@vencord/discord-types"; -import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; +import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; import { Avatar, ChannelStore, ContextMenuApi, GuildStore, PresenceStore, ReadStateStore, TypingStore, useDrag, useDrop, useEffect, useRef, UserStore, useState, useStateFromStores } from "@webpack/common"; import { JSX } from "react"; import { TabContextMenu } from "./ContextMenus"; -const ThreeDots = findComponentByCodeLazy(".dots,", "dotRadius:"); -const dotStyles = findByPropsLazy("numberBadge", "textBadge"); +const ThreeDots = findComponentByCodeLazy("Math.min(1,Math.max(", "dotRadius:"); +const dotStyles = findCssClassesLazy("numberBadge", "baseShapeRound"); -const ChannelTypeIcon = findComponentByCodeLazy(".iconContainerWithGuildIcon,"); +const ChannelTypeIcon = findComponentByCodeLazy('"ChannelItemIcon")'); // Custom SVG icons for pages that don't have findable components diff --git a/src/equicordplugins/dragFavoriteEmotes/index.tsx b/src/equicordplugins/dragFavoriteEmotes/index.tsx index d7b73377a..d194b5df4 100644 --- a/src/equicordplugins/dragFavoriteEmotes/index.tsx +++ b/src/equicordplugins/dragFavoriteEmotes/index.tsx @@ -22,12 +22,12 @@ import { EquicordDevs } from "@utils/constants"; import { classNameFactory } from "@utils/css"; import { classes } from "@utils/misc"; import definePlugin from "@utils/types"; -import { findByPropsLazy } from "@webpack"; +import { findByPropsLazy, findCssClassesLazy } from "@webpack"; import { useDrag, useDrop, useLayoutEffect, useRef, UserSettingsActionCreators } from "@webpack/common"; const UserSettingsDelay = findByPropsLazy("INFREQUENT_USER_ACTION"); -const imgCls = findByPropsLazy("image", "imageLoading"); -const dndCls = findByPropsLazy("wrapper", "target", "dragOver"); +const imgCls = findCssClassesLazy("image", "imageLoading"); +const dndCls = findCssClassesLazy("wrapper", "target", "autoPointerEvents", "dragOver"); const cl = classNameFactory("vc-drag-favorite-emotes-"); diff --git a/src/equicordplugins/friendCodes/FriendCodesPanel.tsx b/src/equicordplugins/friendCodes/FriendCodesPanel.tsx index 5dfcfa491..892fe675a 100644 --- a/src/equicordplugins/friendCodes/FriendCodesPanel.tsx +++ b/src/equicordplugins/friendCodes/FriendCodesPanel.tsx @@ -10,12 +10,12 @@ import { BaseText } from "@components/BaseText"; import { Flex } from "@components/Flex"; import { HeadingTertiary } from "@components/Heading"; import { copyToClipboard } from "@utils/clipboard"; -import { findByPropsLazy } from "@webpack"; +import { findByPropsLazy, findCssClassesLazy } from "@webpack"; import { Button, Forms, Parser, useEffect, useState } from "@webpack/common"; import { FriendInvite } from "./types"; -const FormStyles = findByPropsLazy("header", "title", "emptyState"); +const FormStyles = findCssClassesLazy("header", "title", "emptyState"); const { createFriendInvite, getAllFriendInvites, revokeFriendInvites } = findByPropsLazy("createFriendInvite"); function CopyButton({ copyText, copiedText, onClick }) { diff --git a/src/equicordplugins/friendCodes/index.tsx b/src/equicordplugins/friendCodes/index.tsx index b2d74c228..8168cfe04 100644 --- a/src/equicordplugins/friendCodes/index.tsx +++ b/src/equicordplugins/friendCodes/index.tsx @@ -17,7 +17,7 @@ export default definePlugin({ { find: "#{intl::ADD_FRIEND})}),(", replacement: { - match: /header,children:\[.*?\{\}\)/, + match: /"header",.{0,30}children:\[.*?\{\}\)/, replace: "$&,$self.FriendCodesPanel" }, noWarn: true, diff --git a/src/equicordplugins/sidebarChat/index.tsx b/src/equicordplugins/sidebarChat/index.tsx index e6dc67e3a..6a964716d 100644 --- a/src/equicordplugins/sidebarChat/index.tsx +++ b/src/equicordplugins/sidebarChat/index.tsx @@ -17,11 +17,10 @@ import { Channel, Guild, User } from "@vencord/discord-types"; import { DefaultExtractAndLoadChunksRegex, extractAndLoadChunksLazy, - filters, findByPropsLazy, findComponentByCodeLazy, - findStoreLazy, - mapMangledModuleLazy + findCssClassesLazy, + findStoreLazy } from "@webpack"; import { ChannelRouter, @@ -49,13 +48,8 @@ import { settings, SidebarStore } from "./store"; const cl = classNameFactory("vc-sidebar-chat-"); -const { HeaderBar } = mapMangledModuleLazy(".themedMobile]:", { - HeaderBar: filters.byCode(".themedMobile]:"), -}); - -const { ForumView } = mapMangledModuleLazy("forum-grid-header-section-", { - ForumView: filters.byCode("sidebarState") -}); +const HeaderBar = findComponentByCodeLazy("toolbarClassName:", "}),onDoubleClick:"); +const ForumView = findComponentByCodeLazy("sidebarState"); const ArrowsLeftRightIcon = ({ color, ...rest }) => { return ( @@ -75,14 +69,14 @@ const WindowLaunchIcon = findComponentByCodeLazy("1-1h6a1 1 0 1 0 0-2H5Z"); const XSmallIcon = findComponentByCodeLazy("1.4L12 13.42l5.3 5.3Z"); const Chat = findComponentByCodeLazy("filterAfterTimestamp:", "chatInputType"); const Resize = findComponentByCodeLazy("sidebarType:", "RESIZE_HANDLE_WIDTH)"); -const ChannelHeader = findComponentByCodeLazy(".forumPostTitle]:", '"channel-".concat'); +const ChannelHeader = findComponentByCodeLazy(".GUILD_ANNOUNCEMENT", '"channel-".concat'); const PopoutWindow = findComponentByCodeLazy("Missing guestWindow reference"); const FullChannelView = findComponentByCodeLazy("showFollowButton:(null"); const WanderingCubesLoading = findComponentByCodeLazy('="wanderingCubes"'); const ChatInputTypes = findByPropsLazy("FORM", "NORMAL"); const Sidebars = findByPropsLazy("ThreadSidebar", "MessageRequestSidebar"); -const ChatClasses = findByPropsLazy("threadSidebarOpen"); +const ChatClasses = findCssClassesLazy("threadSidebarOpen", "loader"); const ChannelSectionStore = findStoreLazy("ChannelSectionStore");