diff --git a/src/main/patcher.ts b/src/main/patcher.ts
index a3725ef9..e5b87290 100644
--- a/src/main/patcher.ts
+++ b/src/main/patcher.ts
@@ -131,11 +131,16 @@ if (!IS_VANILLA) {
process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord");
- // Monkey patch commandLine to disable WidgetLayering: Fix DevTools context menus https://github.com/electron/electron/issues/38790
+ // Monkey patch commandLine to:
+ // - disable WidgetLayering: Fix DevTools context menus https://github.com/electron/electron/issues/38790
+ // - disable UseEcoQoSForBackgroundProcess: Work around Discord unloading when in background
const originalAppend = app.commandLine.appendSwitch;
app.commandLine.appendSwitch = function (...args) {
- if (args[0] === "disable-features" && !args[1]?.includes("WidgetLayering")) {
- args[1] += ",WidgetLayering";
+ if (args[0] === "disable-features") {
+ const disabledFeatures = new Set((args[1] ?? "").split(","));
+ disabledFeatures.add("WidgetLayering");
+ disabledFeatures.add("UseEcoQoSForBackgroundProcess");
+ args[1] += [...disabledFeatures].join(",");
}
return originalAppend.apply(this, args);
};
diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx
index b3e768a0..6b26ec06 100644
--- a/src/plugins/_api/badges/index.tsx
+++ b/src/plugins/_api/badges/index.tsx
@@ -117,17 +117,13 @@ export default definePlugin({
{
find: ".PANEL]:14",
replacement: {
- match: /(?<=\i=\(0,\i\.default\)\(\i\);)return 0===\i.length/,
- replace: "$& && $self.getBadges(arguments[0]?.displayProfile).length===0"
+ match: /(?<=(\i)=\(0,\i\.default\)\(\i\);)return 0===\i.length\?/,
+ replace: "$1.unshift(...$self.getBadges(arguments[0].displayProfile));$&"
}
},
{
find: ".description,delay:",
replacement: [
- {
- match: /...(\i)\}=\(0,\i\.useUserProfileAnalyticsContext\)\(\);/,
- replace: "$&arguments[0].badges?.unshift(...$self.getBadges($1));"
- },
{
// alt: "", aria-hidden: false, src: originalSrc
match: /alt:" ","aria-hidden":!0,src:(?=.{0,20}(\i)\.icon)/,
diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx
index ae4358ee..d8e32caf 100644
--- a/src/plugins/_core/settings.tsx
+++ b/src/plugins/_core/settings.tsx
@@ -59,6 +59,7 @@ export default definePlugin({
// FIXME: remove once change merged to stable
{
find: "Messages.ACTIVITY_SETTINGS",
+ noWarn: true,
replacement: {
get match() {
switch (Settings.plugins.Settings.settingsLocation) {
diff --git a/src/plugins/roleColorEverywhere/index.tsx b/src/plugins/roleColorEverywhere/index.tsx
index 56b224da..23084a68 100644
--- a/src/plugins/roleColorEverywhere/index.tsx
+++ b/src/plugins/roleColorEverywhere/index.tsx
@@ -40,9 +40,16 @@ const settings = definePluginSettings({
default: true,
description: "Show role colors in the voice chat user list",
restartNeeded: true
+ },
+ reactorsList: {
+ type: OptionType.BOOLEAN,
+ default: true,
+ description: "Show role colors in the reactors list",
+ restartNeeded: true
}
});
+
export default definePlugin({
name: "RoleColorEverywhere",
authors: [Devs.KingFish, Devs.lewisakura, Devs.AutumnVN],
@@ -99,6 +106,14 @@ export default definePlugin({
}
],
predicate: () => settings.store.voiceUsers,
+ },
+ {
+ find: ".reactorDefault",
+ replacement: {
+ match: /\.openUserContextMenu\)\((\i),(\i),\i\).{0,250}tag:"strong"/,
+ replace: "$&,style:{color:$self.getColor($2?.id,$1)}"
+ },
+ predicate: () => settings.store.reactorsList,
}
],
settings,
diff --git a/src/plugins/showConnections/index.tsx b/src/plugins/showConnections/index.tsx
index a78e4c41..733d069e 100644
--- a/src/plugins/showConnections/index.tsx
+++ b/src/plugins/showConnections/index.tsx
@@ -74,15 +74,28 @@ interface ConnectionPlatform {
icon: { lightSVG: string, darkSVG: string; };
}
-const profilePopoutComponent = ErrorBoundary.wrap((props: { user: User, displayProfile; }) =>
-
+const profilePopoutComponent = ErrorBoundary.wrap(
+ (props: { user: User; displayProfile?: any; simplified?: boolean; }) => (
+
+ ),
+ { noop: true }
);
-const profilePanelComponent = ErrorBoundary.wrap(({ id }: { id: string; }) =>
-
+const profilePanelComponent = ErrorBoundary.wrap(
+ (props: { id: string; simplified?: boolean; }) => (
+
+ ),
+ { noop: true }
);
-function ConnectionsComponent({ id, theme }: { id: string, theme: string; }) {
+function ConnectionsComponent({ id, theme, simplified }: { id: string, theme: string, simplified?: boolean; }) {
const profile = UserProfileStore.getUserProfile(id);
if (!profile)
return null;
@@ -91,6 +104,19 @@ function ConnectionsComponent({ id, theme }: { id: string, theme: string; }) {
if (!connections?.length)
return null;
+ const connectionsContainer = (
+
+ {connections.map(connection => )}
+
+ );
+
+ if (simplified)
+ return connectionsContainer;
+
return (
Connections
-
- {connections.map(connection => )}
-
+ {connectionsContainer}
);
}
@@ -132,7 +152,7 @@ function CompactConnectionComponent({ connection, theme }: { connection: Connect
- {connection.name}
+ {connection.name}
{connection.verified && }
@@ -188,6 +208,13 @@ export default definePlugin({
match: /\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/,
replace: "$self.profilePanelComponent({ id: $1.recipients[0] }),$&"
}
+ },
+ {
+ find: "autoFocusNote:!0})",
+ replacement: {
+ match: /{autoFocusNote:!1}\)}\)(?<=user:(\i),bio:null==(\i)\?.+?)/,
+ replace: "$&,$self.profilePopoutComponent({ user: $1, displayProfile: $2, simplified: true })"
+ }
}
],
settings,
diff --git a/src/plugins/showConnections/styles.css b/src/plugins/showConnections/styles.css
index 383593c1..cead5201 100644
--- a/src/plugins/showConnections/styles.css
+++ b/src/plugins/showConnections/styles.css
@@ -9,3 +9,11 @@
gap: 0.25em;
align-items: center;
}
+
+.vc-sc-connection-name {
+ word-break: break-all;
+}
+
+.vc-sc-tooltip svg {
+ min-width: 16px;
+}
diff --git a/src/plugins/usrbg/index.tsx b/src/plugins/usrbg/index.tsx
index 32da95af..d9af54c3 100644
--- a/src/plugins/usrbg/index.tsx
+++ b/src/plugins/usrbg/index.tsx
@@ -69,13 +69,6 @@ export default definePlugin({
}
]
},
- {
- find: "=!1,canUsePremiumCustomization:",
- replacement: {
- match: /(\i)\.premiumType/,
- replace: "$self.patchPremiumType($1)||$&"
- }
- },
{
find: "BannerLoadingStatus:function",
replacement: {