Adding clean themes branch
This commit is contained in:
parent
aa90f33199
commit
8c0c4918f0
|
|
@ -35,6 +35,7 @@
|
||||||
<script src="compiled/receiver.js"></script>
|
<script src="compiled/receiver.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="static/lib/nanoscroller.css" />
|
<link rel="stylesheet" type="text/css" href="static/lib/nanoscroller.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="static/css/openwebrx.css" />
|
<link rel="stylesheet" type="text/css" href="static/css/openwebrx.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="static/css/themes.css" />
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9, minimum-scale=0.9, shrink-to-fit=no, user-scalable=no, interactive-widget=overlays-content" />
|
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9, minimum-scale=0.9, shrink-to-fit=no, user-scalable=no, interactive-widget=overlays-content" />
|
||||||
<meta name="theme-color" content="#222" />
|
<meta name="theme-color" content="#222" />
|
||||||
|
|
|
||||||
|
|
@ -1141,6 +1141,10 @@ function on_ws_recv(evt) {
|
||||||
Utils.setVesselUrl(config['vessel_url']);
|
Utils.setVesselUrl(config['vessel_url']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ('ui_scheme' in config) {
|
||||||
|
set_ui_scheme(config['ui_scheme']);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "secondary_config":
|
case "secondary_config":
|
||||||
var s = json['value'];
|
var s = json['value'];
|
||||||
|
|
@ -2023,3 +2027,19 @@ function nr_changed() {
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function set_ui_scheme(theme) {
|
||||||
|
const themes = ['brown', 'red', 'green', 'khaki', 'blue', 'navy'];
|
||||||
|
var $panels = $('.openwebrx-panel');
|
||||||
|
var $buttons = $('.openwebrx-button');
|
||||||
|
|
||||||
|
themes.forEach(function(theme) {
|
||||||
|
$panels.removeClass('openwebrx-panel-' + theme);
|
||||||
|
$buttons.removeClass('openwebrx-button-' + theme);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (theme && (theme != '') && (theme != 'default')) {
|
||||||
|
$panels.addClass('openwebrx-panel-' + theme);
|
||||||
|
$buttons.addClass('openwebrx-button-' + theme);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,7 @@ defaultConfig = PropertyLayer(
|
||||||
waterfall_auto_level_default_mode=False,
|
waterfall_auto_level_default_mode=False,
|
||||||
waterfall_auto_min_range=50,
|
waterfall_auto_min_range=50,
|
||||||
key_locked=False,
|
key_locked=False,
|
||||||
|
ui_scheme="default",
|
||||||
ui_opacity=100,
|
ui_opacity=100,
|
||||||
ui_frame=False,
|
ui_frame=False,
|
||||||
ui_swap_wheel=False,
|
ui_swap_wheel=False,
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
|
||||||
"fft_compression",
|
"fft_compression",
|
||||||
"max_clients",
|
"max_clients",
|
||||||
"tuning_precision",
|
"tuning_precision",
|
||||||
|
"ui_scheme",
|
||||||
"ui_opacity",
|
"ui_opacity",
|
||||||
"ui_frame",
|
"ui_frame",
|
||||||
"ui_swap_wheel",
|
"ui_swap_wheel",
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,19 @@ class GeneralSettingsController(SettingsFormController):
|
||||||
),
|
),
|
||||||
Section(
|
Section(
|
||||||
"Display settings",
|
"Display settings",
|
||||||
|
DropdownInput(
|
||||||
|
"ui_scheme",
|
||||||
|
"User interface color scheme",
|
||||||
|
options=[
|
||||||
|
Option("default", "Default"),
|
||||||
|
Option("brown", "Brown"),
|
||||||
|
Option("red", "Red"),
|
||||||
|
Option("green", "Green"),
|
||||||
|
Option("khaki", "Khaki"),
|
||||||
|
Option("blue", "Blue"),
|
||||||
|
Option("navy", "Navy"),
|
||||||
|
],
|
||||||
|
),
|
||||||
NumberInput(
|
NumberInput(
|
||||||
"ui_opacity",
|
"ui_opacity",
|
||||||
"User interface opacity",
|
"User interface opacity",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue