Web UI options faff

This commit is contained in:
Ian Renton
2026-01-30 20:56:18 +00:00
parent 221fade44b
commit 6ed0eed10b
17 changed files with 64 additions and 45 deletions

View File

@@ -387,15 +387,17 @@ function loadOptions() {
options = jsonData;
// Populate the Display panel
options["web-ui-options"]["spot-count"].forEach(sc => $("#spots-to-fetch").append($('<option>', {
web_ui_options["spot-count"].forEach(sc => $("#spots-to-fetch").append($('<option>', {
value: sc,
text: sc
text: sc,
selected: sc == web_ui_options["spot-count-default"] // todo remove this?
})));
$("#spots-to-fetch").val(options["web-ui-options"]["spot-count-default"]);
$("#spots-to-fetch").val(web_ui_options["spot-count-default"]); // todo setting val doesn't update UI?
getAvailableBandColorSchemes().forEach(sc => $("#band-color-scheme").append($('<option>', {
value: sc,
text: sc
})));
$("#band-color-scheme").val(web_ui_options["default-band-color-scheme"]);
// First pass loading settings, so we can load the band colour scheme before the filters that need to use it
loadSettings();
@@ -410,7 +412,7 @@ function loadOptions() {
generateMultiToggleFilterCard("#dx-continent-options", "dx_continent", options["continents"]);
generateMultiToggleFilterCard("#de-continent-options", "de_continent", options["continents"]);
generateModesMultiToggleFilterCard(options["modes"]);
generateSourcesMultiToggleFilterCard(options["spot_sources"], options["web-ui-options"]["spot-providers-enabled-by-default"]);
generateSourcesMultiToggleFilterCard(options["spot_sources"], web_ui_options["spot-providers-enabled-by-default"]);
// Load URL params. These may select things from the various filter & display options, so the function needs
// to be called after these are set up, but if the URL params ask for "embedded mode", this will suppress