fixed rest of the patches
This commit is contained in:
parent
0ebe598eba
commit
fce631dbf3
7 changed files with 14 additions and 19 deletions
|
|
@ -8,6 +8,9 @@ import { isPluginEnabled } from "@api/PluginManager";
|
|||
import betterUserArea from "@equicordplugins/betterUserArea";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findCssClassesLazy } from "@webpack";
|
||||
|
||||
const { iconForeground } = findCssClassesLazy("iconForeground", "autocompleteRowContent");
|
||||
|
||||
export default definePlugin({
|
||||
name: "UserAreaAPI",
|
||||
|
|
@ -18,16 +21,16 @@ export default definePlugin({
|
|||
{
|
||||
find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",
|
||||
replacement: {
|
||||
match: /(className:(\i)\.buttons,.{0,50}?children:\[)/,
|
||||
replace: "$1...$self.renderButtons(arguments[0],$2),"
|
||||
match: /(?<=\(\)\(\i\.\i,.{0,50}children:\[)/,
|
||||
replace: "...$self.renderButtons(arguments[0]),"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
renderButtons(props: { nameplate?: any; }, styles: { iconForeground?: string; }) {
|
||||
renderButtons(props: { nameplate?: any; }) {
|
||||
return Vencord.Api.UserArea._renderButtons({
|
||||
nameplate: props.nameplate,
|
||||
iconForeground: props.nameplate != null ? styles.iconForeground : void 0,
|
||||
iconForeground: props.nameplate != null ? iconForeground : void 0,
|
||||
hideTooltips: this.shouldHideTooltips()
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ export default definePlugin({
|
|||
{
|
||||
find: "PrivateChannel.renderAvatar",
|
||||
replacement: {
|
||||
match: /(\i\]:\i\}\),children:\i\}\),)(?=.{0,25}isSystemDM\(\))/,
|
||||
match: /(\i\]:\i\}\),children:\i\}\),)(?=.{0,100}Types\.SYSTEM_DM)/,
|
||||
replace: "$1style:{color:`${$self.colorDMList(arguments[0])}`},"
|
||||
},
|
||||
predicate: () => settings.store.dmList,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export default definePlugin({
|
|||
TranslateMessage: TranslateMessage,
|
||||
patches: [
|
||||
{
|
||||
find: ".messageListItem",
|
||||
find: '.CUSTOM_GIFT?""',
|
||||
replacement: {
|
||||
match: /renderContentOnly:\i}=\i;/,
|
||||
replace: "$&$self.TranslateMessage(arguments[0].message.content).then(response => arguments[0].message.content = response);"
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ export default definePlugin({
|
|||
{
|
||||
find: "#{intl::USER_PROFILE_PRONOUNS}",
|
||||
replacement: {
|
||||
match: /(\.nicknameIcons,children:)(\i)/,
|
||||
replace: "$1[...Vencord.Api.NicknameIcons._renderIcons({userId:arguments[0].user?.id}),$2]"
|
||||
match: /(?<=isVerifiedBot\(\).{0,50}\i\.\i,children:)(\i)/,
|
||||
replace: "[...Vencord.Api.NicknameIcons._renderIcons({userId:arguments[0].user?.id}),$1]"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -121,11 +121,11 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: ".usernameSpeaking]",
|
||||
find: "VOICE_PANEL}};",
|
||||
predicate: () => settings.store.allCallTimers,
|
||||
replacement: [
|
||||
{
|
||||
match: /(?<=user:(\i).*?)iconGroup,.{0,200}children:\[/,
|
||||
match: /(?<=user:(\i).*?\.EMBEDDED.{0,250}className:)\i\.\i,.{0,200}children:\[/,
|
||||
replace: "$&$self.renderTimer($1.id),",
|
||||
predicate: () => !settings.store.showWithoutHover,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,14 +33,6 @@ export default definePlugin({
|
|||
replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})"
|
||||
}
|
||||
},
|
||||
// User Profile Modal
|
||||
{
|
||||
find: ".connections,userId:",
|
||||
replacement: {
|
||||
match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,
|
||||
replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false}),"
|
||||
}
|
||||
},
|
||||
// User Profile Modal v2
|
||||
{
|
||||
find: ".MODAL_V2,onClose:",
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ export default definePlugin({
|
|||
]
|
||||
},
|
||||
{
|
||||
find: '="interactive-normal",overflowCountClassName:',
|
||||
find: '="interactive-text-default",overflowCountClassName:',
|
||||
replacement: [
|
||||
{
|
||||
// Create a variable for the channel prop
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue