aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-watch
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-07 17:38:31 +0200
committerChocobozzz <me@florianbigard.com>2021-06-07 18:14:05 +0200
commit27bc95867442c772841fb183a625bbda61dede51 (patch)
tree6fe20951f1109c1f5388d9a681f0df0758d463e0 /client/src/app/+videos/+video-watch
parent8beea2d37d90e9a12d895f4a9eebc1e532313d8c (diff)
downloadPeerTube-27bc95867442c772841fb183a625bbda61dede51.tar.gz
PeerTube-27bc95867442c772841fb183a625bbda61dede51.tar.zst
PeerTube-27bc95867442c772841fb183a625bbda61dede51.zip
Bidi support
Diffstat (limited to 'client/src/app/+videos/+video-watch')
-rw-r--r--client/src/app/+videos/+video-watch/comment/video-comment-add.component.html5
-rw-r--r--client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss15
-rw-r--r--client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts22
-rw-r--r--client/src/app/+videos/+video-watch/comment/video-comment.component.scss24
-rw-r--r--client/src/app/+videos/+video-watch/comment/video-comments.component.scss10
-rw-r--r--client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.scss9
-rw-r--r--client/src/app/+videos/+video-watch/video-avatar-channel.component.scss2
-rw-r--r--client/src/app/+videos/+video-watch/video-watch-playlist.component.scss6
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.scss51
9 files changed, 97 insertions, 47 deletions
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
index 42adfed8d..3ee818c8b 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
+++ b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
@@ -10,7 +10,10 @@
10 (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea> 10 (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea>
11 </textarea> 11 </textarea>
12 12
13 <my-help class="markdown-guide" helpType="custom" iconName="markdown" tooltipPlacement="left auto" autoClose="true" i18n-title title="Markdown compatible"> 13 <my-help
14 [ngClass]="{ 'is-rtl': isRTL() }" class="markdown-guide" helpType="custom" iconName="markdown"
15 tooltipPlacement="left auto" autoClose="true" i18n-title title="Markdown compatible"
16 >
14 <ng-template ptTemplate="customHtml"> 17 <ng-template ptTemplate="customHtml">
15 <span i18n>Markdown compatible that supports:</span> 18 <span i18n>Markdown compatible that supports:</span>
16 19
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss
index 7743bd41d..5c97fb13c 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss
+++ b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss
@@ -14,7 +14,7 @@ form {
14 margin-bottom: 10px; 14 margin-bottom: 10px;
15 15
16 my-actor-avatar { 16 my-actor-avatar {
17 margin-right: 10px; 17 @include margin-right(10px);
18 } 18 }
19 19
20 .form-group { 20 .form-group {
@@ -26,12 +26,12 @@ form {
26 textarea { 26 textarea {
27 @include peertube-textarea(100%, $peertube-textarea-height); 27 @include peertube-textarea(100%, $peertube-textarea-height);
28 @include button-focus(pvar(--mainColorLightest)); 28 @include button-focus(pvar(--mainColorLightest));
29 @include padding-right($markdown-icon-width + 15px !important);
29 30
30 min-height: calc(#{$peertube-textarea-height} - 15px * 2); 31 min-height: calc(#{$peertube-textarea-height} - 15px * 2);
31 padding-right: $markdown-icon-width + 15px !important;
32 32
33 @media screen and (max-width: 600px) { 33 @media screen and (max-width: 600px) {
34 padding-right: $markdown-icon-width + 19px !important; 34 @include padding-right($markdown-icon-width + 19px !important);
35 } 35 }
36 36
37 &:focus::placeholder { 37 &:focus::placeholder {
@@ -45,6 +45,12 @@ form {
45 top: 5px; 45 top: 5px;
46 right: 9px; 46 right: 9px;
47 47
48 // inset-inline is not well supported by web browsers
49 &.is-rtl {
50 right: unset;
51 left: 9px;
52 }
53
48 ::ng-deep .help-tooltip-button { 54 ::ng-deep .help-tooltip-button {
49 my-global-icon { 55 my-global-icon {
50 height: $markdown-icon-height; 56 height: $markdown-icon-height;
@@ -86,9 +92,10 @@ form {
86 flex: 1; 92 flex: 1;
87 93
88 code { 94 code {
95 @include margin-left(5px);
96
89 display: inline-block; 97 display: inline-block;
90 vertical-align: middle; 98 vertical-align: middle;
91 margin-left: 5px;
92 } 99 }
93 } 100 }
94} 101}
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts
index 0e1362ad3..c926d8d70 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts
+++ b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts
@@ -1,5 +1,18 @@
1import { Observable } from 'rxjs' 1import { Observable } from 'rxjs'
2import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core' 2import { getLocaleDirection } from '@angular/common'
3import {
4 Component,
5 ElementRef,
6 EventEmitter,
7 Inject,
8 Input,
9 LOCALE_ID,
10 OnChanges,
11 OnInit,
12 Output,
13 SimpleChanges,
14 ViewChild
15} from '@angular/core'
3import { Router } from '@angular/router' 16import { Router } from '@angular/router'
4import { Notifier, User } from '@app/core' 17import { Notifier, User } from '@app/core'
5import { VIDEO_COMMENT_TEXT_VALIDATOR } from '@app/shared/form-validators/video-comment-validators' 18import { VIDEO_COMMENT_TEXT_VALIDATOR } from '@app/shared/form-validators/video-comment-validators'
@@ -37,7 +50,8 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges,
37 private notifier: Notifier, 50 private notifier: Notifier,
38 private videoCommentService: VideoCommentService, 51 private videoCommentService: VideoCommentService,
39 private modalService: NgbModal, 52 private modalService: NgbModal,
40 private router: Router 53 private router: Router,
54 @Inject(LOCALE_ID) private localeId: string
41 ) { 55 ) {
42 super() 56 super()
43 } 57 }
@@ -153,6 +167,10 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges,
153 this.form.value['text'] = this.textareaElement.nativeElement.value = '' 167 this.form.value['text'] = this.textareaElement.nativeElement.value = ''
154 } 168 }
155 169
170 isRTL () {
171 return getLocaleDirection(this.localeId) === 'rtl'
172 }
173
156 private addCommentReply (commentCreate: VideoCommentCreate) { 174 private addCommentReply (commentCreate: VideoCommentCreate) {
157 return this.videoCommentService 175 return this.videoCommentService
158 .addCommentReply(this.video.id, this.parentComment.id, commentCreate) 176 .addCommentReply(this.video.id, this.parentComment.id, commentCreate)
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment.component.scss b/client/src/app/+videos/+video-watch/comment/video-comment.component.scss
index a4d2e237c..7868991ba 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comment.component.scss
+++ b/client/src/app/+videos/+video-watch/comment/video-comment.component.scss
@@ -6,10 +6,11 @@
6 display: flex; 6 display: flex;
7 7
8 .left { 8 .left {
9 @include margin-right(10px);
10
9 display: flex; 11 display: flex;
10 flex-direction: column; 12 flex-direction: column;
11 align-items: center; 13 align-items: center;
12 margin-right: 10px;
13 14
14 .vertical-border { 15 .vertical-border {
15 width: 2px; 16 width: 2px;
@@ -51,6 +52,9 @@ my-actor-avatar {
51} 52}
52 53
53.video-author { 54.video-author {
55 @include padding-right(6px);
56 @include padding-left(6px);
57
54 height: 20px; 58 height: 20px;
55 background-color: #888888; 59 background-color: #888888;
56 border-radius: 12px; 60 border-radius: 12px;
@@ -60,8 +64,6 @@ my-actor-avatar {
60 flex-direction: row; 64 flex-direction: row;
61 align-items: center; 65 align-items: center;
62 display: inline-flex; 66 display: inline-flex;
63 padding-right: 6px;
64 padding-left: 6px;
65 color: #fff !important; 67 color: #fff !important;
66} 68}
67 69
@@ -86,9 +88,10 @@ my-actor-avatar {
86} 88}
87 89
88.comment-date { 90.comment-date {
91 @include margin-left(5px);
92
89 font-size: 90%; 93 font-size: 90%;
90 color: pvar(--greyForegroundColor); 94 color: pvar(--greyForegroundColor);
91 margin-left: 5px;
92 text-decoration: none; 95 text-decoration: none;
93 96
94 &:hover { 97 &:hover {
@@ -129,9 +132,10 @@ my-actor-avatar {
129 132
130 ::ng-deep .dropdown-toggle, 133 ::ng-deep .dropdown-toggle,
131 .comment-action-reply { 134 .comment-action-reply {
135 @include margin-right(10px);
136
132 color: pvar(--greyForegroundColor); 137 color: pvar(--greyForegroundColor);
133 cursor: pointer; 138 cursor: pointer;
134 margin-right: 10px;
135 139
136 &:hover, 140 &:hover,
137 &:active, 141 &:active,
@@ -162,25 +166,25 @@ my-video-comment-add {
162 } 166 }
163 167
164 .left { 168 .left {
165 margin-right: 6px; 169 @include margin-right(6px);
166 } 170 }
167} 171}
168 172
169@media screen and (max-width: 1200px) { 173@media screen and (max-width: 1200px) {
170 .children { 174 .children {
171 margin-left: -10px; 175 @include margin-left(-10px);
172 } 176 }
173} 177}
174 178
175@media screen and (max-width: 600px) { 179@media screen and (max-width: 600px) {
176 .children { 180 .children {
177 margin-left: -20px; 181 @include margin-left(-20px);
178 182
179 .left { 183 .left {
180 align-items: flex-start; 184 align-items: flex-start;
181 185
182 .vertical-border { 186 .vertical-border {
183 margin-left: 2px; 187 @include margin-left(2px);
184 } 188 }
185 } 189 }
186 } 190 }
@@ -189,7 +193,7 @@ my-video-comment-add {
189 flex-direction: column; 193 flex-direction: column;
190 194
191 .comment-date { 195 .comment-date {
192 margin-left: 0; 196 @include margin-left(0);
193 } 197 }
194 } 198 }
195} 199}
diff --git a/client/src/app/+videos/+video-watch/comment/video-comments.component.scss b/client/src/app/+videos/+video-watch/comment/video-comments.component.scss
index a7e858069..29a00ee3f 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comments.component.scss
+++ b/client/src/app/+videos/+video-watch/comment/video-comments.component.scss
@@ -13,19 +13,21 @@
13 13
14.glyphicon, 14.glyphicon,
15.comment-thread-loading { 15.comment-thread-loading {
16 margin-right: 5px; 16 @include margin-right(5px);
17
17 display: inline-block; 18 display: inline-block;
18 font-size: 13px; 19 font-size: 13px;
19} 20}
20 21
21.title-block { 22.title-block {
22 .title-page { 23 .title-page {
23 margin-right: 0; 24 @include margin-right(0);
24 } 25 }
25 26
26 my-feed { 27 my-feed {
28 @include margin-left(5px);
29
27 display: inline-block; 30 display: inline-block;
28 margin-left: 5px;
29 opacity: 0; 31 opacity: 0;
30 transition: ease-in .2s opacity; 32 transition: ease-in .2s opacity;
31 width: 12px; 33 width: 12px;
@@ -47,7 +49,7 @@
47 49
48@media screen and (max-width: 600px) { 50@media screen and (max-width: 600px) {
49 .view-replies { 51 .view-replies {
50 margin-left: 46px; 52 @include margin-left(46px);
51 } 53 }
52} 54}
53 55
diff --git a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.scss b/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.scss
index 5e0373afc..89d44c067 100644
--- a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.scss
+++ b/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.scss
@@ -10,8 +10,9 @@
10 10
11 .title-page.active, 11 .title-page.active,
12 .title-page.title-page-single { 12 .title-page.title-page-single {
13 @include margin-right(.5rem !important);
14
13 margin-bottom: unset; 15 margin-bottom: unset;
14 margin-right: .5rem !important;
15 } 16 }
16} 17}
17 18
@@ -20,14 +21,16 @@
20} 21}
21 22
22.title-page-autoplay { 23.title-page-autoplay {
24 @include margin-left(auto);
25
23 display: flex; 26 display: flex;
24 width: max-content; 27 width: max-content;
25 height: max-content; 28 height: max-content;
26 align-items: center; 29 align-items: center;
27 margin-left: auto;
28 30
29 span { 31 span {
30 margin-right: 0.3rem; 32 @include margin-right(0.3rem);
33
31 text-transform: uppercase; 34 text-transform: uppercase;
32 font-size: 85%; 35 font-size: 85%;
33 font-weight: 600; 36 font-weight: 600;
diff --git a/client/src/app/+videos/+video-watch/video-avatar-channel.component.scss b/client/src/app/+videos/+video-watch/video-avatar-channel.component.scss
index 20e32240c..f269398cb 100644
--- a/client/src/app/+videos/+video-watch/video-avatar-channel.component.scss
+++ b/client/src/app/+videos/+video-watch/video-avatar-channel.component.scss
@@ -15,9 +15,9 @@
15 15
16.wrapper { 16.wrapper {
17 @include actor-avatar-size(35px); 17 @include actor-avatar-size(35px);
18 @include margin-right(5px);
18 19
19 position: relative; 20 position: relative;
20 margin-right: 5px;
21 margin-bottom: 5px; 21 margin-bottom: 5px;
22 22
23 &.generic-channel { 23 &.generic-channel {
diff --git a/client/src/app/+videos/+video-watch/video-watch-playlist.component.scss b/client/src/app/+videos/+video-watch/video-watch-playlist.component.scss
index b3f93b83c..d1a0f97f7 100644
--- a/client/src/app/+videos/+video-watch/video-watch-playlist.component.scss
+++ b/client/src/app/+videos/+video-watch/video-watch-playlist.component.scss
@@ -26,7 +26,7 @@
26 display: flex; 26 display: flex;
27 27
28 .playlist-by { 28 .playlist-by {
29 margin-right: 5px; 29 @include margin-right(5px);
30 } 30 }
31 31
32 .playlist-index span:first-child::after { 32 .playlist-index span:first-child::after {
@@ -40,7 +40,7 @@
40 margin: 10px 0; 40 margin: 10px 0;
41 41
42 my-global-icon:not(:last-child) { 42 my-global-icon:not(:last-child) {
43 margin-right: .5rem; 43 @include margin-right(.5rem);
44 } 44 }
45 45
46 my-global-icon { 46 my-global-icon {
@@ -59,7 +59,7 @@
59 ::ng-deep { 59 ::ng-deep {
60 .video { 60 .video {
61 .position { 61 .position {
62 margin-right: 0; 62 @include margin-right(0);
63 } 63 }
64 64
65 .video-info { 65 .video-info {
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.scss b/client/src/app/+videos/+video-watch/video-watch.component.scss
index af807a208..4a2e05c62 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.scss
+++ b/client/src/app/+videos/+video-watch/video-watch.component.scss
@@ -152,7 +152,7 @@ $video-info-margin-left: 44px;
152 .video-info-name { 152 .video-info-name {
153 @include peertube-word-wrap; 153 @include peertube-word-wrap;
154 154
155 margin-right: 30px; 155 @include margin-right(30px);
156 min-height: 40px; // Align with the action buttons 156 min-height: 40px; // Align with the action buttons
157 font-size: 27px; 157 font-size: 27px;
158 font-weight: $font-semibold; 158 font-weight: $font-semibold;
@@ -167,9 +167,10 @@ $video-info-margin-left: 44px;
167 } 167 }
168 168
169 .video-info-date-views { 169 .video-info-date-views {
170 align-self: start; 170 @include margin-right(10px);
171
171 margin-bottom: 10px; 172 margin-bottom: 10px;
172 margin-right: 10px; 173 align-self: start;
173 font-size: 1em; 174 font-size: 1em;
174 } 175 }
175 176
@@ -209,15 +210,19 @@ $video-info-margin-left: 44px;
209 } 210 }
210 211
211 my-subscribe-button { 212 my-subscribe-button {
212 margin-left: 5px; 213 @include margin-left(5px);
213 } 214 }
214 } 215 }
215 216
216 .video-actions-rates { 217 .video-actions-rates {
217 margin: 0 0 10px; 218 @include margin-left(auto);
219 @include margin-right(0);
220
221 margin-top: 0;
222 margin-bottom: 10px;
223
218 align-items: start; 224 align-items: start;
219 width: max-content; 225 width: max-content;
220 margin-left: auto;
221 226
222 .video-actions { 227 .video-actions {
223 height: 40px; // Align with the title 228 height: 40px; // Align with the title
@@ -227,7 +232,7 @@ $video-info-margin-left: 44px;
227 .action-button:not(:first-child), 232 .action-button:not(:first-child),
228 .action-dropdown, 233 .action-dropdown,
229 my-video-actions-dropdown { 234 my-video-actions-dropdown {
230 margin-left: 5px; 235 @include margin-left(5px);
231 } 236 }
232 237
233 ::ng-deep.action-button { 238 ::ng-deep.action-button {
@@ -305,7 +310,7 @@ $video-info-margin-left: 44px;
305 } 310 }
306 311
307 .icon-text { 312 .icon-text {
308 margin-left: 3px; 313 @include margin-left(3px);
309 } 314 }
310 } 315 }
311 } 316 }
@@ -341,8 +346,11 @@ $video-info-margin-left: 44px;
341 } 346 }
342 347
343 .video-info-description { 348 .video-info-description {
344 margin: 20px 0; 349 @include margin-left($video-info-margin-left);
345 margin-left: $video-info-margin-left; 350 @include margin-right(0);
351
352 margin-top: 20px;
353 margin-bottom: 20px;
346 font-size: 15px; 354 font-size: 15px;
347 355
348 .video-info-description-html { 356 .video-info-description-html {
@@ -355,7 +363,7 @@ $video-info-margin-left: 44px;
355 363
356 .glyphicon, 364 .glyphicon,
357 .description-loading { 365 .description-loading {
358 margin-left: 3px; 366 @include margin-left(3px);
359 } 367 }
360 368
361 .description-loading { 369 .description-loading {
@@ -376,7 +384,7 @@ $video-info-margin-left: 44px;
376 } 384 }
377 385
378 .video-attributes { 386 .video-attributes {
379 margin-left: $video-info-margin-left; 387 @include margin-left($video-info-margin-left);
380 } 388 }
381 389
382 .video-attributes .video-attribute { 390 .video-attributes .video-attribute {
@@ -385,8 +393,9 @@ $video-info-margin-left: 44px;
385 margin-bottom: 12px; 393 margin-bottom: 12px;
386 394
387 .video-attribute-label { 395 .video-attribute-label {
396 @include padding-right(5px);
397
388 min-width: 142px; 398 min-width: 142px;
389 padding-right: 5px;
390 display: inline-block; 399 display: inline-block;
391 color: pvar(--greyForegroundColor); 400 color: pvar(--greyForegroundColor);
392 font-weight: $font-bold; 401 font-weight: $font-bold;
@@ -413,8 +422,9 @@ $video-info-margin-left: 44px;
413} 422}
414 423
415my-recommended-videos { 424my-recommended-videos {
425 @include padding-left(15px);
426
416 display: block; 427 display: block;
417 padding-left: 15px;
418 min-width: 250px; 428 min-width: 250px;
419} 429}
420 430
@@ -432,14 +442,15 @@ my-video-comments {
432 442
433@media screen and (max-width: $small-view) { 443@media screen and (max-width: $small-view) {
434 .privacy-concerns { 444 .privacy-concerns {
435 margin-left: $menu-width - 15px; // Menu is absolute 445 @include margin-left($menu-width - 15px); // Menu is absolute
436 } 446 }
437} 447}
438 448
439:host-context(.expanded) { 449:host-context(.expanded) {
440 .privacy-concerns { 450 .privacy-concerns {
451 @include margin-left(-15px);
452
441 width: 100%; 453 width: 100%;
442 margin-left: -15px;
443 } 454 }
444} 455}
445 456
@@ -473,8 +484,9 @@ my-video-comments {
473 } 484 }
474 485
475 .privacy-concerns-button { 486 .privacy-concerns-button {
487 @include margin-left(auto);
488
476 padding: 5px 8px 5px 7px; 489 padding: 5px 8px 5px 7px;
477 margin-left: auto;
478 border-radius: 3px; 490 border-radius: 3px;
479 white-space: nowrap; 491 white-space: nowrap;
480 cursor: pointer; 492 cursor: pointer;
@@ -487,8 +499,9 @@ my-video-comments {
487 } 499 }
488 500
489 .privacy-concerns-okay { 501 .privacy-concerns-okay {
502 @include margin-left(10px);
503
490 background-color: pvar(--mainColor); 504 background-color: pvar(--mainColor);
491 margin-left: 10px;
492 } 505 }
493} 506}
494 507
@@ -525,7 +538,7 @@ my-video-comments {
525 } 538 }
526 539
527 my-recommended-videos { 540 my-recommended-videos {
528 padding-left: 0; 541 @include padding-left(0);
529 } 542 }
530} 543}
531 544