diff --git a/src/api/MemberListDecorators.tsx b/src/api/MemberListDecorators.tsx
index ab5a618b..ada60776 100644
--- a/src/api/MemberListDecorators.tsx
+++ b/src/api/MemberListDecorators.tsx
@@ -21,25 +21,14 @@ import { Channel, User } from "discord-types/general/index.js";
import { JSX } from "react";
interface DecoratorProps {
- activities: any[];
- channel: Channel;
- /**
- * Only for DM members
- */
- channelName?: string;
- /**
- * Only for server members
- */
- currentUser?: User;
- guildId?: string;
- isMobile: boolean;
- isOwner?: boolean;
- isTyping: boolean;
- selected: boolean;
- status: string;
+ type: "guild" | "dm";
user: User;
- [key: string]: any;
+ /** only present when this is a DM list item */
+ channel: Channel;
+ /** only present when this is a guild list item */
+ isOwner: boolean;
}
+
export type MemberListDecoratorFactory = (props: DecoratorProps) => JSX.Element | null;
type OnlyIn = "guilds" | "dms";
@@ -53,18 +42,16 @@ export function removeMemberListDecorator(identifier: string) {
decoratorsFactories.delete(identifier);
}
-export function __getDecorators(props: DecoratorProps): JSX.Element {
- const isInGuild = !!(props.guildId);
-
+export function __getDecorators(props: DecoratorProps, type: "guild" | "dm"): JSX.Element {
const decorators = Array.from(
decoratorsFactories.entries(),
([key, { render: Decorator, onlyIn }]) => {
- if ((onlyIn === "guilds" && !isInGuild) || (onlyIn === "dms" && isInGuild))
+ if ((onlyIn === "guilds" && type !== "guild") || (onlyIn === "dms" && type !== "dm"))
return null;
return (
-
+
);
}
diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx
index e63073ce..52bede44 100644
--- a/src/plugins/_api/badges/index.tsx
+++ b/src/plugins/_api/badges/index.tsx
@@ -63,7 +63,7 @@ export default definePlugin({
required: true,
patches: [
{
- find: ".FULL_SIZE]:26",
+ find: ".MODAL]:26",
replacement: {
match: /(?=;return 0===(\i)\.length\?)(?<=(\i)\.useMemo.+?)/,
replace: ";$1=$2.useMemo(()=>[...$self.getBadges(arguments[0].displayProfile),...$1],[$1])"
diff --git a/src/plugins/_api/memberListDecorators/index.tsx b/src/plugins/_api/memberListDecorators/index.tsx
index 365c21f3..90f09d8f 100644
--- a/src/plugins/_api/memberListDecorators/index.tsx
+++ b/src/plugins/_api/memberListDecorators/index.tsx
@@ -32,21 +32,17 @@ export default definePlugin({
{
find: ".lostPermission)",
replacement: [
- {
- match: /let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,
- replace: "$&vencordProps=$1,"
- },
{
match: /children:\[(?=.{0,300},lostPermissionTooltipText:)/,
- replace: "children:[(typeof vencordProps!=='undefined'&&Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"
+ replace: "children:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'guild'),"
}
]
},
{
find: "PrivateChannel.renderAvatar",
replacement: {
- match: /decorators:(\i\.isSystemDM\(\))\?(.+?):null/,
- replace: "decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]),$1?$2:null]"
+ match: /decorators:(\i\.isSystemDM\(\)\?.+?:null)/,
+ replace: "decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'dm'),$1]"
}
}
]
diff --git a/src/plugins/_api/serverList.ts b/src/plugins/_api/serverList.ts
index dfd40de7..89c40796 100644
--- a/src/plugins/_api/serverList.ts
+++ b/src/plugins/_api/serverList.ts
@@ -32,9 +32,9 @@ export default definePlugin({
}
},
{
- find: "#{intl::SERVERS}),children",
+ find: ".setGuildsTree(",
replacement: {
- match: /(?<=#{intl::SERVERS}\),children:)\i\.map\(\i\)/,
+ match: /(?<=#{intl::SERVERS}\),gap:"xs",children:)\i\.map\(.{0,50}\.length\)/,
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"
}
}
diff --git a/src/plugins/accountPanelServerProfile/index.tsx b/src/plugins/accountPanelServerProfile/index.tsx
index 8b561581..ad63ba27 100644
--- a/src/plugins/accountPanelServerProfile/index.tsx
+++ b/src/plugins/accountPanelServerProfile/index.tsx
@@ -9,7 +9,7 @@ import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import { getCurrentChannel } from "@utils/discord";
import definePlugin, { OptionType } from "@utils/types";
-import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
+import { findComponentByCodeLazy } from "@webpack";
import { ContextMenuApi, Menu, useEffect, useRef } from "@webpack/common";
import { User } from "discord-types/general";
@@ -19,8 +19,7 @@ interface UserProfileProps {
originalRenderPopout: () => React.ReactNode;
}
-const UserProfile = findComponentByCodeLazy("UserProfilePopoutWrapper: user cannot be undefined");
-const styles = findByPropsLazy("accountProfilePopoutWrapper");
+const UserProfile = findComponentByCodeLazy(".POPOUT,user");
let openAlternatePopout = false;
let accountPanelRef: React.RefObject | null> = { current: null };
@@ -77,7 +76,7 @@ export default definePlugin({
replace: "$self.useAccountPanelRef();$&"
},
{
- match: /(\.AVATAR,children:.+?renderPopout:(\(\i,\i\))=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,
+ match: /(\.AVATAR,children:.+?renderPopout:\((\i),\i\)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,
replace: (_, rest, popoutProps, originalPopout, currentUser) => `${rest}$self.UserProfile({popoutProps:${popoutProps},currentUser:${currentUser},originalRenderPopout:()=>{${originalPopout}}})`
},
{
@@ -121,14 +120,18 @@ export default definePlugin({
}
const currentChannel = getCurrentChannel();
- if (currentChannel?.getGuildId() == null) {
+ if (currentChannel?.getGuildId() == null || !UserProfile.$$vencordGetWrappedComponent()) {
return originalRenderPopout();
}
return (
-
-
-
+
);
}, { noop: true })
});
diff --git a/src/plugins/forceOwnerCrown/index.ts b/src/plugins/forceOwnerCrown/index.ts
index 907d9dc0..bf115c64 100644
--- a/src/plugins/forceOwnerCrown/index.ts
+++ b/src/plugins/forceOwnerCrown/index.ts
@@ -29,8 +29,8 @@ export default definePlugin({
{
find: "#{intl::GUILD_OWNER}),children:",
replacement: {
- match: /,isOwner:(\i),/,
- replace: ",_isOwner:$1=$self.isGuildOwner(e),"
+ match: /(?<=decorators:.{0,200}?isOwner:)\i/,
+ replace: "$self.isGuildOwner(arguments[0])"
}
}
],
diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx
index 0f4016ad..07723bcc 100644
--- a/src/plugins/friendsSince/index.tsx
+++ b/src/plugins/friendsSince/index.tsx
@@ -24,7 +24,7 @@ export default definePlugin({
patches: [
// DM User Sidebar
{
- find: ".PANEL}),nicknameIcons",
+ find: ".SIDEBAR}),nicknameIcons",
replacement: {
match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/,
replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})"
diff --git a/src/plugins/ircColors/index.ts b/src/plugins/ircColors/index.ts
index 3e0515f5..d4f453a7 100644
--- a/src/plugins/ircColors/index.ts
+++ b/src/plugins/ircColors/index.ts
@@ -66,8 +66,8 @@ export default definePlugin({
{
find: '="SYSTEM_TAG"',
replacement: {
- match: /\i.gradientClassName]\),style:/,
- replace: "$&{color:$self.calculateNameColorForMessageContext(arguments[0])},_style:"
+ match: /(?<=\.username.{0,50}?)style:/,
+ replace: "style:{color:$self.calculateNameColorForMessageContext(arguments[0])},_style:"
}
},
{
diff --git a/src/plugins/mutualGroupDMs/index.tsx b/src/plugins/mutualGroupDMs/index.tsx
index 1c9ad40e..d71fd933 100644
--- a/src/plugins/mutualGroupDMs/index.tsx
+++ b/src/plugins/mutualGroupDMs/index.tsx
@@ -16,6 +16,8 @@
* along with this program. If not, see .
*/
+import "./style.css";
+
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import { isNonNullish } from "@utils/guards";
@@ -95,6 +97,12 @@ export default definePlugin({
{
match: /\(0,\i\.jsx\)\(\i,\{items:\i,section:(\i)/,
replace: "$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):$&"
+ },
+ // Discord adds spacing between each item which pushes our tab off screen.
+ // set the gap to zero to ensure ours stays on screen
+ {
+ match: /className:\i\.tabBar/,
+ replace: "$& + ' vc-mutual-gdms-tab-bar'"
}
]
},
diff --git a/src/plugins/mutualGroupDMs/style.css b/src/plugins/mutualGroupDMs/style.css
new file mode 100644
index 00000000..14ea83c9
--- /dev/null
+++ b/src/plugins/mutualGroupDMs/style.css
@@ -0,0 +1,4 @@
+.vc-mutual-gdms-tab-bar {
+ gap: 0;
+ justify-content: space-between;
+}
diff --git a/src/plugins/noUnblockToJump/index.ts b/src/plugins/noUnblockToJump/index.ts
index 04ddf2ed..4dbbe462 100644
--- a/src/plugins/noUnblockToJump/index.ts
+++ b/src/plugins/noUnblockToJump/index.ts
@@ -30,7 +30,7 @@ export default definePlugin({
find: '.id,"Search Results"',
replacement: [
{
- match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,
+ match: /if\(.{1,40}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,
replace: "if(false)$1"
},
{