aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-06 15:36:44 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-03-18 11:17:59 +0100
commit830b4faff15fb9c81d88e8e69fcdf94aad32bef8 (patch)
tree53de6c9e30ce88734b4bdda62016e0498fe78491 /client/src/app/shared/video
parentd4c9f45b31eda0b7a391ddc83eb290ca5cba311f (diff)
downloadPeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.tar.gz
PeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.tar.zst
PeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.zip
Add/update/delete/list my playlists
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r--client/src/app/shared/video/abstract-video-list.scss1
-rw-r--r--client/src/app/shared/video/video-miniature.component.scss22
-rw-r--r--client/src/app/shared/video/video-thumbnail.component.html6
-rw-r--r--client/src/app/shared/video/video-thumbnail.component.scss72
-rw-r--r--client/src/app/shared/video/video.model.ts5
5 files changed, 16 insertions, 90 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.scss b/client/src/app/shared/video/abstract-video-list.scss
index 292ede698..65842af35 100644
--- a/client/src/app/shared/video/abstract-video-list.scss
+++ b/client/src/app/shared/video/abstract-video-list.scss
@@ -1,4 +1,5 @@
1@import '_mixins'; 1@import '_mixins';
2@import '_miniature';
2 3
3.videos { 4.videos {
4 text-align: center; 5 text-align: center;
diff --git a/client/src/app/shared/video/video-miniature.component.scss b/client/src/app/shared/video/video-miniature.component.scss
index c118fc3a1..7d857a74e 100644
--- a/client/src/app/shared/video/video-miniature.component.scss
+++ b/client/src/app/shared/video/video-miniature.component.scss
@@ -1,5 +1,6 @@
1@import '_variables'; 1@import '_variables';
2@import '_mixins'; 2@import '_mixins';
3@import '_miniature';
3 4
4.video-miniature { 5.video-miniature {
5 display: inline-block; 6 display: inline-block;
@@ -14,26 +15,7 @@
14 line-height: normal; 15 line-height: normal;
15 16
16 .video-miniature-name { 17 .video-miniature-name {
17 @include ellipsis-multiline( 18 @include miniature-name;
18 $font-size: 1rem,
19 $line-height: 1,
20 $lines-to-show: 2
21 );
22 transition: color 0.2s;
23 font-size: 16px;
24 font-weight: $font-semibold;
25 color: var(--mainForegroundColor);
26 margin-top: 5px;
27 margin-bottom: 5px;
28
29 &:hover {
30 text-decoration: none;
31 }
32
33 &.blur-filter {
34 filter: blur(3px);
35 padding-left: 4px;
36 }
37 } 19 }
38 20
39 .video-miniature-created-at-views { 21 .video-miniature-created-at-views {
diff --git a/client/src/app/shared/video/video-thumbnail.component.html b/client/src/app/shared/video/video-thumbnail.component.html
index a15df725e..a6757fc4a 100644
--- a/client/src/app/shared/video/video-thumbnail.component.html
+++ b/client/src/app/shared/video/video-thumbnail.component.html
@@ -4,9 +4,11 @@
4> 4>
5 <img alt="" [attr.aria-labelledby]="video.name" [attr.src]="getImageUrl()" [ngClass]="{ 'blur-filter': nsfw }" /> 5 <img alt="" [attr.aria-labelledby]="video.name" [attr.src]="getImageUrl()" [ngClass]="{ 'blur-filter': nsfw }" />
6 6
7 <div class="video-thumbnail-overlay">{{ video.durationLabel }}</div> 7 <div class="video-thumbnail-duration-overlay">{{ video.durationLabel }}</div>
8 8
9 <div class="play-overlay"></div> 9 <div class="play-overlay">
10 <div class="icon"></div>
11 </div>
10 12
11 <div class="progress-bar" *ngIf="video.userHistory?.currentTime"> 13 <div class="progress-bar" *ngIf="video.userHistory?.currentTime">
12 <div [ngStyle]="{ 'width.%': getProgressPercent() }"></div> 14 <div [ngStyle]="{ 'width.%': getProgressPercent() }"></div>
diff --git a/client/src/app/shared/video/video-thumbnail.component.scss b/client/src/app/shared/video/video-thumbnail.component.scss
index b9fd9182f..0113427a3 100644
--- a/client/src/app/shared/video/video-thumbnail.component.scss
+++ b/client/src/app/shared/video/video-thumbnail.component.scss
@@ -1,66 +1,9 @@
1@import '_variables'; 1@import '_variables';
2@import '_mixins'; 2@import '_mixins';
3 3@import '_miniature';
4$play-overlay-transition: 0.2s ease;
5$play-overlay-height: 26px;
6$play-overlay-width: 18px;
7 4
8.video-thumbnail { 5.video-thumbnail {
9 @include disable-outline; 6 @include miniature-thumbnail;
10
11 display: inline-block;
12 position: relative;
13 border-radius: 3px;
14 overflow: hidden;
15 width: $video-thumbnail-width;
16 height: $video-thumbnail-height;
17 background-color: #ececec;
18 transition: filter $play-overlay-transition;
19
20 &:hover {
21 text-decoration: none !important;
22
23 filter: brightness(85%);
24
25 .play-overlay {
26 opacity: 1;
27
28 transform: translate(-50%, -50%) scale(1);
29 }
30 }
31
32 &.focus-visible {
33 box-shadow: 0 0 0 2px var(--mainColor);
34 }
35
36 img {
37 width: $video-thumbnail-width;
38 height: $video-thumbnail-height;
39
40 &.blur-filter {
41 filter: blur(5px);
42 transform : scale(1.03);
43 }
44 }
45
46 .play-overlay {
47 width: 0;
48 height: 0;
49
50 position: absolute;
51 left: 50%;
52 top: 50%;
53 transform: translate(-50%, -50%) scale(0.5);
54
55 transition: all $play-overlay-transition;
56
57 border-top: ($play-overlay-height / 2) solid transparent;
58 border-bottom: ($play-overlay-height / 2) solid transparent;
59
60 border-left: $play-overlay-width solid rgba(255, 255, 255, 0.95);
61
62 opacity: 0;
63 }
64 7
65 .progress-bar { 8 .progress-bar {
66 height: 3px; 9 height: 3px;
@@ -75,16 +18,15 @@ $play-overlay-width: 18px;
75 } 18 }
76 } 19 }
77 20
78 .video-thumbnail-overlay { 21 .video-thumbnail-duration-overlay {
22 @include static-thumbnail-overlay;
23
79 position: absolute; 24 position: absolute;
80 right: 5px; 25 right: 5px;
81 bottom: 5px; 26 bottom: 5px;
82 display: inline-block; 27 padding: 0 5px;
83 background-color: rgba(0, 0, 0, 0.7); 28 border-radius: 3px;
84 color: #fff;
85 font-size: 12px; 29 font-size: 12px;
86 font-weight: $font-bold; 30 font-weight: $font-bold;
87 border-radius: 3px;
88 padding: 0 5px;
89 } 31 }
90} 32}
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts
index 460c09258..c936a8207 100644
--- a/client/src/app/shared/video/video.model.ts
+++ b/client/src/app/shared/video/video.model.ts
@@ -117,9 +117,8 @@ export class Video implements VideoServerModel {
117 this.privacy.label = peertubeTranslate(this.privacy.label, translations) 117 this.privacy.label = peertubeTranslate(this.privacy.label, translations)
118 118
119 this.scheduledUpdate = hash.scheduledUpdate 119 this.scheduledUpdate = hash.scheduledUpdate
120 this.originallyPublishedAt = hash.originallyPublishedAt ? 120 this.originallyPublishedAt = hash.originallyPublishedAt ? new Date(hash.originallyPublishedAt.toString()) : null
121 new Date(hash.originallyPublishedAt.toString()) 121
122 : null
123 if (this.state) this.state.label = peertubeTranslate(this.state.label, translations) 122 if (this.state) this.state.label = peertubeTranslate(this.state.label, translations)
124 123
125 this.blacklisted = hash.blacklisted 124 this.blacklisted = hash.blacklisted