From 242634e89bce835fcbfb59aba3783d356949369c Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 14:16:25 +0700 Subject: [PATCH 01/23] u --- srv/http/assets/css/common.css | 7 ++++++- srv/http/assets/css/main.css | 10 +++++----- srv/http/assets/js/function.js | 3 ++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/srv/http/assets/css/common.css b/srv/http/assets/css/common.css index 1707ff202..61bbc3320 100644 --- a/srv/http/assets/css/common.css +++ b/srv/http/assets/css/common.css @@ -10,7 +10,7 @@ @font-face { font-family : rern; - src : url( '/assets/fonts/rern.woff2?v=1733139637' ); + src : url( '/assets/fonts/rern.woff2?v=1733554181' ); } @font-face { font-family : Lato; @@ -373,10 +373,14 @@ codered { text-shadow: var( --shadow-text ); } .head .i-close { + float: left; color: var( --cm ); } .head .title { + display: inline-block; margin-left: 15px; + width: calc( 100% - 55px ); + line-height: 40px; font-size: 26px; font-weight: 300; letter-spacing: 20px; @@ -415,6 +419,7 @@ code { background: linear-gradient( to right, var( --cm ) calc( 100% - 100px ), rgba( 0,0,0,0 ) 100% ); } .ellipsis, +.head .title, .infoheader, .infomessage, .infofooter, diff --git a/srv/http/assets/css/main.css b/srv/http/assets/css/main.css index 816512ecf..8e61ff973 100644 --- a/srv/http/assets/css/main.css +++ b/srv/http/assets/css/main.css @@ -1396,10 +1396,13 @@ i.map.disabled, .map.disabled i { #countradio { margin-left: 10px; } -#lib-title { +#lib-title, +#mode-title { + display: inline-block; width: calc( 100% - 120px ); } #pl-title { + display: inline-block; width: calc( 100% - 80px ); } .lialbum, @@ -1656,7 +1659,7 @@ i.map.disabled, .map.disabled i { .list .single { display: inline-block; max-width: calc( 100% - 90px ); - line-height: 48px; + line-height: 48px !important; vertical-align: 5%; } .list .name { @@ -2059,9 +2062,6 @@ li.active .li2 bl { #coverart-block { width: 50% } #volume-knob { margin: 20px 0 70px 0 } } - @media ( max-width: 735px ) { - .title { display: none } - } @media ( max-width: 700px ) { .liinfo { display: none } } diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js index 9cfa1a02a..f8ea13906 100644 --- a/srv/http/assets/js/function.js +++ b/srv/http/assets/js/function.js @@ -1225,7 +1225,7 @@ function renderLibraryList( data ) { // V.librarylist var modetitle = ! root ? data.modetitle : data.modetitle .replace( 'MARTIST', 'M ARTIST' ) .replace( 'BRADIO', 'B RADIO' ); - var htmlmodetitle = ico( V.mode ) +''+ modetitle +''; + var htmlmodetitle = ico( V.mode ) +''+ modetitle; if ( 'count' in data && V.mode !== 'latest' ) { $( '#lib-path' ).css( 'max-width', 40 ); $( '#lib-list' ).css( 'width', '100%' ); @@ -1253,6 +1253,7 @@ function renderLibraryList( data ) { // V.librarylist } else if ( V.mode === 'latest' ) { htmlpath += ico( 'flash btntitle button-latest-clear' ); } + htmlpath += ''; $( '#lib-title' ) .html( htmlpath ) .removeClass( 'hide' ); From 65b332af5df4b4646cfd01b0a800c28390775aeb Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 14:27:53 +0700 Subject: [PATCH 02/23] Update function.js --- srv/http/assets/js/function.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js index f8ea13906..6fb8532fd 100644 --- a/srv/http/assets/js/function.js +++ b/srv/http/assets/js/function.js @@ -1275,7 +1275,7 @@ function renderLibraryList( data ) { // V.librarylist if ( V.mode === 'album' ) { // V.albumlist V.albumlist = true; if ( ! $( '.licover' ).length ) $( '#lib-list img' ).eq( 0 ).on( 'load', function() { - $( '#lib-title' ).append( '' ); + $( '#mode-title' ).append( '' ); } ); if ( V.iactive ) $( '#lib-list .coverart' ).eq( V.iactive ).addClass( 'active' ); } else { From a5729a6a9f6738fbb49ce41f602e0f98a4a21b00 Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 15:43:25 +0700 Subject: [PATCH 03/23] Update main.css --- srv/http/assets/css/main.css | 5 ----- 1 file changed, 5 deletions(-) diff --git a/srv/http/assets/css/main.css b/srv/http/assets/css/main.css index 8e61ff973..c0cb2ccfb 100644 --- a/srv/http/assets/css/main.css +++ b/srv/http/assets/css/main.css @@ -2018,11 +2018,6 @@ li.active .li2 bl { #page-playback { --scale: 0.75 } #page-playback.barsalways { --scale: 0.65 } } - @media ( max-height: 335px ) { - #bar-top, - #bar-bottom, - #page-playback { padding-top: 20px !important } - } /*----------------------------------------------------------------------------------*/ #coverart-block, #divcover { max-width: 50vh } @media ( max-height: 540px ) { From e222c68034af3cb01280fe1c4fd3940958a1e78b Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 16:01:12 +0700 Subject: [PATCH 04/23] u --- srv/http/assets/css/main.css | 7 +++---- srv/http/assets/js/main.js | 9 +++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/srv/http/assets/css/main.css b/srv/http/assets/css/main.css index c0cb2ccfb..9485f158b 100644 --- a/srv/http/assets/css/main.css +++ b/srv/http/assets/css/main.css @@ -1355,6 +1355,7 @@ i.map.disabled, .map.disabled i { padding-right: 10px; } .content-top .title { + display: inline-block; margin-left: 15px; height: 40px; line-height: 40px; @@ -1398,7 +1399,6 @@ i.map.disabled, .map.disabled i { } #lib-title, #mode-title { - display: inline-block; width: calc( 100% - 120px ); } #pl-title { @@ -2113,13 +2113,12 @@ li.active .li2 bl { } } @media ( max-width: 400px ) { - #button-settings { right: 10px } .content-top { padding-right: 0 } - #li-count { margin-left: 10px } + #button-settings { right: 10px } + #lib-home-title a { display: none } #pl-manage i { width: 37px } } @media ( max-width: 360px ) { - #li-count { display: none } #playback-controls i { margin: 0 3px } #pl-manage i { width: 36px } } diff --git a/srv/http/assets/js/main.js b/srv/http/assets/js/main.js index c74744af4..4392b5a47 100644 --- a/srv/http/assets/js/main.js +++ b/srv/http/assets/js/main.js @@ -1106,7 +1106,7 @@ $( '#button-lib-update' ).on( 'click', function() { } ); $( '#button-lib-search' ).on( 'click', function() { if ( $( '#lib-search' ).hasClass( 'hide' ) ) { - $( '#lib-path span, #button-lib-back, #button-lib-update' ).addClass( 'hide' ); + $( '#page-library .content-top .title, #lib-path span, #button-lib-back, #button-lib-update' ).addClass( 'hide' ); $( '#page-library .search:not( i )' ).removeClass( 'hide' ); $( '#lib-search-close' ).empty(); $( '#lib-path' ).css( 'max-width', 40 ); @@ -1168,11 +1168,8 @@ $( '#lib-search-close' ).on( 'click', function( e ) { e.stopPropagation(); V.searchlist = false; $( '#search-list' ).remove(); - if ( V.libraryhome ) { - $( '#lib-mode-list' ).removeClass( 'hide' ); - } else { - $( '#button-lib-back, #lib-list, #page-library .index' ).removeClass( 'hide' ); - } + $( '#page-library .content-top .title' ).removeClass( 'hide' ); + if ( ! V.libraryhome ) $( '#button-lib-back, #lib-list, #page-library .index' ).removeClass( 'hide' ); $( '#page-library .search' ).addClass( 'hide' ); $( '#lib-search-close' ).empty(); $( '#lib-search-input' ).val( '' ); From 59d2f32b78225c0d5dc1017101d469f3ac9b6786 Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 16:22:43 +0700 Subject: [PATCH 05/23] Update main.js --- srv/http/assets/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srv/http/assets/js/main.js b/srv/http/assets/js/main.js index 4392b5a47..40c1395a7 100644 --- a/srv/http/assets/js/main.js +++ b/srv/http/assets/js/main.js @@ -1730,9 +1730,9 @@ $( '#button-pl-clear' ).on( 'click', function() { case 'crop': bash( [ 'mpccrop' ] ); $( '#pl-list li:not( .active )' ).remove(); + $( '#infoX' ).trigger( 'click' ); break; } - $( '#infoX' ).trigger( 'click' ); } ); } , ok : () => { From 15f20130873959bd04a6b45c8e1b29144f588527 Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 17:31:17 +0700 Subject: [PATCH 06/23] Update main.css --- srv/http/assets/css/main.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/srv/http/assets/css/main.css b/srv/http/assets/css/main.css index 9485f158b..8584ed890 100644 --- a/srv/http/assets/css/main.css +++ b/srv/http/assets/css/main.css @@ -1378,20 +1378,18 @@ i.map.disabled, .map.disabled i { } #button-lib-update, #button-lib-search, +#button-lib-back, #button-pl-search, #button-pl-playlists { float: right; } #button-lib-back { - position: relative; - float: right; font-size: 28px; color: var( --cm ); z-index: 115; } .i-back.left { float: left !important; - margin-left: 5px; } #countsong, #countradio { From a6afdf3695bedc4a55924fd85137449db2ce8e61 Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 18:12:06 +0700 Subject: [PATCH 07/23] u --- srv/http/assets/css/common.css | 9 +++++++-- srv/http/assets/css/settings.css | 1 + srv/http/common.php | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/srv/http/assets/css/common.css b/srv/http/assets/css/common.css index 61bbc3320..61296a3da 100644 --- a/srv/http/assets/css/common.css +++ b/srv/http/assets/css/common.css @@ -373,18 +373,23 @@ codered { text-shadow: var( --shadow-text ); } .head .i-close { - float: left; color: var( --cm ); } .head .title { display: inline-block; margin-left: 15px; - width: calc( 100% - 55px ); + width: calc( 100% - 135px ); line-height: 40px; font-size: 26px; font-weight: 300; letter-spacing: 20px; } +#button-data .title { + width: calc( 100% - 55px ); +} +#button-data .i-close { + float: left; +} #data hr { margin-left : -20px; margin-right : -20px; diff --git a/srv/http/assets/css/settings.css b/srv/http/assets/css/settings.css index b957ce442..5bceb5ca1 100644 --- a/srv/http/assets/css/settings.css +++ b/srv/http/assets/css/settings.css @@ -269,6 +269,7 @@ heading i.disabled { float: right; } .page-icon { + float: left; color: var( --cw ) !important; background: var( --cm ); } diff --git a/srv/http/common.php b/srv/http/common.php index a6d7e217d..d61f6dc26 100644 --- a/srv/http/common.php +++ b/srv/http/common.php @@ -18,7 +18,7 @@ $pages = [ 'features', 'player', 'networks', 'system', 'addons', 'addonsprogress', 'camilla', 'guide' ]; foreach( $pages as $p ) $$p = false; $$page = true; -$hash = '?v=1733402613'; +$hash = '?v='.time(); $css = [ 'colors', 'common' ]; $logosvg = file_get_contents( '/srv/http/assets/img/icon.svg' ); $filelogin = '/srv/http/data/system/login'; @@ -103,7 +103,7 @@
'.$logosvg.'
-
'.$pageicon.i( 'close' ).''.$title.'-DATA
+
'.i( 'close' ).''.$title.'

 ';
 }

From 289cad2ee39bb41c10a383573eb1709136aecda1 Mon Sep 17 00:00:00 2001
From: rern 
Date: Sat, 7 Dec 2024 18:26:12 +0700
Subject: [PATCH 08/23] u

---
 srv/http/assets/js/addons.js | 6 ------
 srv/http/settings.php        | 7 ++++++-
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/srv/http/assets/js/addons.js b/srv/http/assets/js/addons.js
index 0d43354da..e40313c10 100644
--- a/srv/http/assets/js/addons.js
+++ b/srv/http/assets/js/addons.js
@@ -3,16 +3,10 @@ var icon       = 'addons';
 var keys       = [ 'installurl', 'postinfo', 'title', 'uninstall', 'version' ];
 
 if ( [ 'localhost', '127.0.0.1' ].includes( location.hostname ) ) $( 'a' ).removeAttr( 'href' );
-$( '.helphead' ).off( 'click' ).on( 'click', function() {
-	var hidden = $( '.revisiontext' ).hasClass( 'hide' );
-	$( this ).toggleClass( 'bl', hidden );
-	$( '.revisiontext' ).toggleClass( 'hide', ! hidden );
-} );
 $( '.container' ).on( 'click', '.revision', function() {
 	$this = $( this );
 	$revisiontext = $this.parent().next();
 	var hidden = $revisiontext.hasClass( 'hide' );
-	$( '.helphead' ).toggleClass( 'bl', hidden );
 	$revisiontext.toggleClass( 'hide', ! hidden );
 	$this.toggleClass( 'active' );
 } ).on( 'click', '#list li', function() {
diff --git a/srv/http/settings.php b/srv/http/settings.php
index 8f7c249ac..7d055d8f2 100644
--- a/srv/http/settings.php
+++ b/srv/http/settings.php
@@ -1,7 +1,12 @@
 '.i( $icon.' page-icon' ).''.$title.'
 '.i( 'close close', 'close' ).$iconhead.'

From 15c358a7678c29fae492f7dd2b7bbc53c9938a5f Mon Sep 17 00:00:00 2001
From: rern 
Date: Sat, 7 Dec 2024 18:28:14 +0700
Subject: [PATCH 09/23] Update settings.php

---
 srv/http/settings.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srv/http/settings.php b/srv/http/settings.php
index 7d055d8f2..641fec151 100644
--- a/srv/http/settings.php
+++ b/srv/http/settings.php
@@ -1,10 +1,11 @@
 
Date: Sat, 7 Dec 2024 18:31:59 +0700
Subject: [PATCH 10/23] Update addonsprogress.php

---
 srv/http/settings/addonsprogress.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srv/http/settings/addonsprogress.php b/srv/http/settings/addonsprogress.php
index 94aad089a..1111d1a38 100644
--- a/srv/http/settings/addonsprogress.php
+++ b/srv/http/settings/addonsprogress.php
@@ -56,7 +56,7 @@
 
-
+
OK
@@ -69,7 +69,7 @@ //if ( window.history.replaceState ) window.history.replaceState( null, null, '' ); // on refresh page document.title = 'Addons'; E = {}; -[ 'close', 'container', 'info', 'infobtn', 'infomessage', 'infox', 'progress', 'titleicon' ].forEach( ( el ) => { +[ 'close', 'container', 'info', 'infobtn', 'infomessage', 'progress', 'titleicon' ].forEach( ( el ) => { E[ el ] = document.getElementsByClassName( el )[ 0 ]; } ); E.container.classList.remove( 'hide' ); @@ -84,7 +84,7 @@ fetch( 'cmd.php', { method: 'POST', body: formdata } ); } } ); -[ E.infobtn, E.infox ].forEach( el => el.addEventListener( 'click', () => E.info.remove() ) ); +E.infobtn.addEventListener( 'click', () => E.info.remove() ); scroll = setInterval( () => E.progress.scrollTop = E.progress.scrollHeight, 500 ); document.body.addEventListener( 'keydown', e => { switch( e.key ) { From 5b1fda61e5a9fa7fa59015e41b95c1ef77633109 Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 20:03:24 +0700 Subject: [PATCH 11/23] Update function.js --- srv/http/assets/js/function.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js index 6fb8532fd..5223000fb 100644 --- a/srv/http/assets/js/function.js +++ b/srv/http/assets/js/function.js @@ -1225,7 +1225,7 @@ function renderLibraryList( data ) { // V.librarylist var modetitle = ! root ? data.modetitle : data.modetitle .replace( 'MARTIST', 'M ARTIST' ) .replace( 'BRADIO', 'B RADIO' ); - var htmlmodetitle = ico( V.mode ) +''+ modetitle; + var htmlmodetitle = ico( V.mode ) +''+ modetitle; if ( 'count' in data && V.mode !== 'latest' ) { $( '#lib-path' ).css( 'max-width', 40 ); $( '#lib-list' ).css( 'width', '100%' ); From c2dbb1bcf244fffab3e69335954ee0eccbcc1ecf Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 20:04:06 +0700 Subject: [PATCH 12/23] Update main.css --- srv/http/assets/css/main.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/srv/http/assets/css/main.css b/srv/http/assets/css/main.css index 8584ed890..0d140abd4 100644 --- a/srv/http/assets/css/main.css +++ b/srv/http/assets/css/main.css @@ -1446,9 +1446,6 @@ i.map.disabled, .map.disabled i { font-weight: 300; color: var( --cw ); } -.spaced { - letter-spacing: 4px; -} #button-pl-back { float: right; font-size: 28px !important; From 97181e82397a64b72b95cfe97a7553c134edfad4 Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 20:29:30 +0700 Subject: [PATCH 13/23] Update function.js --- srv/http/assets/js/function.js | 1 + 1 file changed, 1 insertion(+) diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js index 5223000fb..a3e765c40 100644 --- a/srv/http/assets/js/function.js +++ b/srv/http/assets/js/function.js @@ -1136,6 +1136,7 @@ function refreshData() { if ( [ 'sd', 'nas', 'usb' ].includes( V.mode ) ) return if ( V.mode === 'album' && $( '#lib-list .coverart' ).length ) { + V.librarylist = false; $( '.mode.album' ).trigger( 'click' ); } else if ( V.query.length ) { var query = V.query.slice( -1 )[ 0 ]; From 43a378d0026cbfbfce66b36a8087786423093800 Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 20:49:47 +0700 Subject: [PATCH 14/23] Update function.js --- srv/http/assets/js/function.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js index a3e765c40..cbaceb80d 100644 --- a/srv/http/assets/js/function.js +++ b/srv/http/assets/js/function.js @@ -1135,10 +1135,7 @@ function refreshData() { } else { if ( [ 'sd', 'nas', 'usb' ].includes( V.mode ) ) return - if ( V.mode === 'album' && $( '#lib-list .coverart' ).length ) { - V.librarylist = false; - $( '.mode.album' ).trigger( 'click' ); - } else if ( V.query.length ) { + if ( V.query.length ) { var query = V.query.slice( -1 )[ 0 ]; list( query, function( html ) { var data = { From 0349d4529aa437e7301cfd2972674312a71067ea Mon Sep 17 00:00:00 2001 From: rern Date: Sat, 7 Dec 2024 21:36:31 +0700 Subject: [PATCH 15/23] u --- srv/http/assets/css/common.css | 7 ------- srv/http/assets/css/hovercursor.css | 1 - srv/http/assets/css/settings.css | 1 - srv/http/assets/js/common.js | 1 - srv/http/assets/js/function.js | 17 +++++------------ srv/http/assets/js/main.js | 5 +---- srv/http/assets/js/settings.js | 29 ++++++++++++----------------- 7 files changed, 18 insertions(+), 43 deletions(-) diff --git a/srv/http/assets/css/common.css b/srv/http/assets/css/common.css index 61296a3da..1660e6828 100644 --- a/srv/http/assets/css/common.css +++ b/srv/http/assets/css/common.css @@ -2,7 +2,6 @@ #loader { z-index: 120 } #infoOverlay, #keyboard, -#button-data { z-index: 115 } #data, #degug { z-index: 110 } .head { z-index: 95 } @@ -384,12 +383,6 @@ codered { font-weight: 300; letter-spacing: 20px; } -#button-data .title { - width: calc( 100% - 55px ); -} -#button-data .i-close { - float: left; -} #data hr { margin-left : -20px; margin-right : -20px; diff --git a/srv/http/assets/css/hovercursor.css b/srv/http/assets/css/hovercursor.css index 4c4afcd26..8d34b7365 100644 --- a/srv/http/assets/css/hovercursor.css +++ b/srv/http/assets/css/hovercursor.css @@ -112,7 +112,6 @@ li:not( .licover ), #artist, #bar-bottom, #bar-top i, -#button-data i, #button-library, #button-lib-back, #button-lib-update, diff --git a/srv/http/assets/css/settings.css b/srv/http/assets/css/settings.css index 5bceb5ca1..e3452135a 100644 --- a/srv/http/assets/css/settings.css +++ b/srv/http/assets/css/settings.css @@ -734,7 +734,6 @@ input.disabled + .switchlabel:after { .wiring, #backend, #bar-bottom i, - #button-data, #ffmpegfiletype, #menu { cursor: pointer diff --git a/srv/http/assets/js/common.js b/srv/http/assets/js/common.js index 9bd484709..c2dd47eee 100644 --- a/srv/http/assets/js/common.js +++ b/srv/http/assets/js/common.js @@ -84,7 +84,6 @@ function errorDisplay( msg, list ) { $( '#data' ) .html( error ) .removeClass( 'hide' ); - $( '#button-data' ).addClass( 'hide' ); loaderHide(); } diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js index cbaceb80d..62d7033c3 100644 --- a/srv/http/assets/js/function.js +++ b/srv/http/assets/js/function.js @@ -981,16 +981,8 @@ function playbackStatusGet( withdisplay ) { if ( V.volumeactive ) delete status.volume; // immediately change volume when pageInactive > pageActive $.each( status, ( k, v ) => { S[ k ] = v } ); // need braces V.volumecurrent = S.volume; - var dataerror = $( '#data .copy' ).length; - if ( $( '#data' ).hasClass( 'hide' ) || dataerror ) { - if ( dataerror ) { - $( '#data' ).empty(); - $( '#button-data, #data' ).addClass( 'hide' ); - } - renderPlaybackAll(); - } else { - setStatusData(); - } + renderPlaybackAll(); + if ( ! $( '#data' ).hasClass( 'hide' ) ) setStatusData(); } ); } function playlistBlink( off ) { @@ -1926,8 +1918,9 @@ function setStatusData() { } var html = ''; $.each( list, ( k, v ) => html += '"'+ k +'": '+ highlightJSON( v ) +'
' ); - $( '#data' ).html( html ); - $( '#button-data, #data' ).removeClass( 'hide' ); + $( '#data' ) + .html( html ) + .removeClass( 'hide' ); } function setTrackCoverart() { if ( V.mode === 'album' ) $( '#mode-title' ).html( $( '.liinfo .lialbum' ).text() ); diff --git a/srv/http/assets/js/main.js b/srv/http/assets/js/main.js index 40c1395a7..4971a2a1d 100644 --- a/srv/http/assets/js/main.js +++ b/srv/http/assets/js/main.js @@ -169,10 +169,7 @@ $( '#logo, #refresh' ).on( 'click', function() { $( '#debug' ).on( 'click', function() { if ( V.press ) return - $( '#data' ).hasClass( 'hide' ) ? setStatusData() : $( '#button-data, #data' ).addClass( 'hide' ); -} ); -$( '#button-data' ).on( 'click', function() { - $( '#button-data, #data' ).addClass( 'hide' ); + $( '#data' ).hasClass( 'hide' ) ? setStatusData() : $( '#data' ).addClass( 'hide' ); } ); $( '#button-settings' ).on( 'click', function( e ) { e.stopPropagation(); diff --git a/srv/http/assets/js/settings.js b/srv/http/assets/js/settings.js index ef5a3c686..c20c6fa46 100644 --- a/srv/http/assets/js/settings.js +++ b/srv/http/assets/js/settings.js @@ -123,16 +123,11 @@ function refreshData() { } bash( page +'-data.sh', data => { - if ( ! list2JSON( data ) ) return // on load, try catching any errors - - if ( $( '#data' ).hasClass( 'hide' ) || $( '#data .infobtn' ).length ) { - $( '#data' ).empty(); - $( '#button-data, #data' ).addClass( 'hide' ); + // on load, try catching any errors + if ( list2JSON( data ) ) { switchSet(); renderPage(); - } else { - $( '#data' ).html( highlightJSON( S ) ); - $( '#button-data, #data' ).removeClass( 'hide' ); + if ( ! $( '#data' ).hasClass( 'hide' ) ) $( '#data' ).html( highlightJSON( S ) ) } } ); } @@ -362,7 +357,7 @@ $( document ).on( 'keydown', function( e ) { } else if ( V.select2 ) { $( '.select2-hidden-accessible' ).select2( 'close' ); } else if ( ! $( '#data' ).hasClass( 'hide' ) ) { - $( '#button-data' ).trigger( 'click' ); + $( '.page-icon' ).trigger( 'click' ); } else if ( $( '#bar-bottom div:focus' ).length ) { $( '#fader' ).addClass( 'hide' ); $( '#bar-bottom div' ).removeAttr( 'tabindex' ); @@ -388,7 +383,7 @@ $( document ).on( 'keydown', function( e ) { case 'x': if ( ! e.ctrlKey ) return - var close = $( '#data' ).hasClass( 'hide' ) ? '#close' : '#button-data .i-close'; + var close = $( '#data' ).hasClass( 'hide' ) ? '#close' : '.page-icon'; $( close ).trigger( 'click' ); break case 'MediaPause': @@ -401,13 +396,13 @@ $( document ).on( 'keydown', function( e ) { $( '.page-icon' ).on( 'click', function() { if ( $.isEmptyObject( S ) ) return - $( '#data' ).html( highlightJSON( S ) ) - $( '#button-data, #data' ).removeClass( 'hide' ); -} ); -$( '#button-data' ).on( 'click', function() { - switchSet(); - renderPage(); - $( '#button-data, #data' ).addClass( 'hide' ); + if ( $( '#data' ).hasClass( 'hide' ) ) { + $( '#data' ) + .html( highlightJSON( S ) ) + .removeClass( 'hide' ); + } else { + $( '#data' ).addClass( 'hide' ); + } } ); $( '.container' ).on( 'click', '.status .headtitle, .col-l.status', function() { var $this = $( this ); From 5482c4280b2075e4650ca4e68a9f3f6421c65a6f Mon Sep 17 00:00:00 2001 From: rern Date: Sun, 8 Dec 2024 08:13:19 +0700 Subject: [PATCH 16/23] u --- srv/http/assets/js/function.js | 2 +- srv/http/assets/js/main.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js index 62d7033c3..4212f4e27 100644 --- a/srv/http/assets/js/function.js +++ b/srv/http/assets/js/function.js @@ -1777,7 +1777,7 @@ function setPlaylistScroll() { var litop = barVisible( 80, 40 ); $( '#menu-plaction' ).addClass( 'hide' ); $( '#pl-list li' ).removeClass( 'active updn' ); - $liactive = $( '#pl-list li' ).eq( S.song || 0 ); + $liactive = $( '#pl-list li' ).eq( S.song ); $liactive.addClass( 'active' ); if ( ! $( '.pl-remove' ).length && ! I.active ) { if ( $( '#pl-list li' ).length < 5 ) { diff --git a/srv/http/assets/js/main.js b/srv/http/assets/js/main.js index 4971a2a1d..342b148fc 100644 --- a/srv/http/assets/js/main.js +++ b/srv/http/assets/js/main.js @@ -481,13 +481,13 @@ $( '#playback' ).on( 'click', function() { } } ); $( '#playlist, #button-playlist' ).on( 'click', function() { + if ( V.pladd ) return + if ( V.playlist ) { if ( ! V.playlisthome ) playlistGet(); } else { V.playlisthome ? playlistGet() : switchPage( 'playlist' ); } -} ).press( function() { - bash( [ 'plcacheremove' ] ); } ); $( '#bar-top' ).on( 'click', function( e ) { if ( e.target.id !== 'button-settings' ) $( '#settings' ).addClass( 'hide ' ); From 069acd95df2760a583f2f07bc0f0b975e42d1eaa Mon Sep 17 00:00:00 2001 From: rern Date: Sun, 8 Dec 2024 08:23:58 +0700 Subject: [PATCH 17/23] u --- srv/http/assets/js/context.js | 1 + srv/http/assets/js/main.js | 2 +- srv/http/assets/js/passive.js | 1 + srv/http/bash/cmd.sh | 6 +----- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/srv/http/assets/js/context.js b/srv/http/assets/js/context.js index 540b8fb79..6c4a820d7 100644 --- a/srv/http/assets/js/context.js +++ b/srv/http/assets/js/context.js @@ -711,6 +711,7 @@ $( '.contextmenu a, .contextmenu .submenu' ).on( 'click', function() { _replace _replaceplay */ + if ( [ 'addplay', 'replace', 'replaceplay' ].includes( cmd ) ) V.pladdreplaceplay var path = V.list.path; // mpccmd: // [ 'mpcadd', path ] diff --git a/srv/http/assets/js/main.js b/srv/http/assets/js/main.js index 342b148fc..f5f6e9a6d 100644 --- a/srv/http/assets/js/main.js +++ b/srv/http/assets/js/main.js @@ -481,7 +481,7 @@ $( '#playback' ).on( 'click', function() { } } ); $( '#playlist, #button-playlist' ).on( 'click', function() { - if ( V.pladd ) return + if ( V.pladdreplaceplay ) return if ( V.playlist ) { if ( ! V.playlisthome ) playlistGet(); diff --git a/srv/http/assets/js/passive.js b/srv/http/assets/js/passive.js index a280ef251..17e0364e8 100644 --- a/srv/http/assets/js/passive.js +++ b/srv/http/assets/js/passive.js @@ -249,6 +249,7 @@ ps = { orderLibrary(); } , playlist : data => { + delete V.pladdreplaceplay; if ( V.local || V.sortable || $( '.pl-remove' ).length ) return if ( 'blink' in data ) { diff --git a/srv/http/bash/cmd.sh b/srv/http/bash/cmd.sh index 1fbf1521e..4412b582f 100644 --- a/srv/http/bash/cmd.sh +++ b/srv/http/bash/cmd.sh @@ -613,7 +613,6 @@ mpcremove ) for (( i=$TO; i >= $POS; i-- )); do mpc -q del $i done - pushPlaylist else if [[ $songpos == $POS ]]; then [[ $pllength == $POS ]] && next=$(( POS -1 )) || next=$POS @@ -623,8 +622,8 @@ mpcremove ) mpc -q play $next mpc -q stop fi - pushPlaylist fi + pushPlaylist ;; mpcseek ) if [[ $STATE == stop ]]; then @@ -737,9 +736,6 @@ order ) pladdrandom ) plAddRandom ;; -plcacheremove ) - rm -f $dirshm/playlist* - ;; playerstart ) playerStart ;; From 5c5a7a48f5e4d50bc726fd0f894eca38d143722d Mon Sep 17 00:00:00 2001 From: rern Date: Sun, 8 Dec 2024 09:24:56 +0700 Subject: [PATCH 18/23] Update context.js --- srv/http/assets/js/context.js | 1 - 1 file changed, 1 deletion(-) diff --git a/srv/http/assets/js/context.js b/srv/http/assets/js/context.js index 6c4a820d7..540b8fb79 100644 --- a/srv/http/assets/js/context.js +++ b/srv/http/assets/js/context.js @@ -711,7 +711,6 @@ $( '.contextmenu a, .contextmenu .submenu' ).on( 'click', function() { _replace _replaceplay */ - if ( [ 'addplay', 'replace', 'replaceplay' ].includes( cmd ) ) V.pladdreplaceplay var path = V.list.path; // mpccmd: // [ 'mpcadd', path ] From d35b69a21011b85a04e5d0c5a6a76d095098ad1d Mon Sep 17 00:00:00 2001 From: rern Date: Sun, 8 Dec 2024 09:35:59 +0700 Subject: [PATCH 19/23] u --- srv/http/assets/js/main.js | 2 -- srv/http/assets/js/passive.js | 1 - 2 files changed, 3 deletions(-) diff --git a/srv/http/assets/js/main.js b/srv/http/assets/js/main.js index f5f6e9a6d..c3e5bbc54 100644 --- a/srv/http/assets/js/main.js +++ b/srv/http/assets/js/main.js @@ -481,8 +481,6 @@ $( '#playback' ).on( 'click', function() { } } ); $( '#playlist, #button-playlist' ).on( 'click', function() { - if ( V.pladdreplaceplay ) return - if ( V.playlist ) { if ( ! V.playlisthome ) playlistGet(); } else { diff --git a/srv/http/assets/js/passive.js b/srv/http/assets/js/passive.js index 17e0364e8..a280ef251 100644 --- a/srv/http/assets/js/passive.js +++ b/srv/http/assets/js/passive.js @@ -249,7 +249,6 @@ ps = { orderLibrary(); } , playlist : data => { - delete V.pladdreplaceplay; if ( V.local || V.sortable || $( '.pl-remove' ).length ) return if ( 'blink' in data ) { From b8af51e9f47b5950542efa67b18be1a22102e402 Mon Sep 17 00:00:00 2001 From: rern Date: Sun, 8 Dec 2024 10:09:42 +0700 Subject: [PATCH 20/23] Update context.js --- srv/http/assets/js/context.js | 1 + 1 file changed, 1 insertion(+) diff --git a/srv/http/assets/js/context.js b/srv/http/assets/js/context.js index 540b8fb79..0ec1ee581 100644 --- a/srv/http/assets/js/context.js +++ b/srv/http/assets/js/context.js @@ -711,6 +711,7 @@ $( '.contextmenu a, .contextmenu .submenu' ).on( 'click', function() { _replace _replaceplay */ + if ( [ 'add', 'replace' ].includes( cmd.replace( 'play', '' ) ) ) V.playlisthtml = ''; var path = V.list.path; // mpccmd: // [ 'mpcadd', path ] From 44d20f0cd50f353701a7ba0974ee590171f3f0b6 Mon Sep 17 00:00:00 2001 From: rern Date: Sun, 8 Dec 2024 10:53:06 +0700 Subject: [PATCH 21/23] u --- srv/http/assets/js/function.js | 10 ++++------ srv/http/assets/js/main.js | 2 +- srv/http/assets/js/passive.js | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/srv/http/assets/js/function.js b/srv/http/assets/js/function.js index 4212f4e27..5862a3b6d 100644 --- a/srv/http/assets/js/function.js +++ b/srv/http/assets/js/function.js @@ -1001,9 +1001,6 @@ function playlistGet() { if ( $( '#pl-list' ).is( ':empty' ) ) { if ( $( '#bar-top' ).hasClass( 'hide' ) ) banner( 'playlist blink', 'Playlist', 'Get ...', -1 ) - } else { - if ( ! V.playlist ) switchPage( 'playlist' ); - setPlaylistScroll(); } playlistBlink(); list( { playlist: 'current' }, data => { @@ -1360,6 +1357,7 @@ function renderPlaylist( data ) { // V.playlisthome - current playlist V.playlisthome = true; V.playlistlist = false; V.playlisttrack = false; + if ( ! V.playlist ) switchPage( 'playlist' ); $( '#button-pl-back' ).addClass( 'hide' ); $( '#pl-search-close' ).trigger( 'click' ); $( '#button-pl-playlists' ).toggleClass( 'disabled', C.playlists === 0 ); @@ -1379,7 +1377,6 @@ function renderPlaylist( data ) { // V.playlisthome - current playlist $( '#pl-list' ).empty(); $( '.playlist, #page-playlist .emptyadd' ).removeClass( 'hide' ); pageScroll( 0 ); - switchPage( 'playlist' ); return } @@ -1765,8 +1762,9 @@ function setPlaylistInfoWidth() { $title.css( 'max-width', iWdW + titleW < cW ? '' : cW - iWdW ); } function setPlaylistScroll() { + if ( ! V.playlist || ! V.playlisthome ) return + intervalClear(); - switchPage( 'playlist' ); if ( V.sortable || [ 'airplay', 'spotify' ].includes( S.player ) || ( D.audiocd && $( '#pl-list li' ).length < S.song + 1 ) // on eject cd S.song not yet refreshed @@ -1824,7 +1822,7 @@ function setPlaylistScroll() { intervalClear(); S.elapsed = 0; $elapsed.empty(); - setPlaylistScroll(); + if ( V.playlist && V.playlisthome ) setPlaylistScroll(); } else { elapsedtxt = second2HMS( S.elapsed ); $elapsed.html( ico( 'play' ) + elapsedtxt + slash ); diff --git a/srv/http/assets/js/main.js b/srv/http/assets/js/main.js index c3e5bbc54..fc9110eff 100644 --- a/srv/http/assets/js/main.js +++ b/srv/http/assets/js/main.js @@ -457,7 +457,7 @@ $( 'body' ).on( 'click', '#colorok', function() { V.colorpicker = false; V.colorelements.removeAttr( 'style' ); V.colorelements = ''; - if ( V.playlist && V.playlisthome ) setPlaylistScroll(); + setPlaylistScroll(); if ( S.player !== 'mpd' ) switchPage( 'playback' ); } ); $( '#library, #button-library' ).on( 'click', function() { diff --git a/srv/http/assets/js/passive.js b/srv/http/assets/js/passive.js index a280ef251..cd1f6b5b2 100644 --- a/srv/http/assets/js/passive.js +++ b/srv/http/assets/js/passive.js @@ -191,7 +191,7 @@ ps = { setProgress( 0 ); setBlinkDot(); } - if ( V.playlist ) setPlaylistScroll(); + setPlaylistScroll(); } , mpdUpdate : data => { if ( 'counts' in data ) { From 30dbac9952ebae5b3061d521488ad76dd14c1b07 Mon Sep 17 00:00:00 2001 From: rern Date: Sun, 8 Dec 2024 14:46:56 +0700 Subject: [PATCH 22/23] u --- install.sh | 2 +- srv/http/assets/css/main.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2c86767b0..1bcd89fb5 100644 --- a/install.sh +++ b/install.sh @@ -4,7 +4,7 @@ alias=r1 . /srv/http/bash/settings/addons.sh -# 20241206 +# 20241208 rm -f $dirshm/playlist* dir=/srv/http/assets/img/guide diff --git a/srv/http/assets/css/main.css b/srv/http/assets/css/main.css index 0d140abd4..4b33a432a 100644 --- a/srv/http/assets/css/main.css +++ b/srv/http/assets/css/main.css @@ -2074,6 +2074,10 @@ li.active .li2 bl { #volume-knob { width: auto } #coverart-block, #divcover { max-width: 100% } + .wl { width: 46% } + .c1 { margin-left: 5% } + .c2 { margin-left: 27% } + .c3 { margin-left: 73% } } @media ( max-width: 480px ) { #playback-controls i { margin: 0 5px } From bec6e5a851400557fb1c37436de90020778042e0 Mon Sep 17 00:00:00 2001 From: rern Date: Sun, 8 Dec 2024 14:56:14 +0700 Subject: [PATCH 23/23] Update main.css --- srv/http/assets/css/main.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/srv/http/assets/css/main.css b/srv/http/assets/css/main.css index 4b33a432a..87e7141a2 100644 --- a/srv/http/assets/css/main.css +++ b/srv/http/assets/css/main.css @@ -2067,6 +2067,7 @@ li.active .li2 bl { @media ( max-width: 500px ) { #page-playback { padding-top: 60px } #playback-row { margin-top: 20px } + #debug, #time-knob { display: none } #volume-knob, #coverart-block { width: 100% } @@ -2074,6 +2075,11 @@ li.active .li2 bl { #volume-knob { width: auto } #coverart-block, #divcover { max-width: 100% } + #bar-bottom.hide { + display: block !important; + opacity: 0 !important; + } + #bar-bottom.translucent { opacity: 0.6 !important } .wl { width: 46% } .c1 { margin-left: 5% } .c2 { margin-left: 27% }