mirror of https://github.com/Kylart/KawAnime.git
Fixed update time on releases page, would not refresh on refresh
This commit is contained in:
parent
c7770ecab0
commit
5eaf170b0d
|
@ -191,7 +191,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
releases: function () {
|
releases () {
|
||||||
return this.$store.state.releases
|
return this.$store.state.releases
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -230,8 +230,9 @@
|
||||||
this.$store.commit('setErrorSnackbar', `An error occurred while getting ${name}.`)
|
this.$store.commit('setErrorSnackbar', `An error occurred while getting ${name}.`)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
refresh () {
|
async refresh () {
|
||||||
this.$store.dispatch('refreshReleases')
|
await this.$store.dispatch('refreshReleases')
|
||||||
|
this.updateTime()
|
||||||
},
|
},
|
||||||
print (item) {
|
print (item) {
|
||||||
console.log(`[${(new Date()).toLocaleTimeString()}]: Downloading ${item.name}.`)
|
console.log(`[${(new Date()).toLocaleTimeString()}]: Downloading ${item.name}.`)
|
||||||
|
@ -240,7 +241,7 @@
|
||||||
this.choiceTitle = name
|
this.choiceTitle = name
|
||||||
this.$store.commit('setAddToChoice', true)
|
this.$store.commit('setAddToChoice', true)
|
||||||
},
|
},
|
||||||
updateTime (store) {
|
updateTime (store=this.$store) {
|
||||||
const updated = store.state.releasesUpdateTime
|
const updated = store.state.releasesUpdateTime
|
||||||
if (updated) {
|
if (updated) {
|
||||||
this.lastUpdateTime = updated.fromNow()
|
this.lastUpdateTime = updated.fromNow()
|
||||||
|
|
Loading…
Reference in New Issue