This commit is contained in:
Mirco Wittrien 2024-04-20 07:35:50 +02:00
parent e547098173
commit a5d1b09e22
2 changed files with 19 additions and 1 deletions

View File

@ -355,13 +355,14 @@
"FolderItem": {"strings": ["folderNode:", "expandedFolderBackground", "onExpandCollapse"]},
"FolderItemWrapper": {"strings": ["folderNode:", "isFolderExpanded", "defaultFolderName:"]},
"FolderSettingsModal": {"strings": [".handleNameChange", ".handleSubmit", "folderName:"], "noSearch": true},
"GuildBadge": {"strings": ["foregroundDarkColor", "getBadgeCategory"]},
"GuildBans": {"strings": [".Messages.BANS_NO_USERS_BANNED", ".Messages.BANS_SEARCH_PLACEHOLDER", ".getSortedBans"]},
"GuildChannelListContextMenu": {"strings": ["GUILD_ACTIONS_MENU_LABEL", "\"guild-context\",\"aria-label\""], "noSearch": true},
"GuildChild": {"strings": [".getAcronym", ",fontSize:", ".acronym"], "noSearch": true},
"GuildContextMenu": {"strings": ["GUILD_ACTIONS_MENU_LABEL", "navId:\"guild", "GuildContextMenu"], "noSearch": true},
"GuildEmojis": {"strings": ["getMaxEmojiSlots", "lightSrc:", ".Messages.NO_EMOJI"]},
"GuildFavorites": {"strings": [".favoriteIcon", "FAVORITES_GUILD_NAME"]},
"GuildHeader": {"strings": ["bannerVisible:", "disableBannerAnimation:", "onContextMenu"]},
"GuildChild": {"strings": [".getAcronym", ",fontSize:", ".acronym"], "noSearch": true},
"GuildIcon": {"strings": [",animate:", ",size:", "{active:!0"], "noSearch": true},
"GuildIconWrapper": {"strings": ["badgeStrokeColor:", "textScale:"]},
"GuildInvitationRow": {"strings": [".getSelectedInviteMetadata", ".getSuggestedProps", "inviteKey:"], "noSearch": true},
@ -380,6 +381,7 @@
"HeaderBarTitleIcon": {"strings": ["HEADER_BAR_BADGE", ".iconBadge", "iconClassName:"]},
"HomeButtonDefault": {"strings": [".DISCODO_ENABLED", "home_button_no_track", "tutorialContainer"]},
"I18nLoader": {"strings": [".Messages.I18N_LOCALE_LOADING_ERROR", ".loading"]},
"IconBadge": {"strings": [".icon}", "ROUND,disableColor", ".iconBadge,"]},
"ImageModal": {"strings": ["renderLinkComponent", ".Messages.OPEN_IN_BROWSER", "animated"], "noSearch": true},
"ImageVideoModal": {"strings": ["renderLinkComponent", ".Messages.OPEN_IN_BROWSER", "videoWrapper"], "noSearch": true},
"InboxHeader": {"strings": [".UNREADS", ".TODOS", ".controls"]},

View File

@ -86,10 +86,12 @@ module.exports = (_ => {
"DirectMessage",
"FolderHeader",
"FolderItemWrapper",
"GuildBadge",
"GuildFavorites",
"GuildItem",
"GuildsBar",
"HomeButtonDefault",
"IconBadge",
"UnavailableGuildsButton"
]
};
@ -232,6 +234,20 @@ module.exports = (_ => {
});
}
processGuildBadge (e) {
this.processIconBadge(e, "Guild");
}
processIconBadge (e, type = "Icon") {
if (!e.returnvalue) return;
let ref = e.returnvalue.ref;
e.returnvalue.ref = BDFDB.TimeUtils.suppress(instance => {
if (typeof ref == "function") ref(instance);
let node = BDFDB.ReactUtils.findDOMNode(instance);
if (node) for (let path of node.querySelectorAll("path")) path.style.setProperty("d", `path("${path.getAttribute("d")}")`, "important");
}, `Error in Ref of ${type} Badge`, this);
}
processFolderHeader (e) {
if (!e.instance.props.folderNode) return;
e.returnvalue = this.removeMask(e.returnvalue);