]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-forms/timestamp-input.component.ts
Implement two factor in client
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-forms / timestamp-input.component.ts
index 8d67a96ac3ca68744a4f94e389967816a92d1f17..79ca63673e298678dd75dbcdc822f219c0a19728 100644 (file)
@@ -1,6 +1,6 @@
-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'
+import { secondsToTime, timeToInt } from '@shared/core-utils'
 
 @Component({
   selector: 'my-timestamp-input',
@@ -18,6 +18,10 @@ export class TimestampInputComponent implements ControlValueAccessor, OnInit {
   @Input() maxTimestamp: number
   @Input() timestamp: number
   @Input() disabled = false
+  @Input() inputName: string
+  @Input() disableBorder = true
+
+  @Output() inputBlur = new EventEmitter()
 
   timestampString: string
 
@@ -57,5 +61,7 @@ export class TimestampInputComponent implements ControlValueAccessor, OnInit {
 
       this.propagateChange(this.timestamp)
     }
+
+    this.inputBlur.emit()
   }
 }