diff --git a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js index 2aaa31ddd7..aff9d1265a 100644 --- a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js +++ b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js @@ -2,7 +2,7 @@ * @name ShowHiddenChannels * @author DevilBro * @authorId 278543574059057154 - * @version 3.0.9 + * @version 3.1.0 * @description Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible) * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -17,7 +17,7 @@ module.exports = (_ => { "info": { "name": "ShowHiddenChannels", "author": "DevilBro", - "version": "3.0.9", + "version": "3.1.0", "description": "Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible)" } }; @@ -193,8 +193,8 @@ module.exports = (_ => { Channels: "render", ChannelCategoryItem: "type", ChannelItem: "default", - VoiceUser: "render", - VoiceUsers: "render" + VoiceUsers: "render", + VoiceUser: "render" }, after: { ChannelItem: "default", @@ -208,6 +208,12 @@ module.exports = (_ => { bottom: 0; width: 100%; } + ${BDFDB.dotCN.voiceuser + BDFDB.dotCN._showhiddenchannelshiddenchannel} { + width: calc(100% + 8px); + } + ${BDFDB.dotCN.voiceuser + BDFDB.dotCNS._showhiddenchannelshiddenchannel + BDFDB.dotCN.voicecontent} { + margin-right: 8px; + } `; } @@ -533,17 +539,22 @@ module.exports = (_ => { let channelId = (BDFDB.LibraryModules.VoiceUtils.getVoiceStateForUser(e.instance.props.user.id) || {}).channelId; if (channelId && this.isChannelHidden(channelId)) { if (!e.returnvalue) { - e.instance.props.onClick = event => BDFDB.ListenerUtils.stopEvent(event); - e.instance.props.onDoubleClick = event => BDFDB.ListenerUtils.stopEvent(event); + e.instance.props.className = BDFDB.DOMUtils.formatClassName(e.instance.props.className, BDFDB.disCN._showhiddenchannelshiddenchannel); e.instance.props.onMouseDown = event => BDFDB.ListenerUtils.stopEvent(event); - e.instance.props.onMouseUp = event => BDFDB.ListenerUtils.stopEvent(event); - e.instance.props.onKeyDown = event => BDFDB.ListenerUtils.stopEvent(event); - e.instance.props.onKeyUp = event => BDFDB.ListenerUtils.stopEvent(event); - e.instance.props.onKeyPress = event => BDFDB.ListenerUtils.stopEvent(event); + e.instance.props.onClick = event => BDFDB.ListenerUtils.stopEvent(event); } else { let icons = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.voiceicons]]}); if (icons) icons.props.children = []; + e.returnvalue = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.UserPopoutContainer, { + position: BDFDB.LibraryComponents.PopoutContainer.Positions.RIGHT, + align: BDFDB.LibraryComponents.PopoutContainer.Align.TOP, + killEvent: true, + userId: e.instance.props.user.id, + channelId: channelId, + guildId: e.instance.props.guild_id, + children: e.returnvalue + }); } } }