aboutsummaryrefslogtreecommitdiff
path: root/src/app/main.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-07-22 01:23:04 +0200
committer0neGal <mail@0negal.com>2023-07-22 01:23:04 +0200
commitc3652b72b7bb3bcce207139ebc718e15f6746e43 (patch)
treef3ba70e7ccbee09c1f61a7100886be1a75e93c8c /src/app/main.js
parent73a651b63c29e24774c1ba3952a2d6c977101047 (diff)
downloadViper-c3652b72b7bb3bcce207139ebc718e15f6746e43.tar.gz
Viper-c3652b72b7bb3bcce207139ebc718e15f6746e43.zip
mostly support installing packages through GUI
Install toasts, installing overall, dependencies and so forth, all seem to be fully functional, however more bug testing is probably required to concluce whether that is actually the case or not... This also doesn't break `src/modules/mods.js`, i.e dragging mods in to manually install them still functions the same as always.
Diffstat (limited to 'src/app/main.js')
-rw-r--r--src/app/main.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/app/main.js b/src/app/main.js
index 26410cc..51d9e73 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -173,7 +173,7 @@ function installFromPath(path) {
}
// Tells the main process to install a mod from a URL
-function installFromURL(url, dependencies, clearqueue, author) {
+function installFromURL(url, dependencies, clearqueue, author, package_name, version) {
if (clearqueue) {installqueue = []};
let prettydepends = [];
@@ -188,7 +188,9 @@ function installFromURL(url, dependencies, clearqueue, author) {
if (! isModInstalled(pkg[1])) {
newdepends.push({
pkg: depend,
- author: pkg[0]
+ author: pkg[0],
+ version: pkg[2],
+ package_name: pkg[1]
});
prettydepends.push(`${pkg[1]} v${pkg[2]} - ${lang("gui.browser.madeby")} ${pkg[0]}`);
@@ -207,7 +209,7 @@ function installFromURL(url, dependencies, clearqueue, author) {
}
setButtons(false);
- ipcRenderer.send("install-from-url", url, author);
+ ipcRenderer.send("install-from-url", url, author, package_name, version);
if (dependencies) {
installqueue = dependencies;