mirror of https://github.com/Kylart/KawAnime.git
Fix some bugs
This commit is contained in:
parent
74ad60b401
commit
16cd15b44e
|
@ -96,6 +96,7 @@
|
|||
},
|
||||
refresh () {
|
||||
this.$store.dispatch('history/get')
|
||||
this.generateHistory()
|
||||
},
|
||||
close () {
|
||||
this.$store.commit('history/setModal', false)
|
||||
|
|
|
@ -229,6 +229,7 @@
|
|||
methods: {
|
||||
close () {
|
||||
this.$store.commit('mal/showForm', false)
|
||||
this.form = this.initForm
|
||||
},
|
||||
submit () {
|
||||
const id = this.entry.id
|
||||
|
@ -303,11 +304,6 @@
|
|||
console.error((new Date()).toLocaleTimeString(), e)
|
||||
}
|
||||
}
|
||||
},
|
||||
show (bool) {
|
||||
if (!bool) {
|
||||
this.form = this.initForm
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@ export default {
|
|||
|
||||
commit('empty')
|
||||
|
||||
try {
|
||||
const {data, status} = await axios.get('getLatestNyaa', { params: state.params })
|
||||
|
||||
if (status === 200) commit('set', data)
|
||||
|
@ -99,6 +100,14 @@ export default {
|
|||
}, 45 * 1000)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
log(`An error occurred while getting the latest releases. Retrying in 45 seconds.`, e)
|
||||
commit('setInfoSnackbar', 'Could not get the latest releases. Retrying in 45 seconds.', isRoot)
|
||||
setTimeout(() => {
|
||||
log(`Retrying to get latest releases.`)
|
||||
dispatch('refresh').catch(err => { void (err) })
|
||||
}, 45 * 1000)
|
||||
}
|
||||
},
|
||||
async autoRefresh ({dispatch, commit, state}) {
|
||||
// Refresh releases every 30 minutes
|
||||
|
|
Loading…
Reference in New Issue