From 156c50af3085468a47b8ae73fe8cfcae46b42398 Mon Sep 17 00:00:00 2001 From: Lucas Declercq Date: Sat, 6 Oct 2018 19:17:21 +0200 Subject: Add downloadingEnabled property to video model --- client/src/app/shared/video/video-details.model.ts | 2 ++ client/src/app/shared/video/video-edit.model.ts | 5 ++++- client/src/app/shared/video/video.service.ts | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts index fa4ca7f93..ad85641dc 100644 --- a/client/src/app/shared/video/video-details.model.ts +++ b/client/src/app/shared/video/video-details.model.ts @@ -12,6 +12,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { files: VideoFile[] account: Account commentsEnabled: boolean + downloadingEnabled: boolean waitTranscoding: boolean state: VideoConstant @@ -29,6 +30,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { this.tags = hash.tags this.support = hash.support this.commentsEnabled = hash.commentsEnabled + this.downloadingEnabled = hash.downloadingEnabled this.buildLikeAndDislikePercents() } diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index 0046be964..47703ff79 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts @@ -14,6 +14,7 @@ export class VideoEdit implements VideoUpdate { tags: string[] nsfw: boolean commentsEnabled: boolean + downloadingEnabled: boolean waitTranscoding: boolean channelId: number privacy: VideoPrivacy @@ -26,7 +27,7 @@ export class VideoEdit implements VideoUpdate { id?: number scheduleUpdate?: VideoScheduleUpdate - constructor (video?: Video & { tags: string[], commentsEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { + constructor (video?: Video & { tags: string[], commentsEnabled: boolean, downloadingEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { if (video) { this.id = video.id this.uuid = video.uuid @@ -38,6 +39,7 @@ export class VideoEdit implements VideoUpdate { this.tags = video.tags this.nsfw = video.nsfw this.commentsEnabled = video.commentsEnabled + this.downloadingEnabled = video.downloadingEnabled this.waitTranscoding = video.waitTranscoding this.channelId = video.channel.id this.privacy = video.privacy.id @@ -80,6 +82,7 @@ export class VideoEdit implements VideoUpdate { tags: this.tags, nsfw: this.nsfw, commentsEnabled: this.commentsEnabled, + downloadingEnabled: this.downloadingEnabled, waitTranscoding: this.waitTranscoding, channelId: this.channelId, privacy: this.privacy diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index 724a0bde9..c0339dd39 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts @@ -95,6 +95,7 @@ export class VideoService implements VideosProvider { nsfw: video.nsfw, waitTranscoding: video.waitTranscoding, commentsEnabled: video.commentsEnabled, + downloadingEnabled: video.downloadingEnabled, thumbnailfile: video.thumbnailfile, previewfile: video.previewfile, scheduleUpdate -- cgit v1.2.3 From 7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70 Mon Sep 17 00:00:00 2001 From: Lucas Declercq Date: Mon, 8 Oct 2018 14:45:22 +0200 Subject: Rename downloadingEnabled property to downloadEnabled --- client/src/app/shared/video/video-details.model.ts | 4 ++-- client/src/app/shared/video/video-edit.model.ts | 8 ++++---- client/src/app/shared/video/video.service.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts index ad85641dc..5ff3926c4 100644 --- a/client/src/app/shared/video/video-details.model.ts +++ b/client/src/app/shared/video/video-details.model.ts @@ -12,7 +12,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { files: VideoFile[] account: Account commentsEnabled: boolean - downloadingEnabled: boolean + downloadEnabled: boolean waitTranscoding: boolean state: VideoConstant @@ -30,7 +30,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { this.tags = hash.tags this.support = hash.support this.commentsEnabled = hash.commentsEnabled - this.downloadingEnabled = hash.downloadingEnabled + this.downloadEnabled = hash.downloadEnabled this.buildLikeAndDislikePercents() } diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index 47703ff79..e385004e5 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts @@ -14,7 +14,7 @@ export class VideoEdit implements VideoUpdate { tags: string[] nsfw: boolean commentsEnabled: boolean - downloadingEnabled: boolean + downloadEnabled: boolean waitTranscoding: boolean channelId: number privacy: VideoPrivacy @@ -27,7 +27,7 @@ export class VideoEdit implements VideoUpdate { id?: number scheduleUpdate?: VideoScheduleUpdate - constructor (video?: Video & { tags: string[], commentsEnabled: boolean, downloadingEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { + constructor (video?: Video & { tags: string[], commentsEnabled: boolean, downloadEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { if (video) { this.id = video.id this.uuid = video.uuid @@ -39,7 +39,7 @@ export class VideoEdit implements VideoUpdate { this.tags = video.tags this.nsfw = video.nsfw this.commentsEnabled = video.commentsEnabled - this.downloadingEnabled = video.downloadingEnabled + this.downloadEnabled = video.downloadEnabled this.waitTranscoding = video.waitTranscoding this.channelId = video.channel.id this.privacy = video.privacy.id @@ -82,7 +82,7 @@ export class VideoEdit implements VideoUpdate { tags: this.tags, nsfw: this.nsfw, commentsEnabled: this.commentsEnabled, - downloadingEnabled: this.downloadingEnabled, + downloadEnabled: this.downloadEnabled, waitTranscoding: this.waitTranscoding, channelId: this.channelId, privacy: this.privacy diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index c0339dd39..c9d6da7a4 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts @@ -95,7 +95,7 @@ export class VideoService implements VideosProvider { nsfw: video.nsfw, waitTranscoding: video.waitTranscoding, commentsEnabled: video.commentsEnabled, - downloadingEnabled: video.downloadingEnabled, + downloadEnabled: video.downloadEnabled, thumbnailfile: video.thumbnailfile, previewfile: video.previewfile, scheduleUpdate -- cgit v1.2.3 From 8ea1597fdbb2eb8ef71e805cf175e88ae05629c0 Mon Sep 17 00:00:00 2001 From: Lucas Declercq Date: Mon, 8 Oct 2018 16:33:02 +0200 Subject: Fix too big line length --- client/src/app/shared/video/video-edit.model.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index e385004e5..5bb0510f9 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts @@ -27,7 +27,15 @@ export class VideoEdit implements VideoUpdate { id?: number scheduleUpdate?: VideoScheduleUpdate - constructor (video?: Video & { tags: string[], commentsEnabled: boolean, downloadEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { + constructor ( + video?: Video & { + tags: string[], + commentsEnabled: boolean, + downloadEnabled: boolean, + support: string, + thumbnailUrl: string, + previewUrl: string + }) { if (video) { this.id = video.id this.uuid = video.uuid -- cgit v1.2.3 From 9b4b15f91c485f9a7fe2ed314b4101f4b7506b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20B=C3=A9ranger?= <43744761+auberanger@users.noreply.github.com> Date: Mon, 14 Jan 2019 09:06:48 +0100 Subject: WIP : Indicate to users how "trending" works (#1458) * Get the INTERVAL_DAYS const in the video-trending component * Change Trending section title * Add a tooltip to explain how trending section works * Minor CSS fix for the my-feed popover next to the titlepage --- client/src/app/shared/video/abstract-video-list.html | 5 ++++- client/src/app/shared/video/abstract-video-list.scss | 2 +- client/src/app/shared/video/abstract-video-list.ts | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/abstract-video-list.html b/client/src/app/shared/video/abstract-video-list.html index 29492351b..1f97bc389 100644 --- a/client/src/app/shared/video/abstract-video-list.html +++ b/client/src/app/shared/video/abstract-video-list.html @@ -1,8 +1,11 @@
- {{ titlePage }} +
+ {{ titlePage }} +
+
diff --git a/client/src/app/shared/video/abstract-video-list.scss b/client/src/app/shared/video/abstract-video-list.scss index 9fb3fd4d6..292ede698 100644 --- a/client/src/app/shared/video/abstract-video-list.scss +++ b/client/src/app/shared/video/abstract-video-list.scss @@ -19,8 +19,8 @@ my-feed { display: inline-block; - position: relative; top: 1px; + min-width: 60px; } .moderation-block { diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index d234c8bfa..d74384293 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts @@ -39,6 +39,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { ownerDisplayType: OwnerDisplayType = 'account' firstLoadedPage: number displayModerationBlock = false + trendingDays: number + titleTooltip: string protected baseVideoWidth = 215 protected baseVideoHeight = 205 -- cgit v1.2.3 From 7b95f31385eca59ac18197539de30268acc18986 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Jan 2019 09:11:28 +0100 Subject: Help translators to translate trending title/tooltip --- client/src/app/shared/video/abstract-video-list.ts | 1 - 1 file changed, 1 deletion(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index d74384293..b0633be4a 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts @@ -39,7 +39,6 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { ownerDisplayType: OwnerDisplayType = 'account' firstLoadedPage: number displayModerationBlock = false - trendingDays: number titleTooltip: string protected baseVideoWidth = 215 -- cgit v1.2.3 From 457bb213b273a9b206cc5654eb085cede4e916ad Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 Jan 2019 16:05:40 +0100 Subject: Refactor how we use icons Inject them in an angular component so we can easily change their color --- client/src/app/shared/video/feed.component.html | 9 +++++---- client/src/app/shared/video/feed.component.scss | 17 ++++++++--------- .../src/app/shared/video/video-miniature.component.scss | 4 ++-- client/src/app/shared/video/video.model.ts | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/feed.component.html b/client/src/app/shared/video/feed.component.html index 16116ba88..f7624ec01 100644 --- a/client/src/app/shared/video/feed.component.html +++ b/client/src/app/shared/video/feed.component.html @@ -1,10 +1,11 @@
- + class="icon-syndication" role="button" iconName="syndication" + > + {{ item.label }} -
\ No newline at end of file +
diff --git a/client/src/app/shared/video/feed.component.scss b/client/src/app/shared/video/feed.component.scss index 385764be0..ed1dc17d3 100644 --- a/client/src/app/shared/video/feed.component.scss +++ b/client/src/app/shared/video/feed.component.scss @@ -1,3 +1,4 @@ +@import '_variables'; @import '_mixins'; .video-feed { @@ -6,14 +7,12 @@ display: block; } - .icon { - @include icon(12px); + my-global-icon { + cursor: pointer; + width: 12px; + position: relative; + top: -2px; - &.icon-syndication { - position: relative; - top: -2px; - background-color: var(--mainForegroundColor); - mask-image: url('../../../assets/images/global/syndication.svg'); - } + @include apply-svg-color(var(--mainForegroundColor)) } -} \ No newline at end of file +} diff --git a/client/src/app/shared/video/video-miniature.component.scss b/client/src/app/shared/video/video-miniature.component.scss index 895879adc..f44bdf9a9 100644 --- a/client/src/app/shared/video/video-miniature.component.scss +++ b/client/src/app/shared/video/video-miniature.component.scss @@ -50,10 +50,10 @@ text-overflow: ellipsis; white-space: nowrap; font-size: 13px; - color: #585858; + color: $grey-foreground-color; &:hover { - color: #303030; + color: $grey-foreground-hover-color; } } } diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index b92c96450..6ea83d13b 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts @@ -53,7 +53,7 @@ export class Video implements VideoServerModel { displayName: string url: string host: string - avatar: Avatar + avatar?: Avatar } channel: { @@ -63,7 +63,7 @@ export class Video implements VideoServerModel { displayName: string url: string host: string - avatar: Avatar + avatar?: Avatar } userHistory?: { -- cgit v1.2.3 From 092092969633bbcf6d4891a083ea497a7d5c3154 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 29 Jan 2019 08:37:25 +0100 Subject: Add hls support on server --- client/src/app/shared/video/video-details.model.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts index fa4ca7f93..f44b4138b 100644 --- a/client/src/app/shared/video/video-details.model.ts +++ b/client/src/app/shared/video/video-details.model.ts @@ -3,6 +3,8 @@ import { AuthUser } from '../../core' import { Video } from '../../shared/video/video.model' import { Account } from '@app/shared/account/account.model' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' +import { VideoStreamingPlaylist } from '../../../../../shared/models/videos/video-streaming-playlist.model' +import { VideoStreamingPlaylistType } from '../../../../../shared/models/videos/video-streaming-playlist.type' export class VideoDetails extends Video implements VideoDetailsServerModel { descriptionPath: string @@ -19,6 +21,10 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { likesPercent: number dislikesPercent: number + trackerUrls: string[] + + streamingPlaylists: VideoStreamingPlaylist[] + constructor (hash: VideoDetailsServerModel, translations = {}) { super(hash, translations) @@ -30,6 +36,9 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { this.support = hash.support this.commentsEnabled = hash.commentsEnabled + this.trackerUrls = hash.trackerUrls + this.streamingPlaylists = hash.streamingPlaylists + this.buildLikeAndDislikePercents() } @@ -53,4 +62,8 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { this.likesPercent = (this.likes / (this.likes + this.dislikes)) * 100 this.dislikesPercent = (this.dislikes / (this.likes + this.dislikes)) * 100 } + + getHlsPlaylist () { + return this.streamingPlaylists.find(p => p.type === VideoStreamingPlaylistType.HLS) + } } -- cgit v1.2.3