@@ -2743,6 +2743,15 @@ app.$Menu.add("dashboard", new class {
27432743 ) ,
27442744 app . createElement ( "p" )
27452745 )
2746+ this . pbar_resize = ( ) => {
2747+ this . pbar . removeClass ( "tqdm-outline" )
2748+ var width = this . pbar . getChildren ( ) [ 1 ] . valueOf ( ) . offsetWidth
2749+ if ( width >= 84 ) {
2750+ this . pbar . removeClass ( "tqdm-outline" )
2751+ } else {
2752+ this . pbar . class ( "tqdm-outline" )
2753+ }
2754+ }
27462755 this . page = [
27472756 app . createElement ( "div" ) . class ( "panel" ) . append (
27482757 app . createFlex ( ) . append (
@@ -2754,15 +2763,7 @@ app.$Menu.add("dashboard", new class {
27542763 app . createElement ( "p" ) . class ( "title" ) . setI18N ( "dashboard.status" ) ,
27552764 app . createElement ( "p" ) . class ( "value" )
27562765 )
2757- ) . minWidth ( 896 ) . child ( 2 ) . addResize ( ( ) => {
2758- this . pbar . removeClass ( "tqdm-outline" )
2759- var width = this . pbar . getChildren ( ) [ 1 ] . valueOf ( ) . offsetWidth
2760- if ( width >= 84 ) {
2761- this . pbar . removeClass ( "tqdm-outline" )
2762- } else {
2763- this . pbar . class ( "tqdm-outline" )
2764- }
2765- } ) ,
2766+ ) . minWidth ( 896 ) . child ( 2 ) . addResize ( ( ) => this . pbar_resize ( ) ) ,
27662767 this . pbar
27672768 ) ,
27682769 app . createElement ( "div" ) . class ( "panel nopadding" ) . style ( "margin-bottom: 0" ) . append (
@@ -3629,7 +3630,7 @@ app.$Menu.add("dashboard", new class {
36293630 this . basic [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . setText ( this . _format_number_unit ( this . system . connections ) )
36303631 this . basic [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 1 ] . setText ( this . _format_bytes ( this . system . memory ) )
36313632 this . basic [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 2 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . setText ( this . _format_number_unit ( this . system . cache . total ) )
3632- this . basic [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 2 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 1 ] . setText ( `(${ this . _format_bytes ( this . system . cache . bytes ) } )` )
3633+ this . basic [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 2 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 1 ] . setText ( `(${ this . _format_bytes ( this . system . cache . data_bytes ) } )` )
36333634 this . basic [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 3 ] . getChildren ( ) [ 1 ] . setText ( this . system . cpu . toFixed ( 2 ) + "%" )
36343635 }
36353636 drawGlobals ( ) {
@@ -3737,6 +3738,7 @@ app.$Menu.add("dashboard", new class {
37373738 }
37383739 setStatus ( ) {
37393740 this . page [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 1 ] . setI18N ( this . status . key )
3741+ if ( this . pbar . valueOf ( ) . style . display == 'none' && this . status . progress != null ) this . pbar_resize ( )
37403742 this . pbar . valueOf ( ) . style . display = `${ this . status . progress ? '' : 'none' } `
37413743 if ( this . status . progress ) {
37423744 var value_formatter = this . status . progress . desc == "files.downloading" ? ( n ) => this . _format_bytes ( n ) : ( n ) => n
0 commit comments