fix: ChannelTabs, DragFavoriteEmojis, FriendCodes, SidebarChat (#674)

This commit is contained in:
sunnie 2026-01-23 22:55:08 +02:00 • committed by GitHub
parent a6ba94a998
commit 86da4149af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 22 deletions

View file

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

View file

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

View file

@ -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 }) {

View file

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

View file

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