Merge pull request #623 from bloqaudio/fix/save-button-dirty

web: highlight Save to flash only when there are unsaved changes
This commit is contained in:
feelfree69 authored and GitHub committed 2026-10-24 19:39:55 +02:00
commit 9c65039bab
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -836,6 +836,7 @@ function isConfCmd(line){
function setDirty(d){
S.dirty=d;
$("dirty").classList.toggle("show",d);
$("saveBtn").classList.toggle("pri",d);
}
function postCmd(cmd,quiet){
return api("/cmd",{method:"POST",body:cmd}).then(function(r){
+1 -1
View File
@@ -224,7 +224,7 @@ button.danger{background:var(--bad);color:#fff;border-color:transparent}
<span id="ttitle"></span>
<div id="strip"></div>
<span id="dirty" data-i18n="hdr_dirty" data-i18n-t="hdr_dirty_t">unsaved changes</span>
<button class="ctl pri" id="saveBtn" data-i18n="hdr_save" data-i18n-t="hdr_save_t">Save to flash</button>
<button class="ctl" id="saveBtn" data-i18n="hdr_save" data-i18n-t="hdr_save_t">Save to flash</button>
</header>
<main>