From 1f7ec93a246b4f2b2d756141ddb71169e592453a Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sat, 15 Apr 2023 00:40:42 -0300 Subject: [PATCH] SHC: Small improvements (#907) --- src/plugins/showHiddenChannels/index.tsx | 9 +++++++-- src/plugins/showHiddenChannels/style.css | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 5cdc05b..272ff7a 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -309,6 +309,11 @@ export default definePlugin({ match: /"more-options-popout"\)\);if\((?<=function \i\((\i)\).+?)/, replace: (m, props) => `${m}!${props}.inCall&&$self.isHiddenChannel(${props}.channel,true)){}else if(` }, + { + // Remove invite users button for the HiddenChannelLockScreen + match: /"popup".{0,100}?if\((?<=(\i)\.channel.+?)/, + replace: (m, props) => `${m}(${props}.inCall||!$self.isHiddenChannel(${props}.channel,true))&&` + }, { // Render our HiddenChannelLockScreen component instead of the main voice channel component match: /this\.renderVoiceChannelEffects.+?children:(?<=renderContent=function.+?)/, @@ -326,8 +331,8 @@ export default definePlugin({ }, { // Disable bad CSS class which mess up hidden voice channels styling - match: /callContainer,(?<=(\i)=\i\.channel.+?\(\)\.callContainer,)/, - replace: (m, channel) => `${m}$self.isHiddenChannel(${channel},true)?"":` + match: /callContainer,(?<=\(\)\.callContainer,)/, + replace: '$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":' } ] }, diff --git a/src/plugins/showHiddenChannels/style.css b/src/plugins/showHiddenChannels/style.css index c90e8b7..f765843 100644 --- a/src/plugins/showHiddenChannels/style.css +++ b/src/plugins/showHiddenChannels/style.css @@ -85,7 +85,7 @@ .shc-lock-screen-default-emoji-container > [class^="emojiContainer"] { background: var(--bg-overlay-3, var(--background-secondary)); border-radius: 8px; - padding: 3px 4px; + padding: 5px 6px; margin-left: 5px; }