fix: 🐛 fix prototype with async
All checks were successful
repod / xml (push) Successful in 1m47s
repod / php (push) Successful in 1m8s
repod / nodejs (push) Successful in 1m18s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-08-09 22:51:32 +02:00
parent 81af0c219f
commit 7efb0327d4
4 changed files with 12 additions and 12 deletions

View File

@ -18,7 +18,7 @@ export const usePlayer = defineStore('player', {
started: 0,
}),
actions: {
init: () => {
init() {
audio.ondurationchange = () => (this.duration = audio.duration)
audio.onended = () => this.stop()
audio.onloadeddata = () => (this.loaded = true)
@ -29,7 +29,7 @@ export const usePlayer = defineStore('player', {
audio.ontimeupdate = () => (this.currentTime = audio.currentTime)
audio.onvolumechange = () => (this.volume = audio.volume)
},
load: async (episode, podcastUrl) => {
async load(episode, podcastUrl) {
this.episode = episode
this.podcastUrl = podcastUrl
@ -63,24 +63,24 @@ export const usePlayer = defineStore('player', {
audio.src = ''
}
},
pause: () => {
pause() {
audio.pause()
this.paused = true
},
play: () => {
play() {
audio.play()
this.paused = false
this.started = audio.currentTime
},
seek: (currentTime) => {
seek(currentTime) {
audio.currentTime = currentTime
this.time()
},
stop: () => {
stop() {
this.pause()
this.episode = null
},
time: () => {
time() {
this.episode.action = {
podcast: this.podcastUrl,
episode: this.episode.url,
@ -95,10 +95,10 @@ export const usePlayer = defineStore('player', {
this.episode.action,
])
},
setVolume: (volume) => {
setVolume(volume) {
audio.volume = volume
},
setRate: (rate) => {
setRate(rate) {
audio.playbackRate = rate
},
},

View File

@ -10,7 +10,7 @@ export const useSettings = defineStore('settings', {
},
}),
actions: {
setFilters: (filters) => {
setFilters(filters) {
this.filters = { ...this.filters, ...filters }
setCookie('repod.filters', JSON.stringify(this.filters), 365)
},

View File

@ -7,7 +7,7 @@ export const useSubscriptions = defineStore('subscriptions', {
subscriptions: [],
}),
actions: {
fetch: async () => {
async fetch() {
const metrics = await axios.get(
generateUrl('/apps/gpoddersync/personal_settings/metrics'),
)

View File

@ -1,6 +1,6 @@
<template>
<AppContent class="main">
<NcTextField :label="t('repod', 'Find a podcast')" v-model="search">
<NcTextField v-model="search" :label="t('repod', 'Find a podcast')">
<template #icon>
<Magnify :size="20" />
</template>