From 2489ada664f73699f0a376ad8598ec1f524b463b Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 8 Dec 2020 23:19:42 +0100 Subject: [PATCH] Added possibility to disconnect --- include/index.js | 5 +++++ index.html | 3 ++- main.js | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/index.js b/include/index.js index 88b5531..19a7435 100644 --- a/include/index.js +++ b/include/index.js @@ -5,6 +5,7 @@ let launchBtn = document.querySelector('#launch-btn'); let fullProgressBar = document.querySelector('#fullprogressbar') let progressBar = document.querySelector('#progressbar') let loadingMessage = document.querySelector('#loading-message') +let disconnectBtn = document.querySelector('#disconnect-btn') ipcRenderer.on("nick", (event, args) => { console.log(args) @@ -34,4 +35,8 @@ ipcRenderer.on("close", (e, args) => { loadingMessage.innerHTML = "Téléchargement de Minecraft en cours..." progressBar.style.width = "0" launchBtn.disabled = false +}) + +disconnectBtn.addEventListener('click', e => { + ipcRenderer.send('disconnect') }) \ No newline at end of file diff --git a/index.html b/index.html index ee82946..575c930 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + Launcher Projet Secret @@ -22,6 +22,7 @@

Compte


+

Modifier la configuration


Contenu diff --git a/main.js b/main.js index 6d3e8d8..53dc3a9 100644 --- a/main.js +++ b/main.js @@ -94,4 +94,8 @@ ipcMain.on("launch", (event, args) => { launcher.on('progress', (e) => event.sender.send("progress", e)); launcher.on('close', (e) => event.sender.send("close", e)); +}) + +ipcMain.on("disconnect", (e) => { + win.loadFile('login.html') }) \ No newline at end of file