commencement de la 'page search'
This commit is contained in:
parent
5f4ecfc7b3
commit
58d80d1a6b
47 changed files with 889 additions and 84 deletions
38
src/app/utils/components/nav-bar/nav-bar.component.html
Normal file
38
src/app/utils/components/nav-bar/nav-bar.component.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!-- pour les 3 roles -->
|
||||
<div *ngIf="pour === '3roles'">
|
||||
<ul>
|
||||
<li>
|
||||
<a routerLink="/connexion" class="StreamNotFound"> StreamNotFound </a>
|
||||
</li>
|
||||
<li style="float:right; margin-right: 20px;">
|
||||
<mat-slide-toggle></mat-slide-toggle>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- pour User -->
|
||||
<div *ngIf="pour === 'user'">
|
||||
<ul>
|
||||
<li>
|
||||
<a routerLink="/search" class="StreamNotFound"> StreamNotFound </a>
|
||||
</li>
|
||||
<li class="cliquable">
|
||||
<a routerLink="/search"> Rechercher </a>
|
||||
</li>
|
||||
<li class="cliquable">
|
||||
<a routerLink="/search"> Mes playlists </a>
|
||||
</li>
|
||||
<li class="cliquable">
|
||||
<a routerLink="/search"> Historique </a>
|
||||
</li>
|
||||
<li style="float:right; margin-right: 20px;">
|
||||
<a routerLink="/search">
|
||||
<mat-icon>settings</mat-icon>
|
||||
</a>
|
||||
</li>
|
||||
<li style="float:right; margin-right: 20px;">
|
||||
<mat-slide-toggle></mat-slide-toggle>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
68
src/app/utils/components/nav-bar/nav-bar.component.scss
Normal file
68
src/app/utils/components/nav-bar/nav-bar.component.scss
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
.StreamNotFound {
|
||||
font-style: oblique;
|
||||
font-family: cursive;
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
|
||||
mat-icon {
|
||||
margin-top: 2px;
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
|
||||
mat-slide-toggle {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
background-color: black;
|
||||
height: 70px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
li {
|
||||
float: left;
|
||||
font-size: x-large;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
|
||||
li a {
|
||||
display: block;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
|
||||
.cliquable a:hover:not(.active) {
|
||||
background-color: #c8c8c8;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
::ng-deep .mat-slide-toggle-thumb {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
::ng-deep .mat-slide-toggle-bar {
|
||||
background-color: #c8c8c8;
|
||||
}
|
||||
|
||||
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar {
|
||||
background-color: #646464;
|
||||
}
|
||||
25
src/app/utils/components/nav-bar/nav-bar.component.spec.ts
Normal file
25
src/app/utils/components/nav-bar/nav-bar.component.spec.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { NavBarComponent } from './nav-bar.component';
|
||||
|
||||
describe('NavBarComponent', () => {
|
||||
let component: NavBarComponent;
|
||||
let fixture: ComponentFixture<NavBarComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ NavBarComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NavBarComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
17
src/app/utils/components/nav-bar/nav-bar.component.ts
Normal file
17
src/app/utils/components/nav-bar/nav-bar.component.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import {Component, Input, OnInit} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-nav-bar',
|
||||
templateUrl: './nav-bar.component.html',
|
||||
styleUrls: ['./nav-bar.component.scss']
|
||||
})
|
||||
export class NavBarComponent implements OnInit
|
||||
{
|
||||
@Input() pour = "3roles";
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<h3> Ajouter dans </h3>
|
||||
|
||||
|
||||
<mat-divider></mat-divider><!------------------------------------------------------------------------------------------------------------->
|
||||
|
||||
|
||||
<div class="conteneurPlaylists">
|
||||
<div *ngFor="let playlist of tabPlaylistAndBool" style="margin-left: 10px">
|
||||
<mat-checkbox [(ngModel)]="playlist.isSelected"> {{playlist.name}} </mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<mat-divider></mat-divider><!------------------------------------------------------------------------------------------------------------->
|
||||
|
||||
|
||||
<div class="conteneurBtnCreerPlaylist" *ngIf="!goToCreatePlaylist">
|
||||
<button mat-button (click)="goToCreatePlaylist=true">
|
||||
<mat-label>Creer une playlist</mat-label>
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="conteneurInputNewPlaylist" *ngIf="goToCreatePlaylist">
|
||||
<mat-form-field>
|
||||
<mat-label> Nom playlist </mat-label>
|
||||
<input matInput type="text" [(ngModel)]="newPlaylistName">
|
||||
</mat-form-field>
|
||||
<button mat-icon-button (click)="goToCreatePlaylist=false">
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<mat-divider></mat-divider><!------------------------------------------------------------------------------------------------------------->
|
||||
|
||||
|
||||
<mat-dialog-actions style="justify-content: flex-end;">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
<button mat-button [mat-dialog-close]="true" cdkFocusInitial (click)="onValider">Valider</button>
|
||||
</mat-dialog-actions>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
h3 {
|
||||
text-align: center;
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.conteneurPlaylists {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.conteneurBtnCreerPlaylist {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.conteneurInputNewPlaylist {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PopupAddVideoToPlaylistsComponent } from './popup-add-video-to-playlists.component';
|
||||
|
||||
describe('PopupAddVideoToPlaylistsComponent', () => {
|
||||
let component: PopupAddVideoToPlaylistsComponent;
|
||||
let fixture: ComponentFixture<PopupAddVideoToPlaylistsComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PopupAddVideoToPlaylistsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PopupAddVideoToPlaylistsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
import {Component, Inject, OnInit} from '@angular/core';
|
||||
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
|
||||
import {Video} from "../../interfaces/video";
|
||||
|
||||
@Component({
|
||||
selector: 'app-popup-add-video-to-playlists',
|
||||
templateUrl: './popup-add-video-to-playlists.component.html',
|
||||
styleUrls: ['./popup-add-video-to-playlists.component.scss']
|
||||
})
|
||||
export class PopupAddVideoToPlaylistsComponent implements OnInit
|
||||
{
|
||||
video: Video;
|
||||
tabPlaylistAndBool = [];
|
||||
goToCreatePlaylist = false;
|
||||
newPlaylistName = "";
|
||||
|
||||
constructor( public dialogRef: MatDialogRef<PopupAddVideoToPlaylistsComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data ) { }
|
||||
|
||||
|
||||
ngOnInit(): void
|
||||
{
|
||||
this.video = this.data.video;
|
||||
const tabPlaylist = this.data.playlists;
|
||||
for(let playlist of tabPlaylist)
|
||||
{
|
||||
playlist["isSelected"] = false;
|
||||
this.tabPlaylistAndBool.push(playlist);
|
||||
}
|
||||
}
|
||||
|
||||
onValider(): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
3
src/app/utils/components/pub/pub.component.html
Normal file
3
src/app/utils/components/pub/pub.component.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="conteneur">
|
||||
<h1> Je suis une pub </h1>
|
||||
</div>
|
||||
0
src/app/utils/components/pub/pub.component.scss
Normal file
0
src/app/utils/components/pub/pub.component.scss
Normal file
25
src/app/utils/components/pub/pub.component.spec.ts
Normal file
25
src/app/utils/components/pub/pub.component.spec.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PubComponent } from './pub.component';
|
||||
|
||||
describe('PubComponent', () => {
|
||||
let component: PubComponent;
|
||||
let fixture: ComponentFixture<PubComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PubComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PubComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
19
src/app/utils/components/pub/pub.component.ts
Normal file
19
src/app/utils/components/pub/pub.component.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-pub',
|
||||
templateUrl: './pub.component.html',
|
||||
styleUrls: ['./pub.component.scss']
|
||||
})
|
||||
export class PubComponent implements OnInit
|
||||
{
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in a new issue