4
0
mirror of https://github.com/AltarikMC/Launcher synced 2025-12-16 12:13:50 +00:00

Index.html now work

This commit is contained in:
2022-02-18 21:10:54 +01:00
parent f856bd620e
commit 1a3082a90f
4 changed files with 36 additions and 42 deletions

View File

@@ -86,5 +86,7 @@ ipcMain.on("disconnect", () => {
})
ipcMain.on("pageReady", (event) => {
event.sender.send("nick", { name: minecraft.auth.name })
minecraft.getModsInformations(event)
})

View File

@@ -30,13 +30,7 @@ class Minecraft {
if(isDev || password.trim() !== "") {
this.auth = Authenticator.getAuth(username, password)
this.auth.then(v => {
win.loadFile('src/client/index.html').then(() => {
setInterval(() => {
event.sender.send("nick", { name: v.name })
this.getModsInformations(e)
}, 1000)
})
win.loadFile('src/client/index.html')
}).catch(() => {
event.sender.send("loginError")
logger.error("[MJ login] User haven't purchase the game")
@@ -68,9 +62,7 @@ class Minecraft {
} else {
if(!msmc.isDemoUser(result)) {
this.auth = msmc.getMCLC().getAuth(result)
win.loadFile('src/client/index.html').then(() => {
event.sender.send("nick", { name: this.auth.name })
})
win.loadFile('src/client/index.html')
} else {
event.sender.send("loginError")
logger.error("[MS login] User haven't purchase the game")