Skip to content

Commit

Permalink
debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Sep 11, 2023
1 parent 56add24 commit 90c0ccc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/js/components/pages/cdb/Install.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default {

validate()
.then(r => r.installed.forEach(modname => this.installed_mods[modname] = true))
.then(() => this.packages.length == 0 ? search_packages({ type: ["mod"] }) : this.packages)
.then(() => packages.length == 0 ? search_packages({ type: ["mod"] }) : packages)
.then(pkgs => { this.packages = pkgs; packages = pkgs; })
.then(this.resolve_deps(this.author, this.name));
},
Expand All @@ -61,6 +61,7 @@ export default {
// fetch dependency info
get_dependencies(author, name)
.then(deps => {
console.log(deps[key])
deps[key]
.filter(dep => !dep.is_optional) // not-optional
.filter(dep => !this.installed_mods[dep.name]) // not installed
Expand All @@ -71,13 +72,15 @@ export default {
name: deps.name,
installed: true
});
return;
}

// fetch all package infos and provide package choices
const choices = [];
dep.packages.forEach(pkg => {
const parts = pkg.split("/");
const detail = this.packages.find(pkg => pkg.author == parts[0] && pkg.name == parts[1]);
console.log(pkg, detail)
if (detail && detail.type == "mod") {
choices.push(pkg);
}
Expand Down Expand Up @@ -123,7 +126,6 @@ export default {
<td>{{dep.name}}</td>
<td>
<select class="form-control" v-on:change="select_dep(dep.name, $event.target.value)">
<option></option>
<option v-for="choice in dep.choices" :selected="selected_deps[dep.name] == choice">{{choice}}</option>
</select>
</td>
Expand Down

0 comments on commit 90c0ccc

Please sign in to comment.