alert box for reset macros

This commit is contained in:
sanjayk03-dev
2024-01-04 21:59:49 +05:30
parent 8d9a33d03c
commit 443e4bd39a
3 changed files with 11 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ module.exports = {
data: function () {
return {
tab: "1",
confirmShow: false,
confirmReset: false,
};
},
components: {
@@ -92,7 +92,7 @@ module.exports = {
},
cancelMacros: function (id) {
document.getElementById(`macros-name-${id}`).value = "";
document.getElementById(`macros-color-${id}`).value = "#fff";
document.getElementById(`macros-color-${id}`).value = "#ffffff";
},
resetConfig: async function () {
this.config.macros = [
@@ -137,6 +137,7 @@ module.exports = {
await api.put("config/save", this.config);
console.log("Successfully flushed");
this.$dispatch("update");
this.confirmReset = false;
} catch (error) {
console.error("Restore Failed: ", error);
alert("Restore failed");