diff options
author | 0neGal <mail@0negal.com> | 2022-05-16 00:21:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 00:21:59 +0200 |
commit | dee10ac8d1d361f51ce316539e45b8a4197c8ad9 (patch) | |
tree | bbe9c068cf0d851e8baba973a903de617474107f /src/app/browser.js | |
parent | 108c7b97100d2a40e82f8196109c99d1d59b59ee (diff) | |
parent | 9724d433ebba9c323236078eeb87f3e5f5dc3e6d (diff) | |
download | Viper-dee10ac8d1d361f51ce316539e45b8a4197c8ad9.tar.gz Viper-dee10ac8d1d361f51ce316539e45b8a4197c8ad9.zip |
Merge pull request #122 from 0neGal/dependency-supportbetter-browser
feat: Dependency support
Diffstat (limited to 'src/app/browser.js')
-rw-r--r-- | src/app/browser.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/app/browser.js b/src/app/browser.js index e22ab3c..5c943ba 100644 --- a/src/app/browser.js +++ b/src/app/browser.js @@ -171,7 +171,8 @@ function BrowserElFromObj(obj) { download: pkg.download_url, version: pkg.version_number, categories: pkg.categories, - description: pkg.description + description: pkg.description, + dependencies: pkg.dependencies, }) } @@ -240,7 +241,7 @@ function BrowserEl(properties) { <div class="text"> <div class="title">${properties.title}</div> <div class="description">${properties.description}</div> - <button class="install" onclick="installFromURL('${properties.download}')">${installstr}</button> + <button class="install" onclick='installFromURL("${properties.download}", ${JSON.stringify(properties.dependencies)}, true)'>${installstr}</button> <button class="info" onclick="require('electron').shell.openExternal('${properties.url}')">${lang('gui.browser.info')}</button> <button class="visual">${properties.version}</button> <button class="visual">${lang("gui.browser.madeby")} ${properties.author}</button> @@ -285,6 +286,11 @@ ipcRenderer.on("installedmod", (event, mod) => { title: lang("gui.toast.title.installed"), description: mod.name + " " + lang("gui.toast.desc.installed") }) + + if (installqueue.length != 0) { + installFromURL("https://thunderstore.io/package/download/" + installqueue[0]); + installqueue.shift(); + } }) function normalize(items) { |