mirror of
https://github.com/AltarikMC/Launcher
synced 2024-11-25 06:49:51 +01:00
Added possibility to disconnect
This commit is contained in:
parent
f5d524948c
commit
2489ada664
@ -5,6 +5,7 @@ let launchBtn = document.querySelector('#launch-btn');
|
|||||||
let fullProgressBar = document.querySelector('#fullprogressbar')
|
let fullProgressBar = document.querySelector('#fullprogressbar')
|
||||||
let progressBar = document.querySelector('#progressbar')
|
let progressBar = document.querySelector('#progressbar')
|
||||||
let loadingMessage = document.querySelector('#loading-message')
|
let loadingMessage = document.querySelector('#loading-message')
|
||||||
|
let disconnectBtn = document.querySelector('#disconnect-btn')
|
||||||
|
|
||||||
ipcRenderer.on("nick", (event, args) => {
|
ipcRenderer.on("nick", (event, args) => {
|
||||||
console.log(args)
|
console.log(args)
|
||||||
@ -34,4 +35,8 @@ ipcRenderer.on("close", (e, args) => {
|
|||||||
loadingMessage.innerHTML = "Téléchargement de Minecraft en cours..."
|
loadingMessage.innerHTML = "Téléchargement de Minecraft en cours..."
|
||||||
progressBar.style.width = "0"
|
progressBar.style.width = "0"
|
||||||
launchBtn.disabled = false
|
launchBtn.disabled = false
|
||||||
|
})
|
||||||
|
|
||||||
|
disconnectBtn.addEventListener('click', e => {
|
||||||
|
ipcRenderer.send('disconnect')
|
||||||
})
|
})
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Launcher Projet Secret</title>
|
<title>Launcher Projet Secret</title>
|
||||||
@ -22,6 +22,7 @@
|
|||||||
<h3>Compte</h3>
|
<h3>Compte</h3>
|
||||||
<hr>
|
<hr>
|
||||||
<span id="nick-span"></span>
|
<span id="nick-span"></span>
|
||||||
|
<button id="disconnect-btn">Se déconnecter</button>
|
||||||
<h3>Modifier la configuration</h3>
|
<h3>Modifier la configuration</h3>
|
||||||
<hr>
|
<hr>
|
||||||
Contenu
|
Contenu
|
||||||
|
4
main.js
4
main.js
@ -94,4 +94,8 @@ ipcMain.on("launch", (event, args) => {
|
|||||||
launcher.on('progress', (e) => event.sender.send("progress", e));
|
launcher.on('progress', (e) => event.sender.send("progress", e));
|
||||||
launcher.on('close', (e) => event.sender.send("close", e));
|
launcher.on('close', (e) => event.sender.send("close", e));
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
ipcMain.on("disconnect", (e) => {
|
||||||
|
win.loadFile('login.html')
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user