[DEV] rework worktree for the front-end

This commit is contained in:
Edouard DUPIN 2020-01-12 22:50:46 +01:00
parent 32df2db0bf
commit ace8bf5e85
97 changed files with 408 additions and 729 deletions

View File

@ -8,14 +8,15 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { ModuleWithProviders } from '@angular/core'; import { ModuleWithProviders } from '@angular/core';
import { HomeComponent } from './home/home.component'; import { HomeComponent } from './scene/home/home.component';
import { TypeDetailComponent } from './type-detail/type-detail.component'; import { TypeComponent } from './scene/type/type.component';
import { GroupDetailComponent } from './group-detail/group-detail.component'; import { UniversComponent } from './scene/univers/univers';
import { SaisonDetailComponent } from './saison-detail/saison-detail.component'; import { GroupComponent } from './scene/group/group.component';
import { VideoDetailComponent } from './video-detail/video-detail.component'; import { SaisonComponent } from './scene/saison/saison.component';
import { LoginComponent } from './login/login.component'; import { VideoComponent } from './scene/video/video.component';
import { SignUpComponent } from './sign-up/sign-up.component'; import { LoginComponent } from './scene/login/login.component';
import { SettingsComponent } from './settings/settings.component'; import { SignUpComponent } from './scene/sign-up/sign-up.component';
import { SettingsComponent } from './scene/settings/settings.component';
import { VideoEditComponent } from './scene/video-edit/video-edit'; import { VideoEditComponent } from './scene/video-edit/video-edit';
//import { HelpComponent } from './help/help.component'; //import { HelpComponent } from './help/help.component';
@ -23,11 +24,19 @@ import { VideoEditComponent } from './scene/video-edit/video-edit';
const routes: Routes = [ const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full'}, { path: '', redirectTo: '/home', pathMatch: 'full'},
{ path: 'home', component: HomeComponent }, { path: 'home', component: HomeComponent },
{ path: 'type/:id', component: TypeDetailComponent }, { path: 'type/:type_id', component: TypeComponent },
{ path: 'group/:id', component: GroupDetailComponent }, { path: 'univers/:univers_id', component: UniversComponent },
{ path: 'saison/:id', component: SaisonDetailComponent }, //{ path: 'type/:type_id/univers/:univers_id', component: UniversComponent },
{ path: 'video/:id', component: VideoDetailComponent }, { path: 'group/:group_id', component: GroupComponent },
{ path: 'video-edit/:id', component: VideoEditComponent }, //{ path: 'type/:type_id/group/:group_id', component: GroupComponent },
//{ path: 'type/:type_id/univers/:univers_id/group/:group_id', component: GroupComponent },
//{ path: 'univers/:univers_id/group/:group_id', component: GroupComponent },
{ path: 'saison/:saison_id', component: SaisonComponent },
//{ path: 'type/:type_id/univers/:univers_id/group/:group_id/saison/:saison_id', component: SaisonComponent },
{ path: 'video/:video_id', component: VideoComponent },
//{ path: 'type/:type_id/univers/:univers_id/group/:group_id/saison/:saison_id/video/:video_id', component: VideoComponent },
//{ path: 'type/:type_id/univers/:univers_id/group/:group_id/saison/:saison_id/video/:video_id/edit', component: VideoEditComponent },
{ path: 'video-edit/:video_id', component: VideoEditComponent },
{ path: 'login', component: LoginComponent }, { path: 'login', component: LoginComponent },
{ path: 'signup', component: SignUpComponent }, { path: 'signup', component: SignUpComponent },
{ path: 'settings', component: SettingsComponent }, { path: 'settings', component: SettingsComponent },

View File

@ -1,27 +0,0 @@
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
it(`should have as title 'app'`, async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app');
}));
it('should render title in a h1 tag', async(() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
}));
});

View File

@ -5,9 +5,9 @@
*/ */
import { Component, OnInit} from '@angular/core'; import { Component, OnInit} from '@angular/core';
import { UserService } from './user.service'; import { UserService } from './service/user.service';
import { SessionService } from './session.service'; import { SessionService } from './service/session.service';
import { CookiesService } from './cookies.service'; import { CookiesService } from './service/cookies.service';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',

View File

