This commit is contained in:
2025-04-29 18:05:54 +02:00
parent 13c6f14886
commit 4b8d7f1679
9 changed files with 262 additions and 31 deletions

View File

@@ -13,5 +13,6 @@ function getMojangAuth(username, password) {
}
module.exports = {
getMicrosoftAuth
getMicrosoftAuth,
getMojangAuth
}

View File

@@ -1,6 +1,7 @@
const { shell, contextBridge, ipcRenderer } = require("electron")
const { contextBridge, ipcRenderer } = require("electron")
contextBridge.executeInMainWorld("system", {
openInBrowser: (url) => shell.openExternal(url),
call: (method, args) => ipcRenderer.send("call", { method, args })
contextBridge.exposeInMainWorld("system", {
openInBrowser: (url) => ipcRenderer.send("call", { method: "shell::openExternal", args: { url } }),
call: (method, args) => ipcRenderer.send("call", { method, args }),
result: (method, callback) => ipcRenderer.on(`Response<${method}>`, (event, data) => callback(data))
})