From f36da21e40104a50acb00132920b835240cebb38 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Jul 2019 16:05:59 +0200 Subject: Update angular --- .../+video-edit/shared/video-caption-add-modal.component.ts | 2 +- client/src/app/videos/+video-edit/shared/video-edit.component.ts | 2 +- .../video-add-components/video-import-torrent.component.ts | 2 +- .../+video-edit/video-add-components/video-upload.component.ts | 2 +- client/src/app/videos/+video-edit/video-add.component.ts | 6 +++--- .../videos/+video-watch/comment/video-comment-add.component.ts | 4 ++-- .../app/videos/+video-watch/comment/video-comments.component.ts | 2 +- .../src/app/videos/+video-watch/modal/video-share.component.html | 2 +- client/src/app/videos/+video-watch/modal/video-share.component.ts | 2 +- .../src/app/videos/+video-watch/modal/video-support.component.ts | 2 +- client/src/app/videos/+video-watch/video-watch.component.ts | 8 ++++---- client/src/app/videos/+video-watch/video-watch.module.ts | 4 ++-- client/src/app/videos/videos-routing.module.ts | 6 +++--- 13 files changed, 22 insertions(+), 22 deletions(-) (limited to 'client/src/app/videos') 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 1413e7262..86c6e03e7 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 @@ -18,7 +18,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni @Output() captionAdded = new EventEmitter() - @ViewChild('modal') modal: ElementRef + @ViewChild('modal', { static: true }) modal: ElementRef videoCaptionLanguages: VideoConstant[] = [] 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 cea352bfb..d0d5e2a2b 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 @@ -29,7 +29,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { @Input() videoCaptions: (VideoCaptionEdit & { captionPath?: string })[] = [] @Input() waitTranscodingEnabled = true - @ViewChild('videoCaptionAddModal') videoCaptionAddModal: VideoCaptionAddModalComponent + @ViewChild('videoCaptionAddModal', { static: true }) videoCaptionAddModal: VideoCaptionAddModalComponent // So that it can be accessed in the template readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY 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 e47624dd6..74e1e755b 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 @@ -25,7 +25,7 @@ import { scrollToTop } from '@app/shared/misc/utils' export class VideoImportTorrentComponent extends VideoSend implements OnInit, CanComponentDeactivate { @Output() firstStepDone = new EventEmitter() @Output() firstStepError = new EventEmitter() - @ViewChild('torrentfileInput') torrentfileInput: ElementRef + @ViewChild('torrentfileInput', { static: false }) torrentfileInput: ElementRef magnetUri = '' 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 69fa13a2f..23b79edd3 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 @@ -27,7 +27,7 @@ import { scrollToTop } from '@app/shared/misc/utils' export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy, CanComponentDeactivate { @Output() firstStepDone = new EventEmitter() @Output() firstStepError = new EventEmitter() - @ViewChild('videofileInput') videofileInput: ElementRef + @ViewChild('videofileInput', { static: false }) videofileInput: ElementRef // So that it can be accessed in the template readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 01fdfcb66..193de441d 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts @@ -11,9 +11,9 @@ import { VideoImportTorrentComponent } from '@app/videos/+video-edit/video-add-c styleUrls: [ './video-add.component.scss' ] }) export class VideoAddComponent implements CanComponentDeactivate { - @ViewChild('videoUpload') videoUpload: VideoUploadComponent - @ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent - @ViewChild('videoImportTorrent') videoImportTorrent: VideoImportTorrentComponent + @ViewChild('videoUpload', { static: false }) videoUpload: VideoUploadComponent + @ViewChild('videoImportUrl', { static: false }) videoImportUrl: VideoImportUrlComponent + @ViewChild('videoImportTorrent', { static: false }) videoImportTorrent: VideoImportTorrentComponent secondStepType: 'upload' | 'import-url' | 'import-torrent' videoName: string diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts index ac1d02d94..8cdd37680 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts @@ -27,8 +27,8 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { @Output() commentCreated = new EventEmitter() - @ViewChild('visitorModal') visitorModal: NgbModal - @ViewChild('textarea') textareaElement: ElementRef + @ViewChild('visitorModal', { static: true }) visitorModal: NgbModal + @ViewChild('textarea', { static: true }) textareaElement: ElementRef addingComment = false diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts index 5bafc55e5..64bd18072 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts @@ -20,7 +20,7 @@ import { HooksService } from '@app/core/plugins/hooks.service' styleUrls: ['./video-comments.component.scss'] }) export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { - @ViewChild('commentHighlightBlock') commentHighlightBlock: ElementRef + @ViewChild('commentHighlightBlock', { static: false }) commentHighlightBlock: ElementRef @Input() video: VideoDetails @Input() user: User diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.html b/client/src/app/videos/+video-watch/modal/video-share.component.html index 82e59d04d..e0be9f265 100644 --- a/client/src/app/videos/+video-watch/modal/video-share.component.html +++ b/client/src/app/videos/+video-watch/modal/video-share.component.html @@ -27,7 +27,7 @@
- +
diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.ts b/client/src/app/videos/+video-watch/modal/video-share.component.ts index eaaf6b902..f45afccfb 100644 --- a/client/src/app/videos/+video-watch/modal/video-share.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-share.component.ts @@ -30,7 +30,7 @@ type Customizations = { styleUrls: [ './video-share.component.scss' ] }) export class VideoShareComponent { - @ViewChild('modal') modal: ElementRef + @ViewChild('modal', { static: true }) modal: ElementRef @Input() video: VideoDetails = null @Input() videoCaptions: VideoCaption[] = [] diff --git a/client/src/app/videos/+video-watch/modal/video-support.component.ts b/client/src/app/videos/+video-watch/modal/video-support.component.ts index 5e7afa012..b56a51fbf 100644 --- a/client/src/app/videos/+video-watch/modal/video-support.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-support.component.ts @@ -11,7 +11,7 @@ import { MarkdownService } from '@app/shared/renderer' export class VideoSupportComponent { @Input() video: VideoDetails = null - @ViewChild('modal') modal: NgbModal + @ViewChild('modal', { static: true }) modal: NgbModal videoHTMLSupport = '' diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 228c45a06..027c2b026 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -43,10 +43,10 @@ import { HooksService } from '@app/core/plugins/hooks.service' export class VideoWatchComponent implements OnInit, OnDestroy { private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern' - @ViewChild('videoWatchPlaylist') videoWatchPlaylist: VideoWatchPlaylistComponent - @ViewChild('videoShareModal') videoShareModal: VideoShareComponent - @ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent - @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent + @ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent + @ViewChild('videoShareModal', { static: false }) videoShareModal: VideoShareComponent + @ViewChild('videoSupportModal', { static: false }) videoSupportModal: VideoSupportComponent + @ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent player: any playerElement: HTMLVideoElement diff --git a/client/src/app/videos/+video-watch/video-watch.module.ts b/client/src/app/videos/+video-watch/video-watch.module.ts index 67596a3da..f083aca4d 100644 --- a/client/src/app/videos/+video-watch/video-watch.module.ts +++ b/client/src/app/videos/+video-watch/video-watch.module.ts @@ -8,17 +8,17 @@ import { VideoCommentsComponent } from './comment/video-comments.component' import { VideoShareComponent } from './modal/video-share.component' import { VideoWatchRoutingModule } from './video-watch-routing.module' import { VideoWatchComponent } from './video-watch.component' -import { NgxQRCodeModule } from 'ngx-qrcode2' import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap' import { RecommendationsModule } from '@app/videos/recommendations/recommendations.module' import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component' +import { QRCodeModule } from 'angularx-qrcode' @NgModule({ imports: [ VideoWatchRoutingModule, SharedModule, NgbTooltipModule, - NgxQRCodeModule, + QRCodeModule, RecommendationsModule ], diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts index 505173a5b..bc7520207 100644 --- a/client/src/app/videos/videos-routing.module.ts +++ b/client/src/app/videos/videos-routing.module.ts @@ -77,7 +77,7 @@ const videosRoutes: Routes = [ }, { path: 'upload', - loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule', + loadChildren: () => import('app/videos/+video-edit/video-add.module').then(m => m.VideoAddModule), data: { meta: { title: 'Upload a video' @@ -86,7 +86,7 @@ const videosRoutes: Routes = [ }, { path: 'update/:uuid', - loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule', + loadChildren: () => import('app/videos/+video-edit/video-update.module').then(m => m.VideoUpdateModule), data: { meta: { title: 'Edit a video' @@ -95,7 +95,7 @@ const videosRoutes: Routes = [ }, { path: 'watch', - loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule', + loadChildren: () => import('app/videos/+video-watch/video-watch.module').then(m => m.VideoWatchModule), data: { preload: 3000 } -- cgit v1.2.3