diff options
author | Chocobozzz <me@florianbigard.com> | 2020-02-07 10:00:34 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-02-10 16:39:28 +0100 |
commit | 2f5d2ec5ea4fedf2466e1db2d16878b1467b1e05 (patch) | |
tree | d0e4a334a25f19d888f257a71c9a3c8095d04e0b /client/src/app | |
parent | 6c5bc93a3ab9403a76e38814c16167b5af647c10 (diff) | |
download | PeerTube-2f5d2ec5ea4fedf2466e1db2d16878b1467b1e05.tar.gz PeerTube-2f5d2ec5ea4fedf2466e1db2d16878b1467b1e05.tar.zst PeerTube-2f5d2ec5ea4fedf2466e1db2d16878b1467b1e05.zip |
Update to angular 9
Diffstat (limited to 'client/src/app')
13 files changed, 24 insertions, 20 deletions
diff --git a/client/src/app/+my-account/shared/actor-avatar-info.component.ts b/client/src/app/+my-account/shared/actor-avatar-info.component.ts index 101dfa556..8e034bb82 100644 --- a/client/src/app/+my-account/shared/actor-avatar-info.component.ts +++ b/client/src/app/+my-account/shared/actor-avatar-info.component.ts | |||
@@ -11,7 +11,7 @@ import { ServerConfig } from '@shared/models' | |||
11 | styleUrls: [ './actor-avatar-info.component.scss' ] | 11 | styleUrls: [ './actor-avatar-info.component.scss' ] |
12 | }) | 12 | }) |
13 | export class ActorAvatarInfoComponent implements OnInit { | 13 | export class ActorAvatarInfoComponent implements OnInit { |
14 | @ViewChild('avatarfileInput', { static: false }) avatarfileInput: ElementRef<HTMLInputElement> | 14 | @ViewChild('avatarfileInput') avatarfileInput: ElementRef<HTMLInputElement> |
15 | 15 | ||
16 | @Input() actor: VideoChannel | Account | 16 | @Input() actor: VideoChannel | Account |
17 | 17 | ||
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index 7b335b13f..5ca9581a8 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts | |||
@@ -15,7 +15,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' | |||
15 | styleUrls: [ './video-channels.component.scss' ] | 15 | styleUrls: [ './video-channels.component.scss' ] |
16 | }) | 16 | }) |
17 | export class VideoChannelsComponent implements OnInit, OnDestroy { | 17 | export class VideoChannelsComponent implements OnInit, OnDestroy { |
18 | @ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent | 18 | @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent |
19 | 19 | ||
20 | videoChannel: VideoChannel | 20 | videoChannel: VideoChannel |
21 | hotkeys: Hotkey[] | 21 | hotkeys: Hotkey[] |
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 03eb83cb8..59966243b 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -25,8 +25,8 @@ import { InstanceService } from '@app/shared/instance/instance.service' | |||
25 | styleUrls: [ './app.component.scss' ] | 25 | styleUrls: [ './app.component.scss' ] |
26 | }) | 26 | }) |
27 | export class AppComponent implements OnInit { | 27 | export class AppComponent implements OnInit { |
28 | @ViewChild('welcomeModal', { static: false }) welcomeModal: WelcomeModalComponent | 28 | @ViewChild('welcomeModal') welcomeModal: WelcomeModalComponent |
29 | @ViewChild('instanceConfigWarningModal', { static: false }) instanceConfigWarningModal: InstanceConfigWarningModalComponent | 29 | @ViewChild('instanceConfigWarningModal') instanceConfigWarningModal: InstanceConfigWarningModalComponent |
30 | 30 | ||
31 | isMenuDisplayed = true | 31 | isMenuDisplayed = true |
32 | isMenuChangedByUser = false | 32 | isMenuChangedByUser = false |
diff --git a/client/src/app/core/routing/custom-reuse-strategy.ts b/client/src/app/core/routing/custom-reuse-strategy.ts index a9f61acec..cbba82f1f 100644 --- a/client/src/app/core/routing/custom-reuse-strategy.ts +++ b/client/src/app/core/routing/custom-reuse-strategy.ts | |||
@@ -1,5 +1,7 @@ | |||
1 | import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router' | 1 | import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router' |
2 | import { Injectable } from "@angular/core"; | ||
2 | 3 | ||
4 | @Injectable() | ||
3 | export class CustomReuseStrategy implements RouteReuseStrategy { | 5 | export class CustomReuseStrategy implements RouteReuseStrategy { |
4 | storedRouteHandles = new Map<string, DetachedRouteHandle>() | 6 | storedRouteHandles = new Map<string, DetachedRouteHandle>() |
5 | recentlyUsed: string | 7 | recentlyUsed: string |
diff --git a/client/src/app/core/routing/preload-selected-modules-list.ts b/client/src/app/core/routing/preload-selected-modules-list.ts index 3bca60317..aa1c76516 100644 --- a/client/src/app/core/routing/preload-selected-modules-list.ts +++ b/client/src/app/core/routing/preload-selected-modules-list.ts | |||
@@ -1,7 +1,9 @@ | |||
1 | import { Observable, timer as observableTimer, of as ofObservable } from 'rxjs' | 1 | import { Observable, timer as observableTimer, of as ofObservable } from 'rxjs' |
2 | import { switchMap } from 'rxjs/operators' | 2 | import { switchMap } from 'rxjs/operators' |
3 | import { PreloadingStrategy, Route } from '@angular/router' | 3 | import { PreloadingStrategy, Route } from '@angular/router' |
4 | import { Injectable } from "@angular/core"; | ||
4 | 5 | ||
6 | @Injectable() | ||
5 | export class PreloadSelectedModulesList implements PreloadingStrategy { | 7 | export class PreloadSelectedModulesList implements PreloadingStrategy { |
6 | preload (route: Route, load: Function): Observable<any> { | 8 | preload (route: Route, load: Function): Observable<any> { |
7 | if (!route.data || !route.data.preload) return ofObservable(null) | 9 | if (!route.data || !route.data.preload) return ofObservable(null) |
diff --git a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts index 11d8588f4..9197556b0 100644 --- a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts +++ b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts | |||
@@ -14,7 +14,7 @@ import { ServerConfig } from '@shared/models' | |||
14 | templateUrl: './user-moderation-dropdown.component.html' | 14 | templateUrl: './user-moderation-dropdown.component.html' |
15 | }) | 15 | }) |
16 | export class UserModerationDropdownComponent implements OnInit, OnChanges { | 16 | export class UserModerationDropdownComponent implements OnInit, OnChanges { |
17 | @ViewChild('userBanModal', { static: false }) userBanModal: UserBanModalComponent | 17 | @ViewChild('userBanModal') userBanModal: UserBanModalComponent |
18 | 18 | ||
19 | @Input() user: User | 19 | @Input() user: User |
20 | @Input() account: Account | 20 | @Input() account: Account |
diff --git a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts index 4864581b5..a2c0724cd 100644 --- a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts +++ b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts | |||
@@ -18,7 +18,7 @@ import { VideoPlaylistElement } from '@app/shared/video-playlist/video-playlist- | |||
18 | changeDetection: ChangeDetectionStrategy.OnPush | 18 | changeDetection: ChangeDetectionStrategy.OnPush |
19 | }) | 19 | }) |
20 | export class VideoPlaylistElementMiniatureComponent implements OnInit { | 20 | export class VideoPlaylistElementMiniatureComponent implements OnInit { |
21 | @ViewChild('moreDropdown', { static: false }) moreDropdown: NgbDropdown | 21 | @ViewChild('moreDropdown') moreDropdown: NgbDropdown |
22 | 22 | ||
23 | @Input() playlist: VideoPlaylist | 23 | @Input() playlist: VideoPlaylist |
24 | @Input() playlistElement: VideoPlaylistElement | 24 | @Input() playlistElement: VideoPlaylistElement |
diff --git a/client/src/app/shared/video/video-actions-dropdown.component.ts b/client/src/app/shared/video/video-actions-dropdown.component.ts index 390d74c52..69f45346e 100644 --- a/client/src/app/shared/video/video-actions-dropdown.component.ts +++ b/client/src/app/shared/video/video-actions-dropdown.component.ts | |||
@@ -32,12 +32,12 @@ export type VideoActionsDisplayType = { | |||
32 | styleUrls: [ './video-actions-dropdown.component.scss' ] | 32 | styleUrls: [ './video-actions-dropdown.component.scss' ] |
33 | }) | 33 | }) |
34 | export class VideoActionsDropdownComponent implements OnChanges { | 34 | export class VideoActionsDropdownComponent implements OnChanges { |
35 | @ViewChild('playlistDropdown', { static: false }) playlistDropdown: NgbDropdown | 35 | @ViewChild('playlistDropdown') playlistDropdown: NgbDropdown |
36 | @ViewChild('playlistAdd', { static: false }) playlistAdd: VideoAddToPlaylistComponent | 36 | @ViewChild('playlistAdd') playlistAdd: VideoAddToPlaylistComponent |
37 | 37 | ||
38 | @ViewChild('videoDownloadModal', { static: false }) videoDownloadModal: VideoDownloadComponent | 38 | @ViewChild('videoDownloadModal') videoDownloadModal: VideoDownloadComponent |
39 | @ViewChild('videoReportModal', { static: false }) videoReportModal: VideoReportComponent | 39 | @ViewChild('videoReportModal') videoReportModal: VideoReportComponent |
40 | @ViewChild('videoBlacklistModal', { static: false }) videoBlacklistModal: VideoBlacklistComponent | 40 | @ViewChild('videoBlacklistModal') videoBlacklistModal: VideoBlacklistComponent |
41 | 41 | ||
42 | @Input() video: Video | VideoDetails | 42 | @Input() video: Video | VideoDetails |
43 | @Input() videoCaptions: VideoCaption[] = [] | 43 | @Input() videoCaptions: VideoCaption[] = [] |
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 74e1e755b..e47624dd6 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' | |||
25 | export class VideoImportTorrentComponent extends VideoSend implements OnInit, CanComponentDeactivate { | 25 | export class VideoImportTorrentComponent extends VideoSend implements OnInit, CanComponentDeactivate { |
26 | @Output() firstStepDone = new EventEmitter<string>() | 26 | @Output() firstStepDone = new EventEmitter<string>() |
27 | @Output() firstStepError = new EventEmitter<void>() | 27 | @Output() firstStepError = new EventEmitter<void>() |
28 | @ViewChild('torrentfileInput', { static: false }) torrentfileInput: ElementRef<HTMLInputElement> | 28 | @ViewChild('torrentfileInput') torrentfileInput: ElementRef<HTMLInputElement> |
29 | 29 | ||
30 | magnetUri = '' | 30 | magnetUri = '' |
31 | 31 | ||
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 aa87f9581..efdd284e8 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' | |||
27 | export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy, CanComponentDeactivate { | 27 | export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy, CanComponentDeactivate { |
28 | @Output() firstStepDone = new EventEmitter<string>() | 28 | @Output() firstStepDone = new EventEmitter<string>() |
29 | @Output() firstStepError = new EventEmitter<void>() | 29 | @Output() firstStepError = new EventEmitter<void>() |
30 | @ViewChild('videofileInput', { static: false }) videofileInput: ElementRef<HTMLInputElement> | 30 | @ViewChild('videofileInput') videofileInput: ElementRef<HTMLInputElement> |
31 | 31 | ||
32 | // So that it can be accessed in the template | 32 | // So that it can be accessed in the template |
33 | readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY | 33 | 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 401d8a08f..30ab08ea0 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts | |||
@@ -12,9 +12,9 @@ import { ServerConfig } from '@shared/models' | |||
12 | styleUrls: [ './video-add.component.scss' ] | 12 | styleUrls: [ './video-add.component.scss' ] |
13 | }) | 13 | }) |
14 | export class VideoAddComponent implements OnInit, CanComponentDeactivate { | 14 | export class VideoAddComponent implements OnInit, CanComponentDeactivate { |
15 | @ViewChild('videoUpload', { static: false }) videoUpload: VideoUploadComponent | 15 | @ViewChild('videoUpload') videoUpload: VideoUploadComponent |
16 | @ViewChild('videoImportUrl', { static: false }) videoImportUrl: VideoImportUrlComponent | 16 | @ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent |
17 | @ViewChild('videoImportTorrent', { static: false }) videoImportTorrent: VideoImportTorrentComponent | 17 | @ViewChild('videoImportTorrent') videoImportTorrent: VideoImportTorrentComponent |
18 | 18 | ||
19 | secondStepType: 'upload' | 'import-url' | 'import-torrent' | 19 | secondStepType: 'upload' | 'import-url' | 'import-torrent' |
20 | videoName: string | 20 | videoName: string |
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 974c61d6c..47720b0ea 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' | |||
20 | styleUrls: ['./video-comments.component.scss'] | 20 | styleUrls: ['./video-comments.component.scss'] |
21 | }) | 21 | }) |
22 | export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | 22 | export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { |
23 | @ViewChild('commentHighlightBlock', { static: false }) commentHighlightBlock: ElementRef | 23 | @ViewChild('commentHighlightBlock') commentHighlightBlock: ElementRef |
24 | @Input() video: VideoDetails | 24 | @Input() video: VideoDetails |
25 | @Input() user: User | 25 | @Input() user: User |
26 | 26 | ||
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 e09e44809..ee3deb5e9 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -47,9 +47,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
47 | private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern' | 47 | private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern' |
48 | 48 | ||
49 | @ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent | 49 | @ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent |
50 | @ViewChild('videoShareModal', { static: false }) videoShareModal: VideoShareComponent | 50 | @ViewChild('videoShareModal') videoShareModal: VideoShareComponent |
51 | @ViewChild('videoSupportModal', { static: false }) videoSupportModal: VideoSupportComponent | 51 | @ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent |
52 | @ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent | 52 | @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent |
53 | 53 | ||
54 | player: any | 54 | player: any |
55 | playerElement: HTMLVideoElement | 55 | playerElement: HTMLVideoElement |