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

This commit is contained in:
Starbeamrainbowlabs 2019-07-20 11:49:53 +01:00
parent 2d7d60b2b2
commit 14f9cf4a60
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
4 changed files with 20 additions and 6 deletions

View file

@ -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

View file

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

View file

@ -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;
}

View file

@ -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) {
}
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;