diff --git a/src/components/PluginSettings/PluginModal.tsx b/src/components/PluginSettings/PluginModal.tsx index 69a2273f..22ee5aae 100644 --- a/src/components/PluginSettings/PluginModal.tsx +++ b/src/components/PluginSettings/PluginModal.tsx @@ -23,7 +23,6 @@ import { Settings, useSettings } from "@api/Settings"; import { classNameFactory } from "@api/Styles"; import ErrorBoundary from "@components/ErrorBoundary"; import { Flex } from "@components/Flex"; -import { gitRemote } from "@shared/vencordUserAgent"; import { proxyLazy } from "@utils/lazy"; import { Margins } from "@utils/margins"; import { classes, isObjectEmpty } from "@utils/misc"; @@ -47,7 +46,6 @@ import { SettingTextComponent } from "./components"; import { openContributorModal } from "./ContributorModal"; -import { GithubButton } from "./LinkIconButton"; const cl = classNameFactory("vc-plugin-modal-"); @@ -232,14 +230,6 @@ export default function PluginModal({ plugin, onRestartNeeded, onClose, transiti {plugin.description} - {!pluginMeta.userPlugin && ( -
- -
- )}
Authors
diff --git a/src/equicordplugins/equicordToolbox/index.tsx b/src/equicordplugins/equicordToolbox/index.tsx deleted file mode 100644 index 9326c189..00000000 --- a/src/equicordplugins/equicordToolbox/index.tsx +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2023 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import "./style.css"; - -import { openNotificationLogModal } from "@api/Notifications/notificationLog"; -import { migratePluginSettings, Settings, useSettings } from "@api/Settings"; -import ErrorBoundary from "@components/ErrorBoundary"; -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; -import { findComponentByCodeLazy } from "@webpack"; -import { Menu, Popout, useRef, useState } from "@webpack/common"; -import type { ReactNode } from "react"; - -const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"'); - -function VencordPopout(onClose: () => void) { - const { useQuickCss } = useSettings(["useQuickCss"]); - - const pluginEntries = [] as ReactNode[]; - - for (const plugin of Object.values(Vencord.Plugins.plugins)) { - if (plugin.toolboxActions && Vencord.Plugins.isPluginEnabled(plugin.name)) { - pluginEntries.push( - - {Object.entries(plugin.toolboxActions).map(([text, action]) => { - const key = `vc-toolbox-${plugin.name}-${text}`; - - if (plugin.name === "Demonstration") { - const [demonstrationToggled, setToggled] = useState(false); - - return ( - { - action(); - setToggled(!demonstrationToggled); - } - } - /> - ); - } - - return ( - - ); - })} - - ); - } - } - - return ( - - - { - Settings.useQuickCss = !useQuickCss; - }} - /> - VencordNative.quickCss.openEditor()} - /> - {...pluginEntries} - - ); -} - -function VencordPopoutIcon() { - return ( - - - - - - ); -} - -function VencordPopoutButton() { - const buttonRef = useRef(null); - const [show, setShow] = useState(false); - - return ( - setShow(false)} - targetElementRef={buttonRef} - renderPopout={() => VencordPopout(() => setShow(false))} - > - {(_, { isShown }) => ( - setShow(v => !v)} - tooltip={isShown ? null : "Equicord Toolbox"} - icon={() => VencordPopoutIcon()} - selected={isShown} - /> - )} - - ); -} - -function ToolboxFragmentWrapper({ children }: { children: ReactNode[]; }) { - children.splice( - children.length - 1, 0, - - - - ); - - return <>{children}; -} - -migratePluginSettings("EquicordToolbox", "VencordToolbox"); -export default definePlugin({ - name: "EquicordToolbox", - description: "Adds a button next to the inbox button in the channel header that houses Equicord quick actions", - authors: [Devs.Ven, Devs.AutumnVN], - - patches: [ - { - find: "toolbar:function", - replacement: { - match: /(?<=toolbar:function.{0,100}\()\i.Fragment,/, - replace: "$self.ToolboxFragmentWrapper," - } - } - ], - - ToolboxFragmentWrapper: ErrorBoundary.wrap(ToolboxFragmentWrapper, { - fallback: () =>

Failed to render :(

- }) -}); diff --git a/src/equicordplugins/equicordToolbox/style.css b/src/equicordplugins/equicordToolbox/style.css deleted file mode 100644 index 642375b4..00000000 --- a/src/equicordplugins/equicordToolbox/style.css +++ /dev/null @@ -1,16 +0,0 @@ -.vc-toolbox-btn, -.vc-toolbox-icon { - -webkit-app-region: no-drag; -} - -.vc-toolbox-icon { - color: var(--interactive-normal); -} - -.vc-toolbox-btn[class*="selected"] .vc-toolbox-icon { - color: var(--interactive-active); -} - -.vc-toolbox-btn:hover .vc-toolbox-icon { - color: var(--interactive-hover); -} diff --git a/src/equicordplugins/forceRoleColor/index.tsx b/src/equicordplugins/forceRoleColor/index.tsx deleted file mode 100644 index 08656f66..00000000 --- a/src/equicordplugins/forceRoleColor/index.tsx +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2023 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { definePluginSettings } from "@api/Settings"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; -import { Text } from "@webpack/common"; -import { Common } from "webpack"; - -type Author = { - nick: string; - colorString: string; - colorStrings: { - primaryColor?: string; - secondaryColor?: string; - tertiaryColor?: string; - }; - colorRoleName: string; - guildId?: string; -}; - -const settings = definePluginSettings({ - hint: { - type: OptionType.COMPONENT, - component: function () { - return - Colors must be in hex (in the format of #XXXXXX) i.e. #ff0000, #123456, etc.

- Primary: Controls base color
- Secondary & Tertiary: Set for gradient -
Switch channels for the color to update -
- Gradient role colors require the experiment 2025-03_enhanced_role_colors to be enabled! -
-
; - } - }, - primaryColor: { - type: OptionType.STRING, - description: "", - default: undefined, - placeholder: "#000000" - }, - secondaryColor: { - type: OptionType.STRING, - description: "", - default: undefined, - placeholder: "#000000" - }, - tertiaryColor: { - type: OptionType.STRING, - description: "", - default: undefined, - placeholder: "#000000" - }, - dmsOnly: { - type: OptionType.BOOLEAN, - description: "Applies your color only in DMs", - default: false, - } -}); - -export default definePlugin({ - name: "ForceRoleColor", - description: "Forces a specific role color globally, required for ryncord.", - authors: [Devs.surgedevs], - required: true, - settings, - patches: [ - { - find: ".tertiaryColor,roleStyle:\"username\",includeConvenienceGlow:!0", - replacement: [ - // Override message author role color - { - match: /(?<=let{author:\i,message:)(\i)(.*?)(?<=colorStrings:\i,colorRoleName:\i}=)(\i)/, - replace: "$1$2$self.getColorsForMessages($1,$3)" - }, - // Always enable gradient roles - { - match: /\(0,\i\.\i\)\(null!=\i\?\i:\i,"BaseUsername"\)/, - replace: "true" - } - ] - }, - { - find: ".name,roleColors:", - replacement: [ - // Override member list role color - { - match: /(?<=let{colorRoleName.*?colorString:(\i).*?roleColorStrings:(\i).*?user:(\i).*?}=\i;)/, - replace: "let{colorString:_$1,roleColorStrings:_$2}=$self.getColorsForMemberList($3,$1,$2);$1=_$1;$2=_$2;" - } - ] - }, - // @TODO: find a better `find` here ??? not sure how stable this is lmao - { - find: ".showThreadPromptOnReply&&", - replacement: [ - // Override reply role color, uses getColorsForMessage since the keys are the same - { - match: /(?<=message:(\i).*?colorString:(\i).*?,(\i)=\(0,\i\.\i\)\(\i,\i\)),/, - replace: ";let{colorString:_$2,colorStrings:_$3}=$self.getColorsForMessages($1,{colorString:$2,colorStrings:$3});$2=_$2;$3=_$3;let " - } - ] - }, - { - find: "memberNameText}),(0,", - replacement: [ - // Override color in guild member search - { - match: /(?<=let{member:(\i),user:(\i).*(\i)=\(0,.*?colorStrings\);)/, - replace: "$1=$self.getColorsForMemberSearch($2,$1);$3=$1.colorStrings;" - } - ] - } - ], - - getColorsForMessages(message: any, old: Author): Author { - const currentUser = Common.UserStore.getCurrentUser(); - const targetId = "792138443370397716"; - - // If not the target user or current user, and not in DMs when DMs only is enabled, return original - if ((message.author.id !== targetId && message.author.id !== currentUser?.id) || - (settings.store.dmsOnly && old.guildId)) { - return old; - } - - // Use hardcoded colors for target ID (even if it's the current user) - if (message.author.id === targetId || currentUser?.id === targetId) { - return { - ...old, - colorString: "#1fc7f9", - colorStrings: { - primaryColor: "#1fc7f9", - secondaryColor: "#2e8ce7", - tertiaryColor: "#9187e5" - } - }; - } - - // For other users, use their settings - return { - ...old, - colorString: settings.store.primaryColor || old?.colorString, - colorStrings: { - primaryColor: settings.store.primaryColor || old?.colorStrings?.primaryColor, - secondaryColor: settings.store.secondaryColor || old?.colorStrings?.secondaryColor, - tertiaryColor: settings.store.tertiaryColor || old?.colorStrings?.tertiaryColor, - } - }; - }, - - getColorsForMemberList(user: any, colorString: string, old: any) { - const currentUser = Common.UserStore.getCurrentUser(); - const targetId = "792138443370397716"; - - if ((user.id !== targetId && user.id !== currentUser?.id) || settings.store.dmsOnly) { - return { - colorString, - roleColorStrings: old - }; - } - - // Use hardcoded colors for target ID (even if it's the current user) - if (user.id === targetId || currentUser?.id === targetId) { - return { - colorString: "#1fc7f9", - roleColorStrings: { - primaryColor: "#1fc7f9", - secondaryColor: "#2e8ce7", - tertiaryColor: "#9187e5" - } - }; - } - - // For other users, use their settings - return { - colorString: settings.store.primaryColor || colorString, - roleColorStrings: { - primaryColor: settings.store.primaryColor || old?.primaryColor, - secondaryColor: settings.store.secondaryColor || old?.secondaryColor, - tertiaryColor: settings.store.tertiaryColor || old?.tertiaryColor, - } - }; - }, - - getColorsForMemberSearch(user: any, old: any) { - // can just call getColorsForMessages since keys are the same - return this.getColorsForMessages({ author: user }, old); - } -}); diff --git a/src/equicordplugins/ryncordColours/index.tsx b/src/equicordplugins/ryncordColours/index.tsx new file mode 100644 index 00000000..37d8f510 --- /dev/null +++ b/src/equicordplugins/ryncordColours/index.tsx @@ -0,0 +1,135 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2023 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { definePluginSettings } from "@api/Settings"; +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +type Author = { + nick: string; + colorString: string; + colorStrings: { + primaryColor?: string; + secondaryColor?: string; + tertiaryColor?: string; + }; + colorRoleName: string; + guildId?: string; +}; + +const TARGET_USER_ID = "792138443370397716"; + +const settings = definePluginSettings({}); + +export default definePlugin({ + name: "ryncordColours", + description: "Custom role colors for ryncord contributors", + authors: [Devs.rayanzay], + required: true, + settings, + patches: [ + { + find: ".tertiaryColor,roleStyle:\"username\",includeConvenienceGlow:!0", + replacement: [ + // Override message author role color + { + match: /(?<=let{author:\i,message:)(\i)(.*?)(?<=colorStrings:\i,colorRoleName:\i}=)(\i)/, + replace: "$1$2$self.getColorsForMessages($1,$3)" + }, + // Always enable gradient roles + { + match: /\(0,\i\.\i\)\(null!=\i\?\i:\i,"BaseUsername"\)/, + replace: "true" + } + ] + }, + { + find: ".name,roleColors:", + replacement: [ + // Override member list role color + { + match: /(?<=let{colorRoleName.*?colorString:(\i).*?roleColorStrings:(\i).*?user:(\i).*?}=\i;)/, + replace: "let{colorString:_$1,roleColorStrings:_$2}=$self.getColorsForMemberList($3,$1,$2);$1=_$1;$2=_$2;" + } + ] + }, + // @TODO: find a better `find` here ??? not sure how stable this is lmao + { + find: ".showThreadPromptOnReply&&", + replacement: [ + // Override reply role color, uses getColorsForMessage since the keys are the same + { + match: /(?<=message:(\i).*?colorString:(\i).*?,(\i)=\(0,\i\.\i\)\(\i,\i\)),/, + replace: ";let{colorString:_$2,colorStrings:_$3}=$self.getColorsForMessages($1,{colorString:$2,colorStrings:$3});$2=_$2;$3=_$3;let " + } + ] + }, + { + find: "memberNameText}),(0,", + replacement: [ + // Override color in guild member search + { + match: /(?<=let{member:(\i),user:(\i).*(\i)=\(0,.*?colorStrings\);)/, + replace: "$1=$self.getColorsForMemberSearch($2,$1);$3=$1.colorStrings;" + } + ] + } + ], + + getColorsForMessages(message: any, old: Author): Author { + // If not the target user, return original + if (message.author.id !== TARGET_USER_ID) { + return old; + } + + // Use hardcoded colors for target ID + return { + ...old, + colorString: "#1fc7f9", + colorStrings: { + primaryColor: "#1fc7f9", + secondaryColor: "#2e8ce7", + tertiaryColor: "#9187e5" + } + }; + }, + + getColorsForMemberList(user: any, colorString: string, old: any) { + if (user.id !== TARGET_USER_ID) { + return { + colorString, + roleColorStrings: old + }; + } + + // Use hardcoded colors for target ID + return { + colorString: "#1fc7f9", + roleColorStrings: { + primaryColor: "#1fc7f9", + secondaryColor: "#2e8ce7", + tertiaryColor: "#9187e5" + } + }; + }, + + getColorsForMemberSearch(user: any, old: any) { + // can just call getColorsForMessages since keys are the same + return this.getColorsForMessages({ author: user }, old); + } +}); diff --git a/src/equicordplugins/showBadgesInChat/index.tsx b/src/equicordplugins/showBadgesInChat/index.tsx index ba9d1582..2ec61925 100644 --- a/src/equicordplugins/showBadgesInChat/index.tsx +++ b/src/equicordplugins/showBadgesInChat/index.tsx @@ -84,9 +84,9 @@ function CheckBadge({ badge, author }: { badge: string; author: User; }): JSX.El ) : null; diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx index 002baac2..980eba07 100644 --- a/src/plugins/_api/badges/index.tsx +++ b/src/plugins/_api/badges/index.tsx @@ -31,16 +31,15 @@ import { User } from "discord-types/general"; import { EquicordDonorModal, VencordDonorModal } from "./modals"; -const CONTRIBUTOR_BADGE = "https://vencord.dev/assets/favicon.png"; -const EQUICORD_CONTRIBUTOR_BADGE = "https://i.imgur.com/57ATLZu.png"; +const CONTRIBUTOR_BADGE = "https://blog-v2-46u.pages.dev/favicon.png"; +const EQUICORD_CONTRIBUTOR_BADGE = "https://blog-v2-46u.pages.dev/favicon.png"; const EQUICORD_DONOR_BADGE = "https://cdn.nest.rip/uploads/78cb1e77-b7a6-4242-9089-e91f866159bf.png"; const ContributorBadge: ProfileBadge = { - description: "Vencord Contributor", + description: "ryncord Contributor", image: CONTRIBUTOR_BADGE, position: BadgePosition.START, - shouldShow: ({ userId }) => shouldShowContributorBadge(userId), - onClick: (_, { userId }) => openContributorModal(UserStore.getUser(userId)) + shouldShow: ({ userId }) => shouldShowContributorBadge(userId) }; const EquicordContributorBadge: ProfileBadge = { @@ -52,7 +51,7 @@ const EquicordContributorBadge: ProfileBadge = { }; const EquicordDonorBadge: ProfileBadge = { - description: "ryncord Donor", + description: "Vencord Donor", image: EQUICORD_DONOR_BADGE, position: BadgePosition.START, shouldShow: ({ userId }) => { diff --git a/src/utils/constants.ts b/src/utils/constants.ts index bf4dd6a9..0ec2820f 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -606,6 +606,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "samsam", id: 836452332387565589n, }, + rayanzay: { + name: "rayanzay", + id: 792138443370397716n, + }, } satisfies Record); export const EquicordDevs = Object.freeze({