[web] Replace component with plain HTML component

This commit is contained in:
Alain Nussbaumer 2024-01-28 20:27:56 +01:00
parent 9eb391be8b
commit bb43de465f
2 changed files with 9 additions and 26 deletions

View File

@ -30,8 +30,9 @@
v-text="track.item.artist" v-text="track.item.artist"
/> />
<h2 class="subtitle is-7 has-text-grey" v-text="track.item.album" /> <h2 class="subtitle is-7 has-text-grey" v-text="track.item.album" />
<progress-bar <progress
v-if="show_progress" v-if="show_progress && track.item.seek_ms > 0"
class="progress is-info"
:max="track.item.length_ms" :max="track.item.length_ms"
:value="track.item.seek_ms" :value="track.item.seek_ms"
/> />
@ -55,12 +56,11 @@
<script> <script>
import ModalDialogTrack from '@/components/ModalDialogTrack.vue' import ModalDialogTrack from '@/components/ModalDialogTrack.vue'
import ProgressBar from '@/components/ProgressBar.vue'
import webapi from '@/webapi' import webapi from '@/webapi'
export default { export default {
name: 'ListTracks', name: 'ListTracks',
components: { ModalDialogTrack, ProgressBar }, components: { ModalDialogTrack },
props: ['tracks', 'uris', 'expression', 'show_progress', 'show_icon'], props: ['tracks', 'uris', 'expression', 'show_progress', 'show_icon'],
emits: ['play-count-changed'], emits: ['play-count-changed'],
@ -99,4 +99,8 @@ export default {
} }
</script> </script>
<style></style> <style scoped>
.progress {
height: 0.25rem;
}
</style>

View File

@ -1,21 +0,0 @@
<template>
<progress
v-if="value > 0"
class="progress is-info"
:value="value"
:max="max"
/>
</template>
<script>
export default {
name: 'ProgressBar',
props: ['max', 'value']
}
</script>
<style scoped>
.progress {
height: 0.25rem;
}
</style>