diff options
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared')
4 files changed, 11 insertions, 11 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts b/client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts index 34848b036..4b201ac74 100644 --- a/client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts +++ b/client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts | |||
@@ -73,7 +73,7 @@ export class I18nPrimengCalendarService { | |||
73 | } | 73 | } |
74 | 74 | ||
75 | getTimezone () { | 75 | getTimezone () { |
76 | const gmt = new Date().toString().match(/([A-Z]+[\+-][0-9]+)/)[1] | 76 | const gmt = new Date().toString().match(/([A-Z]+[+-][0-9]+)/)[1] |
77 | const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone | 77 | const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone |
78 | 78 | ||
79 | return `${timezone} - ${gmt}` | 79 | return `${timezone} - ${gmt}` |
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts index 875911b91..98d66ff00 100644 --- a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts | |||
@@ -66,18 +66,18 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
66 | isReplacingExistingCaption () { | 66 | isReplacingExistingCaption () { |
67 | if (this.closingModal === true) return false | 67 | if (this.closingModal === true) return false |
68 | 68 | ||
69 | const languageId = this.form.value[ 'language' ] | 69 | const languageId = this.form.value['language'] |
70 | 70 | ||
71 | return languageId && this.existingCaptions.indexOf(languageId) !== -1 | 71 | return languageId && this.existingCaptions.includes(languageId) |
72 | } | 72 | } |
73 | 73 | ||
74 | async addCaption () { | 74 | async addCaption () { |
75 | const languageId = this.form.value[ 'language' ] | 75 | const languageId = this.form.value['language'] |
76 | const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) | 76 | const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) |
77 | 77 | ||
78 | this.captionAdded.emit({ | 78 | this.captionAdded.emit({ |
79 | language: languageObject, | 79 | language: languageObject, |
80 | captionfile: this.form.value[ 'captionfile' ] | 80 | captionfile: this.form.value['captionfile'] |
81 | }) | 81 | }) |
82 | 82 | ||
83 | this.hide() | 83 | this.hide() |
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts b/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts index 3a7dbed36..db1ef8d73 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts +++ b/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts | |||
@@ -24,7 +24,7 @@ function hydrateFormFromVideo (formGroup: FormGroup, video: VideoEdit, thumbnail | |||
24 | .then(response => response.blob()) | 24 | .then(response => response.blob()) |
25 | .then(data => { | 25 | .then(data => { |
26 | formGroup.patchValue({ | 26 | formGroup.patchValue({ |
27 | [ obj.name ]: data | 27 | [obj.name]: data |
28 | }) | 28 | }) |
29 | }) | 29 | }) |
30 | } | 30 | } |
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts index 90a0e8f52..366c93a79 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts | |||
@@ -233,7 +233,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
233 | 233 | ||
234 | async deleteCaption (caption: VideoCaptionEdit) { | 234 | async deleteCaption (caption: VideoCaptionEdit) { |
235 | // Caption recovers his former state | 235 | // Caption recovers his former state |
236 | if (caption.action && this.initialVideoCaptions.indexOf(caption.language.id) !== -1) { | 236 | if (caption.action && this.initialVideoCaptions.includes(caption.language.id)) { |
237 | caption.action = undefined | 237 | caption.action = undefined |
238 | return | 238 | return |
239 | } | 239 | } |
@@ -297,7 +297,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
297 | 297 | ||
298 | private trackPrivacyChange () { | 298 | private trackPrivacyChange () { |
299 | // We will update the schedule input and the wait transcoding checkbox validators | 299 | // We will update the schedule input and the wait transcoding checkbox validators |
300 | this.form.controls[ 'privacy' ] | 300 | this.form.controls['privacy'] |
301 | .valueChanges | 301 | .valueChanges |
302 | .pipe(map(res => parseInt(res.toString(), 10))) | 302 | .pipe(map(res => parseInt(res.toString(), 10))) |
303 | .subscribe( | 303 | .subscribe( |
@@ -336,12 +336,12 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
336 | 336 | ||
337 | private trackChannelChange () { | 337 | private trackChannelChange () { |
338 | // We will update the "support" field depending on the channel | 338 | // We will update the "support" field depending on the channel |
339 | this.form.controls[ 'channelId' ] | 339 | this.form.controls['channelId'] |
340 | .valueChanges | 340 | .valueChanges |
341 | .pipe(map(res => parseInt(res.toString(), 10))) | 341 | .pipe(map(res => parseInt(res.toString(), 10))) |
342 | .subscribe( | 342 | .subscribe( |
343 | newChannelId => { | 343 | newChannelId => { |
344 | const oldChannelId = parseInt(this.form.value[ 'channelId' ], 10) | 344 | const oldChannelId = parseInt(this.form.value['channelId'], 10) |
345 | 345 | ||
346 | // Not initialized yet | 346 | // Not initialized yet |
347 | if (isNaN(newChannelId)) return | 347 | if (isNaN(newChannelId)) return |
@@ -350,7 +350,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
350 | 350 | ||
351 | // Wait support field update | 351 | // Wait support field update |
352 | setTimeout(() => { | 352 | setTimeout(() => { |
353 | const currentSupport = this.form.value[ 'support' ] | 353 | const currentSupport = this.form.value['support'] |
354 | 354 | ||
355 | // First time we set the channel? | 355 | // First time we set the channel? |
356 | if (isNaN(oldChannelId)) { | 356 | if (isNaN(oldChannelId)) { |