mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Put "Watch on Odysee" into a separate component
This commit is contained in:
parent
bea31f534b
commit
b31516d1cb
2 changed files with 24 additions and 17 deletions
21
src/components/WatchOnOdyseeButton.vue
Normal file
21
src/components/WatchOnOdyseeButton.vue
Normal file
|
@ -0,0 +1,21 @@
|
|||
<script>
|
||||
export default {
|
||||
props: {
|
||||
link: String,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<template v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)">
|
||||
<!-- For large screens -->
|
||||
<a :href="link" class="btn lt-lg:hidden flex items-center">
|
||||
<i18n-t keypath="player.watch_on" tag="strong">Odysee</i18n-t>
|
||||
<font-awesome-icon class="mx-1.5" :icon="['fab', 'odysee']" />
|
||||
</a>
|
||||
<!-- For small screens -->
|
||||
<a :href="link" class="btn lg:hidden flex items-center">
|
||||
<font-awesome-icon class="mx-1.5" :icon="['fab', 'odysee']" />
|
||||
</a>
|
||||
</template>
|
||||
</template>
|
|
@ -121,23 +121,7 @@
|
|||
<!-- YouTube -->
|
||||
<WatchOnYouTubeButton :link="`https://youtu.be/${getVideoId()}`" />
|
||||
<!-- Odysee -->
|
||||
<!-- For large screens -->
|
||||
<a
|
||||
v-if="video.lbryId"
|
||||
:href="'https://odysee.com/' + video.lbryId"
|
||||
class="btn lt-lg:hidden flex items-center"
|
||||
>
|
||||
<i18n-t keypath="player.watch_on" tag="strong">Odysee</i18n-t>
|
||||
<font-awesome-icon class="mx-1.5" :icon="['fab', 'odysee']" />
|
||||
</a>
|
||||
<!-- For small screens -->
|
||||
<a
|
||||
v-if="video.lbryId"
|
||||
:href="'https://odysee.com/' + video.lbryId"
|
||||
class="btn lg:hidden flex items-center"
|
||||
>
|
||||
<font-awesome-icon class="mx-1.5" :icon="['fab', 'odysee']" />
|
||||
</a>
|
||||
<WatchOnOdyseeButton :link="`https://odysee.com/${video.lbryId}`" />
|
||||
<!-- listen / watch toggle -->
|
||||
<router-link
|
||||
:to="toggleListenUrl"
|
||||
|
@ -251,6 +235,7 @@ import WatchOnYouTubeButton from "./WatchOnYouTubeButton.vue";
|
|||
import LoadingIndicatorPage from "./LoadingIndicatorPage.vue";
|
||||
import ToastComponent from "./ToastComponent.vue";
|
||||
import { parseTimeParam } from "@/utils/Misc";
|
||||
import WatchOnOdyseeButton from "./WatchOnOdyseeButton.vue";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
|
@ -264,6 +249,7 @@ export default {
|
|||
ShareModal,
|
||||
PlaylistVideos,
|
||||
WatchOnYouTubeButton,
|
||||
WatchOnOdyseeButton,
|
||||
LoadingIndicatorPage,
|
||||
ToastComponent,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue