diff --git a/changelog.md b/changelog.md index 5d2ed7d..e382bdf 100644 --- a/changelog.md +++ b/changelog.md @@ -16,6 +16,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Released +## [1.7.0] - 2022-04-18 +### Added +- [`toast.js`](static/js/toast.js) and [`toast.js.gz`](static/js/toast.js.gz) + added to show hovering alert banners, see [#21][ref-issue-21] +- Add toast JavaScript files to [`setup.py`](setup.py) to be part of twine + distributions + +### Changed +- `/select` page shows success banner after posting new network config data + and does not return to index page anymore. `/configure` page shows success + banner after removing a network and redirects to its page instead of + returning to the index page, see [#21][ref-issue-21] + ## [1.6.0] - 2022-04-18 ### Added - Routing for JavaScript `.js` files added, see [#18][ref-issue-18] @@ -159,8 +172,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `sendfile` function implemented in same way as on Micropythons PicoWeb -[Unreleased]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager/compare/1.6.0...develop +[Unreleased]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager/compare/1.7.0...develop +[1.7.0]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/1.7.0 [1.6.0]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/1.6.0 [1.5.0]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/1.5.0 [1.4.0]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/1.4.0 @@ -171,6 +185,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [0.1.1]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/0.1.1 [0.1.0]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/0.1.0 +[ref-issue-21]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager/issues/21 [ref-issue-18]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager/issues/18 [ref-issue-19]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager/issues/19 [ref-issue-15]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager/issues/15 diff --git a/setup.py b/setup.py index fa9e9c5..558407f 100644 --- a/setup.py +++ b/setup.py @@ -47,6 +47,8 @@ [ 'static/css/bootstrap.min.css', 'static/css/bootstrap.min.css.gz', + 'static/js/toast.js', + 'static/js/toast.js.gz', ] ), ( diff --git a/static/js/toast.js b/static/js/toast.js new file mode 100644 index 0000000..2861f12 --- /dev/null +++ b/static/js/toast.js @@ -0,0 +1,6 @@ +/*! + * toast.js v0.1.0 + * (c) 2022 brainelectronics + * Released under the MIT License + */ +function createToast(t,e,i,s){var n=document.createElement("div");n.classList.add("alert"),t&&n.classList.add(t),n.style.position="relative",n.style.width="100%",n.style.maxWidth="300px",n.style.minWidth="280px",n.style.borderRadius="5px",n.style.padding="15px",n.innerHTML=""+e+" "+i,document.getElementById("alert_container").appendChild(n),setTimeout(function(){n.style.opacity=1,n.style.visibility="visible"},1),s>0?setTimeout(function(){n.style.opacity=0,n.style.visibility="hidden",setTimeout(function(){n.remove()},350)},s):null==s&&setTimeout(function(){n.style.opacity=0,n.style.visibility="hidden",setTimeout(function(){n.remove()},350)},3e3)} \ No newline at end of file diff --git a/static/js/toast.js.gz b/static/js/toast.js.gz new file mode 100644 index 0000000..f12e1b4 Binary files /dev/null and b/static/js/toast.js.gz differ diff --git a/templates/remove.tpl b/templates/remove.tpl index a25cfda..468a837 100644 --- a/templates/remove.tpl +++ b/templates/remove.tpl @@ -8,9 +8,9 @@