diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 80f46c5a96..63cccb6f79 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -5051,24 +5051,23 @@ module.exports = (_ => { if (!this.props.value) return style; style = Object.assign({}, style); this.props.color = typeof this.props.getColor == "function" ? this.props.getColor(this.props.value) : this.props.color; - style.borderColor = this.props.color; - if (InternalComponents.NativeSubComponents.Checkbox.Types) switch (this.props.type) { - case InternalComponents.NativeSubComponents.Checkbox.Types.DEFAULT: + if (InternalComponents.LibraryComponents.Checkbox.Types) switch (this.props.type) { + case InternalComponents.LibraryComponents.Checkbox.Types.DEFAULT: style.borderColor = this.props.color; break; - case InternalComponents.NativeSubComponents.Checkbox.Types.GHOST: + case InternalComponents.LibraryComponents.Checkbox.Types.GHOST: let color = BDFDB.ColorUtils.setAlpha(this.props.color, 0.15, "RGB"); style.backgroundColor = color; style.borderColor = color; break; - case InternalComponents.NativeSubComponents.Checkbox.Types.INVERTED: + case InternalComponents.LibraryComponents.Checkbox.Types.INVERTED: style.backgroundColor = this.props.color; style.borderColor = this.props.color; } return style; } getColor() { - return this.props.value ? (InternalComponents.NativeSubComponents.Checkbox.Types && this.props.type === InternalComponents.NativeSubComponents.Checkbox.Types.INVERTED ? BDFDB.DiscordConstants.Colors.WHITE : this.props.color) : "transparent"; + return this.props.value ? (InternalComponents.LibraryComponents.Checkbox.Types && this.props.type === InternalComponents.LibraryComponents.Checkbox.Types.INVERTED ? BDFDB.DiscordConstants.Colors.WHITE : this.props.color) : "transparent"; } handleChange(e) { this.props.value = typeof this.props.getValue == "function" ? this.props.getValue(this.props.value, e) : !this.props.value; @@ -5101,7 +5100,7 @@ module.exports = (_ => { }) }), BDFDB.ReactUtils.createElement("div", { - className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.checkbox, this.props.shape, this.props.value && BDFDB.disCN.checkboxchecked), + className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.checkbox, BDFDB.disCN["checkbox" + this.props.shape], this.props.value && BDFDB.disCN.checkboxchecked), style: Object.assign({ width: this.props.size, height: this.props.size, @@ -5119,6 +5118,16 @@ module.exports = (_ => { }); } }; + InternalComponents.LibraryComponents.Checkbox.Types = { + DEFAULT: "DEFAULT", + GHOST: "GHOST", + INVERTED: "INVERTED" + }; + InternalComponents.LibraryComponents.Checkbox.Shapes = { + BOX: "box", + ROUND: "round" + }; + InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.Checkbox, {type: InternalComponents.LibraryComponents.Checkbox.Types.INVERTED, shape: InternalComponents.LibraryComponents.Checkbox.Shapes.ROUND}); InternalComponents.LibraryComponents.Clickable = reactInitialized && class BDFDB_Clickable extends LibraryModules.React.Component { handleClick(e) {if (typeof this.props.onClick == "function") this.props.onClick(e, this);} diff --git a/Library/_res/BDFDB.data.json b/Library/_res/BDFDB.data.json index 93e7041a50..d5399c2268 100644 --- a/Library/_res/BDFDB.data.json +++ b/Library/_res/BDFDB.data.json @@ -982,7 +982,8 @@ "verifiedBadge": "verifiedBadge-mH2YpO" }, "ShowHiddenChannels": { - "accessModal": "accessModal-w5HjsV" + "accessModal": "accessModal-w5HjsV", + "hiddenChannel": "hidden-9f2Dsa" }, "SpotifyControls": { "activityButton": "activityButton-5Fs4Aa", @@ -1470,6 +1471,7 @@ "_showconnectionsicon": ["ShowConnections", "connectionIcon"], "_showconnectionsverifiedbadge": ["ShowConnections", "verifiedBadge"], "_showhiddenchannelsaccessmodal": ["ShowHiddenChannels", "accessModal"], + "_showhiddenchannelshiddenchannel": ["ShowHiddenChannels", "hiddenChannel"], "_spellcheckerror": ["SpellCheck", "error"], "_spellcheckoverlay": ["SpellCheck", "overlay"], "_spotifycontrolsactivitybutton": ["SpotifyControls", "activityButton"], diff --git a/Plugins/RevealAllSpoilers/RevealAllSpoilers.plugin.js b/Plugins/RevealAllSpoilers/RevealAllSpoilers.plugin.js index 9cab3230cf..387ec08b34 100644 --- a/Plugins/RevealAllSpoilers/RevealAllSpoilers.plugin.js +++ b/Plugins/RevealAllSpoilers/RevealAllSpoilers.plugin.js @@ -2,7 +2,7 @@ * @name RevealAllSpoilers * @author DevilBro * @authorId 278543574059057154 - * @version 1.0.7 + * @version 1.0.8 * @description Allows you to reveal all Spoilers within a Message/Status by holding the Ctrl Key and clicking a Spoiler * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -17,14 +17,12 @@ module.exports = (_ => { "info": { "name": "RevealAllSpoilers", "author": "DevilBro", - "version": "1.0.7", + "version": "1.0.8", "description": "Allows you to reveal all Spoilers within a Message/Status by holding the Ctrl Key and clicking a Spoiler" }, "changeLog": { - "improved": { - "Plugin Name": "Changed to clarify the Usage", - "Behaviour": "You no longer need to right click a message and press reveal all, simply hold Ctrl and click a Spoiler", - "About Me": "Also works on About Mes" + "fixed": { + "Replies": "No longer reveals spoilers within reply preview if revealing all spoilers within a message" } } }; @@ -97,7 +95,7 @@ module.exports = (_ => { if (e2.methodArguments[0].ctrlKey) { BDFDB.ListenerUtils.stopEvent(e2.methodArguments[0]); let parent = BDFDB.DOMUtils.getParent(BDFDB.dotCN.message, e2.methodArguments[0].target) || e2.methodArguments[0].target.parentElement; - if (parent) for (let spoiler of parent.querySelectorAll(BDFDB.dotCN.spoilerhidden)) spoiler.click(); + if (parent) for (let spoiler of parent.querySelectorAll(BDFDB.dotCN.spoilerhidden)) if (!BDFDB.DOMUtils.getParent(BDFDB.dotCN.messagerepliedmessagepreview, spoiler)) spoiler.click(); } }}, {force: true, noCache: true}); } diff --git a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js index 9d672f2883..19a20f230f 100644 --- a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js +++ b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js @@ -202,6 +202,7 @@ module.exports = (_ => { before: { Channels: "render", ChannelCategoryItem: "type", + ChannelItem: "default", VoiceUsers: "render" }, after: { @@ -492,31 +493,34 @@ module.exports = (_ => { processChannelItem (e) { if (e.instance.props.channel && this.isChannelHidden(e.instance.props.channel.id)) { - let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "ChannelItemIcon"}); - let channelChildren = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelchildren]]}); - if (channelChildren && channelChildren.props && channelChildren.props.children) { - channelChildren.props.children = [BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, { - text: BDFDB.LanguageUtils.LanguageStrings.CHANNEL_LOCKED_SHORT, - children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { - className: BDFDB.disCN.channeliconitem, - style: {display: "block"}, - children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, { - className: BDFDB.disCN.channelactionicon, - name: BDFDB.LibraryComponents.SvgIcon.Names.LOCK_CLOSED + if (!e.returnvalue) e.instance.props.className = BDFDB.DOMUtils.formatClassName(e.instance.props.className, BDFDB.disCN._showhiddenchannelshiddenchannel); + else { + let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "ChannelItemIcon"}); + let channelChildren = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelchildren]]}); + if (channelChildren && channelChildren.props && channelChildren.props.children) { + channelChildren.props.children = [BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, { + text: BDFDB.LanguageUtils.LanguageStrings.CHANNEL_LOCKED_SHORT, + children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { + className: BDFDB.disCN.channeliconitem, + style: {display: "block"}, + children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, { + className: BDFDB.disCN.channelactionicon, + name: BDFDB.LibraryComponents.SvgIcon.Names.LOCK_CLOSED + }) }) - }) - })]; - } - if (!(e.instance.props.channel.type == BDFDB.DiscordConstants.ChannelTypes.GUILD_VOICE && e.instance.props.connected)) { - let wrapper = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelwrapper]]}); - if (wrapper) { - wrapper.props.onMouseDown = _ => {}; - wrapper.props.onMouseUp = _ => {}; + })]; } - let mainContent = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelmaincontent]]}); - if (mainContent) { - mainContent.props.onClick = _ => {}; - mainContent.props.href = null; + if (!(e.instance.props.channel.type == BDFDB.DiscordConstants.ChannelTypes.GUILD_VOICE && e.instance.props.connected)) { + let wrapper = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelwrapper]]}); + if (wrapper) { + wrapper.props.onMouseDown = _ => {}; + wrapper.props.onMouseUp = _ => {}; + } + let mainContent = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelmaincontent]]}); + if (mainContent) { + mainContent.props.onClick = _ => {}; + mainContent.props.href = null; + } } } } diff --git a/Themes/BlurpleRecolor/BlurpleRecolor.css b/Themes/BlurpleRecolor/BlurpleRecolor.css index 1824d07b0d..01ec7eff06 100644 --- a/Themes/BlurpleRecolor/BlurpleRecolor.css +++ b/Themes/BlurpleRecolor/BlurpleRecolor.css @@ -2043,6 +2043,10 @@ a.metadataName-14STf- { .checkbox-1ix_J3.checked-3_4uQ9[style*="border-color: hsl(235, "] { border-color: rgb(var(--accentcolor)) !important; } +.checkbox-1ix_J3 path[fill*="hsl(227, "], +.checkbox-1ix_J3 path[fill*="hsl(235, "] { + fill: rgb(var(--accentcolor)) !important; +} .container-3auIfb { /* switch unchecked */ background-color: rgb(114, 118, 125) !important;