mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update PostContent, add new video-player component
This commit is contained in:
parent
e3f8cfb49e
commit
f11ce7009f
1 changed files with 8 additions and 22 deletions
|
@ -12,7 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="status.pf_type === 'video'" class="w-100">
|
<div v-else-if="status.pf_type === 'video'" class="w-100">
|
||||||
<video-presenter :status="status" v-on:togglecw="status.sensitive = false"></video-presenter>
|
<video-player :status="status" :fixedHeight="fixedHeight" v-on:togglecw="status.sensitive = false" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="status.pf_type === 'photo:album'" class="w-100">
|
<div v-else-if="status.pf_type === 'photo:album'" class="w-100">
|
||||||
|
@ -108,27 +108,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template v-else-if="status.pf_type === 'video'">
|
<video-player
|
||||||
<div v-if="status.sensitive == true" class="content-label-wrapper">
|
v-else-if="status.pf_type === 'video'"
|
||||||
<div class="text-light content-label">
|
:status="status"
|
||||||
<p class="text-center">
|
:fixedHeight="fixedHeight"
|
||||||
<i class="far fa-eye-slash fa-2x"></i>
|
/>
|
||||||
</p>
|
|
||||||
<p class="h4 font-weight-bold text-center">
|
|
||||||
Sensitive Content
|
|
||||||
</p>
|
|
||||||
<p class="text-center py-2 content-label-text">
|
|
||||||
{{ status.spoiler_text ? status.spoiler_text : 'This post may contain sensitive content.'}}
|
|
||||||
</p>
|
|
||||||
<p class="mb-0">
|
|
||||||
<button @click="status.sensitive = false" class="btn btn-outline-light btn-block btn-sm font-weight-bold">See Post</button>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<video v-else class="card-img-top shadow" :class="{ fixedHeight: fixedHeight }" style="border-radius:15px;object-fit: contain;background-color: #000;" controls :poster="getPoster(status)">
|
|
||||||
<source :src="status.media_attachments[0].url" :type="status.media_attachments[0].mime">
|
|
||||||
</video>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<div v-else-if="status.pf_type === 'photo:album'" class="card-img-top shadow" style="border-radius: 15px;">
|
<div v-else-if="status.pf_type === 'photo:album'" class="card-img-top shadow" style="border-radius: 15px;">
|
||||||
<photo-album-presenter :status="status" v-on:lightbox="toggleLightbox" v-on:togglecw="toggleContentWarning()" style="border-radius:15px !important;object-fit: contain;background-color: #000;overflow: hidden;" :class="{ fixedHeight: fixedHeight }"/>
|
<photo-album-presenter :status="status" v-on:lightbox="toggleLightbox" v-on:togglecw="toggleContentWarning()" style="border-radius:15px !important;object-fit: contain;background-color: #000;overflow: hidden;" :class="{ fixedHeight: fixedHeight }"/>
|
||||||
|
@ -185,12 +169,14 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
import BigPicture from 'bigpicture';
|
import BigPicture from 'bigpicture';
|
||||||
import ReadMore from './ReadMore.vue';
|
import ReadMore from './ReadMore.vue';
|
||||||
|
import VideoPlayer from './../../presenter/VideoPlayer.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['status'],
|
props: ['status'],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
"read-more": ReadMore,
|
"read-more": ReadMore,
|
||||||
|
"video-player": VideoPlayer
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
Loading…
Reference in a new issue