1
0
Fork 0

Update to angular 9

This commit is contained in:
Chocobozzz 2020-02-07 10:00:34 +01:00 committed by Chocobozzz
parent 6c5bc93a3a
commit 2f5d2ec5ea
17 changed files with 1399 additions and 656 deletions

View file

@ -4,6 +4,14 @@
"newProjectRoot": "projects",
"projects": {
"PeerTube": {
"i18n": {
"locales": {
"fr_FR": {
"translation": "src/i18n/messages.fr_FR.xlf",
"baseHref": ""
}
}
},
"root": "",
"sourceRoot": "src",
"projectType": "application",
@ -11,6 +19,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"deployUrl": "client/",
"outputPath": "dist",
"index": "src/index.html",
@ -64,6 +73,12 @@
]
},
"hmr": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
@ -72,6 +87,12 @@
]
},
"e2e": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
@ -81,9 +102,14 @@
},
"fr_FR": {
"aot": true,
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"outputPath": "dist/PeerTube-fr_FR",
"i18nFile": "src/i18n/messages.fr_FR.xlf",
"i18nFormat": "xlf",
"i18nLocale": "fr_FR"
}
}

View file

@ -33,20 +33,20 @@
"punycode": "^1.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.25",
"@angular/animations": "~8.2.14",
"@angular-devkit/build-angular": "~0.900.1",
"@angular/animations": "~9.0.0",
"@angular/cdk": "^8.2.3",
"@angular/cli": "~8.3.25",
"@angular/common": "~8.2.14",
"@angular/compiler": "~8.2.14",
"@angular/compiler-cli": "~8.2.14",
"@angular/core": "~8.2.14",
"@angular/forms": "~8.2.14",
"@angular/language-service": "~8.2.14",
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",
"@angular/service-worker": "~8.2.14",
"@angular/cli": "~9.0.1",
"@angular/common": "~9.0.0",
"@angular/compiler": "~9.0.0",
"@angular/compiler-cli": "~9.0.0",
"@angular/core": "~9.0.0",
"@angular/forms": "~9.0.0",
"@angular/language-service": "~9.0.0",
"@angular/platform-browser": "~9.0.0",
"@angular/platform-browser-dynamic": "~9.0.0",
"@angular/router": "~9.0.0",
"@angular/service-worker": "~9.0.0",
"@angularclass/hmr": "^2.1.3",
"@neos21/bootstrap3-glyphicons": "^1.0.1",
"@ng-bootstrap/ng-bootstrap": "^5.1.0",
@ -65,7 +65,7 @@
"@types/linkifyjs": "^2.1.2",
"@types/lodash-es": "^4.17.0",
"@types/markdown-it": "^0.0.9",
"@types/node": "^10.9.2",
"@types/node": "^12.11.1",
"@types/sanitize-html": "1.18.0",
"@types/socket.io-client": "^1.4.32",
"@types/video.js": "^7.3.3",
@ -77,7 +77,7 @@
"buffer": "^5.1.0",
"cache-chunk-store": "^3.0.0",
"chart.js": "^2.9.3",
"codelyzer": "^5.0.1",
"codelyzer": "^5.1.2",
"core-js": "^3.1.4",
"css-loader": "^3.1.0",
"debug": "^4.1.1",
@ -125,7 +125,7 @@
"tslint": "^5.7.0",
"tslint-angular": "^3.0.2",
"tslint-config-standard": "^8.0.1",
"typescript": "~3.5.3",
"typescript": "~3.7.5",
"video.js": "^7",
"videojs-contextmenu-ui": "^5.0.0",
"videojs-contrib-quality-levels": "^2.0.9",
@ -137,9 +137,11 @@
"webpack-cli": "^3.0.8",
"webtorrent": "^0.107.16",
"whatwg-fetch": "^3.0.0",
"zone.js": "~0.10.0"
"zone.js": "~0.10.2"
},
"dependencies": {
"@angular/localize": "~9.0.0",
"@ngx-i18nsupport/tooling": "^8.0.3"
}
, "tslib": "^1.10.0"
}
}

View file

