mirror of https://github.com/FreeTubeApp/FreeTube
Use a computed property instead of a prop to specify the chapters layout (#3199)
This commit is contained in:
parent
76d867a370
commit
e5cf255894
|
@ -7,10 +7,6 @@ export default defineComponent({
|
|||
'ft-card': FtCard
|
||||
},
|
||||
props: {
|
||||
compact: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
chapters: {
|
||||
type: Array,
|
||||
required: true
|
||||
|
@ -29,6 +25,10 @@ export default defineComponent({
|
|||
computed: {
|
||||
currentTitle: function () {
|
||||
return this.chapters[this.currentIndex].title
|
||||
},
|
||||
|
||||
compact: function () {
|
||||
return !this.chapters[0].thumbnail
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -122,7 +122,6 @@
|
|||
/>
|
||||
<watch-video-chapters
|
||||
v-if="!hideChapters && !isLoading && videoChapters.length > 0"
|
||||
:compact="!videoChapters[0].thumbnail"
|
||||
:chapters="videoChapters"
|
||||
:current-chapter-index="videoCurrentChapterIndex"
|
||||
class="watchVideo"
|
||||
|
|
Loading…
Reference in New Issue