diff --git a/package.json b/package.json index 3479555..13a0742 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "altarik-launcher", "author": "Altarik", - "version": "2.0.1", + "version": "2.0.2", "description": "Altarik Launcher", "main": "src/server/main.js", "homepage": "https://altarik.fr/", diff --git a/src/client/assets/js/checkingUpdate.js b/src/client/assets/js/checkingUpdate.js index b1977f5..f5386f4 100644 --- a/src/client/assets/js/checkingUpdate.js +++ b/src/client/assets/js/checkingUpdate.js @@ -3,7 +3,8 @@ app = vue.createApp({ data() { return { displayFullscreen: "block", - fullscreenText: "Recherche de mise à jour..." + fullscreenText: "Recherche de mise à jour...", + downloadLink: null } }, mounted() { @@ -12,16 +13,20 @@ app = vue.createApp({ methods: { sendCheckingUpdate() { ipcRenderer.send("checking-update"); + }, + openLinkExternal() { + shell.openExternal(this.downloadLink) } }, }); -app.mount("#vue"); +let root = app.mount("#vue"); ipcRenderer.on("update-available", (event, arg) => { - app.fullscreenText = "Mise à jour disponible, téléchargement..." + root.fullscreenText = "Mise à jour disponible, téléchargement..." }); ipcRenderer.on("please-download-update", (event, args) => { - app.fullscreenText = `Veuillez télécharger la mise à jour en cliquant sur le lien suivant: ${args.url}` + root.fullscreenText = `Veuillez télécharger la mise à jour en cliquant sur le lien suivant :` + root.downloadLink = `${args.url}` }) \ No newline at end of file diff --git a/src/client/assets/js/preload.js b/src/client/assets/js/preload.js index 4fd6d9a..feb32a5 100644 --- a/src/client/assets/js/preload.js +++ b/src/client/assets/js/preload.js @@ -1,5 +1,5 @@ 'use strict'; -const { ipcRenderer } = require('electron'); +const { ipcRenderer, shell } = require('electron'); let app; window.addEventListener("DOMContentLoaded", () => { const minimizeButton = document.getElementById("minimize-btn") diff --git a/src/client/checkingUpdate.html b/src/client/checkingUpdate.html index ecd3e3a..1075d1d 100644 --- a/src/client/checkingUpdate.html +++ b/src/client/checkingUpdate.html @@ -23,7 +23,7 @@
{{ fullscreenText }}
+{{ fullscreenText }}
{{ downloadLink }}