aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-11 17:36:46 +0100
committerChocobozzz <me@florianbigard.com>2017-12-12 10:58:16 +0100
commit63c4db6d71b98523753c51747e308682d9a2e8a0 (patch)
treed26c0d092ce016f2afe56bf71b08ca4698fe673f /client/src
parent908f6e5e38e85cc0debab0051b7fa34b13025f96 (diff)
downloadPeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.tar.gz
PeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.tar.zst
PeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.zip
Move to angular cli
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+admin/follows/following-add/following-add.component.scss4
-rw-r--r--client/src/app/+admin/follows/shared/follow.service.ts13
-rw-r--r--client/src/app/+admin/index.ts1
-rw-r--r--client/src/app/+admin/jobs/job.routes.ts5
-rw-r--r--client/src/app/+admin/jobs/shared/job.service.ts4
-rw-r--r--client/src/app/+admin/users/shared/user.service.ts3
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.component.scss3
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.scss19
-rw-r--r--client/src/app/account/account-settings/account-change-password/account-change-password.component.scss3
-rw-r--r--client/src/app/account/account-settings/account-details/account-details.component.scss3
-rw-r--r--client/src/app/account/account-settings/account-settings.component.scss3
-rw-r--r--client/src/app/account/account-videos/account-videos.component.scss3
-rw-r--r--client/src/app/account/account.module.ts1
-rw-r--r--client/src/app/app-routing.module.ts2
-rw-r--r--client/src/app/app.component.scss3
-rw-r--r--client/src/app/app.module.ts84
-rw-r--r--client/src/app/app.resolver.ts20
-rw-r--r--client/src/app/app.service.ts48
-rw-r--r--client/src/app/core/auth/auth.service.ts10
-rw-r--r--client/src/app/core/core.module.ts1
-rw-r--r--client/src/app/core/server/server.service.ts6
-rw-r--r--client/src/app/environment.ts77
-rw-r--r--client/src/app/header/header.component.scss3
-rw-r--r--client/src/app/login/login.component.scss3
-rw-r--r--client/src/app/menu/menu.component.scss3
-rw-r--r--client/src/app/shared/account/account.model.ts3
-rw-r--r--client/src/app/shared/forms/form-validators/host.ts (renamed from client/src/app/shared/forms/form-validators/host.validator.ts)0
-rw-r--r--client/src/app/shared/forms/form-validators/index.ts2
-rw-r--r--client/src/app/shared/forms/form-validators/validator-message.ts5
-rw-r--r--client/src/app/shared/forms/form-validators/video.ts6
-rw-r--r--client/src/app/shared/misc/button.component.scss3
-rw-r--r--client/src/app/shared/users/user.service.ts8
-rw-r--r--client/src/app/shared/video-abuse/video-abuse.service.ts12
-rw-r--r--client/src/app/shared/video-blacklist/video-blacklist.service.ts13
-rw-r--r--client/src/app/shared/video/video-miniature.component.scss3
-rw-r--r--client/src/app/shared/video/video-thumbnail.component.scss3
-rw-r--r--client/src/app/shared/video/video.model.ts5
-rw-r--r--client/src/app/shared/video/video.service.ts6
-rw-r--r--client/src/app/signup/signup.component.scss3
-rw-r--r--client/src/app/videos/+video-edit/index.ts2
-rw-r--r--client/src/app/videos/+video-edit/shared/video-description.component.scss3
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.scss3
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts9
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.scss3
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.ts5
-rw-r--r--client/src/app/videos/+video-edit/video-update.component.ts6
-rw-r--r--client/src/app/videos/+video-watch/index.ts1
-rw-r--r--client/src/app/videos/+video-watch/video-download.component.scss3
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.scss3
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts4
-rw-r--r--client/src/app/videos/videos-routing.module.ts6
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts4
-rw-r--r--client/src/custom-typings.d.ts134
-rw-r--r--client/src/environments/environment.prod.ts4
-rw-r--r--client/src/environments/environment.ts9
-rw-r--r--client/src/index.html6
-rw-r--r--client/src/main.browser.aot.ts35
-rw-r--r--client/src/main.browser.ts45
-rw-r--r--client/src/main.ts12
-rw-r--r--client/src/polyfills.browser.ts38
-rw-r--r--client/src/polyfills.ts66
-rw-r--r--client/src/sass/application.scss11
-rw-r--r--client/src/sass/include/_mixins.scss (renamed from client/src/sass/_mixins.scss)2
-rw-r--r--client/src/sass/include/_variables.scss (renamed from client/src/sass/_variables.scss)0
-rw-r--r--client/src/sass/pre-customizations.scss877
-rw-r--r--client/src/standalone/videos/embed.ts2
-rw-r--r--client/src/tsconfig.app.json13
-rw-r--r--client/src/typings.d.ts5
68 files changed, 257 insertions, 1451 deletions
diff --git a/client/src/app/+admin/follows/following-add/following-add.component.scss b/client/src/app/+admin/follows/following-add/following-add.component.scss
index 2cb3efe28..7594b502c 100644
--- a/client/src/app/+admin/follows/following-add/following-add.component.scss
+++ b/client/src/app/+admin/follows/following-add/following-add.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1textarea { 4textarea {
2 height: 250px; 5 height: 250px;
3} 6}
@@ -6,4 +9,3 @@ input[type=submit] {
6 @include peertube-button; 9 @include peertube-button;
7 @include orange-button; 10 @include orange-button;
8} 11}
9
diff --git a/client/src/app/+admin/follows/shared/follow.service.ts b/client/src/app/+admin/follows/shared/follow.service.ts
index 0bfbe8eb6..3a430ff64 100644
--- a/client/src/app/+admin/follows/shared/follow.service.ts
+++ b/client/src/app/+admin/follows/shared/follow.service.ts
@@ -1,17 +1,16 @@
1import { Injectable } from '@angular/core'
2import { HttpClient, HttpParams } from '@angular/common/http' 1import { HttpClient, HttpParams } from '@angular/common/http'
3import { Observable } from 'rxjs/Observable' 2import { Injectable } from '@angular/core'
3import { SortMeta } from 'primeng/primeng'
4import 'rxjs/add/operator/catch' 4import 'rxjs/add/operator/catch'
5import 'rxjs/add/operator/map' 5import 'rxjs/add/operator/map'
6 6import { Observable } from 'rxjs/Observable'
7import { SortMeta } from 'primeng/primeng'
8
9import { RestExtractor, RestPagination, RestService } from '../../../shared'
10import { AccountFollow, ResultList } from '../../../../../../shared' 7import { AccountFollow, ResultList } from '../../../../../../shared'
8import { environment } from '../../../../environments/environment'
9import { RestExtractor, RestPagination, RestService } from '../../../shared'
11 10
12@Injectable() 11@Injectable()
13export class FollowService { 12export class FollowService {
14 private static BASE_APPLICATION_URL = API_URL + '/api/v1/server' 13 private static BASE_APPLICATION_URL = environment.apiUrl + '/api/v1/server'
15 14
16 constructor ( 15 constructor (
17 private authHttp: HttpClient, 16 private authHttp: HttpClient,
diff --git a/client/src/app/+admin/index.ts b/client/src/app/+admin/index.ts
deleted file mode 100644
index b628a3662..000000000
--- a/client/src/app/+admin/index.ts
+++ /dev/null
@@ -1 +0,0 @@
1export * from './admin.module'
diff --git a/client/src/app/+admin/jobs/job.routes.ts b/client/src/app/+admin/jobs/job.routes.ts
index a7bf2b221..331dc2af2 100644
--- a/client/src/app/+admin/jobs/job.routes.ts
+++ b/client/src/app/+admin/jobs/job.routes.ts
@@ -1,9 +1,6 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2
3import { UserRightGuard } from '../../core'
4import { FollowingAddComponent } from './following-add'
5import { UserRight } from '../../../../../shared' 2import { UserRight } from '../../../../../shared'
6import { FollowingListComponent } from './following-list/following-list.component' 3import { UserRightGuard } from '../../core'
7import { JobsComponent } from './job.component' 4import { JobsComponent } from './job.component'
8import { JobsListComponent } from './jobs-list/jobs-list.component' 5import { JobsListComponent } from './jobs-list/jobs-list.component'
9 6
diff --git a/client/src/app/+admin/jobs/shared/job.service.ts b/client/src/app/+admin/jobs/shared/job.service.ts
index 0cfbdbbea..61ee16077 100644
--- a/client/src/app/+admin/jobs/shared/job.service.ts
+++ b/client/src/app/+admin/jobs/shared/job.service.ts
@@ -6,12 +6,12 @@ import 'rxjs/add/operator/map'
6import { Observable } from 'rxjs/Observable' 6import { Observable } from 'rxjs/Observable'
7import { ResultList } from '../../../../../../shared' 7import { ResultList } from '../../../../../../shared'
8import { Job } from '../../../../../../shared/models/job.model' 8import { Job } from '../../../../../../shared/models/job.model'
9 9import { environment } from '../../../../environments/environment'
10import { RestExtractor, RestPagination, RestService } from '../../../shared' 10import { RestExtractor, RestPagination, RestService } from '../../../shared'
11 11
12@Injectable() 12@Injectable()
13export class JobService { 13export class JobService {
14 private static BASE_JOB_URL = API_URL + '/api/v1/jobs' 14 private static BASE_JOB_URL = environment.apiUrl + '/api/v1/jobs'
15 15
16 constructor ( 16 constructor (
17 private authHttp: HttpClient, 17 private authHttp: HttpClient,
diff --git a/client/src/app/+admin/users/shared/user.service.ts b/client/src/app/+admin/users/shared/user.service.ts
index dc77cc1d8..6536546fb 100644
--- a/client/src/app/+admin/users/shared/user.service.ts
+++ b/client/src/app/+admin/users/shared/user.service.ts
@@ -6,11 +6,12 @@ import 'rxjs/add/operator/catch'
6import 'rxjs/add/operator/map' 6import 'rxjs/add/operator/map'
7import { Observable } from 'rxjs/Observable' 7import { Observable } from 'rxjs/Observable'
8import { ResultList, UserCreate, UserUpdate } from '../../../../../../shared' 8import { ResultList, UserCreate, UserUpdate } from '../../../../../../shared'
9import { environment } from '../../../../environments/environment'
9import { RestExtractor, RestPagination, RestService, User } from '../../../shared' 10import { RestExtractor, RestPagination, RestService, User } from '../../../shared'
10 11
11@Injectable() 12@Injectable()
12export class UserService { 13export class UserService {
13 private static BASE_USERS_URL = API_URL + '/api/v1/users/' 14 private static BASE_USERS_URL = environment.apiUrl + '/api/v1/users/'
14 private bytesPipe = new BytesPipe() 15 private bytesPipe = new BytesPipe()
15 16
16 constructor ( 17 constructor (
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.scss b/client/src/app/+admin/users/user-edit/user-edit.component.scss
index 68d270c19..1bb1c5f0f 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.component.scss
+++ b/client/src/app/+admin/users/user-edit/user-edit.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.admin-sub-title { 4.admin-sub-title {
2 margin-bottom: 30px; 5 margin-bottom: 30px;
3} 6}
diff --git a/client/src/app/+admin/users/user-list/user-list.component.scss b/client/src/app/+admin/users/user-list/user-list.component.scss
index 8b22f67ff..72d31a0cc 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.scss
+++ b/client/src/app/+admin/users/user-list/user-list.component.scss
@@ -1,11 +1,14 @@
1 .add-button { 1@import '_variables';
2 @include peertube-button-link; 2@import '_mixins';
3 @include orange-button;
4 3
5 .icon.icon-add { 4.add-button {
6 @include icon(22px); 5 @include peertube-button-link;
6 @include orange-button;
7 7
8 margin-right: 3px; 8 .icon.icon-add {
9 background-image: url('../../../../assets/images/admin/add.svg'); 9 @include icon(22px);
10 } 10
11 margin-right: 3px;
12 background-image: url('../../../../assets/images/admin/add.svg');
11 } 13 }
14}
diff --git a/client/src/app/account/account-settings/account-change-password/account-change-password.component.scss b/client/src/app/account/account-settings/account-change-password/account-change-password.component.scss
index 7a4fdb34d..f8279ffd3 100644
--- a/client/src/app/account/account-settings/account-change-password/account-change-password.component.scss
+++ b/client/src/app/account/account-settings/account-change-password/account-change-password.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1input[type=password] { 4input[type=password] {
2 @include peertube-input-text(340px); 5 @include peertube-input-text(340px);
3 display: block; 6 display: block;
diff --git a/client/src/app/account/account-settings/account-details/account-details.component.scss b/client/src/app/account/account-settings/account-details/account-details.component.scss
index 5c369f968..1bdb19a38 100644
--- a/client/src/app/account/account-settings/account-details/account-details.component.scss
+++ b/client/src/app/account/account-settings/account-details/account-details.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1label { 4label {
2 font-size: 15px; 5 font-size: 15px;
3 font-weight: $font-regular; 6 font-weight: $font-regular;
diff --git a/client/src/app/account/account-settings/account-settings.component.scss b/client/src/app/account/account-settings/account-settings.component.scss
index f514809b0..7f1ade377 100644
--- a/client/src/app/account/account-settings/account-settings.component.scss
+++ b/client/src/app/account/account-settings/account-settings.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.user { 4.user {
2 display: flex; 5 display: flex;
3 6
diff --git a/client/src/app/account/account-videos/account-videos.component.scss b/client/src/app/account/account-videos/account-videos.component.scss
index 5459014a6..28b298c3d 100644
--- a/client/src/app/account/account-videos/account-videos.component.scss
+++ b/client/src/app/account/account-videos/account-videos.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.action-selection-mode { 4.action-selection-mode {
2 width: 174px; 5 width: 174px;
3 display: flex; 6 display: flex;
diff --git a/client/src/app/account/account.module.ts b/client/src/app/account/account.module.ts
index 020199e23..2299c1919 100644
--- a/client/src/app/account/account.module.ts
+++ b/client/src/app/account/account.module.ts
@@ -5,7 +5,6 @@ import { AccountChangePasswordComponent } from './account-settings/account-chang
5import { AccountDetailsComponent } from './account-settings/account-details/account-details.component' 5import { AccountDetailsComponent } from './account-settings/account-details/account-details.component'
6import { AccountSettingsComponent } from './account-settings/account-settings.component' 6import { AccountSettingsComponent } from './account-settings/account-settings.component'
7import { AccountComponent } from './account.component' 7import { AccountComponent } from './account.component'
8import { AccountService } from './account.service'
9import { AccountVideosComponent } from './account-videos/account-videos.component' 8import { AccountVideosComponent } from './account-videos/account-videos.component'
10 9
11@NgModule({ 10@NgModule({
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts
index fe72c9181..f31b51e23 100644
--- a/client/src/app/app-routing.module.ts
+++ b/client/src/app/app-routing.module.ts
@@ -11,7 +11,7 @@ const routes: Routes = [
11 }, 11 },
12 { 12 {
13 path: 'admin', 13 path: 'admin',
14 loadChildren: './+admin#AdminModule' 14 loadChildren: './+admin/admin.module#AdminModule'
15 } 15 }
16] 16]
17 17
diff --git a/client/src/app/app.component.scss b/client/src/app/app.component.scss
index c0ec2025d..2aadb1c97 100644
--- a/client/src/app/app.component.scss
+++ b/client/src/app/app.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.main-row { 4.main-row {
2 min-height: calc(100vh - #{$header-height} - #{$footer-height} - #{$footer-margin}); 5 min-height: calc(100vh - #{$header-height} - #{$footer-height} - #{$footer-margin});
3} 6}
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts
index 1326e3411..e69edbc4b 100644
--- a/client/src/app/app.module.ts
+++ b/client/src/app/app.module.ts
@@ -1,18 +1,10 @@
1import { ApplicationRef, NgModule } from '@angular/core' 1import { NgModule } from '@angular/core'
2import { BrowserModule } from '@angular/platform-browser' 2import { BrowserModule } from '@angular/platform-browser'
3import {
4 removeNgStyles,
5 createNewHosts,
6 createInputTransfer
7} from '@angularclass/hmr'
8 3
9import { MetaModule, MetaLoader, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' 4import { MetaModule, MetaLoader, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
10import 'bootstrap-loader'
11 5
12import { ENV_PROVIDERS } from './environment'
13import { AppRoutingModule } from './app-routing.module' 6import { AppRoutingModule } from './app-routing.module'
14import { AppComponent } from './app.component' 7import { AppComponent } from './app.component'
15import { AppState, InternalStateType } from './app.service'
16 8
17import { AccountModule } from './account' 9import { AccountModule } from './account'
18import { CoreModule } from './core' 10import { CoreModule } from './core'
@@ -35,17 +27,6 @@ export function metaFactory (): MetaLoader {
35 }) 27 })
36} 28}
37 29
38type StoreType = {
39 state: InternalStateType,
40 restoreInputValues: () => void,
41 disposeOldHosts: () => void
42}
43
44// Application wide providers
45const APP_PROVIDERS = [
46 AppState
47]
48
49@NgModule({ 30@NgModule({
50 bootstrap: [ AppComponent ], 31 bootstrap: [ AppComponent ],
51 declarations: [ 32 declarations: [
@@ -74,65 +55,6 @@ const APP_PROVIDERS = [
74 useFactory: (metaFactory) 55 useFactory: (metaFactory)
75 }) 56 })
76 ], 57 ],
77 providers: [ // expose our Services and Providers into Angular's dependency injection 58 providers: [ ]
78 ENV_PROVIDERS,
79 APP_PROVIDERS
80 ]
81}) 59})
82export class AppModule { 60export class AppModule {}
83 constructor (
84 public appRef: ApplicationRef,
85 public appState: AppState
86 ) {}
87
88 public hmrOnInit (store: StoreType) {
89 if (!store || !store.state) {
90 return
91 }
92 console.log('HMR store', JSON.stringify(store, null, 2))
93 /**
94 * Set state
95 */
96 this.appState._state = store.state
97 /**
98 * Set input values
99 */
100 if ('restoreInputValues' in store) {
101 let restoreInputValues = store.restoreInputValues
102 setTimeout(restoreInputValues)
103 }
104
105 this.appRef.tick()
106 delete store.state
107 delete store.restoreInputValues
108 }
109
110 public hmrOnDestroy (store: StoreType) {
111 const cmpLocation = this.appRef.components.map((cmp) => cmp.location.nativeElement)
112 /**
113 * Save state
114 */
115 const state = this.appState._state
116 store.state = state
117 /**
118 * Recreate root elements
119 */
120 store.disposeOldHosts = createNewHosts(cmpLocation)
121 /**
122 * Save input values
123 */
124 store.restoreInputValues = createInputTransfer()
125 /**
126 * Remove styles
127 */
128 removeNgStyles()
129 }
130
131 public hmrAfterDestroy (store: StoreType) {
132 /**
133 * Display new elements
134 */
135 store.disposeOldHosts()
136 delete store.disposeOldHosts
137 }
138}
diff --git a/client/src/app/app.resolver.ts b/client/src/app/app.resolver.ts
deleted file mode 100644
index bc054e90b..000000000
--- a/client/src/app/app.resolver.ts
+++ /dev/null
@@ -1,20 +0,0 @@
1/* tslint:disable */
2
3import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
4import { Injectable } from '@angular/core'
5import { Observable } from 'rxjs/Observable'
6import 'rxjs/add/observable/of'
7
8@Injectable()
9export class DataResolver implements Resolve<any> {
10 public resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
11 return Observable.of({ res: 'I am data'})
12 }
13}
14
15/**
16 * An array of services to resolve routes with data.
17 */
18export const APP_RESOLVER_PROVIDERS = [
19 DataResolver
20]
diff --git a/client/src/app/app.service.ts b/client/src/app/app.service.ts
deleted file mode 100644
index abffc87f1..000000000
--- a/client/src/app/app.service.ts
+++ /dev/null
@@ -1,48 +0,0 @@
1/* tslint:disable */
2
3import { Injectable } from '@angular/core'
4
5export type InternalStateType = {
6 [key: string]: any
7}
8
9@Injectable()
10export class AppState {
11
12 public _state: InternalStateType = { }
13
14 /**
15 * Already return a clone of the current state.
16 */
17 public get state() {
18 return this._state = this._clone(this._state)
19 }
20 /**
21 * Never allow mutation
22 */
23 public set state(value) {
24 throw new Error('do not mutate the `.state` directly')
25 }
26
27 public get(prop?: any) {
28 /**
29 * Use our state getter for the clone.
30 */
31 const state = this.state
32 return state.hasOwnProperty(prop) ? state[prop] : state
33 }
34
35 public set(prop: string, value: any) {
36 /**
37 * Internally mutate our state.
38 */
39 return this._state[prop] = value
40 }
41
42 private _clone(object: InternalStateType) {
43 /**
44 * Simple object clone.
45 */
46 return JSON.parse(JSON.stringify( object ))
47 }
48}
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index e887dde1f..e2b8b6ba5 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -1,7 +1,6 @@
1import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http' 1import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'
2import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
3import { Router } from '@angular/router' 3import { Router } from '@angular/router'
4
5import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
6import 'rxjs/add/observable/throw' 5import 'rxjs/add/observable/throw'
7import 'rxjs/add/operator/do' 6import 'rxjs/add/operator/do'
@@ -13,10 +12,9 @@ import { Subject } from 'rxjs/Subject'
13import { OAuthClientLocal, User as UserServerModel, UserRefreshToken, UserRole, VideoChannel } from '../../../../../shared' 12import { OAuthClientLocal, User as UserServerModel, UserRefreshToken, UserRole, VideoChannel } from '../../../../../shared'
14import { Account } from '../../../../../shared/models/accounts' 13import { Account } from '../../../../../shared/models/accounts'
15import { UserLogin } from '../../../../../shared/models/users/user-login.model' 14import { UserLogin } from '../../../../../shared/models/users/user-login.model'
16// Do not use the barrel (dependency loop) 15import { environment } from '../../../environments/environment'
17import { RestExtractor } from '../../shared/rest' 16import { RestExtractor } from '../../shared/rest'
18import { UserConstructorHash } from '../../shared/users/user.model' 17import { UserConstructorHash } from '../../shared/users/user.model'
19
20import { AuthStatus } from './auth-status.model' 18import { AuthStatus } from './auth-status.model'
21import { AuthUser } from './auth-user.model' 19import { AuthUser } from './auth-user.model'
22 20
@@ -43,9 +41,9 @@ interface UserLoginWithUserInformation extends UserLogin {
43 41
44@Injectable() 42@Injectable()
45export class AuthService { 43export class AuthService {
46 private static BASE_CLIENT_URL = API_URL + '/api/v1/oauth-clients/local' 44 private static BASE_CLIENT_URL = environment.apiUrl + '/api/v1/oauth-clients/local'
47 private static BASE_TOKEN_URL = API_URL + '/api/v1/users/token' 45 private static BASE_TOKEN_URL = environment.apiUrl + '/api/v1/users/token'
48 private static BASE_USER_INFORMATION_URL = API_URL + '/api/v1/users/me' 46 private static BASE_USER_INFORMATION_URL = environment.apiUrl + '/api/v1/users/me'
49 47
50 loginChangedSource: Observable<AuthStatus> 48 loginChangedSource: Observable<AuthStatus>
51 userInformationLoaded = new ReplaySubject<boolean>(1) 49 userInformationLoaded = new ReplaySubject<boolean>(1)
diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts
index 75262e6cf..a58fe6ebe 100644
--- a/client/src/app/core/core.module.ts
+++ b/client/src/app/core/core.module.ts
@@ -11,7 +11,6 @@ import { AuthService } from './auth'
11import { LoginGuard, UserRightGuard } from './routing' 11import { LoginGuard, UserRightGuard } from './routing'
12import { ServerService } from './server' 12import { ServerService } from './server'
13import { ConfirmComponent, ConfirmService } from './confirm' 13import { ConfirmComponent, ConfirmService } from './confirm'
14import { MenuComponent, MenuAdminComponent } from './menu'
15import { throwIfAlreadyLoaded } from './module-import-guard' 14import { throwIfAlreadyLoaded } from './module-import-guard'
16 15
17@NgModule({ 16@NgModule({
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index 16e0595b6..a5be9e199 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -2,13 +2,13 @@ import { HttpClient } from '@angular/common/http'
2import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
3import 'rxjs/add/operator/do' 3import 'rxjs/add/operator/do'
4import { ReplaySubject } from 'rxjs/ReplaySubject' 4import { ReplaySubject } from 'rxjs/ReplaySubject'
5
6import { ServerConfig } from '../../../../../shared' 5import { ServerConfig } from '../../../../../shared'
6import { environment } from '../../../environments/environment'
7 7
8@Injectable() 8@Injectable()
9export class ServerService { 9export class ServerService {
10 private static BASE_CONFIG_URL = API_URL + '/api/v1/config/' 10 private static BASE_CONFIG_URL = environment.apiUrl + '/api/v1/config/'
11 private static BASE_VIDEO_URL = API_URL + '/api/v1/videos/' 11 private static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/'
12 12
13 videoPrivaciesLoaded = new ReplaySubject<boolean>(1) 13 videoPrivaciesLoaded = new ReplaySubject<boolean>(1)
14 videoCategoriesLoaded = new ReplaySubject<boolean>(1) 14 videoCategoriesLoaded = new ReplaySubject<boolean>(1)
diff --git a/client/src/app/environment.ts b/client/src/app/environment.ts
deleted file mode 100644
index dd327a62e..000000000
--- a/client/src/app/environment.ts
+++ /dev/null
@@ -1,77 +0,0 @@
1/* tslint:disable */
2
3/**
4 * Angular 2
5 */
6import {
7 enableDebugTools,
8 disableDebugTools
9} from '@angular/platform-browser';
10import {
11 ApplicationRef,
12 enableProdMode
13} from '@angular/core';
14/**
15 * Environment Providers
16 */
17let PROVIDERS: any[] = [
18 /**
19 * Common env directives
20 */
21];
22
23/**
24 * Angular debug tools in the dev console
25 * https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md
26 */
27let _decorateModuleRef = <T>(value: T): T => { return value; };
28
29if ('production' === ENV) {
30 enableProdMode();
31
32 /**
33 * Production
34 */
35 _decorateModuleRef = (modRef: any) => {
36 disableDebugTools();
37
38 return modRef;
39 };
40
41 PROVIDERS = [
42 ...PROVIDERS,
43 /**
44 * Custom providers in production.
45 */
46 ];
47
48} else {
49
50 _decorateModuleRef = (modRef: any) => {
51 const appRef = modRef.injector.get(ApplicationRef);
52 const cmpRef = appRef.components[0];
53
54 let _ng = (<any> window).ng;
55 enableDebugTools(cmpRef);
56 (<any> window).ng.probe = _ng.probe;
57 (<any> window).ng.coreTokens = _ng.coreTokens;
58 return modRef;
59 };
60
61 /**
62 * Development
63 */
64 PROVIDERS = [
65 ...PROVIDERS,
66 /**
67 * Custom providers in development.
68 */
69 ];
70
71}
72
73export const decorateModuleRef = _decorateModuleRef;
74
75export const ENV_PROVIDERS = [
76 ...PROVIDERS
77];
diff --git a/client/src/app/header/header.component.scss b/client/src/app/header/header.component.scss
index fba70dd2f..1b67042fc 100644
--- a/client/src/app/header/header.component.scss
+++ b/client/src/app/header/header.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1#search-video { 4#search-video {
2 @include peertube-input-text($search-input-width); 5 @include peertube-input-text($search-input-width);
3 margin-right: 15px; 6 margin-right: 15px;
diff --git a/client/src/app/login/login.component.scss b/client/src/app/login/login.component.scss
index 3b4326de4..efec6b706 100644
--- a/client/src/app/login/login.component.scss
+++ b/client/src/app/login/login.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1input:not([type=submit]) { 4input:not([type=submit]) {
2 @include peertube-input-text(340px); 5 @include peertube-input-text(340px);
3 display: block; 6 display: block;
diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss
index 97ceadde3..8cb94b3dd 100644
--- a/client/src/app/menu/menu.component.scss
+++ b/client/src/app/menu/menu.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1menu { 4menu {
2 background-color: $black-background; 5 background-color: $black-background;
3 margin: 0; 6 margin: 0;
diff --git a/client/src/app/shared/account/account.model.ts b/client/src/app/shared/account/account.model.ts
index 0b008188a..9d1fd3e1d 100644
--- a/client/src/app/shared/account/account.model.ts
+++ b/client/src/app/shared/account/account.model.ts
@@ -1,5 +1,6 @@
1import { Account as ServerAccount } from '../../../../../shared/models/accounts/account.model' 1import { Account as ServerAccount } from '../../../../../shared/models/accounts/account.model'
2import { Avatar } from '../../../../../shared/models/avatars/avatar.model' 2import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
3import { environment } from '../../../environments/environment'
3 4
4export class Account implements ServerAccount { 5export class Account implements ServerAccount {
5 id: number 6 id: number
@@ -15,6 +16,6 @@ export class Account implements ServerAccount {
15 static GET_ACCOUNT_AVATAR_PATH (account: Account) { 16 static GET_ACCOUNT_AVATAR_PATH (account: Account) {
16 if (account && account.avatar) return account.avatar.path 17 if (account && account.avatar) return account.avatar.path
17 18
18 return API_URL + '/client/assets/images/default-avatar.png' 19 return environment.apiUrl + '/client/assets/images/default-avatar.png'
19 } 20 }
20} 21}
diff --git a/client/src/app/shared/forms/form-validators/host.validator.ts b/client/src/app/shared/forms/form-validators/host.ts
index c18a35f9b..c18a35f9b 100644
--- a/client/src/app/shared/forms/form-validators/host.validator.ts
+++ b/client/src/app/shared/forms/form-validators/host.ts
diff --git a/client/src/app/shared/forms/form-validators/index.ts b/client/src/app/shared/forms/form-validators/index.ts
index efe77d4ae..09ae86f8a 100644
--- a/client/src/app/shared/forms/form-validators/index.ts
+++ b/client/src/app/shared/forms/form-validators/index.ts
@@ -1,4 +1,4 @@
1export * from './host.validator' 1export * from './host'
2export * from './user' 2export * from './user'
3export * from './video-abuse' 3export * from './video-abuse'
4export * from './video' 4export * from './video'
diff --git a/client/src/app/shared/forms/form-validators/validator-message.ts b/client/src/app/shared/forms/form-validators/validator-message.ts
new file mode 100644
index 000000000..5ce45833b
--- /dev/null
+++ b/client/src/app/shared/forms/form-validators/validator-message.ts
@@ -0,0 +1,5 @@
1export type ValidatorMessage = {
2 [ id: string ]: {
3 [ error: string ]: string
4 }
5}
diff --git a/client/src/app/shared/forms/form-validators/video.ts b/client/src/app/shared/forms/form-validators/video.ts
index 45da7df4a..500b5bc5f 100644
--- a/client/src/app/shared/forms/form-validators/video.ts
+++ b/client/src/app/shared/forms/form-validators/video.ts
@@ -1,11 +1,5 @@
1import { Validators } from '@angular/forms' 1import { Validators } from '@angular/forms'
2 2
3export type ValidatorMessage = {
4 [ id: string ]: {
5 [ error: string ]: string
6 }
7}
8
9export const VIDEO_NAME = { 3export const VIDEO_NAME = {
10 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(120) ], 4 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(120) ],
11 MESSAGES: { 5 MESSAGES: {
diff --git a/client/src/app/shared/misc/button.component.scss b/client/src/app/shared/misc/button.component.scss
index 5fcae4f10..c380c7ae1 100644
--- a/client/src/app/shared/misc/button.component.scss
+++ b/client/src/app/shared/misc/button.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.action-button { 4.action-button {
2 @include peertube-button-link; 5 @include peertube-button-link;
3 6
diff --git a/client/src/app/shared/users/user.service.ts b/client/src/app/shared/users/user.service.ts
index 6d1017fc9..d97edbcbe 100644
--- a/client/src/app/shared/users/user.service.ts
+++ b/client/src/app/shared/users/user.service.ts
@@ -1,14 +1,14 @@
1import { Injectable } from '@angular/core'
2import { HttpClient } from '@angular/common/http' 1import { HttpClient } from '@angular/common/http'
2import { Injectable } from '@angular/core'
3import 'rxjs/add/operator/catch' 3import 'rxjs/add/operator/catch'
4import 'rxjs/add/operator/map' 4import 'rxjs/add/operator/map'
5
6import { RestExtractor } from '../rest'
7import { UserCreate, UserUpdateMe } from '../../../../../shared' 5import { UserCreate, UserUpdateMe } from '../../../../../shared'
6import { environment } from '../../../environments/environment'
7import { RestExtractor } from '../rest'
8 8
9@Injectable() 9@Injectable()
10export class UserService { 10export class UserService {
11 static BASE_USERS_URL = API_URL + '/api/v1/users/' 11 static BASE_USERS_URL = environment.apiUrl + '/api/v1/users/'
12 12
13 constructor ( 13 constructor (
14 private authHttp: HttpClient, 14 private authHttp: HttpClient,
diff --git a/client/src/app/shared/video-abuse/video-abuse.service.ts b/client/src/app/shared/video-abuse/video-abuse.service.ts
index 8d979de31..96a1f1fd2 100644
--- a/client/src/app/shared/video-abuse/video-abuse.service.ts
+++ b/client/src/app/shared/video-abuse/video-abuse.service.ts
@@ -1,19 +1,17 @@
1import { Injectable } from '@angular/core'
2import { HttpClient, HttpParams } from '@angular/common/http' 1import { HttpClient, HttpParams } from '@angular/common/http'
2import { Injectable } from '@angular/core'
3import { SortMeta } from 'primeng/components/common/sortmeta'
3import 'rxjs/add/operator/catch' 4import 'rxjs/add/operator/catch'
4import 'rxjs/add/operator/map' 5import 'rxjs/add/operator/map'
5import { Observable } from 'rxjs/Observable' 6import { Observable } from 'rxjs/Observable'
6 7import { ResultList, VideoAbuse } from '../../../../../shared'
7import { SortMeta } from 'primeng/components/common/sortmeta'
8
9import { AuthService } from '../core'
10import { RestExtractor, RestPagination, RestService } from '../rest' 8import { RestExtractor, RestPagination, RestService } from '../rest'
11import { Utils } from '../utils' 9import { Utils } from '../utils'
12import { ResultList, VideoAbuse } from '../../../../../shared' 10import { environment } from '../../../environments/environment'
13 11
14@Injectable() 12@Injectable()
15export class VideoAbuseService { 13export class VideoAbuseService {
16 private static BASE_VIDEO_ABUSE_URL = API_URL + '/api/v1/videos/' 14 private static BASE_VIDEO_ABUSE_URL = environment.apiUrl + '/api/v1/videos/'
17 15
18 constructor ( 16 constructor (
19 private authHttp: HttpClient, 17 private authHttp: HttpClient,
diff --git a/client/src/app/shared/video-blacklist/video-blacklist.service.ts b/client/src/app/shared/video-blacklist/video-blacklist.service.ts
index 17373d52e..1231690aa 100644
--- a/client/src/app/shared/video-blacklist/video-blacklist.service.ts
+++ b/client/src/app/shared/video-blacklist/video-blacklist.service.ts
@@ -1,18 +1,17 @@
1import { Injectable } from '@angular/core'
2import { HttpClient, HttpParams } from '@angular/common/http' 1import { HttpClient, HttpParams } from '@angular/common/http'
3import { Observable } from 'rxjs/Observable' 2import { Injectable } from '@angular/core'
3import { SortMeta } from 'primeng/components/common/sortmeta'
4import 'rxjs/add/operator/catch' 4import 'rxjs/add/operator/catch'
5import 'rxjs/add/operator/map' 5import 'rxjs/add/operator/map'
6 6import { Observable } from 'rxjs/Observable'
7import { SortMeta } from 'primeng/components/common/sortmeta' 7import { BlacklistedVideo, ResultList } from '../../../../../shared'
8 8import { environment } from '../../../environments/environment'
9import { RestExtractor, RestPagination, RestService } from '../rest' 9import { RestExtractor, RestPagination, RestService } from '../rest'
10import { Utils } from '../utils' 10import { Utils } from '../utils'
11import { BlacklistedVideo, ResultList } from '../../../../../shared'
12 11
13@Injectable() 12@Injectable()
14export class VideoBlacklistService { 13export class VideoBlacklistService {
15 private static BASE_VIDEOS_URL = API_URL + '/api/v1/videos/' 14 private static BASE_VIDEOS_URL = environment.apiUrl + '/api/v1/videos/'
16 15
17 constructor ( 16 constructor (
18 private authHttp: HttpClient, 17 private authHttp: HttpClient,
diff --git a/client/src/app/shared/video/video-miniature.component.scss b/client/src/app/shared/video/video-miniature.component.scss
index 37e84897b..49ba1e51c 100644
--- a/client/src/app/shared/video/video-miniature.component.scss
+++ b/client/src/app/shared/video/video-miniature.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.video-miniature { 4.video-miniature {
2 display: inline-block; 5 display: inline-block;
3 padding-right: 15px; 6 padding-right: 15px;
diff --git a/client/src/app/shared/video/video-thumbnail.component.scss b/client/src/app/shared/video/video-thumbnail.component.scss
index ab4f9bcb1..0fc2df220 100644
--- a/client/src/app/shared/video/video-thumbnail.component.scss
+++ b/client/src/app/shared/video/video-thumbnail.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.video-thumbnail { 4.video-thumbnail {
2 display: inline-block; 5 display: inline-block;
3 position: relative; 6 position: relative;
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts
index d86ef8f92..32c33829d 100644
--- a/client/src/app/shared/video/video.model.ts
+++ b/client/src/app/shared/video/video.model.ts
@@ -1,6 +1,7 @@
1import { Video as VideoServerModel } from '../../../../../shared'
2import { User } from '../' 1import { User } from '../'
2import { Video as VideoServerModel } from '../../../../../shared'
3import { Account } from '../../../../../shared/models/accounts' 3import { Account } from '../../../../../shared/models/accounts'
4import { environment } from '../../../environments/environment'
4 5
5export class Video implements VideoServerModel { 6export class Video implements VideoServerModel {
6 accountName: string 7 accountName: string
@@ -48,7 +49,7 @@ export class Video implements VideoServerModel {
48 } 49 }
49 50
50 constructor (hash: VideoServerModel) { 51 constructor (hash: VideoServerModel) {
51 let absoluteAPIUrl = API_URL 52 let absoluteAPIUrl = environment.apiUrl
52 if (!absoluteAPIUrl) { 53 if (!absoluteAPIUrl) {
53 // The API is on the same domain 54 // The API is on the same domain
54 absoluteAPIUrl = window.location.origin 55 absoluteAPIUrl = window.location.origin
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index 1a0644c3d..91dd3977a 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -9,9 +9,9 @@ import { UserVideoRateUpdate } from '../../../../../shared/models/videos/user-vi
9import { UserVideoRate } from '../../../../../shared/models/videos/user-video-rate.model' 9import { UserVideoRate } from '../../../../../shared/models/videos/user-video-rate.model'
10import { VideoRateType } from '../../../../../shared/models/videos/video-rate.type' 10import { VideoRateType } from '../../../../../shared/models/videos/video-rate.type'
11import { VideoUpdate } from '../../../../../shared/models/videos/video-update.model' 11import { VideoUpdate } from '../../../../../shared/models/videos/video-update.model'
12import { environment } from '../../../environments/environment'
12import { RestExtractor } from '../rest/rest-extractor.service' 13import { RestExtractor } from '../rest/rest-extractor.service'
13import { RestService } from '../rest/rest.service' 14import { RestService } from '../rest/rest.service'
14import { Search } from '../header/search.model'
15import { UserService } from '../users/user.service' 15import { UserService } from '../users/user.service'
16import { SortField } from './sort-field.type' 16import { SortField } from './sort-field.type'
17import { VideoDetails } from './video-details.model' 17import { VideoDetails } from './video-details.model'
@@ -21,7 +21,7 @@ import { Video } from './video.model'
21 21
22@Injectable() 22@Injectable()
23export class VideoService { 23export class VideoService {
24 private static BASE_VIDEO_URL = API_URL + '/api/v1/videos/' 24 private static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/'
25 25
26 constructor ( 26 constructor (
27 private authHttp: HttpClient, 27 private authHttp: HttpClient,
@@ -118,7 +118,7 @@ export class VideoService {
118 118
119 loadCompleteDescription (descriptionPath: string) { 119 loadCompleteDescription (descriptionPath: string) {
120 return this.authHttp 120 return this.authHttp
121 .get(API_URL + descriptionPath) 121 .get(environment.apiUrl + descriptionPath)
122 .map(res => res['description']) 122 .map(res => res['description'])
123 .catch((res) => this.restExtractor.handleError(res)) 123 .catch((res) => this.restExtractor.handleError(res))
124 } 124 }
diff --git a/client/src/app/signup/signup.component.scss b/client/src/app/signup/signup.component.scss
index 3b4326de4..efec6b706 100644
--- a/client/src/app/signup/signup.component.scss
+++ b/client/src/app/signup/signup.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1input:not([type=submit]) { 4input:not([type=submit]) {
2 @include peertube-input-text(340px); 5 @include peertube-input-text(340px);
3 display: block; 6 display: block;
diff --git a/client/src/app/videos/+video-edit/index.ts b/client/src/app/videos/+video-edit/index.ts
deleted file mode 100644
index 63e0414dd..000000000
--- a/client/src/app/videos/+video-edit/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
1export * from './video-add.module'
2export * from './video-update.module'
diff --git a/client/src/app/videos/+video-edit/shared/video-description.component.scss b/client/src/app/videos/+video-edit/shared/video-description.component.scss
index 2a4c8d189..d6a5190c5 100644
--- a/client/src/app/videos/+video-edit/shared/video-description.component.scss
+++ b/client/src/app/videos/+video-edit/shared/video-description.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1textarea { 4textarea {
2 @include peertube-input-text(100%); 5 @include peertube-input-text(100%);
3 6
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.scss b/client/src/app/videos/+video-edit/shared/video-edit.component.scss
index d363499ce..f4466bdde 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.scss
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.video-edit { 4.video-edit {
2 height: 100%; 5 height: 100%;
3 6
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
index 5b1cc3f9c..28c9134a7 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
@@ -2,12 +2,10 @@ import { Component, Input, OnInit } from '@angular/core'
2import { FormBuilder, FormControl, FormGroup } from '@angular/forms' 2import { FormBuilder, FormControl, FormGroup } from '@angular/forms'
3import { ActivatedRoute, Router } from '@angular/router' 3import { ActivatedRoute, Router } from '@angular/router'
4import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
5import { ServerService } from 'app/core'
6import { VideoEdit } from 'app/shared/video/video-edit.model'
7import 'rxjs/add/observable/forkJoin' 5import 'rxjs/add/observable/forkJoin'
8import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum' 6import { ServerService } from '../../../core/server'
7import { ValidatorMessage } from '../../../shared/forms/form-validators/validator-message'
9import { 8import {
10 ValidatorMessage,
11 VIDEO_CATEGORY, 9 VIDEO_CATEGORY,
12 VIDEO_DESCRIPTION, 10 VIDEO_DESCRIPTION,
13 VIDEO_LANGUAGE, 11 VIDEO_LANGUAGE,
@@ -15,7 +13,8 @@ import {
15 VIDEO_NAME, 13 VIDEO_NAME,
16 VIDEO_PRIVACY, 14 VIDEO_PRIVACY,
17 VIDEO_TAGS 15 VIDEO_TAGS
18} from '../../../shared/forms/form-validators' 16} from '../../../shared/forms/form-validators/video'
17import { VideoEdit } from '../../../shared/video/video-edit.model'
19 18
20@Component({ 19@Component({
21 selector: 'my-video-edit', 20 selector: 'my-video-edit',
diff --git a/client/src/app/videos/+video-edit/video-add.component.scss b/client/src/app/videos/+video-edit/video-add.component.scss
index 39673b4b7..78140e0e9 100644
--- a/client/src/app/videos/+video-edit/video-add.component.scss
+++ b/client/src/app/videos/+video-edit/video-add.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.upload-video-container { 4.upload-video-container {
2 border-radius: 3px; 5 border-radius: 3px;
3 background-color: #F7F7F7; 6 background-color: #F7F7F7;
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 2bbc3de17..503f705db 100644
--- a/client/src/app/videos/+video-edit/video-add.component.ts
+++ b/client/src/app/videos/+video-edit/video-add.component.ts
@@ -3,13 +3,12 @@ import { Component, OnInit, ViewChild } from '@angular/core'
3import { FormBuilder, FormGroup } from '@angular/forms' 3import { FormBuilder, FormGroup } from '@angular/forms'
4import { Router } from '@angular/router' 4import { Router } from '@angular/router'
5import { NotificationsService } from 'angular2-notifications' 5import { NotificationsService } from 'angular2-notifications'
6import { VideoService } from 'app/shared/video/video.service'
7import { VideoCreate } from '../../../../../shared'
8import { VideoPrivacy } from '../../../../../shared/models/videos' 6import { VideoPrivacy } from '../../../../../shared/models/videos'
9import { AuthService, ServerService } from '../../core' 7import { AuthService, ServerService } from '../../core'
10import { FormReactive } from '../../shared' 8import { FormReactive } from '../../shared'
11import { ValidatorMessage } from '../../shared/forms/form-validators' 9import { ValidatorMessage } from '../../shared/forms/form-validators/validator-message'
12import { VideoEdit } from '../../shared/video/video-edit.model' 10import { VideoEdit } from '../../shared/video/video-edit.model'
11import { VideoService } from '../../shared/video/video.service'
13 12
14@Component({ 13@Component({
15 selector: 'my-videos-add', 14 selector: 'my-videos-add',
diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts
index d1da8b6d8..08b74f4c3 100644
--- a/client/src/app/videos/+video-edit/video-update.component.ts
+++ b/client/src/app/videos/+video-edit/video-update.component.ts
@@ -3,10 +3,10 @@ import { FormBuilder, FormGroup } from '@angular/forms'
3import { ActivatedRoute, Router } from '@angular/router' 3import { ActivatedRoute, Router } from '@angular/router'
4import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
5import 'rxjs/add/observable/forkJoin' 5import 'rxjs/add/observable/forkJoin'
6import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum' 6import { VideoPrivacy } from '../../../../../shared/models/videos'
7import { ServerService } from '../../core' 7import { ServerService } from '../../core'
8import { FormReactive } from '../../shared' 8import { FormReactive } from '../../shared'
9import { ValidatorMessage } from '../../shared/forms/form-validators' 9import { ValidatorMessage } from '../../shared/forms/form-validators/validator-message'
10import { VideoEdit } from '../../shared/video/video-edit.model' 10import { VideoEdit } from '../../shared/video/video-edit.model'
11import { VideoService } from '../../shared/video/video.service' 11import { VideoService } from '../../shared/video/video.service'
12 12
@@ -25,8 +25,6 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
25 validationMessages: ValidatorMessage = {} 25 validationMessages: ValidatorMessage = {}
26 videoPrivacies = [] 26 videoPrivacies = []
27 27
28 fileError = ''
29
30 constructor ( 28 constructor (
31 private formBuilder: FormBuilder, 29 private formBuilder: FormBuilder,
32 private route: ActivatedRoute, 30 private route: ActivatedRoute,
diff --git a/client/src/app/videos/+video-watch/index.ts b/client/src/app/videos/+video-watch/index.ts
deleted file mode 100644
index b19bfdb1e..000000000
--- a/client/src/app/videos/+video-watch/index.ts
+++ /dev/null
@@ -1 +0,0 @@
1export * from './video-watch.module'
diff --git a/client/src/app/videos/+video-watch/video-download.component.scss b/client/src/app/videos/+video-watch/video-download.component.scss
index c9d5af9c1..7eac3d1c9 100644
--- a/client/src/app/videos/+video-watch/video-download.component.scss
+++ b/client/src/app/videos/+video-watch/video-download.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1.resolution-block:not(:first-child) { 4.resolution-block:not(:first-child) {
2 margin-top: 30px; 5 margin-top: 30px;
3} 6}
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss
index 9daa757b4..52082944a 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.scss
+++ b/client/src/app/videos/+video-watch/video-watch.component.scss
@@ -1,3 +1,6 @@
1@import '_variables';
2@import '_mixins';
3
1#video-container { 4#video-container {
2 background-color: #000; 5 background-color: #000;
3 display: flex; 6 display: flex;
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 bec6932ae..3825e8449 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -2,10 +2,9 @@ import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/co
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { MetaService } from '@ngx-meta/core' 3import { MetaService } from '@ngx-meta/core'
4import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
5import { VideoService } from 'app/shared/video/video.service'
6import { Observable } from 'rxjs/Observable' 5import { Observable } from 'rxjs/Observable'
7import { Subscription } from 'rxjs/Subscription' 6import { Subscription } from 'rxjs/Subscription'
8import videojs from 'video.js' 7import * as videojs from 'video.js'
9import { UserVideoRateType, VideoRateType } from '../../../../../shared' 8import { UserVideoRateType, VideoRateType } from '../../../../../shared'
10import '../../../assets/player/peertube-videojs-plugin' 9import '../../../assets/player/peertube-videojs-plugin'
11import { AuthService, ConfirmService } from '../../core' 10import { AuthService, ConfirmService } from '../../core'
@@ -13,6 +12,7 @@ import { VideoBlacklistService } from '../../shared'
13import { Account } from '../../shared/account/account.model' 12import { Account } from '../../shared/account/account.model'
14import { VideoDetails } from '../../shared/video/video-details.model' 13import { VideoDetails } from '../../shared/video/video-details.model'
15import { Video } from '../../shared/video/video.model' 14import { Video } from '../../shared/video/video.model'
15import { VideoService } from '../../shared/video/video.service'
16import { MarkdownService } from '../shared' 16import { MarkdownService } from '../shared'
17import { VideoDownloadComponent } from './video-download.component' 17import { VideoDownloadComponent } from './video-download.component'
18import { VideoReportComponent } from './video-report.component' 18import { VideoReportComponent } from './video-report.component'
diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts
index 6910421b7..29ec5fd4f 100644
--- a/client/src/app/videos/videos-routing.module.ts
+++ b/client/src/app/videos/videos-routing.module.ts
@@ -46,7 +46,7 @@ const videosRoutes: Routes = [
46 }, 46 },
47 { 47 {
48 path: 'upload', 48 path: 'upload',
49 loadChildren: 'app/videos/+video-edit#VideoAddModule', 49 loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule',
50 data: { 50 data: {
51 meta: { 51 meta: {
52 title: 'Upload a video' 52 title: 'Upload a video'
@@ -55,7 +55,7 @@ const videosRoutes: Routes = [
55 }, 55 },
56 { 56 {
57 path: 'edit/:uuid', 57 path: 'edit/:uuid',
58 loadChildren: 'app/videos/+video-edit#VideoUpdateModule', 58 loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
59 data: { 59 data: {
60 meta: { 60 meta: {
61 title: 'Edit a video' 61 title: 'Edit a video'
@@ -69,7 +69,7 @@ const videosRoutes: Routes = [
69 }, 69 },
70 { 70 {
71 path: 'watch/:uuid', 71 path: 'watch/:uuid',
72 loadChildren: 'app/videos/+video-watch#VideoWatchModule', 72 loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
73 data: { 73 data: {
74 preload: 3000 74 preload: 3000
75 } 75 }
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index 4898c1efe..8b50e323e 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -1,6 +1,6 @@
1// Big thanks to: https://github.com/kmoskwiak/videojs-resolution-switcher 1// Big thanks to: https://github.com/kmoskwiak/videojs-resolution-switcher
2 2
3import videojs, { Player } from 'video.js' 3import * as videojs from 'video.js'
4import * as WebTorrent from 'webtorrent' 4import * as WebTorrent from 'webtorrent'
5import { VideoFile } from '../../../../shared' 5import { VideoFile } from '../../../../shared'
6 6
@@ -27,7 +27,7 @@ const webtorrent = new WebTorrent({ dht: false })
27 27
28const MenuItem = videojsUntyped.getComponent('MenuItem') 28const MenuItem = videojsUntyped.getComponent('MenuItem')
29const ResolutionMenuItem = videojsUntyped.extend(MenuItem, { 29const ResolutionMenuItem = videojsUntyped.extend(MenuItem, {
30 constructor: function (player: Player, options) { 30 constructor: function (player: videojs.Player, options) {
31 options.selectable = true 31 options.selectable = true
32 MenuItem.call(this, player, options) 32 MenuItem.call(this, player, options)
33 33
diff --git a/client/src/custom-typings.d.ts b/client/src/custom-typings.d.ts
deleted file mode 100644
index 882d15d54..000000000
--- a/client/src/custom-typings.d.ts
+++ /dev/null
@@ -1,134 +0,0 @@
1/* tslint: disable */
2
3/*
4 * Custom Type Definitions
5 * When including 3rd party modules you also need to include the type definition for the module
6 * if they don't provide one within the module. You can try to install it with @types
7
8npm install @types/node
9npm install @types/lodash
10
11 * If you can't find the type definition in the registry we can make an ambient/global definition in
12 * this file for now. For example
13
14declare module 'my-module' {
15 export function doesSomething(value: string): string;
16}
17
18 * If you are using a CommonJS module that is using module.exports then you will have to write your
19 * types using export = yourObjectOrFunction with a namespace above it
20 * notice how we have to create a namespace that is equal to the function we're
21 * assigning the export to
22
23declare module 'jwt-decode' {
24 function jwtDecode(token: string): any;
25 namespace jwtDecode {}
26 export = jwtDecode;
27}
28
29 *
30 * If you're prototying and you will fix the types later you can also declare it as type any
31 *
32
33declare var assert: any;
34declare var _: any;
35declare var $: any;
36
37 *
38 * If you're importing a module that uses Node.js modules which are CommonJS you need to import as
39 * in the files such as main.browser.ts or any file within app/
40 *
41
42import * as _ from 'lodash'
43
44 * You can include your type definitions in this file until you create one for the @types
45 *
46 */
47
48// support NodeJS modules without type definitions
49declare module '*';
50
51/*
52// for legacy tslint etc to understand rename 'modern-lru' with your package
53// then comment out `declare module '*';`. For each new module copy/paste
54// this method of creating an `any` module type definition
55declare module 'modern-lru' {
56 let x: any;
57 export = x;
58}
59*/
60
61// Extra variables that live on Global that will be replaced by webpack DefinePlugin
62declare var ENV: string;
63declare var API_URL: string;
64declare var HMR: boolean;
65declare var System: SystemJS;
66
67interface SystemJS {
68 import: (path?: string) => Promise<any>;
69}
70
71interface GlobalEnvironment {
72 ENV: string;
73 API_URL: string;
74 HMR: boolean;
75 SystemJS: SystemJS;
76 System: SystemJS;
77}
78
79interface Es6PromiseLoader {
80 (id: string): (exportName?: string) => Promise<any>;
81}
82
83type FactoryEs6PromiseLoader = () => Es6PromiseLoader;
84type FactoryPromise = () => Promise<any>;
85
86type AsyncRoutes = {
87 [component: string]: Es6PromiseLoader |
88 Function |
89 FactoryEs6PromiseLoader |
90 FactoryPromise ;
91};
92
93type IdleCallbacks = Es6PromiseLoader |
94 Function |
95 FactoryEs6PromiseLoader |
96 FactoryPromise ;
97
98interface WebpackModule {
99 hot: {
100 data?: any,
101 idle: any,
102 accept(dependencies?: string | string[], callback?: (updatedDependencies?: any) => void): void;
103 decline(deps?: any | string | string[]): void;
104 dispose(callback?: (data?: any) => void): void;
105 addDisposeHandler(callback?: (data?: any) => void): void;
106 removeDisposeHandler(callback?: (data?: any) => void): void;
107 check(autoApply?: any, callback?: (err?: Error, outdatedModules?: any[]) => void): void;
108 apply(options?: any, callback?: (err?: Error, outdatedModules?: any[]) => void): void;
109 status(callback?: (status?: string) => void): void | string;
110 removeStatusHandler(callback?: (status?: string) => void): void;
111 };
112}
113
114interface WebpackRequire {
115 (id: string): any;
116 (paths: string[], callback: (...modules: any[]) => void): void;
117 ensure(ids: string[], callback: (req: WebpackRequire) => void, chunkName?: string): void;
118 context(directory: string, useSubDirectories?: boolean, regExp?: RegExp): WebpackContext;
119}
120
121interface WebpackContext extends WebpackRequire {
122 keys(): string[];
123}
124
125interface ErrorStackTraceLimit {
126 stackTraceLimit: number;
127}
128
129// Extend typings
130interface NodeRequire extends WebpackRequire {}
131interface ErrorConstructor extends ErrorStackTraceLimit {}
132interface NodeRequireFunction extends Es6PromiseLoader {}
133interface NodeModule extends WebpackModule {}
134interface Global extends GlobalEnvironment {}
diff --git a/client/src/environments/environment.prod.ts b/client/src/environments/environment.prod.ts
new file mode 100644
index 000000000..c9f5a3b63
--- /dev/null
+++ b/client/src/environments/environment.prod.ts
@@ -0,0 +1,4 @@
1export const environment = {
2 production: true,
3 apiUrl: ''
4}
diff --git a/client/src/environments/environment.ts b/client/src/environments/environment.ts
new file mode 100644
index 000000000..43d788541
--- /dev/null
+++ b/client/src/environments/environment.ts
@@ -0,0 +1,9 @@
1// The file contents for the current environment will overwrite these during build.
2// The build system defaults to the dev environment which uses `environment.ts`, but if you do
3// `ng build --env=prod` then `environment.prod.ts` will be used instead.
4// The list of which env maps to which file can be found in `.angular-cli.json`.
5
6export const environment = {
7 production: false,
8 apiUrl: 'http://localhost:9000'
9}
diff --git a/client/src/index.html b/client/src/index.html
index 4af6b12f6..f14323521 100644
--- a/client/src/index.html
+++ b/client/src/index.html
@@ -1,7 +1,7 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<html> 2<html>
3 <head> 3 <head>
4 <title><%= htmlWebpackPlugin.options.title %></title> 4 <title>PeerTube</title>
5 5
6 <meta charset="UTF-8"> 6 <meta charset="UTF-8">
7 <meta name="viewport" content="width=device-width, initial-scale=1"> 7 <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -14,9 +14,7 @@
14 <link rel="icon" type="image/png" href="/client/assets/images/favicon.png" /> 14 <link rel="icon" type="image/png" href="/client/assets/images/favicon.png" />
15 15
16 <!-- base url --> 16 <!-- base url -->
17 <base href="<%= htmlWebpackPlugin.options.metadata.baseUrl %>"> 17 <base href="/">
18
19 <%= htmlWebpackPlugin.files.webpackManifest %>
20 </head> 18 </head>
21 19
22 <!-- 3. Display the application --> 20 <!-- 3. Display the application -->
diff --git a/client/src/main.browser.aot.ts b/client/src/main.browser.aot.ts
deleted file mode 100644
index 9635d615b..000000000
--- a/client/src/main.browser.aot.ts
+++ /dev/null
@@ -1,35 +0,0 @@
1/* tslint: disable */
2
3import { platformBrowser } from '@angular/platform-browser';
4import { decorateModuleRef } from './app/environment';
5
6/**
7 * App Module
8 * our top level module that holds all of our components.
9 */
10import { AppModuleNgFactory } from '../compiled/src/app/app.module.ngfactory';
11
12/**
13 * Bootstrap our Angular app with a top level NgModule.
14 */
15export function main(): Promise<any> {
16 return platformBrowser()
17 .bootstrapModuleFactory(AppModuleNgFactory)
18 .then(decorateModuleRef)
19 .catch((err) => console.error(err));
20}
21
22switch (document.readyState) {
23 case 'loading':
24 document.addEventListener('DOMContentLoaded', _domReadyHandler, false);
25 break;
26 case 'interactive':
27 case 'complete':
28 default:
29 main();
30}
31
32function _domReadyHandler() {
33 document.removeEventListener('DOMContentLoaded', _domReadyHandler, false);
34 main();
35}
diff --git a/client/src/main.browser.ts b/client/src/main.browser.ts
deleted file mode 100644
index 28f0d5781..000000000
--- a/client/src/main.browser.ts
+++ /dev/null
@@ -1,45 +0,0 @@
1/* tslint: disable */
2
3import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
4import { decorateModuleRef } from './app/environment'
5import { hmrModule } from '@angularclass/hmr'
6
7/**
8 * App Module
9 * our top level module that holds all of our components
10 */
11import { AppModule } from './app'
12
13/**
14 * Bootstrap our Angular app with a top level NgModule
15 */
16export function main (): Promise<any> {
17 return platformBrowserDynamic()
18 .bootstrapModule(AppModule)
19 .then(decorateModuleRef)
20 .then((ngModuleRef: any) => {
21 // `module` global ref for webpackhmr
22 // Don't run this in Prod
23 return hmrModule(ngModuleRef, module)
24 })
25 .catch((err) => console.error(err))
26}
27
28/**
29 * Needed for hmr
30 * in prod this is replace for document ready
31 */
32switch (document.readyState) {
33 case 'loading':
34 document.addEventListener('DOMContentLoaded', _domReadyHandler, false)
35 break
36 case 'interactive':
37 case 'complete':
38 default:
39 main()
40}
41
42function _domReadyHandler () {
43 document.removeEventListener('DOMContentLoaded', _domReadyHandler, false)
44 main()
45}
diff --git a/client/src/main.ts b/client/src/main.ts
new file mode 100644
index 000000000..91ec6da5f
--- /dev/null
+++ b/client/src/main.ts
@@ -0,0 +1,12 @@
1import { enableProdMode } from '@angular/core';
2import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3
4import { AppModule } from './app/app.module';
5import { environment } from './environments/environment';
6
7if (environment.production) {
8 enableProdMode();
9}
10
11platformBrowserDynamic().bootstrapModule(AppModule)
12 .catch(err => console.log(err));
diff --git a/client/src/polyfills.browser.ts b/client/src/polyfills.browser.ts
deleted file mode 100644
index b1a631655..000000000
--- a/client/src/polyfills.browser.ts
+++ /dev/null
@@ -1,38 +0,0 @@
1/* tslint: disable */
2
3// Polyfills
4// (these modules are what are in 'angular2/bundles/angular2-polyfills' so don't use that here)
5
6require('intl');
7require('intl/locale-data/jsonp/en.js');
8import 'ie-shim'; // Internet Explorer
9
10// Prefer CoreJS over the polyfills above
11import 'core-js/es6/symbol';
12import 'core-js/es6/object';
13import 'core-js/es6/function';
14import 'core-js/es6/parse-int';
15import 'core-js/es6/parse-float';
16import 'core-js/es6/number';
17import 'core-js/es6/math';
18import 'core-js/es6/string';
19import 'core-js/es6/date';
20import 'core-js/es6/array';
21import 'core-js/es6/regexp';
22import 'core-js/es6/map';
23import 'core-js/es6/set';
24import 'core-js/es6/weak-map';
25import 'core-js/es6/weak-set';
26import 'core-js/es6/typed';
27import 'core-js/es6/reflect';
28// see issue https://github.com/AngularClass/angular2-webpack-starter/issues/709
29// import 'core-js/es6/promise';
30
31import 'core-js/es7/reflect';
32import 'zone.js/dist/zone';
33
34if ('production' !== ENV) {
35 Error.stackTraceLimit = Infinity;
36
37 require('zone.js/dist/long-stack-trace-zone');
38}
diff --git a/client/src/polyfills.ts b/client/src/polyfills.ts
new file mode 100644
index 000000000..d68672ffe
--- /dev/null
+++ b/client/src/polyfills.ts
@@ -0,0 +1,66 @@
1/**
2 * This file includes polyfills needed by Angular and is loaded before the app.
3 * You can add your own extra polyfills to this file.
4 *
5 * This file is divided into 2 sections:
6 * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 * file.
9 *
10 * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 *
14 * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15 */
16
17/***************************************************************************************************
18 * BROWSER POLYFILLS
19 */
20
21/** IE9, IE10 and IE11 requires all of the following polyfills. **/
22// import 'core-js/es6/symbol';
23// import 'core-js/es6/object';
24// import 'core-js/es6/function';
25// import 'core-js/es6/parse-int';
26// import 'core-js/es6/parse-float';
27// import 'core-js/es6/number';
28// import 'core-js/es6/math';
29// import 'core-js/es6/string';
30// import 'core-js/es6/date';
31// import 'core-js/es6/array';
32// import 'core-js/es6/regexp';
33// import 'core-js/es6/map';
34// import 'core-js/es6/weak-map';
35// import 'core-js/es6/set';
36
37/** IE10 and IE11 requires the following for NgClass support on SVG elements */
38// import 'classlist.js'; // Run `npm install --save classlist.js`.
39
40/** IE10 and IE11 requires the following for the Reflect API. */
41// import 'core-js/es6/reflect';
42
43
44/** Evergreen browsers require these. **/
45// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46import 'core-js/es7/reflect';
47
48
49/**
50 * Required to support Web Animations `@angular/platform-browser/animations`.
51 * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
52 **/
53// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
54
55
56
57/***************************************************************************************************
58 * Zone JS is required by default for Angular itself.
59 */
60import 'zone.js/dist/zone'; // Included with Angular CLI.
61
62
63
64/***************************************************************************************************
65 * APPLICATION IMPORTS
66 */
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss
index 9d347d566..08131406a 100644
--- a/client/src/sass/application.scss
+++ b/client/src/sass/application.scss
@@ -1,5 +1,12 @@
1$FontPathSourceSansPro: "../fonts/source-sans-pro"; 1@import '_variables';
2@import '~source-sans-pro/source-sans-pro'; 2@import '_mixins';
3
4$icon-font-path: '../../node_modules/bootstrap-sass/assets/fonts/bootstrap/';
5@import '~bootstrap-sass/assets/stylesheets/_bootstrap';
6
7$FontPathSourceSansPro: '../../node_modules/npm-font-source-sans-pro/fonts';
8@import '~npm-font-source-sans-pro/source-sans-pro';
9
3@import '~primeng/resources/themes/bootstrap/theme.css'; 10@import '~primeng/resources/themes/bootstrap/theme.css';
4@import '~primeng/resources/primeng.css'; 11@import '~primeng/resources/primeng.css';
5@import '~video.js/dist/video-js.css'; 12@import '~video.js/dist/video-js.css';
diff --git a/client/src/sass/_mixins.scss b/client/src/sass/include/_mixins.scss
index 2a7192fb2..f6f17846e 100644
--- a/client/src/sass/_mixins.scss
+++ b/client/src/sass/include/_mixins.scss
@@ -1,3 +1,5 @@
1@import '_variables';
2
1@mixin disable-default-a-behaviour { 3@mixin disable-default-a-behaviour {
2 &:hover, &:focus, &:active { 4 &:hover, &:focus, &:active {
3 text-decoration: none !important; 5 text-decoration: none !important;
diff --git a/client/src/sass/_variables.scss b/client/src/sass/include/_variables.scss
index 0d310409b..0d310409b 100644
--- a/client/src/sass/_variables.scss
+++ b/client/src/sass/include/_variables.scss
diff --git a/client/src/sass/pre-customizations.scss b/client/src/sass/pre-customizations.scss
deleted file mode 100644
index 52eef50f2..000000000
--- a/client/src/sass/pre-customizations.scss
+++ /dev/null
@@ -1,877 +0,0 @@
1@import '_variables.scss';
2@import '_mixins.scss';
3
4$bootstrap-sass-asset-helper: false !default;
5//
6// Variables
7// --------------------------------------------------
8
9
10//== Colors
11//
12//## Gray and brand colors for use across Bootstrap.
13
14$gray-base: #000 !default;
15$gray-darker: lighten($gray-base, 13.5%) !default; // #222
16$gray-dark: lighten($gray-base, 20%) !default; // #333
17$gray: lighten($gray-base, 33.5%) !default; // #555
18$gray-light: lighten($gray-base, 46.7%) !default; // #777
19$gray-lighter: lighten($gray-base, 93.5%) !default; // #eee
20
21$brand-primary: darken(#428bca, 6.5%) !default; // #337ab7
22$brand-success: #5cb85c !default;
23$brand-info: #5bc0de !default;
24$brand-warning: #f0ad4e !default;
25$brand-danger: #d9534f !default;
26
27
28//== Scaffolding
29//
30//## Settings for some of the most global styles.
31
32//** Background color for `<body>`.
33$body-bg: #fff !default;
34//** Global text color on `<body>`.
35$text-color: $gray-dark !default;
36
37//** Global textual link color.
38$link-color: $brand-primary !default;
39//** Link hover color set via `darken()` function.
40$link-hover-color: darken($link-color, 15%) !default;
41//** Link hover decoration.
42$link-hover-decoration: underline !default;
43
44
45//== Typography
46//
47//## Font, line-height, and color for body text, headings, and more.
48
49$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
50$font-family-serif: Georgia, "Times New Roman", Times, serif !default;
51//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
52$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default;
53$font-family-base: $font-family-sans-serif !default;
54
55$font-size-base: 14px !default;
56$font-size-large: ceil(($font-size-base * 1.25)) !default; // ~18px
57$font-size-small: ceil(($font-size-base * 0.85)) !default; // ~12px
58
59$font-size-h1: floor(($font-size-base * 2.6)) !default; // ~36px
60$font-size-h2: floor(($font-size-base * 2.15)) !default; // ~30px
61$font-size-h3: ceil(($font-size-base * 1.7)) !default; // ~24px
62$font-size-h4: ceil(($font-size-base * 1.25)) !default; // ~18px
63$font-size-h5: $font-size-base !default;
64$font-size-h6: ceil(($font-size-base * 0.85)) !default; // ~12px
65
66//** Unit-less `line-height` for use in components like buttons.
67$line-height-base: 1.428571429 !default; // 20/14
68//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
69$line-height-computed: floor(($font-size-base * $line-height-base)) !default; // ~20px
70
71//** By default, this inherits from the `<body>`.
72$headings-font-family: inherit !default;
73$headings-font-weight: 500 !default;
74$headings-line-height: 1.1 !default;
75$headings-color: inherit !default;
76
77
78//== Iconography
79//
80//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
81
82//** Load fonts from this directory.
83
84// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
85// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
86$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default;
87
88//** File name for all font files.
89$icon-font-name: "glyphicons-halflings-regular" !default;
90//** Element ID within SVG icon file.
91$icon-font-svg-id: "glyphicons_halflingsregular" !default;
92
93
94//== Components
95//
96//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
97
98$padding-base-vertical: 6px !default;
99$padding-base-horizontal: 12px !default;
100
101$padding-large-vertical: 10px !default;
102$padding-large-horizontal: 16px !default;
103
104$padding-small-vertical: 5px !default;
105$padding-small-horizontal: 10px !default;
106
107$padding-xs-vertical: 1px !default;
108$padding-xs-horizontal: 5px !default;
109
110$line-height-large: 1.3333333 !default; // extra decimals for Win 8.1 Chrome
111$line-height-small: 1.5 !default;
112
113$border-radius-base: 4px !default;
114$border-radius-large: 6px !default;
115$border-radius-small: 3px !default;
116
117//** Global color for active items (e.g., navs or dropdowns).
118$component-active-color: #fff !default;
119//** Global background color for active items (e.g., navs or dropdowns).
120$component-active-bg: $brand-primary !default;
121
122//** Width of the `border` for generating carets that indicator dropdowns.
123$caret-width-base: 4px !default;
124//** Carets increase slightly in size for larger components.
125$caret-width-large: 5px !default;
126
127
128//== Tables
129//
130//## Customizes the `.table` component with basic values, each used across all table variations.
131
132//** Padding for `<th>`s and `<td>`s.
133$table-cell-padding: 8px !default;
134//** Padding for cells in `.table-condensed`.
135$table-condensed-cell-padding: 5px !default;
136
137//** Default background color used for all tables.
138$table-bg: transparent !default;
139//** Background color used for `.table-striped`.
140$table-bg-accent: #f9f9f9 !default;
141//** Background color used for `.table-hover`.
142$table-bg-hover: #f5f5f5 !default;
143$table-bg-active: $table-bg-hover !default;
144
145//** Border color for table and cell borders.
146$table-border-color: #ddd !default;
147
148
149//== Buttons
150//
151//## For each of Bootstrap's buttons, define text, background and border color.
152
153$btn-font-weight: normal !default;
154
155$btn-default-color: #333 !default;
156$btn-default-bg: #fff !default;
157$btn-default-border: #ccc !default;
158
159$btn-primary-color: #fff !default;
160$btn-primary-bg: $brand-primary !default;
161$btn-primary-border: darken($btn-primary-bg, 5%) !default;
162
163$btn-success-color: #fff !default;
164$btn-success-bg: $brand-success !default;
165$btn-success-border: darken($btn-success-bg, 5%) !default;
166
167$btn-info-color: #fff !default;
168$btn-info-bg: $brand-info !default;
169$btn-info-border: darken($btn-info-bg, 5%) !default;
170
171$btn-warning-color: #fff !default;
172$btn-warning-bg: $brand-warning !default;
173$btn-warning-border: darken($btn-warning-bg, 5%) !default;
174
175$btn-danger-color: #fff !default;
176$btn-danger-bg: $brand-danger !default;
177$btn-danger-border: darken($btn-danger-bg, 5%) !default;
178
179$btn-link-disabled-color: $gray-light !default;
180
181// Allows for customizing button radius independently from global border radius
182$btn-border-radius-base: $border-radius-base !default;
183$btn-border-radius-large: $border-radius-large !default;
184$btn-border-radius-small: $border-radius-small !default;
185
186
187//== Forms
188//
189//##
190
191//** `<input>` background color
192$input-bg: #fff !default;
193//** `<input disabled>` background color
194$input-bg-disabled: $gray-lighter !default;
195
196//** Text color for `<input>`s
197$input-color: $gray !default;
198//** `<input>` border color
199$input-border: #ccc !default;
200
201// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
202//** Default `.form-control` border radius
203// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
204$input-border-radius: $border-radius-base !default;
205//** Large `.form-control` border radius
206$input-border-radius-large: $border-radius-large !default;
207//** Small `.form-control` border radius
208$input-border-radius-small: $border-radius-small !default;
209
210//** Border color for inputs on focus
211$input-border-focus: #66afe9 !default;
212
213//** Placeholder text color
214$input-color-placeholder: #999 !default;
215
216//** Default `.form-control` height
217$input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
218//** Large `.form-control` height
219$input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
220//** Small `.form-control` height
221$input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
222
223//** `.form-group` margin
224$form-group-margin-bottom: 15px !default;
225
226$legend-color: $gray-dark !default;
227$legend-border-color: #e5e5e5 !default;
228
229//** Background color for textual input addons
230$input-group-addon-bg: $gray-lighter !default;
231//** Border color for textual input addons
232$input-group-addon-border-color: $input-border !default;
233
234//** Disabled cursor for form controls and buttons.
235$cursor-disabled: not-allowed !default;
236
237
238//== Dropdowns
239//
240//## Dropdown menu container and contents.
241
242//** Background for the dropdown menu.
243$dropdown-bg: #fff !default;
244//** Dropdown menu `border-color`.
245$dropdown-border: rgba(0,0,0,.15) !default;
246//** Dropdown menu `border-color` **for IE8**.
247$dropdown-fallback-border: #ccc !default;
248//** Divider color for between dropdown items.
249$dropdown-divider-bg: #e5e5e5 !default;
250
251//** Dropdown link text color.
252$dropdown-link-color: $gray-dark !default;
253//** Hover color for dropdown links.
254$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
255//** Hover background for dropdown links.
256$dropdown-link-hover-bg: #f5f5f5 !default;
257
258//** Active dropdown menu item text color.
259$dropdown-link-active-color: $component-active-color !default;
260//** Active dropdown menu item background color.
261$dropdown-link-active-bg: $component-active-bg !default;
262
263//** Disabled dropdown menu item background color.
264$dropdown-link-disabled-color: $gray-light !default;
265
266//** Text color for headers within dropdown menus.
267$dropdown-header-color: $gray-light !default;
268
269//** Deprecated `$dropdown-caret-color` as of v3.1.0
270$dropdown-caret-color: #000 !default;
271
272
273//-- Z-index master list
274//
275// Warning: Avoid customizing these values. They're used for a bird's eye view
276// of components dependent on the z-axis and are designed to all work together.
277//
278// Note: These variables are not generated into the Customizer.
279
280$zindex-navbar: 1000 !default;
281$zindex-dropdown: 1000 !default;
282$zindex-popover: 1060 !default;
283$zindex-tooltip: 1070 !default;
284$zindex-navbar-fixed: 1030 !default;
285$zindex-modal-background: 1040 !default;
286$zindex-modal: 1050 !default;
287
288
289//== Media queries breakpoints
290//
291//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
292
293// Extra small screen / phone
294//** Deprecated `$screen-xs` as of v3.0.1
295$screen-xs: 480px !default;
296//** Deprecated `$screen-xs-min` as of v3.2.0
297$screen-xs-min: $screen-xs !default;
298//** Deprecated `$screen-phone` as of v3.0.1
299$screen-phone: $screen-xs-min !default;
300
301// Small screen / tablet
302//** Deprecated `$screen-sm` as of v3.0.1
303$screen-sm: 768px !default;
304$screen-sm-min: $screen-sm !default;
305//** Deprecated `$screen-tablet` as of v3.0.1
306$screen-tablet: $screen-sm-min !default;
307
308// Medium screen / desktop
309//** Deprecated `$screen-md` as of v3.0.1
310$screen-md: 992px !default;
311$screen-md-min: $screen-md !default;
312//** Deprecated `$screen-desktop` as of v3.0.1
313$screen-desktop: $screen-md-min !default;
314
315// Large screen / wide desktop
316//** Deprecated `$screen-lg` as of v3.0.1
317$screen-lg: 1200px !default;
318$screen-lg-min: $screen-lg !default;
319//** Deprecated `$screen-lg-desktop` as of v3.0.1
320$screen-lg-desktop: $screen-lg-min !default;
321
322// So media queries don't overlap when required, provide a maximum
323$screen-xs-max: ($screen-sm-min - 1) !default;
324$screen-sm-max: ($screen-md-min - 1) !default;
325$screen-md-max: ($screen-lg-min - 1) !default;
326
327
328//== Grid system
329//
330//## Define your custom responsive grid.
331
332//** Number of columns in the grid.
333$grid-columns: 12 !default;
334//** Padding between columns. Gets divided in half for the left and right.
335$grid-gutter-width: 30px !default;
336// Navbar collapse
337//** Point at which the navbar becomes uncollapsed.
338$grid-float-breakpoint: $screen-sm-min !default;
339//** Point at which the navbar begins collapsing.
340$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
341
342
343//== Container sizes
344//
345//## Define the maximum width of `.container` for different screen sizes.
346
347// Small screen / tablet
348$container-tablet: (720px + $grid-gutter-width) !default;
349//** For `$screen-sm-min` and up.
350$container-sm: $container-tablet !default;
351
352// Medium screen / desktop
353$container-desktop: (940px + $grid-gutter-width) !default;
354//** For `$screen-md-min` and up.
355$container-md: $container-desktop !default;
356
357// Large screen / wide desktop
358$container-large-desktop: (1140px + $grid-gutter-width) !default;
359//** For `$screen-lg-min` and up.
360$container-lg: $container-large-desktop !default;
361
362
363//== Navbar
364//
365//##
366
367// Basics of a navbar
368$navbar-height: 50px !default;
369$navbar-margin-bottom: $line-height-computed !default;
370$navbar-border-radius: $border-radius-base !default;
371$navbar-padding-horizontal: floor(($grid-gutter-width / 2)) !default;
372$navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2) !default;
373$navbar-collapse-max-height: 340px !default;
374
375$navbar-default-color: #777 !default;
376$navbar-default-bg: #f8f8f8 !default;
377$navbar-default-border: darken($navbar-default-bg, 6.5%) !default;
378
379// Navbar links
380$navbar-default-link-color: #777 !default;
381$navbar-default-link-hover-color: #333 !default;
382$navbar-default-link-hover-bg: transparent !default;
383$navbar-default-link-active-color: #555 !default;
384$navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%) !default;
385$navbar-default-link-disabled-color: #ccc !default;
386$navbar-default-link-disabled-bg: transparent !default;
387
388// Navbar brand label
389$navbar-default-brand-color: $navbar-default-link-color !default;
390$navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%) !default;
391$navbar-default-brand-hover-bg: transparent !default;
392
393// Navbar toggle
394$navbar-default-toggle-hover-bg: #ddd !default;
395$navbar-default-toggle-icon-bar-bg: #888 !default;
396$navbar-default-toggle-border-color: #ddd !default;
397
398
399//=== Inverted navbar
400// Reset inverted navbar basics
401$navbar-inverse-color: lighten($gray-light, 15%) !default;
402$navbar-inverse-bg: #222 !default;
403$navbar-inverse-border: darken($navbar-inverse-bg, 10%) !default;
404
405// Inverted navbar links
406$navbar-inverse-link-color: lighten($gray-light, 15%) !default;
407$navbar-inverse-link-hover-color: #fff !default;
408$navbar-inverse-link-hover-bg: transparent !default;
409$navbar-inverse-link-active-color: $navbar-inverse-link-hover-color !default;
410$navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%) !default;
411$navbar-inverse-link-disabled-color: #444 !default;
412$navbar-inverse-link-disabled-bg: transparent !default;
413
414// Inverted navbar brand label
415$navbar-inverse-brand-color: $navbar-inverse-link-color !default;
416$navbar-inverse-brand-hover-color: #fff !default;
417$navbar-inverse-brand-hover-bg: transparent !default;
418
419// Inverted navbar toggle
420$navbar-inverse-toggle-hover-bg: #333 !default;
421$navbar-inverse-toggle-icon-bar-bg: #fff !default;
422$navbar-inverse-toggle-border-color: #333 !default;
423
424
425//== Navs
426//
427//##
428
429//=== Shared nav styles
430$nav-link-padding: 10px 15px !default;
431$nav-link-hover-bg: $gray-lighter !default;
432
433$nav-disabled-link-color: $gray-light !default;
434$nav-disabled-link-hover-color: $gray-light !default;
435
436//== Tabs
437$nav-tabs-border-color: #ddd !default;
438
439$nav-tabs-link-hover-border-color: $gray-lighter !default;
440
441$nav-tabs-active-link-hover-bg: $body-bg !default;
442$nav-tabs-active-link-hover-color: $gray !default;
443$nav-tabs-active-link-hover-border-color: #ddd !default;
444
445$nav-tabs-justified-link-border-color: #ddd !default;
446$nav-tabs-justified-active-link-border-color: $body-bg !default;
447
448//== Pills
449$nav-pills-border-radius: $border-radius-base !default;
450$nav-pills-active-link-hover-bg: $component-active-bg !default;
451$nav-pills-active-link-hover-color: $component-active-color !default;
452
453
454//== Pagination
455//
456//##
457
458$pagination-color: $link-color !default;
459$pagination-bg: #fff !default;
460$pagination-border: #ddd !default;
461
462$pagination-hover-color: $link-hover-color !default;
463$pagination-hover-bg: $gray-lighter !default;
464$pagination-hover-border: #ddd !default;
465
466$pagination-active-color: #fff !default;
467$pagination-active-bg: $brand-primary !default;
468$pagination-active-border: $brand-primary !default;
469
470$pagination-disabled-color: $gray-light !default;
471$pagination-disabled-bg: #fff !default;
472$pagination-disabled-border: #ddd !default;
473
474
475//== Pager
476//
477//##
478
479$pager-bg: $pagination-bg !default;
480$pager-border: $pagination-border !default;
481$pager-border-radius: 15px !default;
482
483$pager-hover-bg: $pagination-hover-bg !default;
484
485$pager-active-bg: $pagination-active-bg !default;
486$pager-active-color: $pagination-active-color !default;
487
488$pager-disabled-color: $pagination-disabled-color !default;
489
490
491//== Jumbotron
492//
493//##
494
495$jumbotron-padding: 30px !default;
496$jumbotron-color: inherit !default;
497$jumbotron-bg: $gray-lighter !default;
498$jumbotron-heading-color: inherit !default;
499$jumbotron-font-size: ceil(($font-size-base * 1.5)) !default;
500$jumbotron-heading-font-size: ceil(($font-size-base * 4.5)) !default;
501
502
503//== Form states and alerts
504//
505//## Define colors for form feedback states and, by default, alerts.
506
507$state-success-text: #3c763d !default;
508$state-success-bg: #dff0d8 !default;
509$state-success-border: darken(adjust-hue($state-success-bg, -10), 5%) !default;
510
511$state-info-text: #31708f !default;
512$state-info-bg: #d9edf7 !default;
513$state-info-border: darken(adjust-hue($state-info-bg, -10), 7%) !default;
514
515$state-warning-text: #8a6d3b !default;
516$state-warning-bg: #fcf8e3 !default;
517$state-warning-border: darken(adjust-hue($state-warning-bg, -10), 5%) !default;
518
519$state-danger-text: #a94442 !default;
520$state-danger-bg: #f2dede !default;
521$state-danger-border: darken(adjust-hue($state-danger-bg, -10), 5%) !default;
522
523
524//== Tooltips
525//
526//##
527
528//** Tooltip max width
529$tooltip-max-width: 200px !default;
530//** Tooltip text color
531$tooltip-color: #fff !default;
532//** Tooltip background color
533$tooltip-bg: #000 !default;
534$tooltip-opacity: .9 !default;
535
536//** Tooltip arrow width
537$tooltip-arrow-width: 5px !default;
538//** Tooltip arrow color
539$tooltip-arrow-color: $tooltip-bg !default;
540
541
542//== Popovers
543//
544//##
545
546//** Popover body background color
547$popover-bg: #fff !default;
548//** Popover maximum width
549$popover-max-width: 276px !default;
550//** Popover border color
551$popover-border-color: rgba(0,0,0,.2) !default;
552//** Popover fallback border color
553$popover-fallback-border-color: #ccc !default;
554
555//** Popover title background color
556$popover-title-bg: darken($popover-bg, 3%) !default;
557
558//** Popover arrow width
559$popover-arrow-width: 10px !default;
560//** Popover arrow color
561$popover-arrow-color: $popover-bg !default;
562
563//** Popover outer arrow width
564$popover-arrow-outer-width: ($popover-arrow-width + 1) !default;
565//** Popover outer arrow color
566$popover-arrow-outer-color: fade_in($popover-border-color, 0.05) !default;
567//** Popover outer arrow fallback color
568$popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%) !default;
569
570
571//== Labels
572//
573//##
574
575//** Default label background color
576$label-default-bg: $gray-light !default;
577//** Primary label background color
578$label-primary-bg: $brand-primary !default;
579//** Success label background color
580$label-success-bg: $brand-success !default;
581//** Info label background color
582$label-info-bg: $brand-info !default;
583//** Warning label background color
584$label-warning-bg: $brand-warning !default;
585//** Danger label background color
586$label-danger-bg: $brand-danger !default;
587
588//** Default label text color
589$label-color: #fff !default;
590//** Default text color of a linked label
591$label-link-hover-color: #fff !default;
592
593
594//== Modals
595//
596//##
597
598//** Padding applied to the modal body
599$modal-inner-padding: 15px !default;
600
601//** Padding applied to the modal title
602$modal-title-padding: 15px !default;
603//** Modal title line-height
604$modal-title-line-height: $line-height-base !default;
605
606//** Background color of modal content area
607$modal-content-bg: #fff !default;
608//** Modal content border color
609$modal-content-border-color: rgba(0,0,0,.2) !default;
610//** Modal content border color **for IE8**
611$modal-content-fallback-border-color: #999 !default;
612
613//** Modal backdrop background color
614$modal-backdrop-bg: #000 !default;
615//** Modal backdrop opacity
616$modal-backdrop-opacity: .5 !default;
617//** Modal header border color
618$modal-header-border-color: #e5e5e5 !default;
619//** Modal footer border color
620$modal-footer-border-color: $modal-header-border-color !default;
621
622$modal-lg: 900px !default;
623$modal-md: 600px !default;
624$modal-sm: 300px !default;
625
626
627//== Alerts
628//
629//## Define alert colors, border radius, and padding.
630
631$alert-padding: 15px !default;
632$alert-border-radius: $border-radius-base !default;
633$alert-link-font-weight: bold !default;
634
635$alert-success-bg: $state-success-bg !default;
636$alert-success-text: $state-success-text !default;
637$alert-success-border: $state-success-border !default;
638
639$alert-info-bg: $state-info-bg !default;
640$alert-info-text: $state-info-text !default;
641$alert-info-border: $state-info-border !default;
642
643$alert-warning-bg: $state-warning-bg !default;
644$alert-warning-text: $state-warning-text !default;
645$alert-warning-border: $state-warning-border !default;
646
647$alert-danger-bg: $state-danger-bg !default;
648$alert-danger-text: $state-danger-text !default;
649$alert-danger-border: $state-danger-border !default;
650
651
652//== Progress bars
653//
654//##
655
656//** Background color of the whole progress component
657$progress-bg: #f5f5f5 !default;
658//** Progress bar text color
659$progress-bar-color: #fff !default;
660//** Variable for setting rounded corners on progress bar.
661$progress-border-radius: $border-radius-base !default;
662
663//** Default progress bar color
664$progress-bar-bg: $brand-primary !default;
665//** Success progress bar color
666$progress-bar-success-bg: $brand-success !default;
667//** Warning progress bar color
668$progress-bar-warning-bg: $brand-warning !default;
669//** Danger progress bar color
670$progress-bar-danger-bg: $brand-danger !default;
671//** Info progress bar color
672$progress-bar-info-bg: $brand-info !default;
673
674
675//== List group
676//
677//##
678
679//** Background color on `.list-group-item`
680$list-group-bg: #fff !default;
681//** `.list-group-item` border color
682$list-group-border: #ddd !default;
683//** List group border radius
684$list-group-border-radius: $border-radius-base !default;
685
686//** Background color of single list items on hover
687$list-group-hover-bg: #f5f5f5 !default;
688//** Text color of active list items
689$list-group-active-color: $component-active-color !default;
690//** Background color of active list items
691$list-group-active-bg: $component-active-bg !default;
692//** Border color of active list elements
693$list-group-active-border: $list-group-active-bg !default;
694//** Text color for content within active list items
695$list-group-active-text-color: lighten($list-group-active-bg, 40%) !default;
696
697//** Text color of disabled list items
698$list-group-disabled-color: $gray-light !default;
699//** Background color of disabled list items
700$list-group-disabled-bg: $gray-lighter !default;
701//** Text color for content within disabled list items
702$list-group-disabled-text-color: $list-group-disabled-color !default;
703
704$list-group-link-color: #555 !default;
705$list-group-link-hover-color: $list-group-link-color !default;
706$list-group-link-heading-color: #333 !default;
707
708
709//== Panels
710//
711//##
712
713$panel-bg: #fff !default;
714$panel-body-padding: 15px !default;
715$panel-heading-padding: 10px 15px !default;
716$panel-footer-padding: $panel-heading-padding !default;
717$panel-border-radius: $border-radius-base !default;
718
719//** Border color for elements within panels
720$panel-inner-border: #ddd !default;
721$panel-footer-bg: #f5f5f5 !default;
722
723$panel-default-text: $gray-dark !default;
724$panel-default-border: #ddd !default;
725$panel-default-heading-bg: #f5f5f5 !default;
726
727$panel-primary-text: #fff !default;
728$panel-primary-border: $brand-primary !default;
729$panel-primary-heading-bg: $brand-primary !default;
730
731$panel-success-text: $state-success-text !default;
732$panel-success-border: $state-success-border !default;
733$panel-success-heading-bg: $state-success-bg !default;
734
735$panel-info-text: $state-info-text !default;
736$panel-info-border: $state-info-border !default;
737$panel-info-heading-bg: $state-info-bg !default;
738
739$panel-warning-text: $state-warning-text !default;
740$panel-warning-border: $state-warning-border !default;
741$panel-warning-heading-bg: $state-warning-bg !default;
742
743$panel-danger-text: $state-danger-text !default;
744$panel-danger-border: $state-danger-border !default;
745$panel-danger-heading-bg: $state-danger-bg !default;
746
747
748//== Thumbnails
749//
750//##
751
752//** Padding around the thumbnail image
753$thumbnail-padding: 4px !default;
754//** Thumbnail background color
755$thumbnail-bg: $body-bg !default;
756//** Thumbnail border color
757$thumbnail-border: #ddd !default;
758//** Thumbnail border radius
759$thumbnail-border-radius: $border-radius-base !default;
760
761//** Custom text color for thumbnail captions
762$thumbnail-caption-color: $text-color !default;
763//** Padding around the thumbnail caption
764$thumbnail-caption-padding: 9px !default;
765
766
767//== Wells
768//
769//##
770
771$well-bg: #f5f5f5 !default;
772$well-border: darken($well-bg, 7%) !default;
773
774
775//== Badges
776//
777//##
778
779$badge-color: #fff !default;
780//** Linked badge text color on hover
781$badge-link-hover-color: #fff !default;
782$badge-bg: $gray-light !default;
783
784//** Badge text color in active nav link
785$badge-active-color: $link-color !default;
786//** Badge background color in active nav link
787$badge-active-bg: #fff !default;
788
789$badge-font-weight: bold !default;
790$badge-line-height: 1 !default;
791$badge-border-radius: 10px !default;
792
793
794//== Breadcrumbs
795//
796//##
797
798$breadcrumb-padding-vertical: 8px !default;
799$breadcrumb-padding-horizontal: 15px !default;
800//** Breadcrumb background color
801$breadcrumb-bg: #f5f5f5 !default;
802//** Breadcrumb text color
803$breadcrumb-color: #ccc !default;
804//** Text color of current page in the breadcrumb
805$breadcrumb-active-color: $gray-light !default;
806//** Textual separator for between breadcrumb elements
807$breadcrumb-separator: "/" !default;
808
809
810//== Carousel
811//
812//##
813
814$carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6) !default;
815
816$carousel-control-color: #fff !default;
817$carousel-control-width: 15% !default;
818$carousel-control-opacity: .5 !default;
819$carousel-control-font-size: 20px !default;
820
821$carousel-indicator-active-bg: #fff !default;
822$carousel-indicator-border-color: #fff !default;
823
824$carousel-caption-color: #fff !default;
825
826
827//== Close
828//
829//##
830
831$close-font-weight: bold !default;
832$close-color: #000 !default;
833$close-text-shadow: 0 1px 0 #fff !default;
834
835
836//== Code
837//
838//##
839
840$code-color: #c7254e !default;
841$code-bg: #f9f2f4 !default;
842
843$kbd-color: #fff !default;
844$kbd-bg: #333 !default;
845
846$pre-bg: #f5f5f5 !default;
847$pre-color: $gray-dark !default;
848$pre-border-color: #ccc !default;
849$pre-scrollable-max-height: 340px !default;
850
851
852//== Type
853//
854//##
855
856//** Horizontal offset for forms and lists.
857$component-offset-horizontal: 180px !default;
858//** Text muted color
859$text-muted: $gray-light !default;
860//** Abbreviations and acronyms border color
861$abbr-border-color: $gray-light !default;
862//** Headings small color
863$headings-small-color: $gray-light !default;
864//** Blockquote small color
865$blockquote-small-color: $gray-light !default;
866//** Blockquote font size
867$blockquote-font-size: ($font-size-base * 1.25) !default;
868//** Blockquote border color
869$blockquote-border-color: $gray-lighter !default;
870//** Page header border color
871$page-header-border-color: $gray-lighter !default;
872//** Width of horizontal description list titles
873$dl-horizontal-offset: $component-offset-horizontal !default;
874//** Point at which .dl-horizontal becomes horizontal
875$dl-horizontal-breakpoint: $grid-float-breakpoint !default;
876//** Horizontal line color.
877$hr-border: $gray-lighter !default;
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index f696df968..40153a51b 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -1,6 +1,6 @@
1import './embed.scss' 1import './embed.scss'
2 2
3import videojs from 'video.js' 3import * as videojs from 'video.js'
4import '../../assets/player/peertube-videojs-plugin' 4import '../../assets/player/peertube-videojs-plugin'
5import 'videojs-dock/dist/videojs-dock.es.js' 5import 'videojs-dock/dist/videojs-dock.es.js'
6import { VideoDetails } from '../../../../shared' 6import { VideoDetails } from '../../../../shared'
diff --git a/client/src/tsconfig.app.json b/client/src/tsconfig.app.json
new file mode 100644
index 000000000..39ba8dbac
--- /dev/null
+++ b/client/src/tsconfig.app.json
@@ -0,0 +1,13 @@
1{
2 "extends": "../tsconfig.json",
3 "compilerOptions": {
4 "outDir": "../out-tsc/app",
5 "baseUrl": "./",
6 "module": "es2015",
7 "types": []
8 },
9 "exclude": [
10 "test.ts",
11 "**/*.spec.ts"
12 ]
13}
diff --git a/client/src/typings.d.ts b/client/src/typings.d.ts
new file mode 100644
index 000000000..ef5c7bd62
--- /dev/null
+++ b/client/src/typings.d.ts
@@ -0,0 +1,5 @@
1/* SystemJS module definition */
2declare var module: NodeModule;
3interface NodeModule {
4 id: string;
5}