Update to angular 9
This commit is contained in:
parent
6c5bc93a3a
commit
2f5d2ec5ea
17 changed files with 1399 additions and 656 deletions
|
@ -4,6 +4,14 @@
|
||||||
"newProjectRoot": "projects",
|
"newProjectRoot": "projects",
|
||||||
"projects": {
|
"projects": {
|
||||||
"PeerTube": {
|
"PeerTube": {
|
||||||
|
"i18n": {
|
||||||
|
"locales": {
|
||||||
|
"fr_FR": {
|
||||||
|
"translation": "src/i18n/messages.fr_FR.xlf",
|
||||||
|
"baseHref": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": "",
|
"root": "",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
|
@ -11,6 +19,7 @@
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
"options": {
|
"options": {
|
||||||
|
"aot": true,
|
||||||
"deployUrl": "client/",
|
"deployUrl": "client/",
|
||||||
"outputPath": "dist",
|
"outputPath": "dist",
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
|
@ -64,6 +73,12 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"hmr": {
|
"hmr": {
|
||||||
|
"budgets": [
|
||||||
|
{
|
||||||
|
"type": "anyComponentStyle",
|
||||||
|
"maximumWarning": "6kb"
|
||||||
|
}
|
||||||
|
],
|
||||||
"fileReplacements": [
|
"fileReplacements": [
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"replace": "src/environments/environment.ts",
|
||||||
|
@ -72,6 +87,12 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"e2e": {
|
"e2e": {
|
||||||
|
"budgets": [
|
||||||
|
{
|
||||||
|
"type": "anyComponentStyle",
|
||||||
|
"maximumWarning": "6kb"
|
||||||
|
}
|
||||||
|
],
|
||||||
"fileReplacements": [
|
"fileReplacements": [
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"replace": "src/environments/environment.ts",
|
||||||
|
@ -81,9 +102,14 @@
|
||||||
},
|
},
|
||||||
"fr_FR": {
|
"fr_FR": {
|
||||||
"aot": true,
|
"aot": true,
|
||||||
|
"budgets": [
|
||||||
|
{
|
||||||
|
"type": "anyComponentStyle",
|
||||||
|
"maximumWarning": "6kb"
|
||||||
|
}
|
||||||
|
],
|
||||||
"outputPath": "dist/PeerTube-fr_FR",
|
"outputPath": "dist/PeerTube-fr_FR",
|
||||||
"i18nFile": "src/i18n/messages.fr_FR.xlf",
|
"i18nFile": "src/i18n/messages.fr_FR.xlf",
|
||||||
"i18nFormat": "xlf",
|
|
||||||
"i18nLocale": "fr_FR"
|
"i18nLocale": "fr_FR"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,20 +33,20 @@
|
||||||
"punycode": "^1.4.1"
|
"punycode": "^1.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~0.803.25",
|
"@angular-devkit/build-angular": "~0.900.1",
|
||||||
"@angular/animations": "~8.2.14",
|
"@angular/animations": "~9.0.0",
|
||||||
"@angular/cdk": "^8.2.3",
|
"@angular/cdk": "^8.2.3",
|
||||||
"@angular/cli": "~8.3.25",
|
"@angular/cli": "~9.0.1",
|
||||||
"@angular/common": "~8.2.14",
|
"@angular/common": "~9.0.0",
|
||||||
"@angular/compiler": "~8.2.14",
|
"@angular/compiler": "~9.0.0",
|
||||||
"@angular/compiler-cli": "~8.2.14",
|
"@angular/compiler-cli": "~9.0.0",
|
||||||
"@angular/core": "~8.2.14",
|
"@angular/core": "~9.0.0",
|
||||||
"@angular/forms": "~8.2.14",
|
"@angular/forms": "~9.0.0",
|
||||||
"@angular/language-service": "~8.2.14",
|
"@angular/language-service": "~9.0.0",
|
||||||
"@angular/platform-browser": "~8.2.14",
|
"@angular/platform-browser": "~9.0.0",
|
||||||
"@angular/platform-browser-dynamic": "~8.2.14",
|
"@angular/platform-browser-dynamic": "~9.0.0",
|
||||||
"@angular/router": "~8.2.14",
|
"@angular/router": "~9.0.0",
|
||||||
"@angular/service-worker": "~8.2.14",
|
"@angular/service-worker": "~9.0.0",
|
||||||
"@angularclass/hmr": "^2.1.3",
|
"@angularclass/hmr": "^2.1.3",
|
||||||
"@neos21/bootstrap3-glyphicons": "^1.0.1",
|
"@neos21/bootstrap3-glyphicons": "^1.0.1",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^5.1.0",
|
"@ng-bootstrap/ng-bootstrap": "^5.1.0",
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
"@types/linkifyjs": "^2.1.2",
|
"@types/linkifyjs": "^2.1.2",
|
||||||
"@types/lodash-es": "^4.17.0",
|
"@types/lodash-es": "^4.17.0",
|
||||||
"@types/markdown-it": "^0.0.9",
|
"@types/markdown-it": "^0.0.9",
|
||||||
"@types/node": "^10.9.2",
|
"@types/node": "^12.11.1",
|
||||||
"@types/sanitize-html": "1.18.0",
|
"@types/sanitize-html": "1.18.0",
|
||||||
"@types/socket.io-client": "^1.4.32",
|
"@types/socket.io-client": "^1.4.32",
|
||||||
"@types/video.js": "^7.3.3",
|
"@types/video.js": "^7.3.3",
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
"buffer": "^5.1.0",
|
"buffer": "^5.1.0",
|
||||||
"cache-chunk-store": "^3.0.0",
|
"cache-chunk-store": "^3.0.0",
|
||||||
"chart.js": "^2.9.3",
|
"chart.js": "^2.9.3",
|
||||||
"codelyzer": "^5.0.1",
|
"codelyzer": "^5.1.2",
|
||||||
"core-js": "^3.1.4",
|
"core-js": "^3.1.4",
|
||||||
"css-loader": "^3.1.0",
|
"css-loader": "^3.1.0",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
"tslint": "^5.7.0",
|
"tslint": "^5.7.0",
|
||||||
"tslint-angular": "^3.0.2",
|
"tslint-angular": "^3.0.2",
|
||||||
"tslint-config-standard": "^8.0.1",
|
"tslint-config-standard": "^8.0.1",
|
||||||
"typescript": "~3.5.3",
|
"typescript": "~3.7.5",
|
||||||
"video.js": "^7",
|
"video.js": "^7",
|
||||||
"videojs-contextmenu-ui": "^5.0.0",
|
"videojs-contextmenu-ui": "^5.0.0",
|
||||||
"videojs-contrib-quality-levels": "^2.0.9",
|
"videojs-contrib-quality-levels": "^2.0.9",
|
||||||
|
@ -137,9 +137,11 @@
|
||||||
"webpack-cli": "^3.0.8",
|
"webpack-cli": "^3.0.8",
|
||||||
"webtorrent": "^0.107.16",
|
"webtorrent": "^0.107.16",
|
||||||
"whatwg-fetch": "^3.0.0",
|
"whatwg-fetch": "^3.0.0",
|
||||||
"zone.js": "~0.10.0"
|
"zone.js": "~0.10.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@angular/localize": "~9.0.0",
|
||||||
"@ngx-i18nsupport/tooling": "^8.0.3"
|
"@ngx-i18nsupport/tooling": "^8.0.3"
|
||||||
}
|
, "tslib": "^1.10.0"
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@ import { ServerConfig } from '@shared/models'
|
||||||
styleUrls: [ './actor-avatar-info.component.scss' ]
|
styleUrls: [ './actor-avatar-info.component.scss' ]
|
||||||
})
|
})
|
||||||
export class ActorAvatarInfoComponent implements OnInit {
|
export class ActorAvatarInfoComponent implements OnInit {
|
||||||
@ViewChild('avatarfileInput', { static: false }) avatarfileInput: ElementRef<HTMLInputElement>
|
@ViewChild('avatarfileInput') avatarfileInput: ElementRef<HTMLInputElement>
|
||||||
|
|
||||||
@Input() actor: VideoChannel | Account
|
@Input() actor: VideoChannel | Account
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
|
||||||
styleUrls: [ './video-channels.component.scss' ]
|
styleUrls: [ './video-channels.component.scss' ]
|
||||||
})
|
})
|
||||||
export class VideoChannelsComponent implements OnInit, OnDestroy {
|
export class VideoChannelsComponent implements OnInit, OnDestroy {
|
||||||
@ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent
|
@ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
|
||||||
|
|
||||||
videoChannel: VideoChannel
|
videoChannel: VideoChannel
|
||||||
hotkeys: Hotkey[]
|
hotkeys: Hotkey[]
|
||||||
|
|
|
@ -25,8 +25,8 @@ import { InstanceService } from '@app/shared/instance/instance.service'
|
||||||
styleUrls: [ './app.component.scss' ]
|
styleUrls: [ './app.component.scss' ]
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
@ViewChild('welcomeModal', { static: false }) welcomeModal: WelcomeModalComponent
|
@ViewChild('welcomeModal') welcomeModal: WelcomeModalComponent
|
||||||
@ViewChild('instanceConfigWarningModal', { static: false }) instanceConfigWarningModal: InstanceConfigWarningModalComponent
|
@ViewChild('instanceConfigWarningModal') instanceConfigWarningModal: InstanceConfigWarningModalComponent
|
||||||
|
|
||||||
isMenuDisplayed = true
|
isMenuDisplayed = true
|
||||||
isMenuChangedByUser = false
|
isMenuChangedByUser = false
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router'
|
import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router'
|
||||||
|
import { Injectable } from "@angular/core";
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
export class CustomReuseStrategy implements RouteReuseStrategy {
|
export class CustomReuseStrategy implements RouteReuseStrategy {
|
||||||
storedRouteHandles = new Map<string, DetachedRouteHandle>()
|
storedRouteHandles = new Map<string, DetachedRouteHandle>()
|
||||||
recentlyUsed: string
|
recentlyUsed: string
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import { Observable, timer as observableTimer, of as ofObservable } from 'rxjs'
|
import { Observable, timer as observableTimer, of as ofObservable } from 'rxjs'
|
||||||
import { switchMap } from 'rxjs/operators'
|
import { switchMap } from 'rxjs/operators'
|
||||||
import { PreloadingStrategy, Route } from '@angular/router'
|
import { PreloadingStrategy, Route } from '@angular/router'
|
||||||
|
import { Injectable } from "@angular/core";
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
export class PreloadSelectedModulesList implements PreloadingStrategy {
|
export class PreloadSelectedModulesList implements PreloadingStrategy {
|
||||||
preload (route: Route, load: Function): Observable<any> {
|
preload (route: Route, load: Function): Observable<any> {
|
||||||
if (!route.data || !route.data.preload) return ofObservable(null)
|
if (!route.data || !route.data.preload) return ofObservable(null)
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { ServerConfig } from '@shared/models'
|
||||||
templateUrl: './user-moderation-dropdown.component.html'
|
templateUrl: './user-moderation-dropdown.component.html'
|
||||||
})
|
})
|
||||||
export class UserModerationDropdownComponent implements OnInit, OnChanges {
|
export class UserModerationDropdownComponent implements OnInit, OnChanges {
|
||||||
@ViewChild('userBanModal', { static: false }) userBanModal: UserBanModalComponent
|
@ViewChild('userBanModal') userBanModal: UserBanModalComponent
|
||||||
|
|
||||||
@Input() user: User
|
@Input() user: User
|
||||||
@Input() account: Account
|
@Input() account: Account
|
||||||
|
|
|
@ -18,7 +18,7 @@ import { VideoPlaylistElement } from '@app/shared/video-playlist/video-playlist-
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
export class VideoPlaylistElementMiniatureComponent implements OnInit {
|
export class VideoPlaylistElementMiniatureComponent implements OnInit {
|
||||||
@ViewChild('moreDropdown', { static: false }) moreDropdown: NgbDropdown
|
@ViewChild('moreDropdown') moreDropdown: NgbDropdown
|
||||||
|
|
||||||
@Input() playlist: VideoPlaylist
|
@Input() playlist: VideoPlaylist
|
||||||
@Input() playlistElement: VideoPlaylistElement
|
@Input() playlistElement: VideoPlaylistElement
|
||||||
|
|
|
@ -32,12 +32,12 @@ export type VideoActionsDisplayType = {
|
||||||
styleUrls: [ './video-actions-dropdown.component.scss' ]
|
styleUrls: [ './video-actions-dropdown.component.scss' ]
|
||||||
})
|
})
|
||||||
export class VideoActionsDropdownComponent implements OnChanges {
|
export class VideoActionsDropdownComponent implements OnChanges {
|
||||||
@ViewChild('playlistDropdown', { static: false }) playlistDropdown: NgbDropdown
|
@ViewChild('playlistDropdown') playlistDropdown: NgbDropdown
|
||||||
@ViewChild('playlistAdd', { static: false }) playlistAdd: VideoAddToPlaylistComponent
|
@ViewChild('playlistAdd') playlistAdd: VideoAddToPlaylistComponent
|
||||||
|
|
||||||
@ViewChild('videoDownloadModal', { static: false }) videoDownloadModal: VideoDownloadComponent
|
@ViewChild('videoDownloadModal') videoDownloadModal: VideoDownloadComponent
|
||||||
@ViewChild('videoReportModal', { static: false }) videoReportModal: VideoReportComponent
|
@ViewChild('videoReportModal') videoReportModal: VideoReportComponent
|
||||||
@ViewChild('videoBlacklistModal', { static: false }) videoBlacklistModal: VideoBlacklistComponent
|
@ViewChild('videoBlacklistModal') videoBlacklistModal: VideoBlacklistComponent
|
||||||
|
|
||||||
@Input() video: Video | VideoDetails
|
@Input() video: Video | VideoDetails
|
||||||
@Input() videoCaptions: VideoCaption[] = []
|
@Input() videoCaptions: VideoCaption[] = []
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { scrollToTop } from '@app/shared/misc/utils'
|
||||||
export class VideoImportTorrentComponent extends VideoSend implements OnInit, CanComponentDeactivate {
|
export class VideoImportTorrentComponent extends VideoSend implements OnInit, CanComponentDeactivate {
|
||||||
@Output() firstStepDone = new EventEmitter<string>()
|
@Output() firstStepDone = new EventEmitter<string>()
|
||||||
@Output() firstStepError = new EventEmitter<void>()
|
@Output() firstStepError = new EventEmitter<void>()
|
||||||
@ViewChild('torrentfileInput', { static: false }) torrentfileInput: ElementRef<HTMLInputElement>
|
@ViewChild('torrentfileInput') torrentfileInput: ElementRef<HTMLInputElement>
|
||||||
|
|
||||||
magnetUri = ''
|
magnetUri = ''
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ import { scrollToTop } from '@app/shared/misc/utils'
|
||||||
export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy, CanComponentDeactivate {
|
export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy, CanComponentDeactivate {
|
||||||
@Output() firstStepDone = new EventEmitter<string>()
|
@Output() firstStepDone = new EventEmitter<string>()
|
||||||
@Output() firstStepError = new EventEmitter<void>()
|
@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
|
// So that it can be accessed in the template
|
||||||
readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY
|
readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY
|
||||||
|
|
|
@ -12,9 +12,9 @@ import { ServerConfig } from '@shared/models'
|
||||||
styleUrls: [ './video-add.component.scss' ]
|
styleUrls: [ './video-add.component.scss' ]
|
||||||
})
|
})
|
||||||
export class VideoAddComponent implements OnInit, CanComponentDeactivate {
|
export class VideoAddComponent implements OnInit, CanComponentDeactivate {
|
||||||
@ViewChild('videoUpload', { static: false }) videoUpload: VideoUploadComponent
|
@ViewChild('videoUpload') videoUpload: VideoUploadComponent
|
||||||
@ViewChild('videoImportUrl', { static: false }) videoImportUrl: VideoImportUrlComponent
|
@ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent
|
||||||
@ViewChild('videoImportTorrent', { static: false }) videoImportTorrent: VideoImportTorrentComponent
|
@ViewChild('videoImportTorrent') videoImportTorrent: VideoImportTorrentComponent
|
||||||
|
|
||||||
secondStepType: 'upload' | 'import-url' | 'import-torrent'
|
secondStepType: 'upload' | 'import-url' | 'import-torrent'
|
||||||
videoName: string
|
videoName: string
|
||||||
|
|
|
@ -20,7 +20,7 @@ import { HooksService } from '@app/core/plugins/hooks.service'
|
||||||
styleUrls: ['./video-comments.component.scss']
|
styleUrls: ['./video-comments.component.scss']
|
||||||
})
|
})
|
||||||
export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
|
export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
@ViewChild('commentHighlightBlock', { static: false }) commentHighlightBlock: ElementRef
|
@ViewChild('commentHighlightBlock') commentHighlightBlock: ElementRef
|
||||||
@Input() video: VideoDetails
|
@Input() video: VideoDetails
|
||||||
@Input() user: User
|
@Input() user: User
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern'
|
private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern'
|
||||||
|
|
||||||
@ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent
|
@ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent
|
||||||
@ViewChild('videoShareModal', { static: false }) videoShareModal: VideoShareComponent
|
@ViewChild('videoShareModal') videoShareModal: VideoShareComponent
|
||||||
@ViewChild('videoSupportModal', { static: false }) videoSupportModal: VideoSupportComponent
|
@ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent
|
||||||
@ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent
|
@ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
|
||||||
|
|
||||||
player: any
|
player: any
|
||||||
playerElement: HTMLVideoElement
|
playerElement: HTMLVideoElement
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
"/client/assets/images/favicon.png",
|
"/client/assets/images/favicon.png",
|
||||||
"/client/*.bundle.css",
|
"/client/*.bundle.css",
|
||||||
"/client/*.bundle.js",
|
"/client/*.bundle.js",
|
||||||
"/client/*.chunk.js"
|
"/client/*.chunk.js",
|
||||||
|
"/manifest.webmanifest"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
1942
client/yarn.lock
1942
client/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue