mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-26 02:05:51 +01:00
ui: show error if no package is selected
This commit is contained in:
parent
bdda585f12
commit
a9de893cca
@ -23,7 +23,9 @@
|
|||||||
"location_placeholder":"Enter a install path here",
|
"location_placeholder":"Enter a install path here",
|
||||||
"select":"Select",
|
"select":"Select",
|
||||||
"overwriting": "Overwriting",
|
"overwriting": "Overwriting",
|
||||||
"overwriting_warning": "Directory {path} already exists.<br>Are you sure you want to <b>overwrite</b> the contents inside?"
|
"overwriting_warning": "Directory {path} already exists.<br>Are you sure you want to <b>overwrite</b> the contents inside?",
|
||||||
|
"nothing_picked": "Nothing selected",
|
||||||
|
"nothing_picked_warning": "Please select at least one package to install!"
|
||||||
},
|
},
|
||||||
"install_packages":{
|
"install_packages":{
|
||||||
"check_for_update":"Checking for updates...",
|
"check_for_update":"Checking for updates...",
|
||||||
|
@ -92,7 +92,20 @@ export default {
|
|||||||
onConfirm: confirmCallback
|
onConfirm: confirmCallback
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
show_nothing_picked_dialog: function () {
|
||||||
|
this.$buefy.dialog.alert({
|
||||||
|
title: this.$t('select_packages.nothing_picked'),
|
||||||
|
message: this.$t('select_packages.nothing_picked_warning', { path: this.$root.$data.install_location }),
|
||||||
|
confirmText: this.$t('cancel'),
|
||||||
|
type: 'is-danger',
|
||||||
|
hasIcon: true
|
||||||
|
})
|
||||||
|
},
|
||||||
install: function () {
|
install: function () {
|
||||||
|
if (!this.$root.config.packages.some(function (x) { return x.default })) {
|
||||||
|
this.show_nothing_picked_dialog()
|
||||||
|
return
|
||||||
|
}
|
||||||
// maintenance + repair
|
// maintenance + repair
|
||||||
if (this.repair) {
|
if (this.repair) {
|
||||||
this.$router.push('/install/repair')
|
this.$router.push('/install/repair')
|
||||||
|
Loading…
Reference in New Issue
Block a user