mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-22 18:55:37 +01:00
Prevent fresh install with no packages selected
This commit is contained in:
parent
6210a2668f
commit
d9e4e5ecc2
@ -30,11 +30,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="subtitle is-6" v-if="!$root.$data.metadata.preexisting_install && advanced">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="subtitle is-6" v-if="!$root.$data.metadata.preexisting_install && advanced">Install Location</div>
|
<div class="subtitle is-6" v-if="!$root.$data.metadata.preexisting_install && advanced">Install Location</div>
|
||||||
<div class="field has-addons" v-if="!$root.$data.metadata.preexisting_install && advanced">
|
<div class="field has-addons" v-if="!$root.$data.metadata.preexisting_install && advanced">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
@ -55,12 +50,13 @@
|
|||||||
v-on:click="advanced = true">Advanced...</a>
|
v-on:click="advanced = true">Advanced...</a>
|
||||||
</p>
|
</p>
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<a class="button is-dark is-medium" v-if="!$root.$data.metadata.preexisting_install"
|
<!-- Disable the Install button on a fresh install with no packages selected -->
|
||||||
v-on:click="install">Install</a>
|
<button v-if="$root.$data.metadata.preexisting_install" class="button is-medium is-dark" v-on:click="install">
|
||||||
</p>
|
Modify
|
||||||
<p class="control">
|
</button>
|
||||||
<a class="button is-dark is-medium" v-if="$root.$data.metadata.preexisting_install"
|
<button v-else class="button is-medium is-dark" v-on:click="install" :disabled="!this.has_package_selected">
|
||||||
v-on:click="install">Modify</a>
|
Install
|
||||||
|
</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -94,6 +90,17 @@
|
|||||||
installDesktopShortcut: true
|
installDesktopShortcut: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
has_package_selected: function() {
|
||||||
|
for (let i=0; i < this.$root.config.packages.length; ++i) {
|
||||||
|
let pkg = this.$root.config.packages[i];
|
||||||
|
if (pkg.default) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
select_file: function () {
|
select_file: function () {
|
||||||
window.external.invoke(JSON.stringify({
|
window.external.invoke(JSON.stringify({
|
||||||
|
Loading…
Reference in New Issue
Block a user