diff --git a/src/App.vue b/src/App.vue index ad7370e..d4b641e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -32,11 +32,7 @@ - - - - - + diff --git a/src/components/VideoComment.vue b/src/components/VideoComment.vue index cae08e5..1301c77 100644 --- a/src/components/VideoComment.vue +++ b/src/components/VideoComment.vue @@ -1,31 +1,28 @@ - - - - Pinned by - {{ video.uploader }} - - - - - {{ comment.author }} - - {{ comment.commentText }} - - {{ numberFormat(comment.likeCount) }} - - - - - + + + + + + + + + + mdi-pin Pinned by {{ video.uploader }} + + {{ comment.author }}mdi-account-check + + + + {{ comment.commentText }} + + + + mdi-thumb-up {{ numberFormat(comment.likeCount) }} + mdi-heart + + + @@ -34,7 +31,7 @@ import { LibPiped } from '@/tools/libpiped' export default { name: 'VideoComment', - props: ['comment'], + props: ['comment', 'video'], methods: { numberFormat (...args) { return LibPiped.numberFormat(...args) diff --git a/src/routes/WatchVideo.vue b/src/routes/WatchVideo.vue index a8f1774..4894743 100644 --- a/src/routes/WatchVideo.vue +++ b/src/routes/WatchVideo.vue @@ -74,7 +74,7 @@ Comments - + @@ -100,7 +100,6 @@ export default { video: { title: 'Loading...' }, - active: false, sponsors: null, selectedAutoLoop: false, showDesc: true, @@ -110,20 +109,7 @@ export default { } }, mounted () { - this.getVideoData().then(() => { - if (this.active) { - this.$refs.videoPlayer.loadVideo() - } - }) - this.getSponsors() - if (this.$store.getters.getPreferenceBoolean('comments', true)) this.getComments() - }, - activated () { - this.active = true - if (this.video.duration) this.$refs.videoPlayer.loadVideo() - }, - deactivated () { - this.active = false + this.initialize() }, watch: { '$route.query.v': function (v) { @@ -133,6 +119,14 @@ export default { } }, methods: { + initialize () { + this.getVideoData().then(() => { + this.$refs.videoPlayer.loadVideo() + }) + this.getSponsors() + if (this.$store.getters.getPreferenceBoolean('comments', true)) this.getComments() + }, + numberFormat (...args) { return LibPiped.numberFormat(...args) },
{{ comment.commentText }}