33 * @author programmer2514
44 * @authorId 563652755814875146
55 * @description A feature-rich BetterDiscord plugin that reworks the Discord UI to be significantly more modular
6- * @version 12.1.0
6+ * @version 12.1.1
77 * @donate https://ko-fi.com/benjaminpryor
88 * @patreon https://www.patreon.com/BenjaminPryor
99 * @website https://github.com/programmer2514/BetterDiscord-CollapsibleUI
@@ -155,17 +155,17 @@ const settings = {
155155const config = {
156156 changelog : [
157157 {
158- title : '12.1.0 ' ,
158+ title : '12.1.1 ' ,
159159 type : 'added' ,
160160 items : [
161- 'Fixed for latest Discord version ' ,
162- 'Fixed user settings overlapping user profile picture when channel list is collapsed ' ,
163- 'Fixed Horizontal Server List compatibility ' ,
164- 'Removed static class references ' ,
161+ 'Prevented hiding members list/user profile buttons while they are collapsed ' ,
162+ 'Fixed crash when trying to collapse all toolbar buttons ' ,
163+ 'Fixed size collapse not working on some elements ' ,
164+ 'Fixed several minor styling issues ' ,
165165 ] ,
166166 } ,
167167 {
168- title : '1.0.0 - 12.0 .0' ,
168+ title : '1.0.0 - 12.1 .0' ,
169169 type : 'added' ,
170170 items : [
171171 'See the full changelog here: https://programmer2514.github.io/?l=cui-changelog' ,
@@ -1331,7 +1331,7 @@ const styles = {
13311331 .${ modules . sidebar ?. guilds } {
13321332 transition: width var(--cui-transition-speed);
13331333 border-right: 1px solid var(--border-subtle) !important;
1334- border-top: 1px solid var(--border-subtle ) !important;
1334+ border-top: 1px solid var(--app- border-frame ) !important;
13351335 }
13361336
13371337 .${ modules . scroller ?. scroller } {
@@ -1816,7 +1816,7 @@ const styles = {
18161816 min-height: var(--cui-collapse-size) !important;
18171817 height: var(--cui-collapse-size) !important;
18181818 max-height: var(--cui-collapse-size) !important;
1819- --custom-app-top-bar-height: calc(24px + var(--space-sm ));
1819+ --custom-app-top-bar-height: calc(24px + var(--space-8 ));
18201820 }
18211821
18221822 .${ modules . sidebar ?. base } {
@@ -1833,8 +1833,8 @@ const styles = {
18331833 right: 0 !important;
18341834 background: var(--background-tertiary) !important;
18351835 z-index: 200 !important;
1836- --custom-app-top-bar-height: calc(24px + var(--space-sm ));
1837- border-bottom: 1px solid var(--border-subtle ) !important;
1836+ --custom-app-top-bar-height: calc(24px + var(--space-8 ));
1837+ border-bottom: 1px solid var(--app- border-frame ) !important;
18381838 }
18391839
18401840 .${ modules . sidebar ?. base } {
@@ -1873,6 +1873,12 @@ const styles = {
18731873 .${ modules . calls ?. wrapper } :not(.${ modules . calls ?. noChat } ) {
18741874 transition: min-height var(--cui-transition-speed), max-height var(--cui-transition-speed) !important;
18751875 }
1876+
1877+ .${ modules . calls ?. wrapper } :not(.${ modules . calls ?. noChat } ) > .${ modules . calls ?. callContainer } {
1878+ border-left: none !important;
1879+ border-top: none !important;
1880+ border-bottom: 1px solid var(--border-subtle) !important;
1881+ }
18761882
18771883 ${ ( settings . sizeCollapse )
18781884 ? `
@@ -1964,6 +1970,7 @@ const styles = {
19641970 min-width: var(--cui-search-panel-width) !important;
19651971 transition: max-width var(--cui-transition-speed), width var(--cui-transition-speed), min-width var(--cui-transition-speed);
19661972 overflow: visible !important;
1973+ border-left: 1px solid var(--border-subtle) !important;
19671974 }
19681975
19691976 .${ modules . search ?. searchResultsWrap } > header > div:last-child {
@@ -1983,6 +1990,14 @@ const styles = {
19831990 }
19841991 `
19851992 : '' }
1993+
1994+ ${ ( settings . sizeCollapse )
1995+ ? `
1996+ @media ${ this . query } {
1997+ ${ this . _toggle [ 1 ] }
1998+ }
1999+ `
2000+ : '' }
19862001 ` . replace ( / \s + / g, ' ' ) ] ) ;
19872002 } ,
19882003 get _toggle ( ) {
@@ -2045,6 +2060,11 @@ const styles = {
20452060 display: none !important;
20462061 }
20472062
2063+ .${ modules . popout ?. container } {
2064+ border-top: 1px solid var(--border-subtle) !important;
2065+ border-left: 1px solid var(--border-subtle) !important;
2066+ }
2067+
20482068 .${ modules . popout ?. chatLayerWrapper } > * {
20492069 width: 100% !important;
20502070 border-radius: 0 !important;
@@ -2110,6 +2130,14 @@ const styles = {
21102130 }
21112131 `
21122132 : '' }
2133+
2134+ ${ ( settings . sizeCollapse )
2135+ ? `
2136+ @media ${ this . query } {
2137+ ${ this . _toggle [ 1 ] }
2138+ }
2139+ `
2140+ : '' }
21132141 ` . replace ( / \s + / g, ' ' ) ] ) ;
21142142 } ,
21152143 get _toggle ( ) {
@@ -2188,6 +2216,14 @@ const styles = {
21882216 }
21892217 `
21902218 : '' }
2219+
2220+ ${ ( settings . sizeCollapse )
2221+ ? `
2222+ @media ${ this . query } {
2223+ ${ this . _toggle [ 1 ] }
2224+ }
2225+ `
2226+ : '' }
21912227 ` . replace ( / \s + / g, ' ' ) ] ) ;
21922228 } ,
21932229 get _toggle ( ) {
@@ -2341,7 +2377,7 @@ const styles = {
23412377 hidden : false ,
23422378 init : function ( ) {
23432379 runtime . api . DOM . addStyle ( `${ runtime . meta . name } -toolbarFull_init_col` , `
2344- .${ modules . icons ?. toolbar } > *:not(:last-child) {
2380+ .${ modules . guilds ?. title } . ${ modules . icons ?. toolbar } > *:not(:last-child) {
23452381 transition: max-width var(--cui-transition-speed) !important;
23462382 max-width: ${ settings . toolbarElementMaxWidth } px !important;
23472383 overflow: hidden !important;
@@ -2353,10 +2389,10 @@ const styles = {
23532389 // Keep expanded while typing in search bar
23542390 // Why is this classname not handled the same by Discord as other elements??
23552391 if ( document . querySelector ( '.public-DraftEditor-content[aria-expanded="true"]' ) ) return ;
2356- if ( document . querySelector ( '.public-DraftEditor-content' ) . querySelector ( '[data-text="true"]' ) . innerHTML ) return ;
2392+ if ( document . querySelector ( '.public-DraftEditor-content' ) ? .querySelector ( '[data-text="true"]' ) ? .innerHTML ) return ;
23572393
23582394 runtime . api . DOM . addStyle ( `${ runtime . meta . name } -toolbarFull_hide_col` , `
2359- .${ modules . icons ?. toolbar } > *:not(:nth- last-child(2) ) {
2395+ .${ modules . guilds ?. title } . ${ modules . icons ?. toolbar } > *:not(:last-child) {
23602396 max-width: 0px !important;
23612397 }
23622398 ` . replace ( / \s + / g, ' ' ) ) ;
@@ -2389,8 +2425,8 @@ const styles = {
23892425 transition: gap var(--cui-transition-speed) !important;
23902426 }
23912427
2392- .${ modules . icons ?. iconWrapper } :not([id*="cui"]):has([d="M14.5 8a3 3 0 1 0-2.7-4.3c-.2.4.06.86.44 1.12a5 5 0 0 1 2.14 3.08c.01.06.06.1.12.1ZM18.44 17.27c.15.43.54.73 1 .73h1.06c.83 0 1.5-.67 1.5-1.5a7.5 7.5 0 0 0-6.5-7.43c-.55-.08-.99.38-1.1.92-.06.3-.15.6-.26.87-.23.58-.05 1.3.47 1.63a9.53 9.53 0 0 1 3.83 4.78ZM12.5 9a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM2 20.5a7.5 7.5 0 0 1 15 0c0 .83-.67 1.5-1.5 1.5a.2.2 0 0 1-.2-.16c-.2-.96-.56-1.87-.88-2.54-.1-.23-.42-.15-.42.1v2.1a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-2.1c0-.25-.31-.33-.42-.1-.32.67-.67 1.58-.88 2.54a.2.2 0 0 1-.2.16A1.5 1.5 0 0 1 2 20.5Z"]),
2393- .${ modules . icons ?. iconWrapper } :not([id*="cui"]):has([d="M23 12.38c-.02.38-.45.58-.78.4a6.97 6.97 0 0 0-6.27-.08.54.54 0 0 1-.44 0 8.97 8.97 0 0 0-11.16 3.55c-.1.15-.1.35 0 .5.37.58.8 1.13 1.28 1.61.24.24.64.15.8-.15.19-.38.39-.73.58-1.02.14-.21.43-.1.4.15l-.19 1.96c-.02.19.07.37.23.47A8.96 8.96 0 0 0 12 21a.4.4 0 0 1 .38.27c.1.33.25.65.4.95.18.34-.02.76-.4.77L12 23a11 11 0 1 1 11-10.62ZM15.5 7.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"]) {
2428+ .${ modules . icons ?. iconWrapper } . ${ modules . icons ?. selected } :not([id*="cui"]):has([d="M14.5 8a3 3 0 1 0-2.7-4.3c-.2.4.06.86.44 1.12a5 5 0 0 1 2.14 3.08c.01.06.06.1.12.1ZM18.44 17.27c.15.43.54.73 1 .73h1.06c.83 0 1.5-.67 1.5-1.5a7.5 7.5 0 0 0-6.5-7.43c-.55-.08-.99.38-1.1.92-.06.3-.15.6-.26.87-.23.58-.05 1.3.47 1.63a9.53 9.53 0 0 1 3.83 4.78ZM12.5 9a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM2 20.5a7.5 7.5 0 0 1 15 0c0 .83-.67 1.5-1.5 1.5a.2.2 0 0 1-.2-.16c-.2-.96-.56-1.87-.88-2.54-.1-.23-.42-.15-.42.1v2.1a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-2.1c0-.25-.31-.33-.42-.1-.32.67-.67 1.58-.88 2.54a.2.2 0 0 1-.2.16A1.5 1.5 0 0 1 2 20.5Z"]),
2429+ .${ modules . icons ?. iconWrapper } . ${ modules . icons ?. selected } :not([id*="cui"]):has([d="M23 12.38c-.02.38-.45.58-.78.4a6.97 6.97 0 0 0-6.27-.08.54.54 0 0 1-.44 0 8.97 8.97 0 0 0-11.16 3.55c-.1.15-.1.35 0 .5.37.58.8 1.13 1.28 1.61.24.24.64.15.8-.15.19-.38.39-.73.58-1.02.14-.21.43-.1.4.15l-.19 1.96c-.02.19.07.37.23.47A8.96 8.96 0 0 0 12 21a.4.4 0 0 1 .38.27c.1.33.25.65.4.95.18.34-.02.76-.4.77L12 23a11 11 0 1 1 11-10.62ZM15.5 7.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"]) {
23942430 display: none;
23952431 }
23962432
0 commit comments