PR fixes
parent
beff82a2f9
commit
5f6d49a622
|
|
@ -61,14 +61,14 @@
|
||||||
function toggleVisibility() {
|
function toggleVisibility() {
|
||||||
let empty = document.getElementById("empty");
|
let empty = document.getElementById("empty");
|
||||||
let loading = document.getElementById("loading");
|
let loading = document.getElementById("loading");
|
||||||
if (replies.length == 0) {
|
if (fetching) {
|
||||||
empty.setAttribute("class", "d-block");
|
|
||||||
loading.setAttribute("class", "d-hide");
|
|
||||||
}
|
|
||||||
else if (fetching) {
|
|
||||||
loading.setAttribute("class", "d-block");
|
loading.setAttribute("class", "d-block");
|
||||||
empty.setAttribute("class", "d-hide");
|
empty.setAttribute("class", "d-hide");
|
||||||
}
|
}
|
||||||
|
else if (replies.length == 0) {
|
||||||
|
empty.setAttribute("class", "d-block");
|
||||||
|
loading.setAttribute("class", "d-hide");
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
loading.setAttribute("class", "d-hide");
|
loading.setAttribute("class", "d-hide");
|
||||||
empty.setAttribute("class", "d-hide");
|
empty.setAttribute("class", "d-hide");
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
var reply = {};
|
var reply = {};
|
||||||
reply.text = document.getElementById('msg').value;
|
reply.text = document.getElementById('msg').value;
|
||||||
replies.push(reply);
|
replies.push(reply);
|
||||||
return updateDevice();
|
updateDevice();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDevice() {
|
function updateDevice() {
|
||||||
|
|
@ -114,10 +114,7 @@
|
||||||
Util.writeStorage("replies.json", JSON.stringify(replies), () => {
|
Util.writeStorage("replies.json", JSON.stringify(replies), () => {
|
||||||
fetching = false;
|
fetching = false;
|
||||||
renderReplyList();
|
renderReplyList();
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
fetching = false;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ exports.reply = function (options) {
|
||||||
responseMessage = { t: "notify", id: msg.id, n: "REPLY", msg: replyText };
|
responseMessage = { t: "notify", id: msg.id, n: "REPLY", msg: replyText };
|
||||||
}
|
}
|
||||||
E.showMenu();
|
E.showMenu();
|
||||||
layout.setUI();
|
|
||||||
layout.render();
|
|
||||||
if (options.sendReply == null || options.sendReply) {
|
if (options.sendReply == null || options.sendReply) {
|
||||||
Bluetooth.println(JSON.stringify(responseMessage));
|
Bluetooth.println(JSON.stringify(responseMessage));
|
||||||
}
|
}
|
||||||
|
|
@ -26,8 +24,6 @@ exports.reply = function (options) {
|
||||||
title: options.title || /*LANG*/ "Reply with:",
|
title: options.title || /*LANG*/ "Reply with:",
|
||||||
back: function () {
|
back: function () {
|
||||||
E.showMenu();
|
E.showMenu();
|
||||||
layout.setUI();
|
|
||||||
layout.render();
|
|
||||||
reject("User pressed back");
|
reject("User pressed back");
|
||||||
},
|
},
|
||||||
}, // options
|
}, // options
|
||||||
|
|
@ -56,8 +52,6 @@ exports.reply = function (options) {
|
||||||
{
|
{
|
||||||
buttons: { Ok: true },
|
buttons: { Ok: true },
|
||||||
remove: function () {
|
remove: function () {
|
||||||
layout.setUI();
|
|
||||||
layout.render();
|
|
||||||
reject(
|
reject(
|
||||||
"Please install a keyboard app, or set a custom reply via the app loader!"
|
"Please install a keyboard app, or set a custom reply via the app loader!"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue