mirror of
https://github.com/romancm/gamebrary
synced 2024-11-24 20:23:06 +00:00
set latest release as selected release by default
This commit is contained in:
parent
66d173aec5
commit
233c28e1b3
1 changed files with 11 additions and 15 deletions
|
@ -80,22 +80,18 @@ export default {
|
||||||
|
|
||||||
this.selectedRelease = latestRelease;
|
this.selectedRelease = latestRelease;
|
||||||
|
|
||||||
if (this.notification) {
|
if (this.notification && latestRelease && latestRelease.tag_name) {
|
||||||
const [latestRelease] = this.releases;
|
this.$store.commit('UPDATE_SETTING', { key: 'release', value: latestRelease.tag_name });
|
||||||
|
|
||||||
if (latestRelease && latestRelease.tag_name) {
|
this.$store.dispatch('SAVE_SETTINGS', this.settings)
|
||||||
this.$store.commit('UPDATE_SETTING', { key: 'release', value: latestRelease.tag_name });
|
.then(() => {
|
||||||
|
this.$store.commit('SET_NOTIFICATION', false);
|
||||||
this.$store.dispatch('SAVE_SETTINGS', this.settings)
|
})
|
||||||
.then(() => {
|
.catch(() => {
|
||||||
this.$store.commit('SET_NOTIFICATION', false);
|
this.$bvToast.toast(
|
||||||
})
|
'There was an error saving your settings',
|
||||||
.catch(() => {
|
{ title: 'Error', variant: 'danger' });
|
||||||
this.$bvToast.toast(
|
});
|
||||||
'There was an error saving your settings',
|
|
||||||
{ title: 'Error', variant: 'danger' });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue