Browse Source

UI: fix smartsettings and add diclaimer again

......it's really killing my motivation to work on this.
pull/65/head
Starbeamrainbowlabs 2 years ago
parent
commit
42e683929b
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 11
      client_src/js/UI.mjs

11
client_src/js/UI.mjs

@ -53,7 +53,7 @@ class UI { @@ -53,7 +53,7 @@ class UI {
await GetFromUrl(`${this.config.api_root}?action=list-reading-types`)
);
this.ui_panel.loadConfig([
this.ui_panel.config = [
{
type: "select",
name: "Reading Type",
@ -67,6 +67,13 @@ class UI { @@ -67,6 +67,13 @@ class UI {
document.querySelector("main").classList.remove("working-visual");
}).bind(this)
},
{
type: "button",
name: "View disclaimer",
callback: ((_event) => {
window.open("https://github.com/ConnectedHumber/Air-Quality-Web/tree/dev#disclaimer", "_blank")
})
},
{
type: "button",
name: "Report bug",
@ -81,7 +88,7 @@ class UI { @@ -81,7 +88,7 @@ class UI {
show_changelog(false);
})
}
]);
];
this.ui_panel.setIndex("Reading Type", this.reading_types.findIndex((type) => type.short_descr == "PM25"));
if(this.tour_enabled) await this.tour.run_once();

Loading…
Cancel
Save