From e79df4eefbeba3e7ab74e17cae1369c80c94b848 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 18 Aug 2020 15:51:51 +0200 Subject: [PATCH] Update playlist add component to accept multiple times the same video --- .../shared-forms/timestamp-input.component.ts | 6 +- .../video-add-to-playlist.component.html | 84 +++---- .../video-add-to-playlist.component.scss | 96 +++++--- .../video-add-to-playlist.component.ts | 223 +++++++++++++----- .../video-playlist.service.ts | 3 +- 5 files changed, 285 insertions(+), 127 deletions(-) diff --git a/client/src/app/shared/shared-forms/timestamp-input.component.ts b/client/src/app/shared/shared-forms/timestamp-input.component.ts index 8d67a96ac..0ffd03d02 100644 --- a/client/src/app/shared/shared-forms/timestamp-input.component.ts +++ b/client/src/app/shared/shared-forms/timestamp-input.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectorRef, Component, forwardRef, Input, OnInit } from '@angular/core' +import { ChangeDetectorRef, Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core' import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' import { secondsToTime, timeToInt } from '../../../assets/player/utils' @@ -19,6 +19,8 @@ export class TimestampInputComponent implements ControlValueAccessor, OnInit { @Input() timestamp: number @Input() disabled = false + @Output() inputBlur = new EventEmitter() + timestampString: string constructor (private changeDetector: ChangeDetectorRef) {} @@ -57,5 +59,7 @@ export class TimestampInputComponent implements ControlValueAccessor, OnInit { this.propagateChange(this.timestamp) } + + this.inputBlur.emit() } } diff --git a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html index a40e0699e..37d5017cf 100644 --- a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html +++ b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html @@ -2,58 +2,60 @@
Save to
- -
- - - Options -
+
-
-
- - - -
+
+ +
-
+
+ -
-
- -
+
+
+
Start at
+
Stop at
+
-
-