manager/templates/update/update.js

30 lines
793 B
JavaScript
Raw Normal View History

2023-04-29 16:19:45 +00:00
const {ipcRenderer} = require("electron");
const packageJson = require("../../package.json")
const ipc = ipcRenderer;
const fs = require("fs")
2023-04-29 17:03:19 +00:00
const loadingSpan = document.getElementById("loadingSpan")
const infoSpan = document.getElementById("infoSpan")
const load = document.getElementById("load")
2023-04-29 16:19:45 +00:00
document.getElementById("version").innerHTML = packageJson.version
2023-04-29 17:03:19 +00:00
ipc.on("error", () => {
loadingSpan.innerHTML = "<i class='fa fa-times'></i>"
load.innerHTML = "<button style='padding: 10%;' class='buttonTryAgain' id='close'>Fermer</button>"
2023-04-29 17:07:38 +00:00
infoSpan.innerHTML = 'Une erreur est apparue lors de la mise à jour, fermez puis relancez !'
2023-04-29 17:03:19 +00:00
const close = document.getElementById("close")
close.addEventListener("click", () => {
ipc.send("close")
})
})
2023-04-29 16:19:45 +00:00