1
0
Fork 0

Update angular

This commit is contained in:
Chocobozzz 2019-07-24 16:05:59 +02:00
parent a353a4d77c
commit f36da21e40
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
45 changed files with 1317 additions and 850 deletions

12
client/browserslist Normal file
View File

@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.

View File

@ -31,21 +31,20 @@
"punycode": "^1.4.1" "punycode": "^1.4.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.13.1", "@angular-devkit/build-angular": "~0.801.2",
"@angular/animations": "~7.2.4", "@angular/animations": "~8.1.2",
"@angular/cdk": "^7.3.4", "@angular/cdk": "^8.1.1",
"@angular/cli": "~7.3.1", "@angular/cli": "~8.1.2",
"@angular/common": "~7.2.4", "@angular/common": "~8.1.2",
"@angular/compiler": "~7.2.4", "@angular/compiler": "~8.1.2",
"@angular/compiler-cli": "~7.2.4", "@angular/compiler-cli": "~8.1.2",
"@angular/core": "~7.2.4", "@angular/core": "~8.1.2",
"@angular/forms": "~7.2.4", "@angular/forms": "~8.1.2",
"@angular/http": "~7.2.4", "@angular/language-service": "~8.1.2",
"@angular/language-service": "~7.2.4", "@angular/platform-browser": "~8.1.2",
"@angular/platform-browser": "~7.2.4", "@angular/platform-browser-dynamic": "~8.1.2",
"@angular/platform-browser-dynamic": "~7.2.4", "@angular/router": "~8.1.2",
"@angular/router": "~7.2.4", "@angular/service-worker": "~8.1.2",
"@angular/service-worker": "~7.2.4",
"@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": "^4.0.0", "@ng-bootstrap/ng-bootstrap": "^4.0.0",
@ -69,10 +68,12 @@
"@types/video.js": "^7.2.5", "@types/video.js": "^7.2.5",
"@types/webtorrent": "^0.98.4", "@types/webtorrent": "^0.98.4",
"angular2-hotkeys": "^2.1.2", "angular2-hotkeys": "^2.1.2",
"angularx-qrcode": "^1.6.4",
"awesome-typescript-loader": "5.2.1", "awesome-typescript-loader": "5.2.1",
"bootstrap": "^4.1.3", "bootstrap": "^4.1.3",
"buffer": "^5.1.0", "buffer": "^5.1.0",
"cache-chunk-store": "^3.0.0", "cache-chunk-store": "^3.0.0",
"codelyzer": "^5.0.1",
"core-js": "^3.0.0", "core-js": "^3.0.0",
"css-loader": "^2.1.1", "css-loader": "^2.1.1",
"dexie": "^2.0.4", "dexie": "^2.0.4",
@ -97,7 +98,6 @@
"ngx-chips": "2.0.0-beta.0", "ngx-chips": "2.0.0-beta.0",
"ngx-clipboard": "12.0.0", "ngx-clipboard": "12.0.0",
"ngx-pipes": "^2.1.7", "ngx-pipes": "^2.1.7",
"ngx-qrcode2": "^0.0.9",
"node-sass": "^4.9.3", "node-sass": "^4.9.3",
"npm-font-source-sans-pro": "^1.0.2", "npm-font-source-sans-pro": "^1.0.2",
"p2p-media-loader-hlsjs": "^0.5.0", "p2p-media-loader-hlsjs": "^0.5.0",
@ -108,7 +108,7 @@
"purify-css": "^1.2.5", "purify-css": "^1.2.5",
"purifycss-webpack": "^0.7.0", "purifycss-webpack": "^0.7.0",
"raw-loader": "^1", "raw-loader": "^1",
"rxjs": "^6.3.3", "rxjs": "^6.5.2",
"sanitize-html": "^1.18.4", "sanitize-html": "^1.18.4",
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"sass-resources-loader": "^2.0.0", "sass-resources-loader": "^2.0.0",
@ -119,7 +119,7 @@
"tslint": "^5.7.0", "tslint": "^5.7.0",
"tslint-angular": "^1.1.2", "tslint-angular": "^1.1.2",
"tslint-config-standard": "^8.0.1", "tslint-config-standard": "^8.0.1",
"typescript": "3.2", "typescript": "3.4.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",
@ -129,6 +129,6 @@
"webpack-cli": "^3.0.8", "webpack-cli": "^3.0.8",
"webtorrent": "^0.103.1", "webtorrent": "^0.103.1",
"whatwg-fetch": "^3.0.0", "whatwg-fetch": "^3.0.0",
"zone.js": "~0.9.0" "zone.js": "~0.9.1"
} }
} }

