forked from FreeTubeApp/FreeTube
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwatch-video-info.vue
More file actions
148 lines (147 loc) · 4.36 KB
/
watch-video-info.vue
File metadata and controls
148 lines (147 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<template>
<ft-card class="watchVideoInfo">
<div>
<h1
class="videoTitle"
>
{{ title }}
</h1>
<div
v-if="isUnlisted"
class="unlistedBadge"
>
{{ $t('Video.Unlisted') }}
</div>
</div>
<div class="videoMetrics">
<div class="datePublishedAndViewCount">
{{ publishedString }} {{ dateString }}
<template
v-if="!hideVideoViews"
>
<span class="seperator">• </span><span class="videoViews">{{ parsedViewCount }}</span>
</template>
</div>
<div
v-if="!hideVideoLikesAndDislikes"
class="likeBarContainer"
>
<div
class="likeSection"
>
<span class="likeCount"><font-awesome-icon :icon="['fas', 'thumbs-up']" /> {{ parsedLikeCount }}</span>
</div>
</div>
<!--
// Uncomment if suitable solution for bringing back dislikes is introduced
<div
v-if="!hideVideoLikesAndDislikes"
class="likeBarContainer"
>
<div
class="likeSection"
>
<div
class="likeBar"
:style="{ background: `linear-gradient(to right, var(--accent-color) ${likePercentageRatio}%, #9E9E9E ${likePercentageRatio}%` }"
/>
<div>
<span class="likeCount"><font-awesome-icon :icon="['fas', 'thumbs-up']" /> {{ parsedLikeCount }}</span>
<span class="dislikeCount"><font-awesome-icon :icon="['fas', 'thumbs-down']" /> {{ parsedDislikeCount }}</span>
</div>
</div>
</div>
-->
</div>
<div class="videoButtons">
<div
class="profileRow"
>
<div>
<router-link
:to="`/channel/${channelId}`"
>
<img
:src="channelThumbnail"
class="channelThumbnail"
alt=""
>
</router-link>
</div>
<div>
<router-link
:to="`/channel/${channelId}`"
class="channelName"
>
{{ channelName }}
</router-link>
<ft-subscribe-button
v-if="!hideUnsubscribeButton"
:channel-id="channelId"
:channel-name="channelName"
:channel-thumbnail="channelThumbnail"
:subscription-count-text="subscriptionCountText"
/>
</div>
</div>
<div class="videoOptions">
<ft-icon-button
v-if="showPlaylists && !isUpcoming"
:title="$t('User Playlists.Add to Playlist')"
:icon="['fas', 'plus']"
class="option"
theme="base"
@click="togglePlaylistPrompt"
/>
<ft-icon-button
v-if="isQuickBookmarkEnabled"
:title="quickBookmarkIconText"
:icon="isInQuickBookmarkPlaylist ? ['fas', 'check'] : ['fas', 'bookmark']"
class="quickBookmarkVideoIcon"
:class="{
bookmarked: isInQuickBookmarkPlaylist,
}"
:theme="quickBookmarkIconTheme"
@click="toggleQuickBookmarked"
/>
<ft-icon-button
v-if="externalPlayer !== ''"
:title="$t('Video.External Player.OpenInTemplate', { externalPlayer })"
:icon="['fas', 'external-link-alt']"
class="option"
theme="secondary"
@click="handleExternalPlayer"
/>
<ft-icon-button
v-if="!isUpcoming && downloadLinks.length > 0"
ref="downloadButton"
:title="$t('Video.Download Video')"
class="option"
theme="secondary"
:icon="['fas', 'download']"
:return-index="true"
:dropdown-options="downloadLinkOptions"
@click="handleDownload"
/>
<ft-icon-button
v-if="!isUpcoming"
:title="$t('Change Format.Change Media Formats')"
class="option"
theme="secondary"
:icon="['fas', 'file-video']"
:dropdown-options="formatTypeOptions"
@click="changeFormat($event)"
/>
<ft-share-button
v-if="!hideSharingActions"
:id="id"
:get-timestamp="getTimestamp"
:playlist-id="playlistId"
class="option"
/>
</div>
</div>
</ft-card>
</template>
<script src="./watch-video-info.js" />
<style scoped src="./watch-video-info.scss" lang="scss" />