Browse Source

Bugfix: Move close button in the changelog dialog box from the bottom to the top of the content

pull/51/head
Starbeamrainbowlabs 3 years ago
parent
commit
14f9cf4a60
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 4
      Changelog.md
  2. 2
      client_src/css/main.css
  3. 11
      client_src/css/nanomodal.css
  4. 9
      client_src/js/UI.mjs

4
Changelog.md

@ -7,12 +7,12 @@ This is the changelog for the air quality web interface and its associated HTTP @@ -7,12 +7,12 @@ This is the changelog for the air quality web interface and its associated HTTP
## v0.12-dev
- Added loading animation while the map is loading
- Added new favicon
- Added device sensor information to the device info tab in the popup
- Add favicon logo, thanks to [@BNNorman](https://github.com/BNNorman)
- Moved the close button in the changelog dialog from the bottom to the top of the content
- [API] Improve accuracy of `distance_calc` for the `list-devices-near` action by using _Haversine's Formula_.
- Display how long ago a device was last seen in it's pop-up box
- [API] HTTP API users can now use the new `last_seen` property to the `list-devices` and `device-info` actions.
- Add favicon logo, thanks to [@BNNorman](https://github.com/BNNorman)
- [API] Added new `sensors` array to `device-info` output, which lists the sensors that a device has
## v0.11.1 - 22nd June 2019

2
client_src/css/main.css

@ -31,7 +31,7 @@ body { @@ -31,7 +31,7 @@ body {
margin: 0; padding: 0;
}
h1 {
body > h1 {
grid-area: header;
justify-self: center;
align-self: start;

11
client_src/css/nanomodal.css

@ -3,3 +3,14 @@ @@ -3,3 +3,14 @@
max-height: 70vh;
overflow-y: scroll;
}
.nanoModal h1 {
margin-top: 0;
}
.nanoModal.reverse .nanoModalButtons {
position: absolute; top: 0.5em; right: 0.5em;
display: inline-block !important;
margin: 0;
border: 0;
}

9
client_src/js/UI.mjs

@ -8,9 +8,9 @@ import GetFromUrl from './Helpers/GetFromUrl.mjs'; @@ -8,9 +8,9 @@ import GetFromUrl from './Helpers/GetFromUrl.mjs';
import Tour from './Tour.mjs';
function show_nanomodal(html) {
function show_nanomodal(html, options = {}) {
return new Promise((resolve, _reject) => {
let modal = NanoModal(html);
let modal = NanoModal(html, options);
modal.onHide(resolve);
modal.show();
});
@ -25,7 +25,10 @@ async function show_changelog(only_if_changed) { @@ -25,7 +25,10 @@ async function show_changelog(only_if_changed) {
}
console.log("[UI] Showing changelog");
await show_nanomodal(await GetFromUrl(`${Config.api_root}?action=changelog`));
await show_nanomodal(await GetFromUrl(`${Config.api_root}?action=changelog`), {
classes: "reverse",
autoRemove: true
});
localStorage.setItem("last_seen_version", current_version);
return true;

Loading…
Cancel
Save