mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Fix layout above description.
Affects, uploaded date, views, likes, subscribe button, etc.
This commit is contained in:
parent
f9fcc5e98a
commit
d0c45650de
1 changed files with 63 additions and 52 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="video && isEmbed" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 999">
|
<div v-if="video && isEmbed" class="absolute top-0 left-0 h-full w-full z-50">
|
||||||
<Player
|
<Player
|
||||||
ref="videoPlayer"
|
ref="videoPlayer"
|
||||||
:video="video"
|
:video="video"
|
||||||
|
@ -21,34 +21,39 @@
|
||||||
:selected-auto-play="selectedAutoPlay"
|
:selected-auto-play="selectedAutoPlay"
|
||||||
:selected-auto-loop="selectedAutoLoop"
|
:selected-auto-loop="selectedAutoLoop"
|
||||||
/>
|
/>
|
||||||
<div class="font-bold uk-margin-small-top text-lg break-words">
|
<div class="font-bold mt-2 text-2xl break-words">
|
||||||
{{ video.title }}
|
{{ video.title }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-flex uk-flex-middle">
|
<div class="flex mb-1.5">
|
||||||
<div class="uk-margin-small-right">{{ addCommas(video.views) }} views</div>
|
<span>{{ addCommas(video.views) }} views</span>
|
||||||
<div class="uk-margin-small-right">{{ uploadDate }}</div>
|
<span class="ml-2">{{ uploadDate }}</span>
|
||||||
<div class="uk-flex-1"></div>
|
|
||||||
|
<div class="flex items-center relative ml-auto children:ml-2">
|
||||||
<template v-if="video.likes >= 0">
|
<template v-if="video.likes >= 0">
|
||||||
<div class="uk-margin-small-left">
|
<div>
|
||||||
<font-awesome-icon class="uk-margin-small-right" 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>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-small-left">
|
<div>
|
||||||
<font-awesome-icon class="uk-margin-small-right" icon="thumbs-down"></font-awesome-icon>
|
<font-awesome-icon icon="thumbs-down"></font-awesome-icon>
|
||||||
<b>{{ video.dislikes >= 0 ? addCommas(video.dislikes) : "?" }}</b>
|
<b>{{ video.dislikes >= 0 ? addCommas(video.dislikes) : "?" }}</b>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="video.likes < 0">
|
<template v-if="video.likes < 0">
|
||||||
<div class="uk-margin-small-left">
|
<div>
|
||||||
<b v-t="'video.ratings_disabled'" />
|
<b v-t="'video.ratings_disabled'" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<a :href="'https://youtu.be/' + getVideoId()" class="uk-margin-small-left btn">
|
<a :href="'https://youtu.be/' + getVideoId()" class="uk-margin-small-left btn">
|
||||||
<b>{{ $t("player.watch_on") }} </b>
|
<b>{{ $t("player.watch_on") }} </b>
|
||||||
<font-awesome-icon class="uk-margin-small-right" :icon="['fab', 'youtube']"></font-awesome-icon>
|
<font-awesome-icon :icon="['fab', 'youtube']"></font-awesome-icon>
|
||||||
</a>
|
</a>
|
||||||
<a v-if="video.lbryId" :href="'https://odysee.com/' + video.lbryId" class="uk-margin-small-left btn">
|
<a
|
||||||
|
v-if="video.lbryId"
|
||||||
|
:href="'https://odysee.com/' + video.lbryId"
|
||||||
|
class="uk-margin-small-left btn"
|
||||||
|
>
|
||||||
<b>{{ $t("player.watch_on") }} LBRY</b>
|
<b>{{ $t("player.watch_on") }} LBRY</b>
|
||||||
</a>
|
</a>
|
||||||
<router-link
|
<router-link
|
||||||
|
@ -60,14 +65,16 @@
|
||||||
<font-awesome-icon :icon="isListening ? 'tv' : 'headphones'"></font-awesome-icon>
|
<font-awesome-icon :icon="isListening ? 'tv' : 'headphones'"></font-awesome-icon>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-small-top">
|
<div class="flex">
|
||||||
|
<div class="flex items-center">
|
||||||
<img :src="video.uploaderAvatar" alt="" loading="lazy" class="rounded-full" />
|
<img :src="video.uploaderAvatar" alt="" loading="lazy" class="rounded-full" />
|
||||||
<router-link v-if="video.uploaderUrl" class="uk-link uk-margin-small-left" :to="video.uploaderUrl">
|
<router-link v-if="video.uploaderUrl" class="link" :to="video.uploaderUrl">
|
||||||
{{ video.uploader }} </router-link
|
{{ video.uploader }} </router-link
|
||||||
> <font-awesome-icon v-if="video.uploaderVerified" icon="check"></font-awesome-icon>
|
><font-awesome-icon class="ml-1" v-if="video.uploaderVerified" icon="check"></font-awesome-icon>
|
||||||
<div class="uk-flex-1"></div>
|
</div>
|
||||||
<button v-if="authenticated" class="btn" @click="subscribeHandler">
|
<button v-if="authenticated" class="btn relative ml-auto" @click="subscribeHandler">
|
||||||
{{ subscribed ? $t("actions.unsubscribe") : $t("actions.subscribe") }}
|
{{ subscribed ? $t("actions.unsubscribe") : $t("actions.subscribe") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,7 +85,12 @@
|
||||||
{{ showDesc ? $t("actions.minimize_description") : $t("actions.show_description") }}
|
{{ showDesc ? $t("actions.minimize_description") : $t("actions.show_description") }}
|
||||||
</button>
|
</button>
|
||||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
<p v-show="showDesc" :style="[{ colour: foregroundColor }]" v-html="purifyHTML(video.description)"></p>
|
<p
|
||||||
|
v-show="showDesc"
|
||||||
|
class="break-words"
|
||||||
|
:style="[{ colour: foregroundColor }]"
|
||||||
|
v-html="purifyHTML(video.description)"
|
||||||
|
></p>
|
||||||
<div v-if="showDesc && sponsors && sponsors.segments">
|
<div v-if="showDesc && sponsors && sponsors.segments">
|
||||||
{{ $t("video.sponsor_segments") }}: {{ sponsors.segments.length }}
|
{{ $t("video.sponsor_segments") }}: {{ sponsors.segments.length }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -112,18 +124,17 @@
|
||||||
|
|
||||||
<div class="grid xl:grid-cols-5 sm:grid-cols-4 grid-cols-1">
|
<div class="grid xl:grid-cols-5 sm:grid-cols-4 grid-cols-1">
|
||||||
<div v-if="comments" ref="comments" class="xl:col-span-4 sm:col-span-3">
|
<div v-if="comments" ref="comments" class="xl:col-span-4 sm:col-span-3">
|
||||||
<div
|
<Comment
|
||||||
v-for="comment in comments.comments"
|
v-for="comment in comments.comments"
|
||||||
:key="comment.commentId"
|
:key="comment.commentId"
|
||||||
class="uk-tile-default uk-align-left uk-width-expand"
|
:comment="comment"
|
||||||
:style="[{ background: backgroundColor }]"
|
:uploader="video.uploader"
|
||||||
>
|
:video-id="getVideoId()"
|
||||||
<Comment :comment="comment" :uploader="video.uploader" :video-id="getVideoId()" />
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="video" class="uk-width-1-5@xl uk-width-1-4@s uk-width-1 uk-flex-last@s uk-flex-first">
|
<div v-if="video" class="order-first sm:order-last">
|
||||||
<a class="btn uk-margin-small-bottom sm:hidden" @click="showRecs = !showRecs">
|
<a class="btn mb-2 sm:hidden" @click="showRecs = !showRecs">
|
||||||
{{ showRecs ? $t("actions.minimize_recommendations") : $t("actions.show_recommendations") }}
|
{{ showRecs ? $t("actions.minimize_recommendations") : $t("actions.show_recommendations") }}
|
||||||
</a>
|
</a>
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in a new issue