im hungry (#675)
* UserAreaAPI: fix patch * NicknameIconsAPI: fix patch * MemberListDecoratorsAPI: some fix * bleeh * less generic
This commit is contained in:
parent
bda0c38cc4
commit
de2716ce52
4 changed files with 11 additions and 13 deletions
|
|
@ -9,7 +9,7 @@ import { Logger } from "@utils/Logger";
|
|||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import type { ComponentType, MouseEventHandler, ReactNode } from "react";
|
||||
|
||||
const PanelButton = findComponentByCodeLazy("tooltipPositionKey", "tooltipShouldShow") as ComponentType<UserAreaButtonProps>;
|
||||
const PanelButton = findComponentByCodeLazy("tooltipPositionKey", "positionKeyStemOverride") as ComponentType<UserAreaButtonProps>;
|
||||
|
||||
export interface UserAreaButtonProps {
|
||||
icon: ReactNode;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ export default definePlugin({
|
|||
{
|
||||
find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",
|
||||
replacement: {
|
||||
match: /(?<=\(\)\(\i\.\i,.{0,50}children:\[)/,
|
||||
replace: "...$self.renderButtons(arguments[0]),"
|
||||
match: /(?<=className:(\i)\.\i,style:\i,)children:\[/,
|
||||
replace: "children:[...$self.renderButtons(arguments[0],$1),"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -30,18 +30,16 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: "#{intl::GUILD_OWNER}),children:",
|
||||
replacement: [
|
||||
{
|
||||
match: /children:\[(?=.{0,300},lostPermissionTooltipText:)/,
|
||||
replace: "children:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'guild'),"
|
||||
}
|
||||
]
|
||||
find: "MemberListItem",
|
||||
replacement: {
|
||||
match: /(?<=GuildIcon:\i}=\i.{0,30}Fragment,\{children:\[)/,
|
||||
replace: "Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'guild'),"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: "PrivateChannel.renderAvatar",
|
||||
replacement: {
|
||||
match: /decorators:(\i\.isSystemDM\(\)\?.+?:null)/,
|
||||
match: /decorators:(\i\.isSystemDM\(\)\?.{0,100}:null)/,
|
||||
replace: "decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'dm'),$1]"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ export default definePlugin({
|
|||
{
|
||||
find: "#{intl::USER_PROFILE_PRONOUNS}",
|
||||
replacement: {
|
||||
match: /(?<=isVerifiedBot\(\).{0,50}\i\.\i,children:)(\i)/,
|
||||
replace: "[...Vencord.Api.NicknameIcons._renderIcons({userId:arguments[0].user?.id}),$1]"
|
||||
match: /(?<=isVerifiedBot\(\)}\).{0,60})children:(\i)/,
|
||||
replace: "children:[...Vencord.Api.NicknameIcons._renderIcons({userId:arguments[0].user?.id}),$1]"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue