fix: add a easier-to-see indicator at playhead (close #52)
This commit is contained in:
parent
d4c2c4e49d
commit
9d7d08f0dc
@ -1,17 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="pointer" @click="(event) => $store.dispatch('player/seek', event.x * player.duration / event.target.offsetWidth)">
|
<input class="progress"
|
||||||
<NcProgressBar size="medium" :value="player.currentTime * 100 / player.duration" />
|
:max="player.duration"
|
||||||
</div>
|
min="0"
|
||||||
|
type="range"
|
||||||
|
:value="player.currentTime"
|
||||||
|
@change="(event) => $store.dispatch('player/seek', event.target.value)">
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { NcProgressBar } from '@nextcloud/vue'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProgressBar',
|
name: 'ProgressBar',
|
||||||
components: {
|
|
||||||
NcProgressBar,
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
player() {
|
||||||
return this.$store.state.player
|
return this.$store.state.player
|
||||||
@ -21,7 +19,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.pointer {
|
.progress {
|
||||||
cursor: pointer;
|
height: 4px;
|
||||||
|
min-height: 4px;
|
||||||
|
position: absolute;
|
||||||
|
top: -2px;
|
||||||
|
width: 99%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user