View File

@ -11,7 +11,7 @@ import { MarkdownService } from '@app/shared/renderer'
styleUrls: [ './about-instance.component.scss' ] styleUrls: [ './about-instance.component.scss' ]
}) })
export class AboutInstanceComponent implements OnInit { export class AboutInstanceComponent implements OnInit {
@ViewChild('contactAdminModal') contactAdminModal: ContactAdminModalComponent @ViewChild('contactAdminModal', { static: true }) contactAdminModal: ContactAdminModalComponent
shortDescription = '' shortDescription = ''
descriptionHTML = '' descriptionHTML = ''

View File

@ -13,7 +13,7 @@ import { InstanceService } from '@app/shared/instance/instance.service'
styleUrls: [ './contact-admin-modal.component.scss' ] styleUrls: [ './contact-admin-modal.component.scss' ]
}) })
export class ContactAdminModalComponent extends FormReactive implements OnInit { export class ContactAdminModalComponent extends FormReactive implements OnInit {
@ViewChild('modal') modal: NgbModal @ViewChild('modal', { static: true }) modal: NgbModal
error: string error: string

View File

@ -13,7 +13,7 @@ import { VideoAbuse } from '../../../../../../shared/models/videos'
styleUrls: [ './moderation-comment-modal.component.scss' ] styleUrls: [ './moderation-comment-modal.component.scss' ]
}) })
export class ModerationCommentModalComponent extends FormReactive implements OnInit { export class ModerationCommentModalComponent extends FormReactive implements OnInit {
@ViewChild('modal') modal: NgbModal @ViewChild('modal', { static: true }) modal: NgbModal
@Output() commentUpdated = new EventEmitter<string>() @Output() commentUpdated = new EventEmitter<string>()
private abuseToComment: VideoAbuse private abuseToComment: VideoAbuse

View File

@ -17,7 +17,7 @@ import { MarkdownService } from '@app/shared/renderer'
styleUrls: [ '../moderation.component.scss'] styleUrls: [ '../moderation.component.scss']
}) })
export class VideoAbuseListComponent extends RestTable implements OnInit { export class VideoAbuseListComponent extends RestTable implements OnInit {
@ViewChild('moderationCommentModal') moderationCommentModal: ModerationCommentModalComponent @ViewChild('moderationCommentModal', { static: true }) moderationCommentModal: ModerationCommentModalComponent
videoAbuses: (VideoAbuse & { moderationCommentHtml?: string, reasonHtml?: string })[] = [] videoAbuses: (VideoAbuse & { moderationCommentHtml?: string, reasonHtml?: string })[] = []
totalRecords = 0 totalRecords = 0

View File

@ -10,7 +10,7 @@ import { LogLevel } from '@shared/models/server/log-level.type'
styleUrls: [ './logs.component.scss' ] styleUrls: [ './logs.component.scss' ]
}) })
export class LogsComponent implements OnInit { export class LogsComponent implements OnInit {
@ViewChild('logsElement') logsElement: ElementRef<HTMLElement> @ViewChild('logsElement', { static: true }) logsElement: ElementRef<HTMLElement>
loading = false loading = false

View File

@ -14,7 +14,7 @@ import { DropdownAction } from '@app/shared/buttons/action-dropdown.component'
styleUrls: [ './user-list.component.scss' ] styleUrls: [ './user-list.component.scss' ]
}) })
export class UserListComponent extends RestTable implements OnInit { export class UserListComponent extends RestTable implements OnInit {
@ViewChild('userBanModal') userBanModal: UserBanModalComponent @ViewChild('userBanModal', { static: true }) userBanModal: UserBanModalComponent
users: User[] = [] users: User[] = []
totalRecords = 0 totalRecords = 0

View File

@ -6,7 +6,7 @@ import { UserNotificationsComponent } from '@app/shared'
styleUrls: [ './my-account-notifications.component.scss' ] styleUrls: [ './my-account-notifications.component.scss' ]
}) })
export class MyAccountNotificationsComponent { export class MyAccountNotificationsComponent {
@ViewChild('userNotification') userNotification: UserNotificationsComponent @ViewChild('userNotification', { static: true }) userNotification: UserNotificationsComponent
markAllAsRead () { markAllAsRead () {
this.userNotification.markAllAsRead() this.userNotification.markAllAsRead()

View File

@ -18,7 +18,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
export class MyAccountAcceptOwnershipComponent extends FormReactive implements OnInit { export class MyAccountAcceptOwnershipComponent extends FormReactive implements OnInit {
@Output() accepted = new EventEmitter<void>() @Output() accepted = new EventEmitter<void>()
@ViewChild('modal') modal: ElementRef @ViewChild('modal', { static: true }) modal: ElementRef
videoChangeOwnership: VideoChangeOwnership | undefined = undefined videoChangeOwnership: VideoChangeOwnership | undefined = undefined

View File

@ -18,7 +18,7 @@ export class MyAccountOwnershipComponent extends RestTable implements OnInit {
sort: SortMeta = { field: 'createdAt', order: -1 } sort: SortMeta = { field: 'createdAt', order: -1 }
pagination: RestPagination = { count: this.rowsPerPage, start: 0 } pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
@ViewChild('myAccountAcceptOwnershipComponent') myAccountAcceptOwnershipComponent: MyAccountAcceptOwnershipComponent @ViewChild('myAccountAcceptOwnershipComponent', { static: true }) myAccountAcceptOwnershipComponent: MyAccountAcceptOwnershipComponent
constructor ( constructor (
private notifier: Notifier, private notifier: Notifier,

View File

@ -23,8 +23,8 @@ import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
styleUrls: [ './my-account-videos.component.scss' ] styleUrls: [ './my-account-videos.component.scss' ]
}) })
export class MyAccountVideosComponent implements DisableForReuseHook { export class MyAccountVideosComponent implements DisableForReuseHook {
@ViewChild('videosSelection') videosSelection: VideosSelectionComponent @ViewChild('videosSelection', { static: true }) videosSelection: VideosSelectionComponent
@ViewChild('videoChangeOwnershipModal') videoChangeOwnershipModal: VideoChangeOwnershipComponent @ViewChild('videoChangeOwnershipModal', { static: true }) videoChangeOwnershipModal: VideoChangeOwnershipComponent
titlePage: string titlePage: string
selection: SelectionType = {} selection: SelectionType = {}

View File

@ -13,7 +13,7 @@ import { VideoOwnershipService } from '@app/shared/video-ownership'
styleUrls: [ './video-change-ownership.component.scss' ] styleUrls: [ './video-change-ownership.component.scss' ]
}) })
export class VideoChangeOwnershipComponent extends FormReactive implements OnInit { export class VideoChangeOwnershipComponent extends FormReactive implements OnInit {
@ViewChild('modal') modal: ElementRef @ViewChild('modal', { static: true }) modal: ElementRef
usernamePropositions: string[] usernamePropositions: string[]

View File

@ -10,7 +10,7 @@ import { Notifier } from '@app/core'
styleUrls: [ './actor-avatar-info.component.scss' ] styleUrls: [ './actor-avatar-info.component.scss' ]
}) })
export class ActorAvatarInfoComponent { export class ActorAvatarInfoComponent {
@ViewChild('avatarfileInput') avatarfileInput: ElementRef<HTMLInputElement> @ViewChild('avatarfileInput', { static: false }) avatarfileInput: ElementRef<HTMLInputElement>
@Input() actor: VideoChannel | Account @Input() actor: VideoChannel | Account

View File

@ -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') subscribeButton: SubscribeButtonComponent @ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent
videoChannel: VideoChannel videoChannel: VideoChannel
hotkeys: Hotkey[] hotkeys: Hotkey[]

View File

@ -8,31 +8,31 @@ import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy'
const routes: Routes = [ const routes: Routes = [
{ {
path: 'admin', path: 'admin',
loadChildren: './+admin/admin.module#AdminModule' loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule)
}, },
{ {
path: 'my-account', path: 'my-account',
loadChildren: './+my-account/my-account.module#MyAccountModule' loadChildren: () => import('./+my-account/my-account.module').then(m => m.MyAccountModule)
}, },
{ {
path: 'verify-account', path: 'verify-account',
loadChildren: './+signup/+verify-account/verify-account.module#VerifyAccountModule' loadChildren: () => import('./+signup/+verify-account/verify-account.module').then(m => m.VerifyAccountModule)
}, },
{ {
path: 'accounts', path: 'accounts',
loadChildren: './+accounts/accounts.module#AccountsModule' loadChildren: () => import('./+accounts/accounts.module').then(m => m.AccountsModule)
}, },
{ {
path: 'video-channels', path: 'video-channels',
loadChildren: './+video-channels/video-channels.module#VideoChannelsModule' loadChildren: () => import('./+video-channels/video-channels.module').then(m => m.VideoChannelsModule)
}, },
{ {
path: 'about', path: 'about',
loadChildren: './+about/about.module#AboutModule' loadChildren: () => import('./+about/about.module').then(m => m.AboutModule)
}, },
{ {
path: 'signup', path: 'signup',
loadChildren: './+signup/+register/register.module#RegisterModule' loadChildren: () => import('./+signup/+register/register.module').then(m => m.RegisterModule)
}, },
{ {
path: '', path: '',
@ -40,7 +40,7 @@ const routes: Routes = [
}, },
{ {
path: '**', path: '**',
loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule' loadChildren: () => import('./+page-not-found/page-not-found.module').then(m => m.PageNotFoundModule)
} }
] ]

View File

@ -16,8 +16,8 @@ import { Router } from '@angular/router'
}) })
export class LoginComponent extends FormReactive implements OnInit { export class LoginComponent extends FormReactive implements OnInit {
@ViewChild('emailInput') input: ElementRef @ViewChild('emailInput', { static: true }) input: ElementRef
@ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef @ViewChild('forgotPasswordModal', { static: true }) forgotPasswordModal: ElementRef
error: string = null error: string = null
forgotPasswordEmail = '' forgotPasswordEmail = ''

View File

@ -13,7 +13,7 @@ import { filter } from 'rxjs/operators'
styleUrls: [ './avatar-notification.component.scss' ] styleUrls: [ './avatar-notification.component.scss' ]
}) })
export class AvatarNotificationComponent implements OnInit, OnDestroy { export class AvatarNotificationComponent implements OnInit, OnDestroy {
@ViewChild('popover') popover: NgbPopover @ViewChild('popover', { static: true }) popover: NgbPopover
@Input() user: User @Input() user: User
unreadNotifications = 0 unreadNotifications = 0

View File

@ -9,7 +9,7 @@ import { sortBy } from '@app/shared/misc/utils'
styleUrls: [ './language-chooser.component.scss' ] styleUrls: [ './language-chooser.component.scss' ]
}) })
export class LanguageChooserComponent { export class LanguageChooserComponent {
@ViewChild('modal') modal: ElementRef @ViewChild('modal', { static: true }) modal: ElementRef
languages: { id: string, label: string }[] = [] languages: { id: string, label: string }[] = []

View File

@ -11,7 +11,7 @@ import { HotkeysService } from 'angular2-hotkeys'
styleUrls: [ './menu.component.scss' ] styleUrls: [ './menu.component.scss' ]
}) })
export class MenuComponent implements OnInit { export class MenuComponent implements OnInit {
@ViewChild('languageChooserModal') languageChooserModal: LanguageChooserComponent @ViewChild('languageChooserModal', { static: true }) languageChooserModal: LanguageChooserComponent
user: User user: User
isLoggedIn: boolean isLoggedIn: boolean

View File

@ -10,7 +10,7 @@ import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
styleUrls: [ './confirm.component.scss' ] styleUrls: [ './confirm.component.scss' ]
}) })
export class ConfirmComponent implements OnInit { export class ConfirmComponent implements OnInit {
@ViewChild('confirmModal') confirmModal: ElementRef @ViewChild('confirmModal', { static: true }) confirmModal: ElementRef
title = '' title = ''
message = '' message = ''

View File

@ -14,7 +14,7 @@ import { User } from '../../../../../shared'
styleUrls: [ './user-ban-modal.component.scss' ] styleUrls: [ './user-ban-modal.component.scss' ]
}) })
export class UserBanModalComponent extends FormReactive implements OnInit { export class UserBanModalComponent extends FormReactive implements OnInit {
@ViewChild('modal') modal: NgbModal @ViewChild('modal', { static: true }) modal: NgbModal
@Output() userBanned = new EventEmitter<User | User[]>() @Output() userBanned = new EventEmitter<User | User[]>()
private usersToBan: User | User[] private usersToBan: User | User[]

View File

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

View File

@ -17,7 +17,7 @@ import { secondsToTime } from '../../../assets/player/utils'
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class VideoPlaylistElementMiniatureComponent { export class VideoPlaylistElementMiniatureComponent {
@ViewChild('moreDropdown') moreDropdown: NgbDropdown @ViewChild('moreDropdown', { static: false }) moreDropdown: NgbDropdown
@Input() playlist: VideoPlaylist @Input() playlist: VideoPlaylist
@Input() video: Video @Input() video: Video

View File

@ -16,7 +16,7 @@ import { FormReactive, VideoBlacklistValidatorsService } from '@app/shared/forms
export class VideoBlacklistComponent extends FormReactive implements OnInit { export class VideoBlacklistComponent extends FormReactive implements OnInit {
@Input() video: VideoDetails = null @Input() video: VideoDetails = null
@ViewChild('modal') modal: NgbModal @ViewChild('modal', { static: true }) modal: NgbModal
@Output() videoBlacklisted = new EventEmitter() @Output() videoBlacklisted = new EventEmitter()

View File

@ -10,7 +10,7 @@ import { Notifier } from '@app/core'
styleUrls: [ './video-download.component.scss' ] styleUrls: [ './video-download.component.scss' ]
}) })
export class VideoDownloadComponent { export class VideoDownloadComponent {
@ViewChild('modal') modal: ElementRef @ViewChild('modal', { static: true }) modal: ElementRef
downloadType: 'direct' | 'torrent' = 'torrent' downloadType: 'direct' | 'torrent' = 'torrent'
resolutionId: number | string = -1 resolutionId: number | string = -1

View File

@ -17,7 +17,7 @@ import { VideoAbuseService } from '@app/shared/video-abuse'
export class VideoReportComponent extends FormReactive implements OnInit { export class VideoReportComponent extends FormReactive implements OnInit {
@Input() video: VideoDetails = null @Input() video: VideoDetails = null
@ViewChild('modal') modal: NgbModal @ViewChild('modal', { static: true }) modal: NgbModal
error: string = null error: string = null

View File

@ -29,12 +29,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') playlistDropdown: NgbDropdown @ViewChild('playlistDropdown', { static: false }) playlistDropdown: NgbDropdown
@ViewChild('playlistAdd') playlistAdd: VideoAddToPlaylistComponent @ViewChild('playlistAdd', { static: false }) playlistAdd: VideoAddToPlaylistComponent
@ViewChild('videoDownloadModal') videoDownloadModal: VideoDownloadComponent @ViewChild('videoDownloadModal', { static: false }) videoDownloadModal: VideoDownloadComponent
@ViewChild('videoReportModal') videoReportModal: VideoReportComponent @ViewChild('videoReportModal', { static: false }) videoReportModal: VideoReportComponent
@ViewChild('videoBlacklistModal') videoBlacklistModal: VideoBlacklistComponent @ViewChild('videoBlacklistModal', { static: false }) videoBlacklistModal: VideoBlacklistComponent
@Input() video: Video | VideoDetails @Input() video: Video | VideoDetails

View File

@ -18,7 +18,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
@Output() captionAdded = new EventEmitter<VideoCaptionEdit>() @Output() captionAdded = new EventEmitter<VideoCaptionEdit>()
@ViewChild('modal') modal: ElementRef @ViewChild('modal', { static: true }) modal: ElementRef
videoCaptionLanguages: VideoConstant<string>[] = [] videoCaptionLanguages: VideoConstant<string>[] = []

View File

@ -29,7 +29,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
@Input() videoCaptions: (VideoCaptionEdit & { captionPath?: string })[] = [] @Input() videoCaptions: (VideoCaptionEdit & { captionPath?: string })[] = []
@Input() waitTranscodingEnabled = true @Input() waitTranscodingEnabled = true
@ViewChild('videoCaptionAddModal') videoCaptionAddModal: VideoCaptionAddModalComponent @ViewChild('videoCaptionAddModal', { static: true }) videoCaptionAddModal: VideoCaptionAddModalComponent
// 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

View File

@ -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') torrentfileInput: ElementRef<HTMLInputElement> @ViewChild('torrentfileInput', { static: false }) torrentfileInput: ElementRef<HTMLInputElement>
magnetUri = '' magnetUri = ''

View File

@ -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') videofileInput: ElementRef<HTMLInputElement> @ViewChild('videofileInput', { static: false }) 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

View File

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

View File

@ -27,8 +27,8 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
@Output() commentCreated = new EventEmitter<VideoCommentCreate>() @Output() commentCreated = new EventEmitter<VideoCommentCreate>()
@ViewChild('visitorModal') visitorModal: NgbModal @ViewChild('visitorModal', { static: true }) visitorModal: NgbModal
@ViewChild('textarea') textareaElement: ElementRef @ViewChild('textarea', { static: true }) textareaElement: ElementRef
addingComment = false addingComment = false

View File

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

View File

@ -27,7 +27,7 @@
<ngb-tab i18n-title title="QR-Code" id="qrcode"> <ngb-tab i18n-title title="QR-Code" id="qrcode">
<ng-template ngbTabContent> <ng-template ngbTabContent>
<div class="tab-content"> <div class="tab-content">
<ngx-qrcode qrc-element-type="url" [qrc-value]="getVideoUrl()" qrc-errorCorrectionLevel="Q"></ngx-qrcode> <qrcode [qrdata]="getVideoUrl()" size="256" level="Q"></qrcode>
</div> </div>
</ng-template> </ng-template>
</ngb-tab> </ngb-tab>

View File

@ -30,7 +30,7 @@ type Customizations = {
styleUrls: [ './video-share.component.scss' ] styleUrls: [ './video-share.component.scss' ]
}) })
export class VideoShareComponent { export class VideoShareComponent {
@ViewChild('modal') modal: ElementRef @ViewChild('modal', { static: true }) modal: ElementRef
@Input() video: VideoDetails = null @Input() video: VideoDetails = null
@Input() videoCaptions: VideoCaption[] = [] @Input() videoCaptions: VideoCaption[] = []

View File

@ -11,7 +11,7 @@ import { MarkdownService } from '@app/shared/renderer'
export class VideoSupportComponent { export class VideoSupportComponent {
@Input() video: VideoDetails = null @Input() video: VideoDetails = null
@ViewChild('modal') modal: NgbModal @ViewChild('modal', { static: true }) modal: NgbModal
videoHTMLSupport = '' videoHTMLSupport = ''

View File

@ -43,10 +43,10 @@ import { HooksService } from '@app/core/plugins/hooks.service'
export class VideoWatchComponent implements OnInit, OnDestroy { 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') videoWatchPlaylist: VideoWatchPlaylistComponent @ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent
@ViewChild('videoShareModal') videoShareModal: VideoShareComponent @ViewChild('videoShareModal', { static: false }) videoShareModal: VideoShareComponent
@ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent @ViewChild('videoSupportModal', { static: false }) videoSupportModal: VideoSupportComponent
@ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent @ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent
player: any player: any
playerElement: HTMLVideoElement playerElement: HTMLVideoElement

View File

@ -8,17 +8,17 @@ import { VideoCommentsComponent } from './comment/video-comments.component'
import { VideoShareComponent } from './modal/video-share.component' import { VideoShareComponent } from './modal/video-share.component'
import { VideoWatchRoutingModule } from './video-watch-routing.module' import { VideoWatchRoutingModule } from './video-watch-routing.module'
import { VideoWatchComponent } from './video-watch.component' import { VideoWatchComponent } from './video-watch.component'
import { NgxQRCodeModule } from 'ngx-qrcode2'
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap' import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'
import { RecommendationsModule } from '@app/videos/recommendations/recommendations.module' import { RecommendationsModule } from '@app/videos/recommendations/recommendations.module'
import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component' import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component'
import { QRCodeModule } from 'angularx-qrcode'
@NgModule({ @NgModule({
imports: [ imports: [
VideoWatchRoutingModule, VideoWatchRoutingModule,
SharedModule, SharedModule,
NgbTooltipModule, NgbTooltipModule,
NgxQRCodeModule, QRCodeModule,
RecommendationsModule RecommendationsModule
], ],

View File

@ -77,7 +77,7 @@ const videosRoutes: Routes = [
}, },
{ {
path: 'upload', 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: { data: {
meta: { meta: {
title: 'Upload a video' title: 'Upload a video'
@ -86,7 +86,7 @@ const videosRoutes: Routes = [
}, },
{ {
path: 'update/:uuid', 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: { data: {
meta: { meta: {
title: 'Edit a video' title: 'Edit a video'
@ -95,7 +95,7 @@ const videosRoutes: Routes = [
}, },
{ {
path: 'watch', 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: { data: {
preload: 3000 preload: 3000
} }

View File

@ -11,32 +11,13 @@
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
* *
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html * Learn more in https://angular.io/guide/browser-support
*/ */
/*************************************************************************************************** /***************************************************************************************************
* BROWSER POLYFILLS * BROWSER POLYFILLS
*/ */
/**
* IE9, IE10 and IE11 requires all of the following polyfills.
*/
// For Google Bot
import 'core-js/es6/symbol'
import 'core-js/es6/object'
import 'core-js/es6/function'
import 'core-js/es6/parse-int'
import 'core-js/es6/parse-float'
import 'core-js/es6/number'
import 'core-js/es6/math'
import 'core-js/es6/string'
import 'core-js/es6/date'
import 'core-js/es6/array'
import 'core-js/es6/regexp'
import 'core-js/es6/map'
import 'core-js/es6/weak-map'
import 'core-js/es6/set'
import 'core-js/es7/object' import 'core-js/es7/object'
/** IE10 and IE11 requires the following for NgClass support on SVG elements */ /** IE10 and IE11 requires the following for NgClass support on SVG elements */

View File

@ -3,7 +3,6 @@
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app", "outDir": "../out-tsc/app",
"baseUrl": "./", "baseUrl": "./",
"module": "esnext",
"types": [], "types": [],
"lib": [ "lib": [
"es2017", "es2017",

View File

@ -1,6 +1,7 @@
{ {
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"downlevelIteration": true,
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
@ -13,7 +14,7 @@
"suppressImplicitAnyIndexErrors":true, "suppressImplicitAnyIndexErrors":true,
"alwaysStrict": true, "alwaysStrict": true,
"strictBindCallApply": true, "strictBindCallApply": true,
"target": "es5", "target": "es2015",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],

File diff suppressed because it is too large Load Diff