manager/templates/update/update.js
2023-04-29 19:07:38 +02:00

30 lines
793 B
JavaScript

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