fix: add a easier-to-see indicator at playhead (close #52)
All checks were successful
repod / xml (push) Successful in 24s
repod / php (push) Successful in 1m7s
repod / nodejs (push) Successful in 2m24s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-01-30 17:34:20 +01:00
parent d4c2c4e49d
commit 9d7d08f0dc

View File

@ -1,17 +1,15 @@
<template>
<div class="pointer" @click="(event) => $store.dispatch('player/seek', event.x * player.duration / event.target.offsetWidth)">
<NcProgressBar size="medium" :value="player.currentTime * 100 / player.duration" />
</div>
<input class="progress"
:max="player.duration"
min="0"
type="range"
:value="player.currentTime"
@change="(event) => $store.dispatch('player/seek', event.target.value)">
</template>
<script>
import { NcProgressBar } from '@nextcloud/vue'
export default {
name: 'ProgressBar',
components: {
NcProgressBar,
},
computed: {
player() {
return this.$store.state.player
@ -21,7 +19,11 @@ export default {
</script>
<style scoped>
.pointer {
cursor: pointer;
.progress {
height: 4px;
min-height: 4px;
position: absolute;
top: -2px;
width: 99%;
}
</style>