feat: better display the reading status for episodes (in episodes list / podcast section) (close #51)
All checks were successful
repod / xml (push) Successful in 18s
repod / php (push) Successful in 56s
repod / nodejs (push) Successful in 1m56s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-01-29 16:06:54 +01:00
parent b63e1175a0
commit 87315b1221

View File

@ -19,6 +19,11 @@
<template #subname> <template #subname>
{{ episode.duration }} {{ episode.duration }}
</template> </template>
<template #indicator>
<NcProgressBar v-if="episode.action && episode.action.action === 'PLAY'"
class="progress"
:value="episode.action.position * 100 / episode.action.total" />
</template>
<template #actions> <template #actions>
<NcActionButton v-if="!isCurrentEpisode(episode)" @click="load(episode)"> <NcActionButton v-if="!isCurrentEpisode(episode)" @click="load(episode)">
<template #icon> <template #icon>
@ -48,7 +53,7 @@
</template> </template>
<script> <script>
import { NcActionButton, NcAvatar, NcListItem, NcModal } from '@nextcloud/vue' import { NcActionButton, NcAvatar, NcListItem, NcModal, NcProgressBar } from '@nextcloud/vue'
import Loading from '../Atoms/Loading.vue' import Loading from '../Atoms/Loading.vue'
import Modal from '../Atoms/Modal.vue' import Modal from '../Atoms/Modal.vue'
import PlayButton from 'vue-material-design-icons/Play.vue' import PlayButton from 'vue-material-design-icons/Play.vue'
@ -68,6 +73,7 @@ export default {
NcAvatar, NcAvatar,
NcListItem, NcListItem,
NcModal, NcModal,
NcProgressBar,
PlayButton, PlayButton,
StopButton, StopButton,
}, },
@ -121,4 +127,8 @@ export default {
.ended { .ended {
opacity: .4; opacity: .4;
} }
.progress {
margin-top: .4rem;
}
</style> </style>