diff --git a/front/src/app/_animations/fade-in.animation.ts b/front/src/app/_animations/fade-in.animation.ts deleted file mode 100644 index 273e7c0..0000000 --- a/front/src/app/_animations/fade-in.animation.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { trigger, animate, transition, style } from '@angular/animations'; - -export const fadeInAnimation = - trigger('fadeInAnimation', [ - // route 'enter' transition - transition(':enter', [ - - // styles at start of transition - style({ opacity: 0 }), - - // animation and styles at end of transition - animate('.5s', style({ opacity: 1 })) - ]), - ]); - diff --git a/front/src/app/_animations/index.ts b/front/src/app/_animations/index.ts deleted file mode 100644 index 893db99..0000000 --- a/front/src/app/_animations/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './fade-in.animation'; -export * from './slide-in-out.animation'; diff --git a/front/src/app/_animations/slide-in-out.animation.ts b/front/src/app/_animations/slide-in-out.animation.ts deleted file mode 100644 index 3c72bc5..0000000 --- a/front/src/app/_animations/slide-in-out.animation.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { trigger, state, animate, transition, style } from '@angular/animations'; - -export const slideInOutAnimation = - trigger('slideInOutAnimation', [ - - // end state styles for route container (host) - state('*', style({ - // the view covers the whole screen with a semi tranparent background - position: 'fixed', - top: 0, - left: 0, - right: 0, - bottom: 0, - backgroundColor: 'rgba(0, 0, 0, 0.8)' - })), - - // route 'enter' transition - transition(':enter', [ - - // styles at start of transition - style({ - // start with the content positioned off the right of the screen, - // -400% is required instead of -100% because the negative position adds to the width of the element - right: '-400%', - - // start with background opacity set to 0 (invisible) - backgroundColor: 'rgba(0, 0, 0, 0)' - }), - - // animation and styles at end of transition - animate('.5s ease-in-out', style({ - // transition the right position to 0 which slides the content into view - right: 0, - - // transition the background opacity to 0.8 to fade it in - backgroundColor: 'rgba(0, 0, 0, 0.8)' - })) - ]), - - // route 'leave' transition - transition(':leave', [ - // animation and styles at end of transition - animate('.5s ease-in-out', style({ - // transition the right position to -400% which slides the content out of view - right: '-400%', - - // transition the background opacity to 0 to fade it out - backgroundColor: 'rgba(0, 0, 0, 0)' - })) - ]) - ]); diff --git a/front/src/app/app.module.ts b/front/src/app/app.module.ts index 4a7f4cf..5b2ecde 100644 --- a/front/src/app/app.module.ts +++ b/front/src/app/app.module.ts @@ -7,7 +7,6 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { HttpClientModule } from '@angular/common/http'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; // this is needed for dynamic selection of the select import { AppRoutingModule } from './app-routing.module'; @@ -97,7 +96,6 @@ import { AppComponent } from './app.component'; BrowserModule, RouterModule, AppRoutingModule, - BrowserAnimationsModule, HttpClientModule, FormsModule, ReactiveFormsModule, diff --git a/front/src/app/popin/delete-confirm/delete-confirm.ts b/front/src/app/popin/delete-confirm/delete-confirm.ts index 3dbf33e..f714ebe 100644 --- a/front/src/app/popin/delete-confirm/delete-confirm.ts +++ b/front/src/app/popin/delete-confirm/delete-confirm.ts @@ -3,7 +3,7 @@ * @copyright 2018, Edouard DUPIN, all right reserved * @license PROPRIETARY (see license file) */ -import { Injectable, Component, OnInit, Input, Output, SimpleChanges, EventEmitter } from '@angular/core'; +import { Injectable, Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; // import { AppRoutingModule } from "../app-routing.module"; diff --git a/front/src/app/popin/upload-progress/upload-progress.ts b/front/src/app/popin/upload-progress/upload-progress.ts index bb89ad3..f79990c 100644 --- a/front/src/app/popin/upload-progress/upload-progress.ts +++ b/front/src/app/popin/upload-progress/upload-progress.ts @@ -8,8 +8,6 @@ import { Injectable, Component, OnInit, Input, SimpleChanges } from '@angular/co // import { AppRoutingModule } from "../app-routing.module"; import { Router } from '@angular/router'; -import { ActivatedRoute, Params } from '@angular/router'; -import { TypeService } from '../../service/type'; import { PopInService } from '../../service/popin'; @Component({ diff --git a/front/src/app/scene/home/home.ts b/front/src/app/scene/home/home.ts index 1e88dbc..0274473 100644 --- a/front/src/app/scene/home/home.ts +++ b/front/src/app/scene/home/home.ts @@ -6,7 +6,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; import { TypeService } from '../../service/type'; import { ArianeService } from '../../service/ariane'; @@ -14,9 +13,7 @@ import { ArianeService } from '../../service/ariane'; @Component({ selector: 'app-home', templateUrl: './home.html', - styleUrls: [ './home.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './home.less' ] }) export class HomeScene implements OnInit { dataList = []; diff --git a/front/src/app/scene/login/login.ts b/front/src/app/scene/login/login.ts index b0cbafe..2a271c3 100644 --- a/front/src/app/scene/login/login.ts +++ b/front/src/app/scene/login/login.ts @@ -8,7 +8,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Router } from '@angular/router'; import { Location } from '@angular/common'; -import { fadeInAnimation } from '../../_animations/index'; import { UserService } from '../../service/user'; import { SessionService } from '../../service/session'; import { CookiesService } from '../../service/cookies'; @@ -45,9 +44,7 @@ declare function SHA512(param1: any): any; @Component({ selector: 'app-login', templateUrl: './login.html', - styleUrls: [ './login.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './login.less' ] }) export class LoginScene implements OnInit { public loginOK:boolean = false; diff --git a/front/src/app/scene/season-edit/season-edit.ts b/front/src/app/scene/season-edit/season-edit.ts index 8e85b09..a405e04 100644 --- a/front/src/app/scene/season-edit/season-edit.ts +++ b/front/src/app/scene/season-edit/season-edit.ts @@ -6,7 +6,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; import { SeasonService } from '../../service/season'; import { ArianeService } from '../../service/ariane'; @@ -21,9 +20,7 @@ export interface ElementList { @Component({ selector: 'app-season-edit', templateUrl: './season-edit.html', - styleUrls: [ './season-edit.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './season-edit.less' ] }) export class SeasonEditScene implements OnInit { diff --git a/front/src/app/scene/season/season.ts b/front/src/app/scene/season/season.ts index 1f8142a..951dfd4 100644 --- a/front/src/app/scene/season/season.ts +++ b/front/src/app/scene/season/season.ts @@ -6,7 +6,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; import { SeasonService } from '../../service/season'; import { SeriesService } from '../../service/series'; @@ -15,9 +14,7 @@ import { ArianeService } from '../../service/ariane'; @Component({ selector: 'app-season', templateUrl: './season.html', - styleUrls: [ './season.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './season.less' ] }) export class SeasonScene implements OnInit { name: string = ''; diff --git a/front/src/app/scene/series-edit/series-edit.ts b/front/src/app/scene/series-edit/series-edit.ts index 9b44e42..c02e712 100644 --- a/front/src/app/scene/series-edit/series-edit.ts +++ b/front/src/app/scene/series-edit/series-edit.ts @@ -4,10 +4,9 @@ * @license PROPRIETARY (see license file) */ -import { Component, OnInit, ElementRef } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { Location } from '@angular/common'; -import { fadeInAnimation } from '../../_animations/index'; import { SeriesService } from '../../service/series'; import { DataService } from '../../service/data'; @@ -28,9 +27,7 @@ export class ElementList { @Component({ selector: 'app-series-edit', templateUrl: './series-edit.html', - styleUrls: [ './series-edit.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './series-edit.less' ] }) export class SeriesEditScene implements OnInit { diff --git a/front/src/app/scene/series/series.ts b/front/src/app/scene/series/series.ts index 325c948..9a87440 100644 --- a/front/src/app/scene/series/series.ts +++ b/front/src/app/scene/series/series.ts @@ -6,7 +6,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; import { SeriesService } from '../../service/series'; import { ArianeService } from '../../service/ariane'; @@ -14,9 +13,7 @@ import { ArianeService } from '../../service/ariane'; @Component({ selector: 'app-series', templateUrl: './series.html', - styleUrls: [ './series.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './series.less' ] }) export class SeriesScene implements OnInit { diff --git a/front/src/app/scene/sign-up/sign-up.ts b/front/src/app/scene/sign-up/sign-up.ts index e0ebe9c..a82ae17 100644 --- a/front/src/app/scene/sign-up/sign-up.ts +++ b/front/src/app/scene/sign-up/sign-up.ts @@ -7,7 +7,6 @@ import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { checkLoginValidity, checkEmailValidity, checkPasswordValidity } from '../login/login'; -import { fadeInAnimation } from '../../_animations/index'; import { UserService } from '../../service/user'; import { ArianeService } from '../../service/ariane'; @@ -15,9 +14,7 @@ import { ArianeService } from '../../service/ariane'; @Component({ selector: 'app-sign-up', templateUrl: './sign-up.html', - styleUrls: [ './sign-up.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './sign-up.less' ] }) export class SignUpScene implements OnInit { diff --git a/front/src/app/scene/type/type.ts b/front/src/app/scene/type/type.ts index 8bdab9c..3da5fa3 100644 --- a/front/src/app/scene/type/type.ts +++ b/front/src/app/scene/type/type.ts @@ -6,7 +6,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; import { TypeService } from '../../service/type'; import { ArianeService } from '../../service/ariane'; @@ -14,9 +13,7 @@ import { ArianeService } from '../../service/ariane'; @Component({ selector: 'app-type', templateUrl: './type.html', - styleUrls: [ './type.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './type.less' ] }) export class TypeScene implements OnInit { diff --git a/front/src/app/scene/universe/universe.ts b/front/src/app/scene/universe/universe.ts index f329bc5..fa98d77 100644 --- a/front/src/app/scene/universe/universe.ts +++ b/front/src/app/scene/universe/universe.ts @@ -7,16 +7,13 @@ import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; import { ArianeService } from '../../service/ariane'; import { environment } from '../../../environments/environment'; @Component({ selector: 'app-universe', templateUrl: './universe.html', - styleUrls: [ './universe.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './universe.less' ] }) export class UniverseScene implements OnInit { diff --git a/front/src/app/scene/upload/upload.ts b/front/src/app/scene/upload/upload.ts index 05c256b..acf2cc7 100644 --- a/front/src/app/scene/upload/upload.ts +++ b/front/src/app/scene/upload/upload.ts @@ -6,8 +6,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; - import { PopInService } from '../../service/popin'; import { TypeService } from '../../service/type'; @@ -50,9 +48,7 @@ export class FileFailParsedElement { @Component({ selector: 'app-video-edit', templateUrl: './upload.html', - styleUrls: [ './upload.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './upload.less' ] }) export class UploadScene implements OnInit { diff --git a/front/src/app/scene/video-edit/video-edit.ts b/front/src/app/scene/video-edit/video-edit.ts index edb54cc..86d8221 100644 --- a/front/src/app/scene/video-edit/video-edit.ts +++ b/front/src/app/scene/video-edit/video-edit.ts @@ -6,7 +6,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; import { PopInService } from '../../service/popin'; @@ -55,9 +54,7 @@ class DataToSend { @Component({ selector: 'app-video-edit', templateUrl: './video-edit.html', - styleUrls: [ './video-edit.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './video-edit.less' ] }) export class VideoEditScene implements OnInit { diff --git a/front/src/app/scene/video/video.ts b/front/src/app/scene/video/video.ts index c212e96..293b252 100644 --- a/front/src/app/scene/video/video.ts +++ b/front/src/app/scene/video/video.ts @@ -6,7 +6,6 @@ import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { fadeInAnimation } from '../../_animations/index'; import { HttpWrapperService } from '../../service/http-wrapper'; import { VideoService } from '../../service/video'; import { SeriesService } from '../../service/series'; @@ -16,9 +15,7 @@ import { ArianeService } from '../../service/ariane'; @Component({ selector: 'app-video', templateUrl: './video.html', - styleUrls: [ './video.less' ], - animations: [ fadeInAnimation ], - host: { '[@fadeInAnimation]': '' } + styleUrls: [ './video.less' ] }) export class VideoScene implements OnInit { diff --git a/front/src/app/service/season.ts b/front/src/app/service/season.ts index a2489bc..794185a 100644 --- a/front/src/app/service/season.ts +++ b/front/src/app/service/season.ts @@ -61,8 +61,8 @@ export class SeasonService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then((response) => { - // let data = response.gets_where([["==", "season_id", _id]], ["id", "name", "episode"], ["episode", "name"]) - let data = response.gets_where([ [ '==', 'season_id', id ] ], undefined, [ 'episode', 'name' ]); + // let data = response.gets_where([["==", "seasonId", _id]], ["id", "name", "episode"], ["episode", "name"]) + let data = response.gets_where([ [ '==', 'seasonId', id ] ], undefined, [ 'episode', 'name' ]); resolve(data.length); }).catch((response) => { reject(response); @@ -107,8 +107,8 @@ export class SeasonService { nodeId:number, progress:any = null) { const formData = new FormData(); - formData.append('file_name', file.name); - formData.append('node_id', nodeId.toString()); + formData.append('fileName', file.name); + formData.append('nodeId', nodeId.toString()); formData.append('file', file); let self = this; return new Promise((resolve, reject) => { diff --git a/front/src/app/service/series.ts b/front/src/app/service/series.ts index 33b3d51..53d8b4b 100644 --- a/front/src/app/service/series.ts +++ b/front/src/app/service/series.ts @@ -70,7 +70,7 @@ export class SeriesService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then((response:DataInterface) => { - let data = response.getsWhere([ [ '==', 'series_id', id ], [ '==', 'season_id', null ] ], undefined, [ 'episode', 'name' ]); + let data = response.getsWhere([ [ '==', 'seriesId', id ], [ '==', 'seasonId', null ] ], undefined, [ 'episode', 'name' ]); resolve(data); }).catch((response) => { reject(response); @@ -82,7 +82,7 @@ export class SeriesService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then((response:DataInterface) => { - let data = response.getsWhere([ [ '==', 'series_id', id ] ], undefined, undefined); + let data = response.getsWhere([ [ '==', 'seriesId', id ] ], undefined, undefined); resolve(data.length); }).catch((response) => { reject(response); @@ -101,7 +101,7 @@ export class SeriesService { return new Promise((resolve, reject) => { self.bdd.getSeason() .then((response:DataInterface) => { - let data = response.getsWhere([ [ '==', 'parent_id', id ] ], [ 'id' ], [ 'number' ]); + let data = response.getsWhere([ [ '==', 'parentId', id ] ], [ 'id' ], [ 'number' ]); if(select.length === 0) { resolve(data); return; @@ -177,8 +177,8 @@ export class SeriesService { nodeId:number, progress:any = null) { const formData = new FormData(); - formData.append('file_name', file.name); - formData.append('node_id', nodeId.toString()); + formData.append('fileName', file.name); + formData.append('nodeId', nodeId.toString()); formData.append('file', file); let self = this; return new Promise((resolve, reject) => { diff --git a/front/src/app/service/type.ts b/front/src/app/service/type.ts index 43f50e8..8ffbade 100644 --- a/front/src/app/service/type.ts +++ b/front/src/app/service/type.ts @@ -60,7 +60,7 @@ export class TypeService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then((response) => { - let data = response.gets_where([ [ '==', 'type_id', _id ] ], undefined, undefined); + let data = response.gets_where([ [ '==', 'typeId', _id ] ], undefined, undefined); resolve(data.length); }).catch((response) => { reject(response); @@ -74,16 +74,16 @@ export class TypeService { self.bdd.getVideo() .then((response) => { if(_select.length === 0) { - let data = response.gets_where([ [ '==', 'type_id', _id ], [ '==', 'series_id', null ], [ '==', 'universe_id', null ] ], undefined, [ 'name' ]); + let data = response.gets_where([ [ '==', 'typeId', _id ], [ '==', 'seriesId', null ], [ '==', 'universeId', null ] ], undefined, [ 'name' ]); resolve(data); return; } if(_select[0] === '*') { - let data = response.gets_where([ [ '==', 'type_id', _id ], [ '==', 'series_id', null ], [ '==', 'universe_id', null ] ], undefined, [ 'name' ]); + let data = response.gets_where([ [ '==', 'typeId', _id ], [ '==', 'seriesId', null ], [ '==', 'universeId', null ] ], undefined, [ 'name' ]); resolve(data); return; } - let data = response.gets_where([ [ '==', 'type_id', _id ], [ '==', 'series_id', null ], [ '==', 'universe_id', null ] ], _select, [ 'name' ]); + let data = response.gets_where([ [ '==', 'typeId', _id ], [ '==', 'seriesId', null ], [ '==', 'universeId', null ] ], _select, [ 'name' ]); resolve(data); return; }).catch((response) => { @@ -99,7 +99,7 @@ export class TypeService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then(function(response) { - let data = response.gets_where([["==", "type_id", _id], ["!=", "series_id", null], ["==", "universe_id", null]], ["series_id"], ["name"]); + let data = response.gets_where([["==", "typeId", _id], ["!=", "seriesId", null], ["==", "universeId", null]], ["seriesId"], ["name"]); if (_select.length == 0) { resolve(data); return; @@ -125,7 +125,7 @@ export class TypeService { return new Promise((resolve, reject) => { self.bdd.getSeries() .then((response) => { - let data = response.gets_where([ [ '==', 'parent_id', _id ] ], undefined, [ 'name' ]); + let data = response.gets_where([ [ '==', 'parentId', _id ] ], undefined, [ 'name' ]); resolve(data); }).catch((response) => { reject(response); @@ -138,7 +138,7 @@ export class TypeService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then((response) => { - let data = response.data.gets_where([ [ '==', 'type_id', _id ], [ '==', 'series_id', null ], [ '==', 'universe_id', null ] ], [ 'univers_id' ], [ 'name' ]); + let data = response.data.gets_where([ [ '==', 'typeId', _id ], [ '==', 'seriesId', null ], [ '==', 'universeId', null ] ], [ 'universId' ], [ 'name' ]); if(_select.length === 0) { resolve(data); return; diff --git a/front/src/app/service/video.ts b/front/src/app/service/video.ts index b85f43a..1f32c32 100644 --- a/front/src/app/service/video.ts +++ b/front/src/app/service/video.ts @@ -61,9 +61,9 @@ export class VideoService { formData.append('file', file); formData.append('universe', universe); if(seriesId !== null) { - formData.append('series_id', seriesId.toString()); + formData.append('seriesId', seriesId.toString()); } else { - formData.append('series_id', null); + formData.append('seriesId', null); } formData.append('series', series); if(season !== null) { @@ -80,9 +80,9 @@ export class VideoService { formData.append('title', title); if(typeId !== null) { - formData.append('type_id', typeId.toString()); + formData.append('typeId', typeId.toString()); } else { - formData.append('type_id', null); + formData.append('typeId', null); } return this.http.uploadMultipart(`${this.serviceName }/upload/`, formData, progress); } @@ -109,8 +109,8 @@ export class VideoService { mediaId:number, progress:any = null) { const formData = new FormData(); - formData.append('file_name', file.name); - formData.append('type_id', mediaId.toString()); + formData.append('fileName', file.name); + formData.append('typeId', mediaId.toString()); formData.append('file', file); let self = this; return new Promise((resolve, reject) => { @@ -132,8 +132,8 @@ export class VideoService { mediaId:number, progress:any = null) { const formData = new FormData(); - formData.append('file_name', 'take_screenshoot'); - formData.append('type_id', mediaId.toString()); + formData.append('fileName', 'take_screenshoot'); + formData.append('typeId', mediaId.toString()); formData.append('file', blob); let self = this; return new Promise((resolve, reject) => {