You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
bugfixes, UI improvements, logging improvements
This commit is contained in:
@@ -155,6 +155,13 @@ $(document).ready(() => {
|
||||
$('.version-string').text(currentVersion);
|
||||
|
||||
setBg();
|
||||
|
||||
updateIconState();
|
||||
|
||||
// Update icons when the checkbox state changes
|
||||
$('input[type="checkbox"]').change(function() {
|
||||
updateIconState();
|
||||
});
|
||||
});
|
||||
|
||||
function getQueryParameter(name) {
|
||||
@@ -162,6 +169,17 @@ function getQueryParameter(name) {
|
||||
return urlParams.get(name);
|
||||
}
|
||||
|
||||
function updateIconState() {
|
||||
$('input[type="checkbox"]').each(function() {
|
||||
var icon = $(this).siblings('label').find('i');
|
||||
if ($(this).is(':checked')) {
|
||||
icon.removeClass('fa-toggle-off').addClass('fa-toggle-on');
|
||||
} else {
|
||||
icon.removeClass('fa-toggle-on').addClass('fa-toggle-off');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setTheme(themeName) {
|
||||
const themeColors = themes[themeName];
|
||||
if (themeColors) {
|
||||
@@ -191,4 +209,5 @@ function setBg() {
|
||||
} else {
|
||||
$('body').css('background', 'var(--color-main)');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user