1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

new chat window, bugfixes, component update

This commit is contained in:
Marek Farkaš
2025-04-22 21:23:11 +02:00
parent 79e4205612
commit 008441f93a
19 changed files with 286 additions and 150 deletions

View File

@@ -166,11 +166,6 @@ $(document).ready(() => {
$('.version-string').text(currentVersion);
setBg();
// Update icons when the checkbox state changes
$('input[type="checkbox"]').change(function() {
updateIconState(this);
});
});
function getQueryParameter(name) {
@@ -178,29 +173,6 @@ function getQueryParameter(name) {
return urlParams.get(name);
}
function updateIconState(el) {
// If an element is passed, update only that one
if (el) {
var $checkbox = $(el);
var icon = $checkbox.siblings('label').find('i');
if ($checkbox.is(':checked')) {
icon.removeClass('fa-toggle-off').addClass('fa-toggle-on');
} else {
icon.removeClass('fa-toggle-on').addClass('fa-toggle-off');
}
} else {
// Otherwise, update all checkboxes
$('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) {