diff --git a/src/index.html b/src/index.html index d8819d3..2e65fda 100644 --- a/src/index.html +++ b/src/index.html @@ -17,7 +17,6 @@
- diff --git a/src/modules/gui/gui.js b/src/modules/gui/gui.js index b1cb480..2a27a85 100644 --- a/src/modules/gui/gui.js +++ b/src/modules/gui/gui.js @@ -335,13 +335,16 @@ class GUI { /** * Flashes the error icon in the menu bar + * + * @param {string} icon Font awesome icon class */ - static flashErrorIcon() { + static flashIcon(icon = "fas fa-exclamation-circle red") { var statusButton = $(".menu").find("[data-button='status']"); var statusIcon = statusButton.find("i"); + statusButton.stop(true, true); statusIcon.removeClass(); - statusIcon.addClass("fas fa-exclamation-circle red"); + statusIcon.addClass(icon); statusButton.show().delay(1000).fadeOut("slow"); } @@ -355,9 +358,10 @@ class GUI { updateEntry.setId("update-entry"); updateEntry.add(); + GUI.flashIcon("fas fa-box blue"); + $(".entry[data-id='" + updateEntry.getId() + "']").find("[data-entry-link='download']").click(function() { ipcRenderer.send("download-update"); - $(".menu").find("[data-button='download']").show(); updateEntry.setTitle("Downloading v" + info.version + "..."); updateEntry.setText(""); @@ -377,7 +381,7 @@ class GUI { updateEntry.setText("XenonTrade v" + info.version + " has been downloaded. It will be automatically installed after closing XenonTrade.