restoring the config and macros gcodes

This commit is contained in:
sanjayk03-dev
2024-06-07 16:50:31 +05:30
parent 41cd60a0f3
commit dd994d6229
2 changed files with 38 additions and 54 deletions

View File

@@ -76,33 +76,6 @@ module.exports = {
console.error("Restore Failed: ", error);
alert("Restore failed");
}
// const fileReader = new FileReader();
// fileReader.onload = async ({ target }) => {
// let config;
// try {
// config = JSON.parse(target.result);
// } catch (error) {
// console.error("Invalid config file:", error);
// alert("Invalid config file");
// return;
// }
// try {
// await api.put("config/save", config);
// this.$dispatch("update");
// SvelteComponents.showDialog("Message", {
// title: "Success",
// message: "Configuration restored"
// });
// this.confirmReset= false
// } catch (error) {
// console.error("Restore failed:", error);
// alert("Restore failed");
// }
// };
// fileReader.readAsText(files[0]);
},
next: async function () {