mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-12-13 13:50:27 +05:30
Move conditional rendering logic to WatchOnYouTubeButton
This commit is contained in:
parent
662eb32e3e
commit
b382b525b1
@ -35,10 +35,7 @@
|
||||
<font-awesome-icon icon="rss" />
|
||||
</a>
|
||||
|
||||
<WatchOnYouTubeButton
|
||||
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||
:link="`https://youtube.com/channel/${this.channel.id}`"
|
||||
/>
|
||||
<WatchOnYouTubeButton :link="`https://youtube.com/channel/${this.channel.id}`" />
|
||||
|
||||
<div class="flex mt-4 mb-2">
|
||||
<button
|
||||
|
@ -23,10 +23,7 @@
|
||||
<a class="btn mr-1" :href="getRssUrl">
|
||||
<font-awesome-icon icon="rss" />
|
||||
</a>
|
||||
<WatchOnYouTubeButton
|
||||
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||
:link="`https://www.youtube.com/playlist?list=${this.$route.query.list}`"
|
||||
/>
|
||||
<WatchOnYouTubeButton :link="`https://www.youtube.com/playlist?list=${this.$route.query.list}`" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -8,13 +8,13 @@ export default {
|
||||
|
||||
<template>
|
||||
<!-- For large screens -->
|
||||
<a :href="link" class="btn lt-lg:hidden">
|
||||
<a :href="link" v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)" class="btn lt-lg:hidden">
|
||||
<i18n-t keypath="player.watch_on" tag="strong">
|
||||
<font-awesome-icon class="mx-1.5" :icon="['fab', 'youtube']" />
|
||||
</i18n-t>
|
||||
</a>
|
||||
<!-- For small screens -->
|
||||
<a :href="link" class="btn lg:hidden">
|
||||
<a :href="link" v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)" class="btn lg:hidden">
|
||||
<font-awesome-icon class="mx-1.5" :icon="['fab', 'youtube']" />
|
||||
</a>
|
||||
</template>
|
||||
|
@ -108,10 +108,7 @@
|
||||
>
|
||||
<font-awesome-icon icon="rss" />
|
||||
</a>
|
||||
<WatchOnYouTubeButton
|
||||
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||
:link="`https://youtu.be/${getVideoId()}`"
|
||||
/>
|
||||
<WatchOnYouTubeButton :link="`https://youtu.be/${getVideoId()}`" />
|
||||
<!-- Share Dialog -->
|
||||
<button class="btn" @click="showShareModal = !showShareModal">
|
||||
<i18n-t class="lt-lg:hidden" keypath="actions.share" tag="strong"></i18n-t>
|
||||
|
Loading…
Reference in New Issue
Block a user