@ -14,37 +14,39 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { routing } from './app-routing.module'; import { routing } from './app-routing.module';
import { HelpComponent } from './help/help.component'; import { UploadFileComponent } from './component/upload-file/upload-file.component';
import { AuthService } from './auth.service'; import { TopMenuComponent } from './component/top-menu/top-menu.component';
import { UploadFileComponent } from './upload-file/upload-file.component'; import { ElementTypeComponent } from './component/element-type/element-type.component';
import { TopMenuComponent } from './top-menu/top-menu.component'; import { ElementGroupComponent } from './component/element-group/element-group.component';
import { ElementTypeComponent } from './element-type/element-type.component'; import { ElementSaisonComponent } from './component/element-saison/element-saison.component';
import { ElementGroupComponent } from './element-group/element-group.component'; import { ElementVideoComponent } from './component/element-video/element-video.component';
import { ElementSaisonComponent } from './element-saison/element-saison.component';
import { ElementVideoComponent } from './element-video/element-video.component'; import { HelpComponent } from './scene/help/help.component';
import { LoginComponent } from './login/login.component'; import { LoginComponent } from './scene/login/login.component';
import { SignUpComponent } from './sign-up/sign-up.component'; import { SignUpComponent } from './scene/sign-up/sign-up.component';
import { ValidateEmailComponent } from './validate-email/validate-email.component'; import { ValidateEmailComponent } from './scene/validate-email/validate-email.component';
import { HomeComponent } from './home/home.component'; import { HomeComponent } from './scene/home/home.component';
import { TypeDetailComponent } from './type-detail/type-detail.component'; import { TypeComponent } from './scene/type/type.component';
import { GroupDetailComponent } from './group-detail/group-detail.component'; import { UniversComponent } from './scene/univers/univers';
import { SaisonDetailComponent } from './saison-detail/saison-detail.component'; import { GroupComponent } from './scene/group/group.component';
import { VideoDetailComponent } from './video-detail/video-detail.component'; import { SaisonComponent } from './scene/saison/saison.component';
import { SettingsComponent } from './settings/settings.component'; import { VideoComponent } from './scene/video/video.component';
import { ErrorViewerComponent } from './error-viewer/error-viewer.component'; import { SettingsComponent } from './scene/settings/settings.component';
import { ErrorViewerComponent } from './scene/error-viewer/error-viewer.component';
import { ErrorComponent } from './error/error.component'; import { ErrorComponent } from './error/error.component';
import { VideoEditComponent } from './scene/video-edit/video-edit'; import { VideoEditComponent } from './scene/video-edit/video-edit';
import { ArianeService } from './ariane.service'; import { AuthService } from './service/auth.service';
import { CookiesService } from './cookies.service'; import { ArianeService } from './service/ariane.service';
import { HttpWrapperService } from './http-wrapper.service'; import { CookiesService } from './service/cookies.service';
import { UserService } from './user.service'; import { HttpWrapperService } from './service/http-wrapper.service';
import { UniversService } from './univers.service'; import { UserService } from './service/user.service';
import { GroupService } from './group.service'; import { UniversService } from './service/univers.service';
import { TypeService } from './type.service'; import { GroupService } from './service/group.service';
import { SaisonService } from './saison.service'; import { TypeService } from './service/type.service';
import { VideoService } from './video.service'; import { SaisonService } from './service/saison.service';
import { SessionService } from './session.service'; import { VideoService } from './service/video.service';
import { SessionService } from './service/session.service';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
@ -64,10 +66,11 @@ import { AppComponent } from './app.component';
SignUpComponent, SignUpComponent,
ValidateEmailComponent, ValidateEmailComponent,
HomeComponent, HomeComponent,
TypeDetailComponent, TypeComponent,
GroupDetailComponent, UniversComponent,
SaisonDetailComponent, GroupComponent,
VideoDetailComponent, SaisonComponent,
VideoComponent,
SettingsComponent, SettingsComponent,
ErrorViewerComponent, ErrorViewerComponent,
ErrorComponent, ErrorComponent,

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { AuthService } from './auth.service';
describe('AuthService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [AuthService]
});
});
it('should be created', inject([AuthService], (service: AuthService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -9,7 +9,7 @@ import { Injectable, Component, OnInit, Input } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { GroupService } from '../group.service'; import { GroupService } from '../../service/group.service';
@Component({ @Component({
selector: 'app-element-group', selector: 'app-element-group',

View File

@ -9,7 +9,7 @@ import { Injectable, Component, OnInit, Input } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { SaisonService } from '../saison.service'; import { SaisonService } from '../../service/saison.service';
@Component({ @Component({
selector: 'app-element-saison', selector: 'app-element-saison',

View File

@ -9,7 +9,7 @@ import { Injectable, Component, OnInit, Input } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { TypeService } from '../type.service'; import { TypeService } from '../../service/type.service';
@Component({ @Component({
selector: 'app-element-type', selector: 'app-element-type',

View File

@ -9,8 +9,8 @@ import { Injectable, Component, OnInit, Input } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { VideoService } from '../video.service'; import { VideoService } from '../../service/video.service';
import { HttpWrapperService } from '../http-wrapper.service'; import { HttpWrapperService } from '../../service/http-wrapper.service';
@Component({ @Component({
selector: 'app-element-video', selector: 'app-element-video',

View File

@ -2,28 +2,71 @@
<div id="main-menu" class="main-menu color-menu-background"> <div id="main-menu" class="main-menu color-menu-background">
<button class="item" <button class="item"
(click)="onHome()"> (click)="onHome()">
<div class="xdesktop">
<i class="material-icons">home</i> Home <i class="material-icons">home</i> Home
</div>
<div class="xmobile">
<i class="material-icons">home</i>
</div>
</button> </button>
<div class="ariane"> <div class="ariane">
<button class="item" *ngIf="ariane_type_id != null" title="type" (click)="onArianeType()">{{ariane_type_name}}</button> <button class="item" *ngIf="ariane_type_id != null" title="type" (click)="onArianeType()">
<div class="xdesktop">
{{ariane_type_name}}
</div>
<div class="xmobile">
U
</div>
</button>
<div class="item_ariane_separator" *ngIf="ariane_univers_id != null && ariane_type_id != null" >/</div> <div class="item_ariane_separator" *ngIf="ariane_univers_id != null && ariane_type_id != null" >/</div>
<button class="item" *ngIf="ariane_univers_id != null" title="univers" (click)="onArianeUnivers()">{{ariane_univers_name}}</button> <button class="item" *ngIf="ariane_univers_id != null" title="univers" (click)="onArianeUnivers()">
<div class="xdesktop">
{{ariane_univers_name}}
</div>
<div class="xmobile">
U
</div>
</button>
<div class="item_ariane_separator" *ngIf="ariane_group_id != null && (ariane_univers_id != null || ariane_type_id != null)" >/</div> <div class="item_ariane_separator" *ngIf="ariane_group_id != null && (ariane_univers_id != null || ariane_type_id != null)" >/</div>
<button class="item" *ngIf="ariane_group_id != null" title="group" (click)="onArianeGroup()">{{ariane_group_name}}</button> <button class="item" *ngIf="ariane_group_id != null" title="group" (click)="onArianeGroup()">
<div class="xdesktop">
{{ariane_group_name}}
</div>
<div class="xmobile">
G
</div>
</button>
<div class="item_ariane_separator" *ngIf="ariane_saison_id != null && (ariane_group_id != null || ariane_univers_id != null || ariane_type_id != null)" >/</div> <div class="item_ariane_separator" *ngIf="ariane_saison_id != null && (ariane_group_id != null || ariane_univers_id != null || ariane_type_id != null)" >/</div>
<button class="item" *ngIf="ariane_saison_id != null" title="saison" (click)="onArianeSaison()">{{ariane_saison_name}}</button> <button class="item" *ngIf="ariane_saison_id != null" title="saison" (click)="onArianeSaison()">
<div class="xdesktop">
{{ariane_saison_name}}
</div>
<div class="xmobile">
N
</div>
</button>
</div> </div>
<button class="item" <button class="item"
*ngIf="login == null" *ngIf="login == null"
style="float:right;" style="float:right;"
(click)="onSignIn()"> (click)="onSignIn()">
<div class="xdesktop">
<i class="material-icons">add_circle_outline</i> Sign-up <i class="material-icons">add_circle_outline</i> Sign-up
</div>
<div class="xmobile">
<i class="material-icons">add_circle_outline</i>
</div>
</button> </button>
<button class="item" <button class="item"
*ngIf="login == null" *ngIf="login == null"
style="float:right;" style="float:right;"
(click)="onLogin()"> <!-- [routerLink]="['./login']" routerLinkActive="active" --> (click)="onLogin()"> <!-- [routerLink]="['./login']" routerLinkActive="active" -->
<div class="xdesktop">
<i class="material-icons">account_circle</i> Sign-in <i class="material-icons">account_circle</i> Sign-in
</div>
<div class="xmobile">
<i class="material-icons">account_circle</i>
</div>
</button> </button>
<button class="item" <button class="item"
*ngIf="login != null" *ngIf="login != null"
@ -35,7 +78,12 @@
*ngIf="editable == true" *ngIf="editable == true"
style="float:right; height:56px;" style="float:right; height:56px;"
(click)="onEdit()"> (click)="onEdit()">
<i class="material-icons">create</i> Edit <div class="xdesktop">
<i class="material-icons">edit</i> Edit
</div>
<div class="xmobile">
<i class="material-icons">edit</i>
</div>
</button> </button>
</div> </div>
<div class="fill-all" *ngIf="login != null &amp;&amp; displayUserMenu == true" (click)="onOutUserProperty()"> <div class="fill-all" *ngIf="login != null &amp;&amp; displayUserMenu == true" (click)="onOutUserProperty()">

View File

@ -107,6 +107,14 @@
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: bold;
font-size: 17px; font-size: 17px;
.comment {
visibility: "hidden";
}
@media all and (min-width: 700px) {
.comment {
visibility: "visible";
}
}
} }
.ariane { .ariane {

View File

@ -9,8 +9,8 @@ import { Injectable, Component, OnInit } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { SessionService } from '../session.service'; import { SessionService } from '../../service/session.service';
import { ArianeService } from '../ariane.service'; import { ArianeService } from '../../service/ariane.service';
@Component({ @Component({
selector: 'app-top-menu', selector: 'app-top-menu',

View File

@ -1,5 +1,5 @@
.uploadfilecontainer { .uploadfilecontainer {
//background-image: url("../../assets/cloud-2044823_960_720.png"); //background-image: url("../../../assets/cloud-2044823_960_720.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100px; background-size: 100px;
background-position: center; background-position: center;

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { CookiesService } from './cookies.service';
describe('CookiesService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [CookiesService]
});
});
it('should be created', inject([CookiesService], (service: CookiesService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ElementGroupComponent } from './top-menu.component';
describe('ElementGroupComponent', () => {
let component: ElementGroupComponent;
let fixture: ComponentFixture<ElementGroupComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ElementGroupComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ElementGroupComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ElementSaisonComponent } from './top-menu.component';
describe('ElementSaisonComponent', () => {
let component: ElementSaisonComponent;
let fixture: ComponentFixture<ElementSaisonComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ElementSaisonComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ElementSaisonComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ElementTypeComponent } from './top-menu.component';
describe('ElementTypeComponent', () => {
let component: ElementTypeComponent;
let fixture: ComponentFixture<ElementTypeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ElementTypeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ElementTypeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ElementVideoComponent } from './top-menu.component';
describe('ElementVideoComponent', () => {
let component: ElementVideoComponent;
let fixture: ComponentFixture<ElementVideoComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ElementVideoComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ElementVideoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ErrorViewerComponent } from './error-viewer.component';
describe('ErrorViewerComponent', () => {
let component: ErrorViewerComponent;
let fixture: ComponentFixture<ErrorViewerComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ErrorViewerComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ErrorViewerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ErrorComponent } from './error.component';
describe('ErrorComponent', () => {
let component: ErrorComponent;
let fixture: ComponentFixture<ErrorComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ErrorComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ErrorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { GroupDetailComponent } from './group-detail.component';
describe('GroupDetailComponent', () => {
let component: GroupDetailComponent;
let fixture: ComponentFixture<GroupDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GroupDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GroupDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { GroupService } from './group.service';
describe('GroupService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [GroupService]
});
});
it('should be created', inject([GroupService], (service: GroupService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HelpComponent } from './help.component';
describe('HelpComponent', () => {
let component: HelpComponent;
let fixture: ComponentFixture<HelpComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HelpComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HelpComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HomeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { HttpWrapperService } from './http-wrapper.service';
describe('HttpWrapperService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [HttpWrapperService]
});
});
it('should be created', inject([HttpWrapperService], (service: HttpWrapperService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginComponent } from './login.component';
describe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoginComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SaisonDetailComponent } from './saison-detail.component';
describe('SaisonDetailComponent', () => {
let component: SaisonDetailComponent;
let fixture: ComponentFixture<SaisonDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SaisonDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SaisonDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { SaisonService } from './saison.service';
describe('SaisonService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [SaisonService]
});
});
it('should be created', inject([SaisonService], (service: SaisonService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -7,20 +7,22 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { GroupService } from '../group.service'; import { GroupService } from '../../service/group.service';
import { ArianeService } from '../ariane.service'; import { ArianeService } from '../../service/ariane.service';
@Component({ @Component({
selector: 'app-group-detail', selector: 'app-group',
templateUrl: './group-detail.component.html', templateUrl: './group.component.html',
styleUrls: ['./group-detail.component.less'], styleUrls: ['./group.component.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })
export class GroupDetailComponent implements OnInit { export class GroupComponent implements OnInit {
//id_type = -1;
//id_univers = -1;
id_group = -1; id_group = -1;
saisons_error = ""; saisons_error = "";
saisons = []; saisons = [];
@ -35,7 +37,10 @@ export class GroupDetailComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.id_group = parseInt(this.route.snapshot.paramMap.get('id')); //this.id_univers = parseInt(this.route.snapshot.paramMap.get('univers_id'));
//this.id_type = parseInt(this.route.snapshot.paramMap.get('type_id'));
this.id_group = parseInt(this.route.snapshot.paramMap.get('group_id'));
console.log
let self = this; let self = this;
console.log("get parameter id: " + this.id_group); console.log("get parameter id: " + this.id_group);
this.groupService.getSaison(this.id_group) this.groupService.getSaison(this.id_group)
@ -56,12 +61,14 @@ export class GroupDetailComponent implements OnInit {
}); });
} }
onSelectSaison(_idSelected: number):void { onSelectSaison(_idSelected: number):void {
this.router.navigate(['saison/' + _idSelected ]); //this.router.navigate(['/type/' + this.type_id + '/group/' + this.id_group + '/saison/' + _idSelected ]);
this.router.navigate(['/saison/' + _idSelected ]);
this.arianeService.setSaison(_idSelected); this.arianeService.setSaison(_idSelected);
} }
onSelectVideo(_idSelected: number):void { onSelectVideo(_idSelected: number):void {
this.router.navigate(['video/' + _idSelected ]); //this.router.navigate(['/type/' + this.type_id + '/group/' + this.id_group + '/video/' + _idSelected ]);
this.router.navigate(['/video/' + _idSelected ]);
this.arianeService.setVideo(_idSelected); this.arianeService.setVideo(_idSelected);
} }

View File

@ -7,10 +7,10 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { TypeService } from '../type.service'; import { TypeService } from '../../service/type.service';
import { ArianeService } from '../ariane.service'; import { ArianeService } from '../../service/ariane.service';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',

View File

@ -7,11 +7,11 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { slideInOutAnimation } from '../_animations/index'; import { slideInOutAnimation } from '../../_animations/index';
import { UserService } from '../user.service'; import { UserService } from '../../service/user.service';
import { SessionService } from '../session.service'; import { SessionService } from '../../service/session.service';
import { CookiesService } from '../cookies.service'; import { CookiesService } from '../../service/cookies.service';
export let checkLoginValidity = function(_value:string):boolean { export let checkLoginValidity = function(_value:string):boolean {

View File

@ -7,20 +7,20 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { SaisonService } from '../saison.service'; import { SaisonService } from '../../service/saison.service';
import { ArianeService } from '../ariane.service'; import { ArianeService } from '../../service/ariane.service';
@Component({ @Component({
selector: 'app-saison-detail', selector: 'app-saison',
templateUrl: './saison-detail.component.html', templateUrl: './saison.component.html',
styleUrls: ['./saison-detail.component.less'], styleUrls: ['./saison.component.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })
export class SaisonDetailComponent implements OnInit { export class SaisonComponent implements OnInit {
id_saison = -1; id_saison = -1;
videos_error = ""; videos_error = "";
videos = []; videos = [];
@ -33,7 +33,7 @@ export class SaisonDetailComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.id_saison = parseInt(this.route.snapshot.paramMap.get('id')); this.id_saison = parseInt(this.route.snapshot.paramMap.get('saison_id'));
let self = this; let self = this;
console.log("get parameter id: " + this.id_saison); console.log("get parameter id: " + this.id_saison);
this.saisonService.getVideo(this.id_saison) this.saisonService.getVideo(this.id_saison)

View File

@ -22,7 +22,7 @@
color: white; color: white;
.comment { .comment {
background-image: url("../../assets/images/comments.svg"); background-image: url("../../../assets/images/comments.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 45px; background-size: 45px;
/*background-attachment: fixed;*/ /*background-attachment: fixed;*/
@ -32,7 +32,7 @@
text-shadow:0px 0px 4px #2b3137; text-shadow:0px 0px 4px #2b3137;
} }
.share { .share {
background-image: url("../../assets/images/share.svg"); background-image: url("../../../assets/images/share.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 45px; background-size: 45px;
/*background-attachment: fixed;*/ /*background-attachment: fixed;*/
@ -42,7 +42,7 @@
text-shadow:0px 0px 4px #2b3137; text-shadow:0px 0px 4px #2b3137;
} }
.time { .time {
background-image: url("../../assets/images/time.svg"); background-image: url("../../../assets/images/time.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 45px; background-size: 45px;
/*background-attachment: fixed;*/ /*background-attachment: fixed;*/
@ -115,17 +115,17 @@ span.psw {
text-align: center; text-align: center;
} }
.icon-right-load { .icon-right-load {
background: white url("../../assets/images/load.svg") right no-repeat; background: white url("../../../assets/images/load.svg") right no-repeat;
background-size: 35px; background-size: 35px;
padding-right: 17px; padding-right: 17px;
} }
.icon-right-validate { .icon-right-validate {
background: white url("../../assets/images/validate.svg") right no-repeat; background: white url("../../../assets/images/validate.svg") right no-repeat;
background-size: 35px; background-size: 35px;
padding-right: 17px; padding-right: 17px;
} }
.icon-right-not-validate { .icon-right-not-validate {
background: white url("../../assets/images/validate-not.svg") right no-repeat; background: white url("../../../assets/images/validate-not.svg") right no-repeat;
background-size: 35px; background-size: 35px;
padding-right: 17px; padding-right: 17px;
} }

View File

@ -7,8 +7,8 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { checkLoginValidity, checkEmailValidity, checkPasswordValidity } from '../login/login.component'; import { checkLoginValidity, checkEmailValidity, checkPasswordValidity } from '../login/login.component';
import { fadeInAnimation } from '../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { UserService } from '../user.service'; import { UserService } from '../../service/user.service';
@Component({ @Component({

View File

@ -7,20 +7,20 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { TypeService } from '../type.service'; import { TypeService } from '../../service/type.service';
import { ArianeService } from '../ariane.service'; import { ArianeService } from '../../service/ariane.service';
@Component({ @Component({
selector: 'app-type-detail', selector: 'app-type',
templateUrl: './type-detail.component.html', templateUrl: './type.component.html',
styleUrls: ['./type-detail.component.less'], styleUrls: ['./type.component.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })
export class TypeDetailComponent implements OnInit { export class TypeComponent implements OnInit {
type_id = -1; type_id = -1;
groups_error = ""; groups_error = "";
groups = []; groups = [];
@ -42,7 +42,7 @@ export class TypeDetailComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.type_id = parseInt(this.route.snapshot.paramMap.get('id')); this.type_id = parseInt(this.route.snapshot.paramMap.get('type_id'));
let self = this; let self = this;
console.log("get parameter id: " + this.type_id); console.log("get parameter id: " + this.type_id);
this.typeService.getSubGroup(this.type_id) this.typeService.getSubGroup(this.type_id)
@ -63,12 +63,14 @@ export class TypeDetailComponent implements OnInit {
}); });
} }
onSelectGroup(_idSelected: number):void { onSelectGroup(_idSelected: number):void {
this.router.navigate(['group/' + _idSelected ]); //this.router.navigate(['/type/' + this.type_id + '/group/' + _idSelected ]);
this.router.navigate(['/group/' + _idSelected ]);
this.arianeService.setGroup(_idSelected); this.arianeService.setGroup(_idSelected);
} }
onSelectVideo(_idSelected: number):void { onSelectVideo(_idSelected: number):void {
this.router.navigate(['video/' + _idSelected ]); //this.router.navigate(['/type/' + this.type_id + '/video/' + _idSelected ]);
this.router.navigate(['/video/' + _idSelected ]);
this.arianeService.setVideo(_idSelected); this.arianeService.setVideo(_idSelected);
} }

View File

@ -0,0 +1,7 @@
<div class="main-reduce">
<div class="fill-all">
<div *ngFor="let data of videos" class="item item-video" (click)="onSelectVideo(data)">
<app-element-video [id_video]="data"></app-element-video>
</div>
</div>
</div>

View File

@ -0,0 +1,62 @@
.fill-all{
width:100%;
height:100%;
margin:0;
padding:0;
border:0;
background-color:#0F0;
}
.item {
font-size: 20px;
height: 21%;
width: 23%;
margin: 1%;
padding: 0;
overflow: hidden;
//box-shadow: 0 1px 1.5px 0 rgba(0,0,0,.12),0 1px 1px 0 rgba(0,0,0,.24);
box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6);
line-height: normal;
border: none;
font-family: "Roboto","Helvetica","Arial",sans-serif;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0;
will-change: box-shadow;
outline: none;
cursor: pointer;
text-decoration: none;
text-align: center;
vertical-align: middle;
transition-duration: 0.4s;
float:left;
display:block;
h1 {
font-size: 24px;
}
&:hover {
background-color: #F00;
}
.material-icons {
vertical-align: middle;
}
.material-icons {
position: absolute;
top: 50%;
left: 50%;
transform: ~"translate(-12px,-12px)";
line-height: 24px;
width: 24px;
}
}
.item-video {
&:hover {
background-color: #0F0;
}
}

View File

@ -0,0 +1,56 @@
/** @file
* @author Edouard DUPIN
* @copyright 2018, Edouard DUPIN, all right reserved
* @license PROPRIETARY (see license file)
*/
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common';
import { fadeInAnimation } from '../../_animations/index';
import { UniversService } from '../../service/univers.service';
import { ArianeService } from '../../service/ariane.service';
@Component({
selector: 'app-univers',
templateUrl: './univers.html',
styleUrls: ['./univers.less'],
animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' }
})
export class UniversComponent implements OnInit {
univers_id = -1;
videos_error = "";
videos = [];
constructor(private route: ActivatedRoute,
private router: Router,
private locate: Location,
private universService: UniversService,
private arianeService: ArianeService) {
}
ngOnInit() {
this.univers_id = parseInt(this.route.snapshot.paramMap.get('univers_id'));
let self = this;
console.log("get parameter id: " + this.univers_id);
/*
this.universService.getVideo(this.univers_id)
.then(function(response) {
self.videos_error = "";
self.videos = response
}).catch(function(response) {
self.videos_error = "Can not get the List of video without saison";
self.videos = []
});
*/
}
onSelectVideo(_idSelected: number):void {
this.router.navigate(['video/' + _idSelected ]);
this.arianeService.setVideo(_idSelected);
}
}

View File

@ -6,7 +6,7 @@ sign {
right:100; right:100;
background-color:#2b3137; background-color:#2b3137;
background-image: url("../../assets/images/ikon_gray.svg"); background-image: url("../../../assets/images/ikon_gray.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
/* /*
background-size: contain; background-size: contain;
@ -31,7 +31,7 @@ sign {
color: white; color: white;
.comment { .comment {
background-image: url("../../assets/images/comments.svg"); background-image: url("../../../assets/images/comments.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 45px; background-size: 45px;
background-attachment: fixed; background-attachment: fixed;
@ -41,7 +41,7 @@ sign {
text-shadow:0px 0px 4px #2b3137; text-shadow:0px 0px 4px #2b3137;
} }
.share { .share {
background-image: url("../../assets/images/share.svg"); background-image: url("../../../assets/images/share.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 45px; background-size: 45px;
background-attachment: fixed; background-attachment: fixed;
@ -51,7 +51,7 @@ sign {
text-shadow:0px 0px 4px #2b3137; text-shadow:0px 0px 4px #2b3137;
} }
.forget { .forget {
background-image: url("../../assets/images/erase.svg"); background-image: url("../../../assets/images/erase.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 45px; background-size: 45px;
background-attachment: fixed; background-attachment: fixed;
@ -61,7 +61,7 @@ sign {
text-shadow:0px 0px 4px #2b3137; text-shadow:0px 0px 4px #2b3137;
} }
.time { .time {
background-image: url("../../assets/images/time.svg"); background-image: url("../../../assets/images/time.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 45px; background-size: 45px;
background-attachment: fixed; background-attachment: fixed;

View File

@ -10,9 +10,9 @@ import { Location } from '@angular/common';
import { NgForm } from '@angular/forms'; import { NgForm } from '@angular/forms';
import { FormGroup, FormControl } from "@angular/forms"; import { FormGroup, FormControl } from "@angular/forms";
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { HttpWrapperService } from '../../http-wrapper.service'; import { HttpWrapperService } from '../../service/http-wrapper.service';
import { VideoService } from '../../video.service'; import { VideoService } from '../../service/video.service';
@Component({ @Component({
selector: 'app-video-edit', selector: 'app-video-edit',
@ -63,7 +63,7 @@ export class VideoEditComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.id_video = parseInt(this.route.snapshot.paramMap.get('id')); this.id_video = parseInt(this.route.snapshot.paramMap.get('video_id'));
let self = this; let self = this;
this.videoService.get(this.id_video) this.videoService.get(this.id_video)
.then(function(response) { .then(function(response) {

View File

@ -7,20 +7,19 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { HttpWrapperService } from '../http-wrapper.service'; import { HttpWrapperService } from '../../service/http-wrapper.service';
import { VideoService } from '../../service/video.service';
import { VideoService } from '../video.service';
@Component({ @Component({
selector: 'app-video-detail', selector: 'app-video',
templateUrl: './video-detail.component.html', templateUrl: './video.component.html',
styleUrls: ['./video-detail.component.less'], styleUrls: ['./video.component.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })
export class VideoDetailComponent implements OnInit { export class VideoComponent implements OnInit {
id_video:number = -1; id_video:number = -1;
error:string = "" error:string = ""
@ -45,7 +44,7 @@ export class VideoDetailComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.id_video = parseInt(this.route.snapshot.paramMap.get('id')); this.id_video = parseInt(this.route.snapshot.paramMap.get('video_id'));
let self = this; let self = this;
this.videoService.get(this.id_video) this.videoService.get(this.id_video)
.then(function(response) { .then(function(response) {

View File

@ -6,13 +6,25 @@
import { Injectable, Output, EventEmitter } from '@angular/core' import { Injectable, Output, EventEmitter } from '@angular/core'
import { TypeService } from 'app/type.service'; import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { UniversService } from 'app/univers.service';
import { GroupService } from 'app/group.service'; import { TypeService } from 'app/service/type.service';
import { SaisonService } from 'app/saison.service'; import { UniversService } from 'app/service/univers.service';
import { GroupService } from 'app/service/group.service';
import { SaisonService } from 'app/service/saison.service';
export class InputOrders {
public type_id: number = null;
public univers_id: number = null;
public group_id: number = null;
public saison_id: number = null;
public video_id: number = null;
}
@Injectable() @Injectable()
export class ArianeService { export class ArianeService {
public type_id: number = null; public type_id: number = null;
public type_name: string = null; public type_name: string = null;
@Output() type_change: EventEmitter<number> = new EventEmitter(); @Output() type_change: EventEmitter<number> = new EventEmitter();
@ -32,7 +44,7 @@ export class ArianeService {
public video_id: number = null; public video_id: number = null;
@Output() video_change: EventEmitter<number> = new EventEmitter(); @Output() video_change: EventEmitter<number> = new EventEmitter();
constructor( constructor(private route: ActivatedRoute,
private typeService: TypeService, private typeService: TypeService,
private universService: UniversService, private universService: UniversService,
private groupService: GroupService, private groupService: GroupService,
@ -56,6 +68,38 @@ export class ArianeService {
this.video_id = null; this.video_id = null;
this.video_change.emit(this.video_id); this.video_change.emit(this.video_id);
} }
/*
getCurrentRoute():InputOrders {
let out = new InputOrders()
out.type_id = parseInt(this.route.snapshot.paramMap.get('type_id'));
if (out.type_id == 0){
out.type_id = undefined;
}
out.univers_id = parseInt(this.route.snapshot.paramMap.get('univers_id'));
if (out.univers_id == 0){
out.univers_id = undefined;
}
out.group_id = parseInt(this.route.snapshot.paramMap.get('group_id'));
if (out.group_id == 0){
out.group_id = undefined;
}
out.saison_id = parseInt(this.route.snapshot.paramMap.get('saison_id'));
if (out.saison_id == 0){
out.saison_id = undefined;
}
out.video_id = parseInt(this.route.snapshot.paramMap.get('video_id'));
if (out.video_id == 0){
out.video_id = undefined;
}
return out;
}
routeTo(_data:InputOrders, _destination:string = null) {
routeTo = ""
//if (
this.router.navigate(['/type/' + this.type_id + '/group/' + this.id_group + '/saison/' + _idSelected ]);
}
*/
setType(id:number):void { setType(id:number):void {
this.type_id = id; this.type_id = id;

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper.service';
@Injectable() @Injectable()
export class GroupService { export class GroupService {
@ -24,7 +24,7 @@ export class GroupService {
.then(function(response: any) { .then(function(response: any) {
if (response.status == 200) { if (response.status == 200) {
resolve(response.data); resolve(response.data);
console.log("get data from type : " + response.data); //console.log("get data from type : " + response.data);
return; return;
} }
reject("An error occured"); reject("An error occured");

View File

@ -7,7 +7,7 @@ import { environment } from 'environments/environment';
@Injectable() @Injectable()
export class HttpWrapperService { export class HttpWrapperService {
private displayReturn:boolean = true; private displayReturn:boolean = false;
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
} }

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper.service';
@Injectable() @Injectable()
export class SaisonService { export class SaisonService {
@ -24,7 +24,7 @@ export class SaisonService {
.then(function(response: any) { .then(function(response: any) {
if (response.status == 200) { if (response.status == 200) {
resolve(response.data); resolve(response.data);
console.log("get data from type : " + response.data); //console.log("get data from type : " + response.data);
return; return;
} }
reject("An error occured"); reject("An error occured");

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper.service';
//import { SHA512 } from 'assets/js_3rd_party/sha512'; //import { SHA512 } from 'assets/js_3rd_party/sha512';
export interface MessageLogIn { export interface MessageLogIn {
@ -32,7 +32,7 @@ export class TypeService {
.then(function(response: any) { .then(function(response: any) {
if (response.status == 200) { if (response.status == 200) {
resolve(response.data); resolve(response.data);
console.log("get data from type : " + response.data); //console.log("get data from type : " + response.data);
return; return;
} }
reject("An error occured"); reject("An error occured");

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper.service';
@Injectable() @Injectable()
export class UniversService { export class UniversService {
@ -21,7 +21,7 @@ export class UniversService {
.then(function(response: any) { .then(function(response: any) {
if (response.status == 200) { if (response.status == 200) {
resolve(response.data); resolve(response.data);
console.log("get data from univers : " + response.data); //console.log("get data from univers : " + response.data);
return; return;
} }
reject("An error occured"); reject("An error occured");

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper.service';
//import { SHA512 } from 'assets/js_3rd_party/sha512'; //import { SHA512 } from 'assets/js_3rd_party/sha512';
interface MessageLogIn { interface MessageLogIn {

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper.service';
@Injectable() @Injectable()
export class VideoService { export class VideoService {
@ -24,7 +24,7 @@ export class VideoService {
.then(function(response: any) { .then(function(response: any) {
if (response.status == 200) { if (response.status == 200) {
resolve(response.data); resolve(response.data);
console.log("get data from response : " + JSON.stringify(response.data, null, 2)); //console.log("get data from response : " + JSON.stringify(response.data, null, 2));
return; return;
} }
reject("An error occured"); reject("An error occured");

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { SessionService } from './session.service';
describe('SessionService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [SessionService]
});
});
it('should be created', inject([SessionService], (service: SessionService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SettingsComponent } from './settings.component';
describe('SettingsComponent', () => {
let component: SettingsComponent;
let fixture: ComponentFixture<SettingsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SettingsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SettingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SignUpComponent } from './sign-up.component';
describe('SignUpComponent', () => {
let component: SignUpComponent;
let fixture: ComponentFixture<SignUpComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SignUpComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SignUpComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TopMenuComponent } from './top-menu.component';
describe('TopMenuComponent', () => {
let component: TopMenuComponent;
let fixture: ComponentFixture<TopMenuComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TopMenuComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TopMenuComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TypeDetailComponent } from './type-detail.component';
describe('TypeDetailComponent', () => {
let component: TypeDetailComponent;
let fixture: ComponentFixture<TypeDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TypeDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TypeDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { UserService } from './user.service';
describe('TypeService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [testService]
});
});
it('should be created', inject([TypeService], (service: TypeService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { UserService } from './user.service';
describe('UserService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [UserService]
});
});
it('should be created', inject([UserService], (service: UserService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ValidateEmailComponent } from './validate-email.component';
describe('ValidateEmailComponent', () => {
let component: ValidateEmailComponent;
let fixture: ComponentFixture<ValidateEmailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ValidateEmailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ValidateEmailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { VideoDetailComponent } from './video-detail.component';
describe('VideoDetailComponent', () => {
let component: VideoDetailComponent;
let fixture: ComponentFixture<VideoDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ VideoDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(VideoDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { VideoService } from './video.service';
describe('VideoService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [VideoService]
});
});
it('should be created', inject([VideoService], (service: VideoService) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,3 +1,24 @@
@media all and (min-width: 800px) {
.xdesktop{display:block;}
.xtablette{display:none;}
.xphone{display:none;}
.xmobile{display:none;}
}
@media all and (min-width: 600px) and (max-width: 800px) {
.xdesktop{display:none;}
.xtablette{display:block;}
.xphone{display:none;}
.xmobile{display:block;}
}
@media all and (max-width: 600px) {
.xdesktop{display:none;}
.xtablette{display:none;}
.xphone{display:block;}
.xmobile{display:block;}
}
html { html {
font-size: 24px; font-size: 24px;