the latest mods from nexus is now on the online mods page

This commit is contained in:
2026-02-07 22:58:00 +01:00
parent c038e92592
commit f68fd0ac3a
4 changed files with 93 additions and 14 deletions

36
main.js
View File

@@ -27,8 +27,10 @@ const bepinexFiles = [
let bepinexVersion
let bepinexBackupVersion
let mainWindow
const createWindow = () => {
const win = new BrowserWindow({
mainWindow = new BrowserWindow({
width: 1280,
height: 720,
webPreferences: {
@@ -36,7 +38,7 @@ const createWindow = () => {
}
})
win.loadFile('renderer/index.html')
mainWindow.loadFile('renderer/index.html')
}
app.whenReady().then(() => {
@@ -329,4 +331,32 @@ async function verifyNexusAPI() {
if (await nexus.getValidationResult()) {
return true
}
}
}
ipcMain.handle('get-latest-mods', async () => {
if (nexus == undefined) {
return
}
mods = await nexus.getLatestAdded()
return mods
})
ipcMain.handle('download-mod', async (event, link) => {
if (nexus == undefined) {
return
}
const nexusWindow = new BrowserWindow({
width: 1080,
height: 720,
modal: true,
parent: mainWindow,
webPreferences: {
nodeIntegration: false,
contextIsolation: true
}
})
nexusWindow.loadURL(link)
})