diff options
author | Chocobozzz <me@florianbigard.com> | 2022-10-07 15:26:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-10-07 15:26:53 +0200 |
commit | 5c5bcea2e64daf0a66a796c89432732ed27308d2 (patch) | |
tree | 96cec8f275c5dc3d71c284453af41a4915521686 /client/src/app/+videos | |
parent | a69ea13086273fc6659c153be93f0f5b37aad733 (diff) | |
download | PeerTube-5c5bcea2e64daf0a66a796c89432732ed27308d2.tar.gz PeerTube-5c5bcea2e64daf0a66a796c89432732ed27308d2.tar.zst PeerTube-5c5bcea2e64daf0a66a796c89432732ed27308d2.zip |
Refactor form reactive
Diffstat (limited to 'client/src/app/+videos')
8 files changed, 17 insertions, 18 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 95d83b131..4ab2d42db 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 | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { ServerService } from '@app/core' | 2 | import { ServerService } from '@app/core' |
3 | import { VIDEO_CAPTION_FILE_VALIDATOR, VIDEO_CAPTION_LANGUAGE_VALIDATOR } from '@app/shared/form-validators/video-captions-validators' | 3 | import { VIDEO_CAPTION_FILE_VALIDATOR, VIDEO_CAPTION_LANGUAGE_VALIDATOR } from '@app/shared/form-validators/video-captions-validators' |
4 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
5 | import { VideoCaptionEdit } from '@app/shared/shared-main' | 5 | import { VideoCaptionEdit } from '@app/shared/shared-main' |
6 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' | 6 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' |
7 | import { HTMLServerConfig, VideoConstant } from '@shared/models' | 7 | import { HTMLServerConfig, VideoConstant } from '@shared/models' |
@@ -26,7 +26,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
26 | private closingModal = false | 26 | private closingModal = false |
27 | 27 | ||
28 | constructor ( | 28 | constructor ( |
29 | protected formValidatorService: FormValidatorService, | 29 | protected formReactiveService: FormReactiveService, |
30 | private modalService: NgbModal, | 30 | private modalService: NgbModal, |
31 | private serverService: ServerService | 31 | private serverService: ServerService |
32 | ) { | 32 | ) { |
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts index f33353d36..2cb470a24 100644 --- a/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { VIDEO_CAPTION_FILE_CONTENT_VALIDATOR } from '@app/shared/form-validators/video-captions-validators' | 2 | import { VIDEO_CAPTION_FILE_CONTENT_VALIDATOR } from '@app/shared/form-validators/video-captions-validators' |
3 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
4 | import { VideoCaptionEdit, VideoCaptionService, VideoCaptionWithPathEdit } from '@app/shared/shared-main' | 4 | import { VideoCaptionEdit, VideoCaptionService, VideoCaptionWithPathEdit } from '@app/shared/shared-main' |
5 | import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' | 5 | import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' |
6 | import { HTMLServerConfig, VideoConstant } from '@shared/models' | 6 | import { HTMLServerConfig, VideoConstant } from '@shared/models' |
7 | import { ServerService } from '../../../../core' | 7 | import { ServerService } from '../../../../core' |
8 | 8 | ||
@@ -29,8 +29,7 @@ export class VideoCaptionEditModalContentComponent extends FormReactive implemen | |||
29 | 29 | ||
30 | constructor ( | 30 | constructor ( |
31 | protected openedModal: NgbActiveModal, | 31 | protected openedModal: NgbActiveModal, |
32 | protected formValidatorService: FormValidatorService, | 32 | protected formReactiveService: FormReactiveService, |
33 | private modalService: NgbModal, | ||
34 | private videoCaptionService: VideoCaptionService, | 33 | private videoCaptionService: VideoCaptionService, |
35 | private serverService: ServerService | 34 | private serverService: ServerService |
36 | ) { | 35 | ) { |
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts index 344b99ea2..4f2276e8c 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts | |||
@@ -3,7 +3,7 @@ import { AfterViewInit, Component, EventEmitter, OnInit, Output } from '@angular | |||
3 | import { Router } from '@angular/router' | 3 | import { Router } from '@angular/router' |
4 | import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core' | 4 | import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core' |
5 | import { scrollToTop } from '@app/helpers' | 5 | import { scrollToTop } from '@app/helpers' |
6 | import { FormValidatorService } from '@app/shared/shared-forms' | 6 | import { FormReactiveService } from '@app/shared/shared-forms' |
7 | import { Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' | 7 | import { Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' |
8 | import { LiveVideoService } from '@app/shared/shared-video-live' | 8 | import { LiveVideoService } from '@app/shared/shared-video-live' |
9 | import { LoadingBarService } from '@ngx-loading-bar/core' | 9 | import { LoadingBarService } from '@ngx-loading-bar/core' |
@@ -39,7 +39,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView | |||
39 | error: string | 39 | error: string |
40 | 40 | ||
41 | constructor ( | 41 | constructor ( |
42 | protected formValidatorService: FormValidatorService, | 42 | protected formReactiveService: FormReactiveService, |
43 | protected loadingBar: LoadingBarService, | 43 | protected loadingBar: LoadingBarService, |
44 | protected notifier: Notifier, | 44 | protected notifier: Notifier, |
45 | protected authService: AuthService, | 45 | protected authService: AuthService, |
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts index 7b9531d27..4a1408a4a 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts | |||
@@ -3,7 +3,7 @@ import { AfterViewInit, Component, ElementRef, EventEmitter, OnInit, Output, Vie | |||
3 | import { Router } from '@angular/router' | 3 | import { Router } from '@angular/router' |
4 | import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core' | 4 | import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core' |
5 | import { scrollToTop } from '@app/helpers' | 5 | import { scrollToTop } from '@app/helpers' |
6 | import { FormValidatorService } from '@app/shared/shared-forms' | 6 | import { FormReactiveService } from '@app/shared/shared-forms' |
7 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' | 7 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' |
8 | import { LoadingBarService } from '@ngx-loading-bar/core' | 8 | import { LoadingBarService } from '@ngx-loading-bar/core' |
9 | import { logger } from '@root-helpers/logger' | 9 | import { logger } from '@root-helpers/logger' |
@@ -35,7 +35,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Af | |||
35 | error: string | 35 | error: string |
36 | 36 | ||
37 | constructor ( | 37 | constructor ( |
38 | protected formValidatorService: FormValidatorService, | 38 | protected formReactiveService: FormReactiveService, |
39 | protected loadingBar: LoadingBarService, | 39 | protected loadingBar: LoadingBarService, |
40 | protected notifier: Notifier, | 40 | protected notifier: Notifier, |
41 | protected authService: AuthService, | 41 | protected authService: AuthService, |
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts index 422f0c643..502f3818e 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts | |||
@@ -4,7 +4,7 @@ import { AfterViewInit, Component, EventEmitter, OnInit, Output } from '@angular | |||
4 | import { Router } from '@angular/router' | 4 | import { Router } from '@angular/router' |
5 | import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core' | 5 | import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core' |
6 | import { scrollToTop } from '@app/helpers' | 6 | import { scrollToTop } from '@app/helpers' |
7 | import { FormValidatorService } from '@app/shared/shared-forms' | 7 | import { FormReactiveService } from '@app/shared/shared-forms' |
8 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' | 8 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' |
9 | import { LoadingBarService } from '@ngx-loading-bar/core' | 9 | import { LoadingBarService } from '@ngx-loading-bar/core' |
10 | import { logger } from '@root-helpers/logger' | 10 | import { logger } from '@root-helpers/logger' |
@@ -34,7 +34,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, AfterV | |||
34 | error: string | 34 | error: string |
35 | 35 | ||
36 | constructor ( | 36 | constructor ( |
37 | protected formValidatorService: FormValidatorService, | 37 | protected formReactiveService: FormReactiveService, |
38 | protected loadingBar: LoadingBarService, | 38 | protected loadingBar: LoadingBarService, |
39 | protected notifier: Notifier, | 39 | protected notifier: Notifier, |
40 | protected authService: AuthService, | 40 | protected authService: AuthService, |
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 19fba2a83..b0d846664 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 | |||
@@ -5,7 +5,7 @@ import { AfterViewInit, Component, ElementRef, EventEmitter, OnDestroy, OnInit, | |||
5 | import { ActivatedRoute, Router } from '@angular/router' | 5 | import { ActivatedRoute, Router } from '@angular/router' |
6 | import { AuthService, CanComponentDeactivate, HooksService, MetaService, Notifier, ServerService, UserService } from '@app/core' | 6 | import { AuthService, CanComponentDeactivate, HooksService, MetaService, Notifier, ServerService, UserService } from '@app/core' |
7 | import { genericUploadErrorHandler, scrollToTop } from '@app/helpers' | 7 | import { genericUploadErrorHandler, scrollToTop } from '@app/helpers' |
8 | import { FormValidatorService } from '@app/shared/shared-forms' | 8 | import { FormReactiveService } from '@app/shared/shared-forms' |
9 | import { BytesPipe, Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' | 9 | import { BytesPipe, Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' |
10 | import { LoadingBarService } from '@ngx-loading-bar/core' | 10 | import { LoadingBarService } from '@ngx-loading-bar/core' |
11 | import { logger } from '@root-helpers/logger' | 11 | import { logger } from '@root-helpers/logger' |
@@ -60,7 +60,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy | |||
60 | private uploadServiceSubscription: Subscription | 60 | private uploadServiceSubscription: Subscription |
61 | 61 | ||
62 | constructor ( | 62 | constructor ( |
63 | protected formValidatorService: FormValidatorService, | 63 | protected formReactiveService: FormReactiveService, |
64 | protected loadingBar: LoadingBarService, | 64 | protected loadingBar: LoadingBarService, |
65 | protected notifier: Notifier, | 65 | protected notifier: Notifier, |
66 | protected authService: AuthService, | 66 | protected authService: AuthService, |
diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts index ed17dff06..212971447 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.ts +++ b/client/src/app/+videos/+video-edit/video-update.component.ts | |||
@@ -4,7 +4,7 @@ import { SelectChannelItem } from 'src/types/select-options-item.model' | |||
4 | import { Component, HostListener, OnInit } from '@angular/core' | 4 | import { Component, HostListener, OnInit } from '@angular/core' |
5 | import { ActivatedRoute, Router } from '@angular/router' | 5 | import { ActivatedRoute, Router } from '@angular/router' |
6 | import { Notifier } from '@app/core' | 6 | import { Notifier } from '@app/core' |
7 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 7 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
8 | import { Video, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' | 8 | import { Video, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' |
9 | import { LiveVideoService } from '@app/shared/shared-video-live' | 9 | import { LiveVideoService } from '@app/shared/shared-video-live' |
10 | import { LoadingBarService } from '@ngx-loading-bar/core' | 10 | import { LoadingBarService } from '@ngx-loading-bar/core' |
@@ -33,7 +33,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
33 | private updateDone = false | 33 | private updateDone = false |
34 | 34 | ||
35 | constructor ( | 35 | constructor ( |
36 | protected formValidatorService: FormValidatorService, | 36 | protected formReactiveService: FormReactiveService, |
37 | private route: ActivatedRoute, | 37 | private route: ActivatedRoute, |
38 | private router: Router, | 38 | private router: Router, |
39 | private notifier: Notifier, | 39 | private notifier: Notifier, |
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts index 9f4a68736..9a9bfe710 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | import { Router } from '@angular/router' | 16 | import { Router } from '@angular/router' |
17 | import { Notifier, User } from '@app/core' | 17 | import { Notifier, User } from '@app/core' |
18 | import { VIDEO_COMMENT_TEXT_VALIDATOR } from '@app/shared/form-validators/video-comment-validators' | 18 | import { VIDEO_COMMENT_TEXT_VALIDATOR } from '@app/shared/form-validators/video-comment-validators' |
19 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 19 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
20 | import { Video } from '@app/shared/shared-main' | 20 | import { Video } from '@app/shared/shared-main' |
21 | import { VideoComment, VideoCommentService } from '@app/shared/shared-video-comment' | 21 | import { VideoComment, VideoCommentService } from '@app/shared/shared-video-comment' |
22 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 22 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
@@ -48,7 +48,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, | |||
48 | private emojiMarkupList: { emoji: string, name: string }[] | 48 | private emojiMarkupList: { emoji: string, name: string }[] |
49 | 49 | ||
50 | constructor ( | 50 | constructor ( |
51 | protected formValidatorService: FormValidatorService, | 51 | protected formReactiveService: FormReactiveService, |
52 | private notifier: Notifier, | 52 | private notifier: Notifier, |
53 | private videoCommentService: VideoCommentService, | 53 | private videoCommentService: VideoCommentService, |
54 | private modalService: NgbModal, | 54 | private modalService: NgbModal, |