@@ -18,6 +18,36 @@ function preferenceCreator(items, container, inner) {
1818 break ;
1919 }
2020 }
21+ initializeSettingsTipToggles ( container ) ;
22+ }
23+
24+ function initializeSettingsTipToggles ( container ) {
25+ $ ( container ) . find ( 'p.settings-msg' ) . each ( function ( ) {
26+ let tip = $ ( this ) ;
27+ if ( tip . data ( 'settings-tip-ready' ) || tip . hasClass ( 'd-none' ) ) return ;
28+ if ( $ . trim ( tip . text ( ) ) === '' && tip . find ( 'a' ) . length === 0 ) return ;
29+
30+ let button = $ ( `
31+ <button type="button" class="settings-tip-toggle" aria-expanded="false" title="${ i18n . __ ( 'helper' ) } ">
32+ ?
33+ </button>
34+ ` ) ;
35+
36+ tip . data ( 'settings-tip-ready' , true ) ;
37+ tip . addClass ( 'settings-tip-content settings-tip-collapsed' ) ;
38+ tip . attr ( 'aria-hidden' , 'true' ) ;
39+
40+ let label = tip . prevAll ( 'label:first' ) ;
41+ if ( label . length > 0 ) label . after ( button ) ;
42+ else tip . before ( button ) ;
43+
44+ button . on ( 'click' , function ( ) {
45+ let expanded = button . attr ( 'aria-expanded' ) === 'true' ;
46+ button . attr ( 'aria-expanded' , expanded ? 'false' : 'true' ) ;
47+ tip . toggleClass ( 'settings-tip-collapsed' , expanded ) ;
48+ tip . attr ( 'aria-hidden' , expanded ? 'true' : 'false' ) ;
49+ } ) ;
50+ } ) ;
2151}
2252
2353function titleSolution ( obj , parent ) {
@@ -708,9 +738,9 @@ function domString(type) {
708738 onkeydown="if(event.keyCode === 13) lock($('#passcode-locker').val(), $('#passcode-locker-again').val());"
709739 type="password" />
710740 <br /><br/>
711- <div class="text-muted small ">
741+ <small class="text-grey settings-title ">
712742 ${ store . get ( 'islocked' ) ? i18n . __ ( 'locker-settings-input-tip-lock-mode-on' ) : i18n . __ ( 'locker-settings-input-tip-lock-mode-off' ) }
713- </div ></div></div>
743+ </small ></div></div>
714744 <br/>`
715745 ;
716746 break ;
@@ -1091,6 +1121,7 @@ function colorSet(id) {
10911121 ipc . send ( "logger" , $ ( "#color-" + id ) . val ( ) ) ;
10921122 themeColorList [ id ] = $ ( "#color-" + id ) . val ( ) ;
10931123 store . set ( "theme-color" , themeColorList ) ;
1124+ ipc . send ( "theme-color-changed" ) ;
10941125}
10951126
10961127function colorInitializer ( ) {
0 commit comments