owmweather - Show message during save

pull/1969/head
Martin Boonk 2022-07-02 23:26:18 +02:00
parent b6c6ca3c86
commit 76cd112a13
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,10 @@
document.getElementById("upload").addEventListener("click", function() {
try {
settings.apikey = document.getElementById("apikey").value;
Util.writeStorage("owmweather.json", JSON.stringify(settings));
Util.showModal("Saving...");
Util.writeStorage("owmweather.json", JSON.stringify(settings), ()=>{
Util.hideModal();
});
console.log("Sent settings!");
} catch(ex) {
console.log("(Warning) Could not write settings to BangleJs.");