2021-06-17 00:44:46 +05:30
|
|
|
<template>
|
2021-06-29 01:15:03 +05:30
|
|
|
<div class="uk-text-secondary" :style="[{ background: backgroundColor }]">
|
2021-10-09 00:22:51 +05:30
|
|
|
<router-link class="uk-text-emphasis" :to="video.url">
|
|
|
|
<img :height="height" :width="width" style="width: 100%" :src="video.thumbnail" alt="" loading="lazy" />
|
2021-12-27 20:16:26 +05:30
|
|
|
<div class="relative">
|
2021-07-21 18:02:17 +05:30
|
|
|
<span
|
2021-07-21 15:45:07 +05:30
|
|
|
v-if="video.duration"
|
2021-12-27 20:16:26 +05:30
|
|
|
class="rounded-md absolute video-duration bg-black bg-opacity-75 bottom-5px right-5px"
|
|
|
|
style="padding: 0 5px"
|
2021-07-21 18:02:17 +05:30
|
|
|
>{{ timeFormat(video.duration) }}</span
|
|
|
|
>
|
2021-08-22 15:57:09 +05:30
|
|
|
<span
|
|
|
|
v-if="video.watched"
|
2021-12-27 20:16:26 +05:30
|
|
|
class="rounded-md absolute video-duration bg-black bg-opacity-75 bottom-5px left-5px"
|
|
|
|
style="padding: 0 5px"
|
2021-09-05 18:38:26 +05:30
|
|
|
>{{ $t("video.watched") }}</span
|
2021-08-22 15:57:09 +05:30
|
|
|
>
|
2021-07-21 15:45:07 +05:30
|
|
|
</div>
|
2021-09-02 15:58:32 +05:30
|
|
|
|
|
|
|
<div>
|
2021-10-08 04:14:54 +05:30
|
|
|
<p
|
2021-10-28 23:25:20 +05:30
|
|
|
style="
|
|
|
|
padding-top: 0.5rem;
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
overflow: hidden;
|
|
|
|
"
|
2021-10-08 04:14:54 +05:30
|
|
|
:title="video.title"
|
|
|
|
>
|
|
|
|
{{ video.title }}
|
|
|
|
</p>
|
2021-09-02 15:58:32 +05:30
|
|
|
</div>
|
2021-06-17 00:44:46 +05:30
|
|
|
</router-link>
|
|
|
|
|
2021-09-02 15:58:32 +05:30
|
|
|
<div class="uk-align-right" style="margin-left: 0; margin-bottom: 0; display: inline-block; width: 10%">
|
2021-10-08 04:14:54 +05:30
|
|
|
<router-link
|
|
|
|
:to="video.url + '&listen=1'"
|
|
|
|
:aria-label="'Listen to ' + video.title"
|
|
|
|
:title="'Listen to ' + video.title"
|
|
|
|
>
|
2021-09-02 15:58:32 +05:30
|
|
|
<font-awesome-icon icon="headphones"></font-awesome-icon>
|
|
|
|
</router-link>
|
|
|
|
</div>
|
|
|
|
|
2021-10-09 02:38:41 +05:30
|
|
|
<div style="display: flex; flex-flow: row; height: 15%">
|
2021-09-02 15:58:32 +05:30
|
|
|
<router-link class="uk-link-muted" :to="video.uploaderUrl">
|
2021-10-08 04:14:54 +05:30
|
|
|
<img
|
|
|
|
v-if="video.uploaderAvatar"
|
|
|
|
:src="video.uploaderAvatar"
|
|
|
|
loading="lazy"
|
|
|
|
:alt="video.uploaderName"
|
2021-12-27 20:16:26 +05:30
|
|
|
class="rounded-full"
|
2021-10-28 23:25:20 +05:30
|
|
|
style="margin-right: 0.5rem; margin-top: 0.5rem; width: 32px; height: 32px"
|
2021-10-08 04:14:54 +05:30
|
|
|
/>
|
2021-09-02 15:58:32 +05:30
|
|
|
</router-link>
|
|
|
|
|
2021-10-28 23:25:20 +05:30
|
|
|
<div style="width: calc(100% - 32px - 8px)">
|
2021-10-08 04:14:54 +05:30
|
|
|
<router-link
|
2021-10-09 02:38:41 +05:30
|
|
|
v-if="video.uploaderUrl && video.uploaderName && !hideChannel"
|
2021-10-08 04:14:54 +05:30
|
|
|
class="uk-link-muted uk-overflow-hidden"
|
|
|
|
:to="video.uploaderUrl"
|
|
|
|
:title="video.uploaderName"
|
2021-10-28 23:25:20 +05:30
|
|
|
style="display: block; width: 90%"
|
2021-10-08 04:14:54 +05:30
|
|
|
>
|
2021-08-17 23:00:36 +05:30
|
|
|
{{ video.uploaderName }} <font-awesome-icon
|
|
|
|
v-if="video.uploaderVerified"
|
|
|
|
icon="check"
|
|
|
|
></font-awesome-icon>
|
2021-06-17 00:44:46 +05:30
|
|
|
</router-link>
|
|
|
|
|
2021-09-02 15:58:32 +05:30
|
|
|
<b v-if="video.views >= 0 || video.uploadedDate" class="uk-text-small">
|
|
|
|
<span v-if="video.views >= 0">
|
|
|
|
<font-awesome-icon icon="eye"></font-awesome-icon>
|
|
|
|
{{ numberFormat(video.views) }} •
|
|
|
|
</span>
|
|
|
|
<span v-if="video.uploadedDate">
|
|
|
|
{{ video.uploadedDate }}
|
|
|
|
</span>
|
|
|
|
<span v-if="video.uploaded">
|
|
|
|
{{ timeAgo(video.uploaded) }}
|
|
|
|
</span>
|
|
|
|
</b>
|
2021-06-17 00:44:46 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
2021-10-09 00:22:51 +05:30
|
|
|
video: {
|
|
|
|
type: Object,
|
|
|
|
default: () => {
|
|
|
|
return {};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
height: { type: String, default: "118" },
|
|
|
|
width: { type: String, default: "210" },
|
|
|
|
hideChannel: { type: Boolean, default: false },
|
2021-06-17 00:44:46 +05:30
|
|
|
},
|
|
|
|
};
|
2021-07-21 18:02:17 +05:30
|
|
|
</script>
|