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

cleanup + RDS features

This commit is contained in:
NoobishSVK
2024-01-27 23:00:44 +01:00
parent e1e26e16e2
commit fb31afb9a7
30 changed files with 257 additions and 5836 deletions

View File

@@ -1,21 +1,21 @@
/* Themes */
const themes = {
theme1: ['#1d1838', '#8069fa'],
theme2: ['#381818', '#ff7070'],
theme1: ['#111', '#aaa'],
theme2: ['#1f0c0c', '#ff7070'],
theme3: ['#121c0c', '#a9ff70'],
theme4: ['#0c1c1b', '#68f7ee'],
theme5: ['#171106', '#f5b642'],
theme6: ['#21091d', '#ed51d3'],
theme7: ['#111', '#aaa']
theme7: ['#1d1838', '#8069fa'],
theme8: ['#000', '#888'],
};
function setTheme(themeName) {
const themeColors = themes[themeName];
if (themeColors) {
$(':root').css('--color-main', themeColors[0]);
$(':root').css('--color-main-bright', themeColors[1]);
}
}
/* Signal Units */
const signalUnits = {
dbf: ['dBf'],
dbuv: ['dBµV'],
dbm: ['dBm'],
};
$(document).ready(() => {
const themeSelector = $('#theme-selector');
@@ -31,16 +31,7 @@ $(document).ready(() => {
setTheme(selectedTheme);
localStorage.setItem('theme', selectedTheme);
});
});
/* Signal Units */
const signalUnits = {
dbf: ['dBf'],
dbuv: ['dBµV'],
dbm: ['dBm'],
};
$(document).ready(() => {
const signalSelector = $('#signal-selector');
if (localStorage.getItem('signalUnit')) {
@@ -51,4 +42,12 @@ $(document).ready(() => {
const selectedSignalUnit = event.target.value;
localStorage.setItem('signalUnit', selectedSignalUnit);
});
});
});
function setTheme(themeName) {
const themeColors = themes[themeName];
if (themeColors) {
$(':root').css('--color-main', themeColors[0]);
$(':root').css('--color-main-bright', themeColors[1]);
}
}