mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-25 15:07:21 +00:00
Add "Watch on YouTube" button.
This commit is contained in:
parent
e36bafea9c
commit
c599d56db6
@ -1,30 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="uk-container uk-container-xlarge">
|
<div class="uk-container uk-container-xlarge" v-if="video">
|
||||||
<ErrorHandler v-if="video && video.error" :message="video.message" :error="video.error" />
|
<ErrorHandler v-if="video && video.error" :message="video.message" :error="video.error" />
|
||||||
|
|
||||||
<div v-show="!video.error">
|
<div v-show="!video.error">
|
||||||
<Player ref="videoPlayer" :video="video" :sponsors="sponsors" :selectedAutoPlay="selectedAutoPlay" />
|
<Player ref="videoPlayer" :video="video" :sponsors="sponsors" :selectedAutoPlay="selectedAutoPlay" />
|
||||||
<h1 class="uk-text-bold">{{ video.title }}</h1>
|
<h1 class="uk-text-bold">{{ video.title }}</h1>
|
||||||
|
|
||||||
|
<div uk-grid>
|
||||||
|
<div class="uk-width-1-2 uk-text-left">
|
||||||
<img :src="video.uploaderAvatar" loading="lazy" />
|
<img :src="video.uploaderAvatar" loading="lazy" />
|
||||||
<router-link class="uk-text-bold" v-bind:to="video.uploaderUrl || '/'">
|
<router-link class="uk-text-bold" v-if="video.uploaderUrl" :to="video.uploaderUrl">
|
||||||
<a>{{ video.uploader }}</a>
|
<a>{{ video.uploader }}</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<p :style="[{ colour: foregroundColor }]">
|
<div :style="[{ colour: foregroundColor }]">
|
||||||
<font-awesome-icon icon="thumbs-up"></font-awesome-icon>
|
<font-awesome-icon icon="thumbs-up"></font-awesome-icon>
|
||||||
<b>{{ addCommas(video.likes) }}</b>
|
<b>{{ addCommas(video.likes) }}</b>
|
||||||
|
|
||||||
<font-awesome-icon icon="thumbs-down"></font-awesome-icon>
|
<font-awesome-icon icon="thumbs-down"></font-awesome-icon>
|
||||||
<b>{{ addCommas(video.dislikes) }}</b>
|
<b>{{ addCommas(video.dislikes) }}</b>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div>
|
||||||
<font-awesome-icon icon="eye"></font-awesome-icon>
|
<font-awesome-icon icon="eye"></font-awesome-icon>
|
||||||
<b>{{ addCommas(video.views) }}</b> views
|
<b>{{ addCommas(video.views) }}</b> views
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div>
|
||||||
Uploaded on <b>{{ video.uploadDate }}</b>
|
Uploaded on <b>{{ video.uploadDate }}</b>
|
||||||
</p>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="uk-width-1-2 uk-text-right">
|
||||||
|
<a :href="'https://youtu.be/' + getVideoId()"
|
||||||
|
>Watch on <font-awesome-icon :icon="['fab', 'youtube']"></font-awesome-icon
|
||||||
|
></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
<a class="uk-button uk-button-small" style="background: #222" @click="showDesc = !showDesc">
|
<a class="uk-button uk-button-small" style="background: #222" @click="showDesc = !showDesc">
|
||||||
{{ showDesc ? "+" : "-" }}
|
{{ showDesc ? "+" : "-" }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { createApp } from "vue";
|
import { createApp } from "vue";
|
||||||
import { library } from "@fortawesome/fontawesome-svg-core";
|
import { library } from "@fortawesome/fontawesome-svg-core";
|
||||||
import { faThumbsUp, faThumbsDown, faEye, faThumbtack, faCheck, faHeart, faHeadphones } from "@fortawesome/free-solid-svg-icons";
|
import { faThumbsUp, faThumbsDown, faEye, faThumbtack, faCheck, faHeart, faHeadphones } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { faGithub, faBitcoin } from "@fortawesome/free-brands-svg-icons";
|
import { faGithub, faBitcoin, faYoutube } from "@fortawesome/free-brands-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
||||||
library.add(faThumbsUp, faThumbsDown, faEye, faGithub, faBitcoin, faThumbtack, faCheck, faHeart, faHeadphones);
|
library.add(faThumbsUp, faThumbsDown, faEye, faGithub, faBitcoin, faThumbtack, faCheck, faHeart, faHeadphones, faYoutube);
|
||||||
|
|
||||||
import("uikit/dist/css/uikit-core.css");
|
import("uikit/dist/css/uikit-core.css");
|
||||||
import("uikit/dist/js/uikit-core.min");
|
import("uikit/dist/js/uikit-core.min");
|
||||||
|
Loading…
Reference in New Issue
Block a user