From b682782093a22a729eea8862476ff1c8aac4ef0c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 12 Dec 2017 11:59:28 +0100 Subject: Upgrade to angular 5 --- client/src/app/shared/account/account.model.ts | 2 +- client/src/assets/player/peertube-videojs-plugin.ts | 2 +- client/src/main.ts | 15 ++++++++------- client/src/polyfills.ts | 6 ++---- 4 files changed, 12 insertions(+), 13 deletions(-) (limited to 'client/src') diff --git a/client/src/app/shared/account/account.model.ts b/client/src/app/shared/account/account.model.ts index 9d1fd3e1d..3a29ec979 100644 --- a/client/src/app/shared/account/account.model.ts +++ b/client/src/app/shared/account/account.model.ts @@ -16,6 +16,6 @@ export class Account implements ServerAccount { static GET_ACCOUNT_AVATAR_PATH (account: Account) { if (account && account.avatar) return account.avatar.path - return environment.apiUrl + '/client/assets/images/default-avatar.png' + return '/client/assets/images/default-avatar.png' } } diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index 8b50e323e..d9dc2615b 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts @@ -2,7 +2,7 @@ import * as videojs from 'video.js' import * as WebTorrent from 'webtorrent' -import { VideoFile } from '../../../../shared' +import { VideoFile } from '../../../../shared/models/videos/video.model' import { renderVideo } from './video-renderer' diff --git a/client/src/main.ts b/client/src/main.ts index 91ec6da5f..f3825fe50 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -1,12 +1,13 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { enableProdMode } from '@angular/core' +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; +import { AppModule } from './app/app.module' +import { environment } from './environments/environment' if (environment.production) { - enableProdMode(); + enableProdMode() } -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.log(err)); +platformBrowserDynamic() + .bootstrapModule(AppModule) + .catch(err => console.log(err)) diff --git a/client/src/polyfills.ts b/client/src/polyfills.ts index d68672ffe..c2d7f1d6e 100644 --- a/client/src/polyfills.ts +++ b/client/src/polyfills.ts @@ -43,7 +43,7 @@ /** Evergreen browsers require these. **/ // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. -import 'core-js/es7/reflect'; +import 'core-js/es7/reflect' /** @@ -53,12 +53,10 @@ import 'core-js/es7/reflect'; // import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - +import 'zone.js/dist/zone' // Included with Angular CLI. /*************************************************************************************************** -- cgit v1.2.3