@ -11,7 +11,7 @@ import { ServerConfig } from '@shared/models'
styleUrls: [ './actor-avatar-info.component.scss' ]
})
export class ActorAvatarInfoComponent implements OnInit {
@ViewChild('avatarfileInput', { static: false }) avatarfileInput: ElementRef<HTMLInputElement>
@ViewChild('avatarfileInput') avatarfileInput: ElementRef<HTMLInputElement>
@Input() actor: VideoChannel | Account

View file

@ -15,7 +15,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
styleUrls: [ './video-channels.component.scss' ]
})
export class VideoChannelsComponent implements OnInit, OnDestroy {
@ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent
@ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
videoChannel: VideoChannel
hotkeys: Hotkey[]

View file

@ -25,8 +25,8 @@ import { InstanceService } from '@app/shared/instance/instance.service'
styleUrls: [ './app.component.scss' ]
})
export class AppComponent implements OnInit {
@ViewChild('welcomeModal', { static: false }) welcomeModal: WelcomeModalComponent
@ViewChild('instanceConfigWarningModal', { static: false }) instanceConfigWarningModal: InstanceConfigWarningModalComponent
@ViewChild('welcomeModal') welcomeModal: WelcomeModalComponent
@ViewChild('instanceConfigWarningModal') instanceConfigWarningModal: InstanceConfigWarningModalComponent
isMenuDisplayed = true
isMenuChangedByUser = false

View file

@ -1,5 +1,7 @@
import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router'
import { Injectable } from "@angular/core";
@Injectable()
export class CustomReuseStrategy implements RouteReuseStrategy {
storedRouteHandles = new Map<string, DetachedRouteHandle>()
recentlyUsed: string

View file

@ -1,7 +1,9 @@
import { Observable, timer as observableTimer, of as ofObservable } from 'rxjs'
import { switchMap } from 'rxjs/operators'
import { PreloadingStrategy, Route } from '@angular/router'
import { Injectable } from "@angular/core";
@Injectable()
export class PreloadSelectedModulesList implements PreloadingStrategy {
preload (route: Route, load: Function): Observable<any> {
if (!route.data || !route.data.preload) return ofObservable(null)

View file

@ -14,7 +14,7 @@ import { ServerConfig } from '@shared/models'
templateUrl: './user-moderation-dropdown.component.html'
})
export class UserModerationDropdownComponent implements OnInit, OnChanges {
@ViewChild('userBanModal', { static: false }) userBanModal: UserBanModalComponent
@ViewChild('userBanModal') userBanModal: UserBanModalComponent
@Input() user: User
@Input() account: Account

View file

@ -18,7 +18,7 @@ import { VideoPlaylistElement } from '@app/shared/video-playlist/video-playlist-
changeDetection: ChangeDetectionStrategy.OnPush
})
export class VideoPlaylistElementMiniatureComponent implements OnInit {
@ViewChild('moreDropdown', { static: false }) moreDropdown: NgbDropdown
@ViewChild('moreDropdown') moreDropdown: NgbDropdown
@Input() playlist: VideoPlaylist
@Input() playlistElement: VideoPlaylistElement

View file

@ -32,12 +32,12 @@ export type VideoActionsDisplayType = {
styleUrls: [ './video-actions-dropdown.component.scss' ]
})
export class VideoActionsDropdownComponent implements OnChanges {
@ViewChild('playlistDropdown', { static: false }) playlistDropdown: NgbDropdown
@ViewChild('playlistAdd', { static: false }) playlistAdd: VideoAddToPlaylistComponent
@ViewChild('playlistDropdown') playlistDropdown: NgbDropdown
@ViewChild('playlistAdd') playlistAdd: VideoAddToPlaylistComponent
@ViewChild('videoDownloadModal', { static: false }) videoDownloadModal: VideoDownloadComponent
@ViewChild('videoReportModal', { static: false }) videoReportModal: VideoReportComponent
@ViewChild('videoBlacklistModal', { static: false }) videoBlacklistModal: VideoBlacklistComponent
@ViewChild('videoDownloadModal') videoDownloadModal: VideoDownloadComponent
@ViewChild('videoReportModal') videoReportModal: VideoReportComponent
@ViewChild('videoBlacklistModal') videoBlacklistModal: VideoBlacklistComponent
@Input() video: Video | VideoDetails
@Input() videoCaptions: VideoCaption[] = []

View file

@ -25,7 +25,7 @@ import { scrollToTop } from '@app/shared/misc/utils'
export class VideoImportTorrentComponent extends VideoSend implements OnInit, CanComponentDeactivate {
@Output() firstStepDone = new EventEmitter<string>()
@Output() firstStepError = new EventEmitter<void>()
@ViewChild('torrentfileInput', { static: false }) torrentfileInput: ElementRef<HTMLInputElement>
@ViewChild('torrentfileInput') torrentfileInput: ElementRef<HTMLInputElement>
magnetUri = ''

View file

@ -27,7 +27,7 @@ import { scrollToTop } from '@app/shared/misc/utils'
export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy, CanComponentDeactivate {
@Output() firstStepDone = new EventEmitter<string>()
@Output() firstStepError = new EventEmitter<void>()
@ViewChild('videofileInput', { static: false }) videofileInput: ElementRef<HTMLInputElement>
@ViewChild('videofileInput') videofileInput: ElementRef<HTMLInputElement>
// So that it can be accessed in the template
readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY

View file

@ -12,9 +12,9 @@ import { ServerConfig } from '@shared/models'
styleUrls: [ './video-add.component.scss' ]
})
export class VideoAddComponent implements OnInit, CanComponentDeactivate {
@ViewChild('videoUpload', { static: false }) videoUpload: VideoUploadComponent
@ViewChild('videoImportUrl', { static: false }) videoImportUrl: VideoImportUrlComponent
@ViewChild('videoImportTorrent', { static: false }) videoImportTorrent: VideoImportTorrentComponent
@ViewChild('videoUpload') videoUpload: VideoUploadComponent
@ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent
@ViewChild('videoImportTorrent') videoImportTorrent: VideoImportTorrentComponent
secondStepType: 'upload' | 'import-url' | 'import-torrent'
videoName: string

View file

@ -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', { static: false }) commentHighlightBlock: ElementRef
@ViewChild('commentHighlightBlock') commentHighlightBlock: ElementRef
@Input() video: VideoDetails
@Input() user: User

View file

@ -47,9 +47,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern'
@ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent
@ViewChild('videoShareModal', { static: false }) videoShareModal: VideoShareComponent
@ViewChild('videoSupportModal', { static: false }) videoSupportModal: VideoSupportComponent
@ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent
@ViewChild('videoShareModal') videoShareModal: VideoShareComponent
@ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent
@ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
player: any
playerElement: HTMLVideoElement

View file

@ -10,7 +10,8 @@
"/client/assets/images/favicon.png",
"/client/*.bundle.css",
"/client/*.bundle.js",
"/client/*.chunk.js"
"/client/*.chunk.js",
"/manifest.webmanifest"
]
}
},

File diff suppressed because it is too large Load diff