2021-06-16 19:14:46 +00:00
|
|
|
<template>
|
2021-06-28 19:45:03 +00:00
|
|
|
<div class="uk-text-secondary" :style="[{ background: backgroundColor }]">
|
2021-06-16 19:14:46 +00:00
|
|
|
<router-link class="uk-text-emphasis" v-bind:to="video.url">
|
2021-08-26 13:44:19 +00:00
|
|
|
<img
|
|
|
|
:height="height"
|
|
|
|
:width="width"
|
|
|
|
style="width: 100%"
|
|
|
|
v-bind:src="video.thumbnail"
|
|
|
|
alt="thumbnail"
|
|
|
|
loading="lazy"
|
|
|
|
/>
|
2021-07-21 10:15:07 +00:00
|
|
|
<div class="uk-position-relative">
|
2021-07-21 12:32:17 +00:00
|
|
|
<span
|
2021-07-21 10:15:07 +00:00
|
|
|
v-if="video.duration"
|
2021-07-21 12:32:17 +00:00
|
|
|
class="uk-label uk-border-rounded uk-position-absolute video-duration"
|
2021-07-21 10:15:07 +00:00
|
|
|
style="bottom: 5px; right: 5px; background: rgba(0, 0, 0, .75); color: white; padding: 0 5px;"
|
2021-07-21 12:32:17 +00:00
|
|
|
>{{ timeFormat(video.duration) }}</span
|
|
|
|
>
|
2021-08-22 10:27:09 +00:00
|
|
|
<span
|
|
|
|
v-if="video.watched"
|
|
|
|
class="uk-label uk-border-rounded uk-position-absolute video-duration"
|
|
|
|
style="bottom: 5px; left: 5px; background: rgba(0, 0, 0, .75); color: white; padding: 0 5px;"
|
|
|
|
>Watched</span
|
|
|
|
>
|
2021-07-21 10:15:07 +00:00
|
|
|
</div>
|
2021-07-27 04:28:14 +00:00
|
|
|
<p class="uk-text-break">{{ video.title }}</p>
|
2021-06-16 19:14:46 +00:00
|
|
|
</router-link>
|
|
|
|
|
|
|
|
<div :class="{ 'uk-align-left': !(video.views >= 0 || video.uploadedDate) }">
|
|
|
|
<div v-if="video.uploaderUrl && video.uploaderName && !hideChannel">
|
|
|
|
<router-link class="uk-link-muted" :to="video.uploaderUrl">
|
2021-08-17 17:30:36 +00:00
|
|
|
{{ video.uploaderName }} <font-awesome-icon
|
|
|
|
v-if="video.uploaderVerified"
|
|
|
|
icon="check"
|
|
|
|
></font-awesome-icon>
|
2021-06-16 19:14:46 +00:00
|
|
|
</router-link>
|
|
|
|
<br />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<b v-if="video.views >= 0 || video.uploadedDate" class="uk-text-small uk-align-left">
|
|
|
|
<div v-if="video.views >= 0">
|
|
|
|
<font-awesome-icon icon="eye"></font-awesome-icon>
|
|
|
|
{{ numberFormat(video.views) }} views
|
|
|
|
<br />
|
|
|
|
</div>
|
|
|
|
<div v-if="video.uploadedDate">
|
|
|
|
{{ video.uploadedDate }}
|
|
|
|
</div>
|
2021-07-21 12:32:17 +00:00
|
|
|
<div v-if="video.uploaded">
|
|
|
|
{{ timeAgo(video.uploaded) }}
|
|
|
|
</div>
|
2021-06-16 19:14:46 +00:00
|
|
|
</b>
|
|
|
|
<div class="uk-align-right">
|
|
|
|
<router-link :to="video.url + '&listen=1'">
|
|
|
|
<font-awesome-icon icon="headphones"></font-awesome-icon>
|
|
|
|
</router-link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
video: Object,
|
|
|
|
height: String,
|
|
|
|
width: String,
|
|
|
|
hideChannel: Boolean,
|
|
|
|
},
|
|
|
|
};
|
2021-07-21 12:32:17 +00:00
|
|
|
</script>
|