From 9b8ab3bf9748495ed8828bfb6122deeeba4f42a9 Mon Sep 17 00:00:00 2001
From: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Date: Fri, 7 Feb 2025 15:54:20 -0500
Subject: [PATCH] Fix Conflicts + Invite Button
---
src/components/DonateButton.tsx | 23 ++++++++++++-
src/components/Heart.tsx | 1 +
src/components/VencordSettings/VencordTab.tsx | 17 ++++++----
.../VencordSettings/specialCard.css | 22 ++++++------
src/equicordplugins/fullVcPfp/index.tsx | 34 +++++++++++++++----
src/plugins/usrbg/index.tsx | 4 +--
6 files changed, 74 insertions(+), 27 deletions(-)
diff --git a/src/components/DonateButton.tsx b/src/components/DonateButton.tsx
index 1bad49e3..5770964c 100644
--- a/src/components/DonateButton.tsx
+++ b/src/components/DonateButton.tsx
@@ -16,7 +16,8 @@
* along with this program. If not, see .
*/
-import { Button } from "@webpack/common";
+import { openInviteModal } from "@utils/discord";
+import { Button, showToast } from "@webpack/common";
import { ButtonProps } from "@webpack/types";
import { Heart } from "./Heart";
@@ -39,3 +40,23 @@ export default function DonateButton({
);
}
+
+export function InviteButton({
+ look = Button.Looks.LINK,
+ color = Button.Colors.TRANSPARENT,
+ ...props
+}: Partial) {
+ return (
+
+ );
+}
diff --git a/src/components/Heart.tsx b/src/components/Heart.tsx
index 600a4c72..8f9f9a31 100644
--- a/src/components/Heart.tsx
+++ b/src/components/Heart.tsx
@@ -37,3 +37,4 @@ export function Heart(props: SVGProps) {
);
}
+
diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx
index 241586b6..6b5f4568 100644
--- a/src/components/VencordSettings/VencordTab.tsx
+++ b/src/components/VencordSettings/VencordTab.tsx
@@ -9,7 +9,7 @@ import "./VencordTab.css";
import { openNotificationLogModal } from "@api/Notifications/notificationLog";
import { useSettings } from "@api/Settings";
import { classNameFactory } from "@api/Styles";
-import DonateButton from "@components/DonateButton";
+import DonateButton, { InviteButton } from "@components/DonateButton";
import { openContributorModal } from "@components/PluginSettings/ContributorModal";
import { openPluginModal } from "@components/PluginSettings/PluginModal";
import { gitRemote } from "@shared/vencordUserAgent";
@@ -334,11 +334,16 @@ function EquicordSettings() {
function DonateButtonComponent() {
return (
-
+
+
+
+
);
}
diff --git a/src/components/VencordSettings/specialCard.css b/src/components/VencordSettings/specialCard.css
index e0755891..a819b2fb 100644
--- a/src/components/VencordSettings/specialCard.css
+++ b/src/components/VencordSettings/specialCard.css
@@ -60,19 +60,19 @@
.vc-special-hyperlink {
margin-top: 1em;
cursor: pointer;
+}
- .vc-special-hyperlink-text {
- color: black;
- font-size: 1em;
- font-weight: bold;
- text-align: center;
- transition: text-decoration 0.5s;
- cursor: pointer;
- }
+.vc-special-hyperlink-text {
+ color: black;
+ font-size: 1em;
+ font-weight: bold;
+ text-align: center;
+ transition: text-decoration 0.5s;
+ cursor: pointer;
+}
- &:hover .vc-special-hyperlink-text {
- text-decoration: underline;
- }
+.vc-special-hyperlink:hover .vc-special-hyperlink-text {
+ text-decoration: underline;
}
.vc-special-image-container {
diff --git a/src/equicordplugins/fullVcPfp/index.tsx b/src/equicordplugins/fullVcPfp/index.tsx
index 25fffa09..6d50b43f 100644
--- a/src/equicordplugins/fullVcPfp/index.tsx
+++ b/src/equicordplugins/fullVcPfp/index.tsx
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
-import { migratePluginSettings } from "@api/Settings";
+import { migratePluginSettings, Settings } from "@api/Settings";
import { disableStyle, enableStyle } from "@api/Styles";
import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types";
@@ -12,18 +12,25 @@ import { IconUtils, UserStore } from "@webpack/common";
import style from "./style.css?managed";
+interface iUSRBG extends Plugin {
+ userHasBackground(userId: string);
+ getImageUrl(userId: string): string | null;
+}
+
migratePluginSettings("FullVCPFP", "fullVcPfp");
export default definePlugin({
name: "FullVCPFP",
description: "Makes avatars take up the entire vc tile. Breaks if USRBG Voice Background is enabled.",
authors: [EquicordDevs.mochienya],
- patches: [{
- find: "\"data-selenium-video-tile\":",
- replacement: {
- match: /(?<=function\((\i),\i\)\{)/,
- replace: "$1.style=$self.getVoiceBackgroundStyles($1);",
+ patches: [
+ {
+ find: "\"data-selenium-video-tile\":",
+ replacement: {
+ match: /(?<=function\((\i),\i\)\{)/,
+ replace: "$1.style=$self.getVoiceBackgroundStyles($1);",
+ }
}
- }],
+ ],
getVoiceBackgroundStyles({ className, participantUserId }: any) {
if (!className.includes("tile_")) return;
@@ -32,6 +39,19 @@ export default definePlugin({
const avatarUrl = IconUtils.getUserAvatarURL(user, false, 1024);
+ if (Settings.plugins.USRBG.enabled && Settings.plugins.USRBG.voiceBackground) {
+ const USRBG = (Vencord.Plugins.plugins.USRBG as unknown as iUSRBG);
+ if (USRBG.userHasBackground(participantUserId)) {
+ return {
+ backgroundImage: `url(${USRBG.getImageUrl(participantUserId)})`,
+ backgroundSize: "cover",
+ backgroundPosition: "center",
+ backgroundRepeat: "no-repeat",
+ "--full-res-avatar": `url(${avatarUrl})`
+ };
+ }
+ }
+
return {
"--full-res-avatar": `url(${avatarUrl})`,
};
diff --git a/src/plugins/usrbg/index.tsx b/src/plugins/usrbg/index.tsx
index df823102..45176da6 100644
--- a/src/plugins/usrbg/index.tsx
+++ b/src/plugins/usrbg/index.tsx
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-import { definePluginSettings } from "@api/Settings";
+import { definePluginSettings, Settings } from "@api/Settings";
import { Link } from "@components/Link";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
@@ -63,7 +63,7 @@ export default definePlugin({
},
{
find: "\"data-selenium-video-tile\":",
- predicate: () => settings.store.voiceBackground,
+ predicate: () => !Settings.plugins.FullVCPFP.enabled && settings.store.voiceBackground,
replacement: [
{
match: /(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,