2020-02-16 19:30:00 +01:00
|
|
|
<template>
|
|
|
|
<div
|
2020-06-23 18:08:24 +02:00
|
|
|
class="ft-list-video ft-list-item"
|
2020-02-16 19:30:00 +01:00
|
|
|
:class="{
|
|
|
|
list: (listType === 'list' || forceListType === 'list') && forceListType !== 'grid',
|
2020-06-23 17:47:19 +02:00
|
|
|
grid: (listType === 'grid' || forceListType === 'list') && forceListType !== 'list',
|
2020-12-18 05:21:17 +01:00
|
|
|
[appearance]: true,
|
2021-01-13 23:24:26 +01:00
|
|
|
watched: addWatchedStyle
|
2020-02-16 19:30:00 +01:00
|
|
|
}"
|
|
|
|
>
|
2020-06-23 17:47:19 +02:00
|
|
|
<div
|
|
|
|
class="videoThumbnail"
|
|
|
|
>
|
|
|
|
<router-link
|
|
|
|
class="thumbnailLink"
|
2021-04-27 22:29:28 +02:00
|
|
|
tabindex="-1"
|
2020-06-23 17:47:19 +02:00
|
|
|
:to="{
|
|
|
|
path: `/watch/${id}`,
|
|
|
|
query: playlistId ? {playlistId} : {}
|
|
|
|
}"
|
2020-02-16 19:30:00 +01:00
|
|
|
>
|
2020-06-23 17:47:19 +02:00
|
|
|
<img
|
|
|
|
:src="thumbnail"
|
|
|
|
class="thumbnailImage"
|
|
|
|
>
|
|
|
|
</router-link>
|
|
|
|
<div
|
2020-09-23 00:13:04 +02:00
|
|
|
v-if="isLive || duration !== '0:00'"
|
2020-02-16 19:30:00 +01:00
|
|
|
class="videoDuration"
|
2020-06-23 17:47:19 +02:00
|
|
|
:class="{ live: isLive }"
|
2020-02-16 19:30:00 +01:00
|
|
|
>
|
2020-08-12 05:26:49 +02:00
|
|
|
{{ isLive ? $t("Video.Live") : duration }}
|
2020-06-23 17:47:19 +02:00
|
|
|
</div>
|
2021-06-13 17:31:43 +02:00
|
|
|
<ft-icon-button
|
|
|
|
v-if="externalPlayer !== ''"
|
|
|
|
:title="$t('Video.External Player.OpenInTemplate').replace('$', externalPlayer)"
|
|
|
|
icon="external-link-alt"
|
|
|
|
class="externalPlayerIcon"
|
|
|
|
theme="base"
|
|
|
|
:padding="appearance === `watchPlaylistItem` ? 6 : 7"
|
|
|
|
:size="appearance === `watchPlaylistItem` ? 12 : 16"
|
|
|
|
@click="handleExternalPlayer"
|
|
|
|
/>
|
2020-06-23 17:47:19 +02:00
|
|
|
<ft-icon-button
|
2020-02-16 19:30:00 +01:00
|
|
|
v-if="!isLive"
|
2021-01-15 00:03:23 +01:00
|
|
|
:title="$t('Video.Save Video')"
|
2020-02-16 19:30:00 +01:00
|
|
|
icon="star"
|
|
|
|
class="favoritesIcon"
|
2021-01-15 00:03:23 +01:00
|
|
|
:theme="favoriteIconTheme"
|
2020-07-10 03:22:13 +02:00
|
|
|
:padding="appearance === `watchPlaylistItem` ? 5 : 6"
|
|
|
|
:size="appearance === `watchPlaylistItem` ? 14 : 18"
|
2021-01-15 00:03:23 +01:00
|
|
|
@click="toggleSave"
|
2020-02-16 19:30:00 +01:00
|
|
|
/>
|
|
|
|
<div
|
2021-01-13 23:24:26 +01:00
|
|
|
v-if="addWatchedStyle"
|
2020-02-16 19:30:00 +01:00
|
|
|
class="videoWatched"
|
|
|
|
>
|
2020-08-12 05:26:49 +02:00
|
|
|
{{ $t("Video.Watched") }}
|
2020-02-16 19:30:00 +01:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-if="watched"
|
|
|
|
class="watchedProgressBar"
|
|
|
|
:style="{width: progressPercentage + '%'}"
|
|
|
|
/>
|
|
|
|
</div>
|
2020-06-23 18:08:24 +02:00
|
|
|
<div class="info">
|
2020-06-23 17:47:19 +02:00
|
|
|
<ft-icon-button
|
|
|
|
class="optionsButton"
|
|
|
|
title="More Options"
|
2020-12-18 05:21:17 +01:00
|
|
|
theme="base-no-default"
|
2020-06-23 17:47:19 +02:00
|
|
|
:size="16"
|
|
|
|
:use-shadow="false"
|
|
|
|
dropdown-position-x="left"
|
|
|
|
:dropdown-names="optionsNames"
|
|
|
|
:dropdown-values="optionsValues"
|
|
|
|
@click="handleOptionsClick"
|
|
|
|
/>
|
|
|
|
<router-link
|
|
|
|
class="title"
|
|
|
|
:to="{
|
|
|
|
path: `/watch/${id}`,
|
|
|
|
query: playlistId ? {playlistId} : {}
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
{{ title }}
|
|
|
|
</router-link>
|
|
|
|
<div class="infoLine">
|
2020-06-23 18:39:26 +02:00
|
|
|
<router-link
|
|
|
|
class="channelName"
|
|
|
|
:to="`/channel/${channelId}`"
|
|
|
|
>
|
|
|
|
<span>{{ channelName }}</span>
|
|
|
|
</router-link>
|
2021-04-30 23:24:21 +02:00
|
|
|
<template v-if="!isLive && !isUpcoming && !isPremium && !hideViews">
|
2020-10-06 23:47:40 +02:00
|
|
|
<span class="viewCount">• {{ parsedViewCount }}</span>
|
|
|
|
<span v-if="viewCount === 1">{{ $t("Video.View").toLowerCase() }}</span>
|
|
|
|
<span v-else>{{ $t("Video.Views").toLowerCase() }}</span>
|
|
|
|
</template>
|
2020-06-23 18:39:26 +02:00
|
|
|
<span
|
2020-08-20 04:39:44 +02:00
|
|
|
v-if="uploadedTime !== '' && !isLive && !inHistory"
|
2020-06-23 18:39:26 +02:00
|
|
|
class="uploadedTime"
|
|
|
|
>• {{ uploadedTime }}</span>
|
2020-08-20 04:39:44 +02:00
|
|
|
<span
|
|
|
|
v-if="inHistory"
|
|
|
|
class="uploadedTime"
|
|
|
|
>• {{ publishedText }}</span>
|
2020-06-23 18:39:26 +02:00
|
|
|
<span
|
2020-10-06 04:27:32 +02:00
|
|
|
v-if="isLive && !hideViews"
|
2020-06-23 18:39:26 +02:00
|
|
|
class="viewCount"
|
2020-10-06 23:47:40 +02:00
|
|
|
>• {{ parsedViewCount }} {{ $t("Video.Watching").toLowerCase() }}</span>
|
2020-06-23 17:47:19 +02:00
|
|
|
</div>
|
|
|
|
<p
|
|
|
|
v-if="listType !== 'grid' && appearance === 'result'"
|
|
|
|
class="description"
|
|
|
|
>
|
|
|
|
{{ description }}
|
|
|
|
</p>
|
|
|
|
</div>
|
2020-02-16 19:30:00 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./ft-list-video.js" />
|
2020-06-23 17:47:19 +02:00
|
|
|
<style scoped src="./ft-list-video.sass" lang="sass" />
|