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 -->
|
<!-- YouTube -->
|
||||||
<WatchOnYouTubeButton :link="`https://youtu.be/${getVideoId()}`" />
|
<WatchOnYouTubeButton :link="`https://youtu.be/${getVideoId()}`" />
|
||||||
<!-- Odysee -->
|
<!-- Odysee -->
|
||||||
<!-- For large screens -->
|
<WatchOnOdyseeButton :link="`https://odysee.com/${video.lbryId}`" />
|
||||||
<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>
|
|
||||||
<!-- listen / watch toggle -->
|
<!-- listen / watch toggle -->
|
||||||
<router-link
|
<router-link
|
||||||
:to="toggleListenUrl"
|
:to="toggleListenUrl"
|
||||||
|
@ -251,6 +235,7 @@ import WatchOnYouTubeButton from "./WatchOnYouTubeButton.vue";
|
||||||
import LoadingIndicatorPage from "./LoadingIndicatorPage.vue";
|
import LoadingIndicatorPage from "./LoadingIndicatorPage.vue";
|
||||||
import ToastComponent from "./ToastComponent.vue";
|
import ToastComponent from "./ToastComponent.vue";
|
||||||
import { parseTimeParam } from "@/utils/Misc";
|
import { parseTimeParam } from "@/utils/Misc";
|
||||||
|
import WatchOnOdyseeButton from "./WatchOnOdyseeButton.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
|
@ -264,6 +249,7 @@ export default {
|
||||||
ShareModal,
|
ShareModal,
|
||||||
PlaylistVideos,
|
PlaylistVideos,
|
||||||
WatchOnYouTubeButton,
|
WatchOnYouTubeButton,
|
||||||
|
WatchOnOdyseeButton,
|
||||||
LoadingIndicatorPage,
|
LoadingIndicatorPage,
|
||||||
ToastComponent,
|
ToastComponent,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue