From 8d711f3aa9c2b074bbbb152f117fc148c9f9a773 Mon Sep 17 00:00:00 2001 From: Alexandre Moreau Date: Mon, 24 Oct 2022 01:21:47 +0200 Subject: [PATCH] Implement minimize comments in WatchVideo --- src/components/WatchVideo.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index c62dc364..0e7a497c 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -162,9 +162,14 @@
-
-

+
+
+

@@ -243,6 +248,7 @@ export default { sponsors: null, selectedAutoLoop: false, selectedAutoPlay: null, + showComments: true, showDesc: true, showRecs: true, showChapters: true, @@ -363,6 +369,12 @@ export default { '"]', }); }, + toggleComments() { + this.showComments = !this.showComments; + if (this.showComments && this.comments === null) { + this.fetchComments(); + } + }, fetchComments() { return this.fetchJson(this.apiUrl() + "/comments/" + this.getVideoId()); },