Update ShowHiddenChannels.plugin.js
This commit is contained in:
parent
61678964d6
commit
160f6c31b1
|
@ -2,7 +2,7 @@
|
||||||
* @name ShowHiddenChannels
|
* @name ShowHiddenChannels
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @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)
|
* @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
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -17,7 +17,7 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "ShowHiddenChannels",
|
"name": "ShowHiddenChannels",
|
||||||
"author": "DevilBro",
|
"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)"
|
"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",
|
Channels: "render",
|
||||||
ChannelCategoryItem: "type",
|
ChannelCategoryItem: "type",
|
||||||
ChannelItem: "default",
|
ChannelItem: "default",
|
||||||
VoiceUser: "render",
|
VoiceUsers: "render",
|
||||||
VoiceUsers: "render"
|
VoiceUser: "render"
|
||||||
},
|
},
|
||||||
after: {
|
after: {
|
||||||
ChannelItem: "default",
|
ChannelItem: "default",
|
||||||
|
@ -208,6 +208,12 @@ module.exports = (_ => {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
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;
|
let channelId = (BDFDB.LibraryModules.VoiceUtils.getVoiceStateForUser(e.instance.props.user.id) || {}).channelId;
|
||||||
if (channelId && this.isChannelHidden(channelId)) {
|
if (channelId && this.isChannelHidden(channelId)) {
|
||||||
if (!e.returnvalue) {
|
if (!e.returnvalue) {
|
||||||
e.instance.props.onClick = event => BDFDB.ListenerUtils.stopEvent(event);
|
e.instance.props.className = BDFDB.DOMUtils.formatClassName(e.instance.props.className, BDFDB.disCN._showhiddenchannelshiddenchannel);
|
||||||
e.instance.props.onDoubleClick = event => BDFDB.ListenerUtils.stopEvent(event);
|
|
||||||
e.instance.props.onMouseDown = event => BDFDB.ListenerUtils.stopEvent(event);
|
e.instance.props.onMouseDown = event => BDFDB.ListenerUtils.stopEvent(event);
|
||||||
e.instance.props.onMouseUp = event => BDFDB.ListenerUtils.stopEvent(event);
|
e.instance.props.onClick = 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);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let icons = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.voiceicons]]});
|
let icons = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.voiceicons]]});
|
||||||
if (icons) icons.props.children = [];
|
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
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue