Migrate to vue3 (fix #126) #127
@ -195,6 +195,15 @@ export default {
|
|||||||
return decodeUrl(this.$route.params.url)
|
return decodeUrl(this.$route.params.url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
episode() {
|
||||||
|
if (this.episode) {
|
||||||
|
this.episodes = this.episodes.map((e) =>
|
||||||
|
e.url === this.episode.url ? this.episode : e,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@ -258,7 +267,6 @@ export default {
|
|||||||
generateUrl('/apps/gpoddersync/episode_action/create'),
|
generateUrl('/apps/gpoddersync/episode_action/create'),
|
||||||
[episode.action],
|
[episode.action],
|
||||||
)
|
)
|
||||||
this.updateList(episode)
|
|
||||||
if (read && this.episode && episode.url === this.episode.url) {
|
if (read && this.episode && episode.url === this.episode.url) {
|
||||||
this.load(null)
|
this.load(null)
|
||||||
}
|
}
|
||||||
@ -269,11 +277,6 @@ export default {
|
|||||||
this.loadingAction = false
|
this.loadingAction = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateList(episode) {
|
|
||||||
this.episodes = this.episodes.map((e) =>
|
|
||||||
e.url === episode.url ? episode : e,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -66,6 +66,7 @@ export const usePlayer = defineStore('player', {
|
|||||||
pause() {
|
pause() {
|
||||||
audio.pause()
|
audio.pause()
|
||||||
this.paused = true
|
this.paused = true
|
||||||
|
this.time()
|
||||||
},
|
},
|
||||||
play() {
|
play() {
|
||||||
audio.play()
|
audio.play()
|
||||||
|
Loading…
Reference in New Issue
Block a user