aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.html2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts3
-rw-r--r--client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html62
-rw-r--r--client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.scss18
-rw-r--r--client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts4
-rw-r--r--client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts3
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts14
8 files changed, 67 insertions, 41 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html
index 50d030ac9..ee5a50611 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.html
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html
@@ -45,7 +45,7 @@
45 </ng-template> 45 </ng-template>
46 </my-help> 46 </my-help>
47 47
48 <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="true"></my-markdown-textarea> 48 <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="videoToUpdate"></my-markdown-textarea>
49 49
50 <div *ngIf="formErrors.description" class="form-error"> 50 <div *ngIf="formErrors.description" class="form-error">
51 {{ formErrors.description }} 51 {{ formErrors.description }}
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
index d8d20a249..189bc9669 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
@@ -7,8 +7,7 @@ import { genericUploadErrorHandler, scrollToTop } from '@app/helpers'
7import { FormValidatorService } from '@app/shared/shared-forms' 7import { FormValidatorService } from '@app/shared/shared-forms'
8import { BytesPipe, Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' 8import { BytesPipe, Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main'
9import { LoadingBarService } from '@ngx-loading-bar/core' 9import { LoadingBarService } from '@ngx-loading-bar/core'
10import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' 10import { HttpStatusCode, VideoPrivacy } from '@shared/models'
11import { VideoPrivacy } from '@shared/models'
12import { UploaderXFormData } from './uploaderx-form-data' 11import { UploaderXFormData } from './uploaderx-form-data'
13import { VideoSend } from './video-send' 12import { VideoSend } from './video-send'
14 13
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
index 04f8f0d58..0e1c4c207 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
@@ -161,7 +161,7 @@ export class VideoCommentComponent implements OnInit, OnChanges {
161 // Before HTML rendering restore line feed for markdown list compatibility 161 // Before HTML rendering restore line feed for markdown list compatibility
162 const commentText = this.comment.text.replace(/<br.?\/?>/g, '\r\n') 162 const commentText = this.comment.text.replace(/<br.?\/?>/g, '\r\n')
163 const html = await this.markdownService.textMarkdownToHTML(commentText, true, true) 163 const html = await this.markdownService.textMarkdownToHTML(commentText, true, true)
164 this.sanitizedCommentHTML = this.markdownService.processVideoTimestamps(html) 164 this.sanitizedCommentHTML = this.markdownService.processVideoTimestamps(this.video.shortUUID, html)
165 this.newParentComments = this.parentComments.concat([ this.comment ]) 165 this.newParentComments = this.parentComments.concat([ this.comment ])
166 166
167 if (this.comment.account) { 167 if (this.comment.account) {
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html
index 598bc485d..362a21905 100644
--- a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html
+++ b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html
@@ -1,54 +1,62 @@
1<div class="video-attribute"> 1<div class="attribute">
2 <span i18n class="video-attribute-label">Privacy</span> 2 <span i18n class="attribute-label">Privacy</span>
3 <span class="video-attribute-value">{{ video.privacy.label }}</span> 3 <span class="attribute-value">{{ video.privacy.label }}</span>
4</div> 4</div>
5 5
6<div *ngIf="video.isLocal === false" class="video-attribute"> 6<div *ngIf="video.isLocal === false" class="attribute">
7 <span i18n class="video-attribute-label">Origin</span> 7 <span i18n class="attribute-label">Origin</span>
8 <a class="video-attribute-value" target="_blank" rel="noopener noreferrer" [href]="getVideoUrl()">{{ video.originInstanceHost }}</a> 8 <a
9 class="attribute-value" target="_blank" rel="noopener noreferrer"
10 routerLink="/search" [queryParams]="{ host: getVideoHost() }"
11 >{{ video.originInstanceHost }}</a>
12
13 <a
14 i18n-title title="Open the video on the origin instance" class="glyphicon glyphicon-new-window"
15 target="_blank" rel="noopener noreferrer" [href]="getVideoUrl()"
16 ></a>
9</div> 17</div>
10 18
11<div *ngIf="!!video.originallyPublishedAt" class="video-attribute"> 19<div *ngIf="!!video.originallyPublishedAt" class="attribute">
12 <span i18n class="video-attribute-label">Originally published</span> 20 <span i18n class="attribute-label">Originally published</span>
13 <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span> 21 <span class="attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span>
14</div> 22</div>
15 23
16<div class="video-attribute"> 24<div class="attribute">
17 <span i18n class="video-attribute-label">Category</span> 25 <span i18n class="attribute-label">Category</span>
18 <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span> 26 <span *ngIf="!video.category.id" class="attribute-value">{{ video.category.label }}</span>
19 <a 27 <a
20 *ngIf="video.category.id" class="video-attribute-value" 28 *ngIf="video.category.id" class="attribute-value"
21 [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }" 29 [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }"
22 >{{ video.category.label }}</a> 30 >{{ video.category.label }}</a>
23</div> 31</div>
24 32
25<div class="video-attribute"> 33<div class="attribute">
26 <span i18n class="video-attribute-label">Licence</span> 34 <span i18n class="attribute-label">Licence</span>
27 <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span> 35 <span *ngIf="!video.licence.id" class="attribute-value">{{ video.licence.label }}</span>
28 <a 36 <a
29 *ngIf="video.licence.id" class="video-attribute-value" 37 *ngIf="video.licence.id" class="attribute-value"
30 [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }" 38 [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }"
31 >{{ video.licence.label }}</a> 39 >{{ video.licence.label }}</a>
32</div> 40</div>
33 41
34<div class="video-attribute"> 42<div class="attribute">
35 <span i18n class="video-attribute-label">Language</span> 43 <span i18n class="attribute-label">Language</span>
36 <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span> 44 <span *ngIf="!video.language.id" class="attribute-value">{{ video.language.label }}</span>
37 <a 45 <a
38 *ngIf="video.language.id" class="video-attribute-value" 46 *ngIf="video.language.id" class="attribute-value"
39 [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }" 47 [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }"
40 >{{ video.language.label }}</a> 48 >{{ video.language.label }}</a>
41</div> 49</div>
42 50
43<div class="video-attribute video-attribute-tags"> 51<div class="attribute attribute-tags">
44 <span i18n class="video-attribute-label">Tags</span> 52 <span i18n class="attribute-label">Tags</span>
45 <a 53 <a
46 *ngFor="let tag of getVideoTags()" 54 *ngFor="let tag of getVideoTags()"
47 class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }" 55 class="attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }"
48 >{{ tag }}</a> 56 >{{ tag }}</a>
49</div> 57</div>
50 58
51<div class="video-attribute" *ngIf="!video.isLive"> 59<div class="attribute" *ngIf="!video.isLive">
52 <span i18n class="video-attribute-label">Duration</span> 60 <span i18n class="attribute-label">Duration</span>
53 <span class="video-attribute-value">{{ video.duration | myDurationFormatter }}</span> 61 <span class="attribute-value">{{ video.duration | myDurationFormatter }}</span>
54</div> 62</div>
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.scss b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.scss
index 45190a3e3..26bead124 100644
--- a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.scss
+++ b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.scss
@@ -1,13 +1,13 @@
1@use '_variables' as *; 1@use '_variables' as *;
2@use '_mixins' as *; 2@use '_mixins' as *;
3 3
4.video-attribute { 4.attribute {
5 font-size: 13px; 5 font-size: 13px;
6 display: block; 6 display: block;
7 margin-bottom: 12px; 7 margin-bottom: 12px;
8} 8}
9 9
10.video-attribute-label { 10.attribute-label {
11 @include padding-right(5px); 11 @include padding-right(5px);
12 12
13 min-width: 142px; 13 min-width: 142px;
@@ -16,7 +16,7 @@
16 font-weight: $font-bold; 16 font-weight: $font-bold;
17} 17}
18 18
19a.video-attribute-value { 19a.attribute-value {
20 @include disable-default-a-behaviour; 20 @include disable-default-a-behaviour;
21 color: pvar(--mainForegroundColor); 21 color: pvar(--mainForegroundColor);
22 22
@@ -25,16 +25,22 @@ a.video-attribute-value {
25 } 25 }
26} 26}
27 27
28.video-attribute-tags { 28.attribute-tags {
29 .video-attribute-value:not(:nth-child(2)) { 29 .attribute-value:not(:nth-child(2)) {
30 &::before { 30 &::before {
31 content: ', '; 31 content: ', ';
32 } 32 }
33 } 33 }
34} 34}
35 35
36.glyphicon-new-window {
37 color: pvar(--inputPlaceholderColor);
38 margin-left: 5px;
39 font-size: 12px;
40}
41
36@media screen and (max-width: 1600px) { 42@media screen and (max-width: 1600px) {
37 .video-attributes .video-attribute { 43 .attributes .attribute {
38 margin-bottom: 5px; 44 margin-bottom: 5px;
39 } 45 }
40} 46}
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts
index 5cb77f0c8..9429581ac 100644
--- a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts
@@ -17,6 +17,10 @@ export class VideoAttributesComponent {
17 return this.video.url 17 return this.video.url
18 } 18 }
19 19
20 getVideoHost () {
21 return this.video.channel.host
22 }
23
20 getVideoTags () { 24 getVideoTags () {
21 if (!this.video || Array.isArray(this.video.tags) === false) return [] 25 if (!this.video || Array.isArray(this.video.tags) === false) return []
22 26
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts
index 23d00d31a..870c7ae3f 100644
--- a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts
@@ -80,6 +80,7 @@ export class VideoDescriptionComponent implements OnChanges {
80 80
81 private async setVideoDescriptionHTML () { 81 private async setVideoDescriptionHTML () {
82 const html = await this.markdownService.textMarkdownToHTML(this.video.description) 82 const html = await this.markdownService.textMarkdownToHTML(this.video.description)
83 this.videoHTMLDescription = this.markdownService.processVideoTimestamps(html) 83
84 this.videoHTMLDescription = this.markdownService.processVideoTimestamps(this.video.shortUUID, html)
84 } 85 }
85} 86}
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index d078844c3..ccb9c5e71 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -21,8 +21,16 @@ import { isXPercentInViewport, scrollToTop } from '@app/helpers'
21import { Video, VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main' 21import { Video, VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main'
22import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' 22import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription'
23import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' 23import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
24import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' 24import { timeToInt } from '@shared/core-utils'
25import { HTMLServerConfig, PeerTubeProblemDocument, ServerErrorCode, VideoCaption, VideoPrivacy, VideoState } from '@shared/models' 25import {
26 HTMLServerConfig,
27 HttpStatusCode,
28 PeerTubeProblemDocument,
29 ServerErrorCode,
30 VideoCaption,
31 VideoPrivacy,
32 VideoState
33} from '@shared/models'
26import { cleanupVideoWatch, getStoredTheater, getStoredVideoWatchHistory } from '../../../assets/player/peertube-player-local-storage' 34import { cleanupVideoWatch, getStoredTheater, getStoredVideoWatchHistory } from '../../../assets/player/peertube-player-local-storage'
27import { 35import {
28 CustomizationOptions, 36 CustomizationOptions,
@@ -32,7 +40,6 @@ import {
32 PlayerMode, 40 PlayerMode,
33 videojs 41 videojs
34} from '../../../assets/player/peertube-player-manager' 42} from '../../../assets/player/peertube-player-manager'
35import { timeToInt } from '../../../assets/player/utils'
36import { environment } from '../../../environments/environment' 43import { environment } from '../../../environments/environment'
37import { VideoWatchPlaylistComponent } from './shared' 44import { VideoWatchPlaylistComponent } from './shared'
38 45
@@ -575,6 +582,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
575 582
576 videoCaptions: playerCaptions, 583 videoCaptions: playerCaptions,
577 584
585 videoShortUUID: video.shortUUID,
578 videoUUID: video.uuid 586 videoUUID: video.uuid
579 }, 587 },
580 588