From 662eb32e3e8d9ff239e37c6720a8281f47a1c694 Mon Sep 17 00:00:00 2001 From: thecashewtrader Date: Wed, 2 Nov 2022 22:53:12 +0530 Subject: [PATCH] Extract Watch on YouTube button to a component --- src/components/ChannelPage.vue | 24 ++++++------------------ src/components/PlaylistPage.vue | 23 +++++------------------ src/components/WatchOnYouTubeButton.vue | 20 ++++++++++++++++++++ src/components/WatchVideo.vue | 22 +++++----------------- 4 files changed, 36 insertions(+), 53 deletions(-) create mode 100644 src/components/WatchOnYouTubeButton.vue diff --git a/src/components/ChannelPage.vue b/src/components/ChannelPage.vue index 297619f3..66b1835b 100644 --- a/src/components/ChannelPage.vue +++ b/src/components/ChannelPage.vue @@ -30,29 +30,15 @@ v-if="channel.id" :href="`${apiUrl()}/feed/unauthenticated/rss?channels=${channel.id}`" target="_blank" - class="btn flex-col ml-3" + class="btn flex-col mx-3" > - - - - - - - - - - + :link="`https://youtube.com/channel/${this.channel.id}`" + />
@@ -66,11 +51,13 @@ + + diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index a4191d4f..d1adc0f5 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -108,24 +108,10 @@ > - - - - - - - - - - + :link="`https://youtu.be/${getVideoId()}`" + />