diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-16 14:22:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-16 14:31:40 +0200 |
commit | f4001cf408a99049d01a356bfb20a62342de06ea (patch) | |
tree | 421776dfe64335dca2725ac3ac5f3b3e6b7564c6 /client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts | |
parent | 16f7022b06fb76c0b00c23c970bc8df605b0ec63 (diff) | |
download | PeerTube-f4001cf408a99049d01a356bfb20a62342de06ea.tar.gz PeerTube-f4001cf408a99049d01a356bfb20a62342de06ea.tar.zst PeerTube-f4001cf408a99049d01a356bfb20a62342de06ea.zip |
Handle .srt subtitles
Diffstat (limited to 'client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts')
-rw-r--r-- | client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts | 13 |
1 files changed, 11 insertions, 2 deletions
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 45b8c71f8..5498dac22 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 | |||
@@ -49,10 +49,14 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
49 | } | 49 | } |
50 | 50 | ||
51 | show () { | 51 | show () { |
52 | this.closingModal = false | ||
53 | |||
52 | this.modal.show() | 54 | this.modal.show() |
53 | } | 55 | } |
54 | 56 | ||
55 | hide () { | 57 | hide () { |
58 | this.closingModal = true | ||
59 | |||
56 | this.modal.hide() | 60 | this.modal.hide() |
57 | } | 61 | } |
58 | 62 | ||
@@ -65,7 +69,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
65 | } | 69 | } |
66 | 70 | ||
67 | async addCaption () { | 71 | async addCaption () { |
68 | this.closingModal = true | 72 | this.hide() |
69 | 73 | ||
70 | const languageId = this.form.value[ 'language' ] | 74 | const languageId = this.form.value[ 'language' ] |
71 | const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) | 75 | const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) |
@@ -74,7 +78,12 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
74 | language: languageObject, | 78 | language: languageObject, |
75 | captionfile: this.form.value['captionfile'] | 79 | captionfile: this.form.value['captionfile'] |
76 | }) | 80 | }) |
81 | // | ||
82 | // this.form.patchValue({ | ||
83 | // language: null, | ||
84 | // captionfile: null | ||
85 | // }) | ||
77 | 86 | ||
78 | this.hide() | 87 | this.form.reset() |
79 | } | 88 | } |
80 | } | 89 | } |