diff options
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/browser.js | 4 | ||||
-rw-r--r-- | src/app/main.js | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/app/browser.js b/src/app/browser.js index eb18fe5..73eb6f7 100644 --- a/src/app/browser.js +++ b/src/app/browser.js @@ -25,6 +25,7 @@ var Browser = { title: pkg.name, image: pkg.icon, author: pkg.owner, + download: pkg.download_url, description: pkg.description }) } @@ -62,8 +63,7 @@ function BrowserEl(properties) { <div class="text"> <div class="title">${properties.title}</div> <div class="description">${properties.description} - ${lang("gui.browser.madeby")} ${properties.author}</div> - <button>Install</button> - <button>Info</button> + <button onclick="installFromURL('${properties.download}')">Install</button> </div> </div> ` diff --git a/src/app/main.js b/src/app/main.js index 5f0cc9a..b61b20a 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -153,6 +153,11 @@ function installmod() { ipcRenderer.send("installmod") } +// Tells the main process to install a mod from a URL +function installFromURL(url) { + ipcRenderer.send("installfromurl", url) +} + // Frontend part of settings a new game path ipcRenderer.on("newpath", (event, newpath) => { settings.gamepath = newpath; |