amelioration du style globale

This commit is contained in:
MiharyR 2021-11-26 17:05:12 +01:00
parent cd1f323686
commit d1ac1b77f0
36 changed files with 191 additions and 112 deletions

View file

@ -86,10 +86,10 @@
</ng-container> </ng-container>
<!-- Advertiser Column --> <!-- Advertiser Column -->
<ng-container matColumnDef="advertiser"> <ng-container matColumnDef="company">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Annonceur </th> <th mat-header-cell *matHeaderCellDef mat-sort-header> Annonceur </th>
<td mat-cell *matCellDef="let advert"> <td mat-cell *matCellDef="let advert">
{{advert.advertiser}} {{advert.company}}
</td> </td>
</ng-container> </ng-container>

View file

@ -68,3 +68,7 @@ input {
border: solid 1px black !important; border: solid 1px black !important;
background-color: white !important; background-color: white !important;
} }
::ng-deep .mat-pseudo-checkbox-checked {
background-color: black !important;
}

View file

@ -5,12 +5,36 @@ import {ThemeService} from "../../../utils/services/theme/theme.service";
import {MatDialog} from "@angular/material/dialog"; import {MatDialog} from "@angular/material/dialog";
import {MatSnackBar} from "@angular/material/snack-bar"; import {MatSnackBar} from "@angular/material/snack-bar";
import {MatTableDataSource} from "@angular/material/table"; import {MatTableDataSource} from "@angular/material/table";
import {Advert, AdvertWithCountViews} from "../../../utils/interfaces/advert"; import {Advert} from "../../../utils/interfaces/advert";
import {PopupDeleteAdAdminComponent} from "../popup-delete-ad-admin/popup-delete-ad-admin.component"; import {PopupDeleteAdAdminComponent} from "../popup-delete-ad-admin/popup-delete-ad-admin.component";
import {PopupVisualizeImagesAdminComponent} from "../popup-visualize-images-admin/popup-visualize-images-admin.component"; import {PopupVisualizeImagesAdminComponent} from "../popup-visualize-images-admin/popup-visualize-images-admin.component";
import {FictitiousAdvertsService} from "../../../utils/services/fictitiousDatas/fictitiousAdverts/fictitious-adverts.service"; import {FictitiousAdvertsService} from "../../../utils/services/fictitiousDatas/fictitiousAdverts/fictitious-adverts.service";
import {FormControl} from "@angular/forms"; import {FormControl} from "@angular/forms";
import {FictitiousUtilsService} from "../../../utils/services/fictitiousDatas/fictitiousUtils/fictitious-utils.service"; import {FictitiousUtilsService} from "../../../utils/services/fictitiousDatas/fictitiousUtils/fictitious-utils.service";
import {User} from "../../../utils/interfaces/user";
import {FictitiousUsersService} from "../../../utils/services/fictitiousDatas/fictitiousUsers/fictitious-users.service";
export interface AdvertWithCountViewsAndCompany {
_id: string,
userId: string,
company: string,
title: string,
url: string,
images: {
url: string,
description: string,
}[],
interests: string[],
comment: string,
views: Date[],
countViews: number,
isVisible: boolean,
isActive: boolean,
createdAt: Date,
updatedAt: Date,
}
@ -21,8 +45,9 @@ import {FictitiousUtilsService} from "../../../utils/services/fictitiousDatas/fi
}) })
export class PageAdListAdminComponent implements AfterViewInit export class PageAdListAdminComponent implements AfterViewInit
{ {
tabAdvertWithCountViews: AdvertWithCountViews[] = []; tabAdvertWithCountViews: AdvertWithCountViewsAndCompany[] = [];
displayedColumns: string[] = [ 'title', 'advertiser', 'interests', 'createdAt', 'updatedAt', 'countViews', 'isVisible', 'actions' ]; tabAdvertiser: User[];
displayedColumns: string[] = [ 'title', 'company', 'interests', 'createdAt', 'updatedAt', 'countViews', 'isVisible', 'actions' ];
dataSource ; dataSource ;
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
@ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatPaginator) paginator: MatPaginator;
@ -38,6 +63,7 @@ export class PageAdListAdminComponent implements AfterViewInit
constructor( public themeService: ThemeService, constructor( public themeService: ThemeService,
private fictitiousAdvertsService: FictitiousAdvertsService, private fictitiousAdvertsService: FictitiousAdvertsService,
private fictitiousUtilsService: FictitiousUtilsService, private fictitiousUtilsService: FictitiousUtilsService,
private fictitiousUsersService: FictitiousUsersService,
public dialog: MatDialog, public dialog: MatDialog,
private snackBar: MatSnackBar ) { } private snackBar: MatSnackBar ) { }
@ -47,8 +73,9 @@ export class PageAdListAdminComponent implements AfterViewInit
// --- FAUX CODE --- // --- FAUX CODE ---
const tabAdvert = this.fictitiousAdvertsService.getTabAdvert(8); const tabAdvert = this.fictitiousAdvertsService.getTabAdvert(8);
this.allInterests = this.fictitiousUtilsService.getTags(); this.allInterests = this.fictitiousUtilsService.getTags();
this.tabAdvertiser = this.fictitiousUsersService.getTabAdvertiser(3);
for(let advert of tabAdvert) this.tabAdvertWithCountViews.push(this.advertToAdvertWithCountViews(advert)); for(let advert of tabAdvert) this.tabAdvertWithCountViews.push(this.advertToAdvertWithCountViewsAndCompany(advert));
this.dataSource = new MatTableDataSource<Advert>(); this.dataSource = new MatTableDataSource<Advert>();
this.onFilter(); this.onFilter();
} }
@ -61,7 +88,7 @@ export class PageAdListAdminComponent implements AfterViewInit
} }
onVisualizeImages(advert: AdvertWithCountViews) onVisualizeImages(advert: AdvertWithCountViewsAndCompany)
{ {
const config = { const config = {
width: '30%', width: '30%',
@ -79,7 +106,7 @@ export class PageAdListAdminComponent implements AfterViewInit
} }
onDelete(advert: AdvertWithCountViews): void onDelete(advert: AdvertWithCountViewsAndCompany): void
{ {
const config = { const config = {
data: { advert: advert } data: { advert: advert }
@ -160,13 +187,23 @@ export class PageAdListAdminComponent implements AfterViewInit
} }
advertToAdvertWithCountViews(advert: Advert): AdvertWithCountViews advertToAdvertWithCountViewsAndCompany(advert: Advert): AdvertWithCountViewsAndCompany
{ {
let company0 = "company" ;
for(let advertiser of this.tabAdvertiser)
{
if(advert.userId === advertiser._id) {
company0 = advertiser.company;
break;
}
}
return { return {
_id: advert._id, _id: advert._id,
userId: advert.userId, userId: advert.userId,
title: advert.title, title: advert.title,
advertiser: advert.advertiser, company: company0,
url: advert.url,
images: advert.images, images: advert.images,
interests: advert.interests, interests: advert.interests,
comment: advert.comment, comment: advert.comment,

View file

@ -34,7 +34,7 @@ export class PopupDeleteAdAdminComponent implements OnInit
// --- VRAI CODE --- // --- VRAI CODE ---
/* /*
this.messageService this.messageService
.sendMessage("advertiser/delete/ad", {"advert": this.advert}) .sendMessage("url/delete/ad", {"advert": this.advert})
.subscribe( retour => { .subscribe( retour => {
if(retour.status === "error") { if(retour.status === "error") {

View file

@ -7,10 +7,10 @@
<mat-divider></mat-divider> <mat-divider></mat-divider>
<mat-dialog-content> <mat-dialog-content>
<!-- Advertiser --> <!-- URL -->
<div class="row myRow"> <div class="row myRow">
<div class="col-6 myLabel"> Annonceur: </div> <div class="col-6 myLabel"> Annonceur: </div>
<div class="col-6 myValue"> {{advert.advertiser}} </div> <div class="col-6 myValue"> {{advert.url}} </div>
</div> </div>
<!-- Images --> <!-- Images -->

View file

@ -39,6 +39,7 @@ export class PopupUpdateAdminComponent implements OnInit
dateOfBirth: admin0.dateOfBirth, dateOfBirth: admin0.dateOfBirth,
gender: admin0.gender, gender: admin0.gender,
interests: [], interests: [],
company: "",
isActive: admin0.isActive, isActive: admin0.isActive,
isAccepted: admin0.isisAccepted, isAccepted: admin0.isisAccepted,
createdAt: admin0.createdAt, createdAt: admin0.createdAt,

View file

@ -35,7 +35,7 @@
<mat-radio-button value="user" (click)="this.roleName = 'user'; onFilter()"> <mat-radio-button value="user" (click)="this.roleName = 'user'; onFilter()">
Utilisateur Utilisateur
</mat-radio-button><br> </mat-radio-button><br>
<mat-radio-button value="advertiser" (click)="this.roleName = 'advertiser'; onFilter()"> <mat-radio-button value="url" (click)="this.roleName = 'url'; onFilter()">
Annonceur Annonceur
</mat-radio-button><br> </mat-radio-button><br>
<mat-radio-button value="admin" (click)="this.roleName = 'admin'; onFilter()"> <mat-radio-button value="admin" (click)="this.roleName = 'admin'; onFilter()">

View file

@ -133,6 +133,11 @@
<mat-label>Login</mat-label> <mat-label>Login</mat-label>
<input matInput type="text" [(ngModel)]="user.login"> <input matInput type="text" [(ngModel)]="user.login">
</mat-form-field><br> </mat-form-field><br>
<!-- company -->
<mat-form-field appearance="fill" *ngIf="user.role.name === 'advertiser'">
<mat-label>Entreprise</mat-label>
<input matInput type="text" [(ngModel)]="user.company">
</mat-form-field><br *ngIf="user.role.name === 'advertiser'">
</div> </div>
<!-- mdp + confirmation --> <!-- mdp + confirmation -->

View file

@ -38,6 +38,7 @@ export class PopupCreateUserComponent implements OnInit
dateOfBirth: null, dateOfBirth: null,
gender: "man", gender: "man",
interests: [], interests: [],
company: "",
isActive: false, isActive: false,
isAccepted: false, isAccepted: false,
createdAt: new Date(), createdAt: new Date(),
@ -72,12 +73,8 @@ export class PopupCreateUserComponent implements OnInit
this.errorMessage = "Veuillez remplir le champ 'email'."; this.errorMessage = "Veuillez remplir le champ 'email'.";
this.hasError = true; this.hasError = true;
} }
if((this.user.role.name === 'user') && ((this.user.dateOfBirth === undefined) || (this.user.dateOfBirth === null))) {
this.errorMessage = "Veuillez remplir le champ 'date de naissance'.";
this.hasError = true;
}
else if(!this.isValidEmail(this.user.email)) { else if(!this.isValidEmail(this.user.email)) {
this.errorMessage = "Email invalide"; this.errorMessage = "Email invalide.";
this.hasError = true; this.hasError = true;
} }
else if(this.password.length === 0) { else if(this.password.length === 0) {
@ -88,6 +85,14 @@ export class PopupCreateUserComponent implements OnInit
this.errorMessage = "Le mot de passe est différent de sa confirmation."; this.errorMessage = "Le mot de passe est différent de sa confirmation.";
this.hasError = true; this.hasError = true;
} }
else if((this.user.role.name === 'user') && ((this.user.dateOfBirth === undefined) || (this.user.dateOfBirth === null))) {
this.errorMessage = "Veuillez remplir le champ 'date de naissance'.";
this.hasError = true;
}
else if((this.user.role.name === 'advertiser') && (this.user.company.length === 0)) {
this.errorMessage = "Veuillez remplir le champ 'entreprise'.";
this.hasError = true;
}
else { else {
this.errorMessage = "" ; this.errorMessage = "" ;
this.hasError = false; this.hasError = false;

View file

@ -62,7 +62,7 @@
<div class="col-6 myLabel">Rôle:</div> <div class="col-6 myLabel">Rôle:</div>
<div class="col-6 myValue"> <div class="col-6 myValue">
<span *ngIf="user.role.name === 'user'">Utilisateur</span> <span *ngIf="user.role.name === 'user'">Utilisateur</span>
<span *ngIf="user.role.name === 'advertiser'">Annonceur</span> <span *ngIf="user.role.name === 'url'">Annonceur</span>
<span *ngIf="user.role.name === 'admin'">Admin</span> <span *ngIf="user.role.name === 'admin'">Admin</span>
</div> </div>
</div> </div>

View file

@ -82,19 +82,6 @@ input {
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
::ng-deep .mat-pseudo-checkbox-checked {
// aura
::ng-deep .mat-checkbox-ripple .mat-ripple-element {
background-color: grey !important;
}
// contenu coche
::ng-deep .mat-checkbox-checked.mat-accent .mat-checkbox-background {
background-color: black !important; background-color: black !important;
} }
// indeterminate
::ng-deep .mat-checkbox .mat-checkbox-frame {
border: solid 1px black !important;
background-color: white !important;
}

View file

@ -229,7 +229,7 @@ export class PageAdListAdvertiserComponent implements AfterViewInit
_id: advert._id, _id: advert._id,
userId: advert.userId, userId: advert.userId,
title: advert.title, title: advert.title,
advertiser: advert.advertiser, url: advert.url,
images: advert.images, images: advert.images,
interests: advert.interests, interests: advert.interests,
comment: advert.comment, comment: advert.comment,

View file

@ -28,6 +28,12 @@
<textarea matInput [(ngModel)]="advert.comment"></textarea> <textarea matInput [(ngModel)]="advert.comment"></textarea>
</mat-form-field><br> </mat-form-field><br>
<!-- url -->
<mat-form-field class="commentContainer" appearance="fill">
<mat-label> URL </mat-label>
<textarea matInput [(ngModel)]="advert.url"></textarea>
</mat-form-field><br>
<!-- IsVisible --> <!-- IsVisible -->
<mat-checkbox [(ngModel)]="advert.isVisible"> Visible </mat-checkbox><br><br> <mat-checkbox [(ngModel)]="advert.isVisible"> Visible </mat-checkbox><br><br>

View file

@ -9,7 +9,7 @@ const ADVERT_VIDE: Advert = {
_id: "", _id: "",
userId: "", userId: "",
title: "", title: "",
advertiser: "", url: "",
images: [], images: [],
interests: [], interests: [],
comment: "", comment: "",
@ -48,14 +48,14 @@ export class PopupAddOrUpdateAdComponent implements OnInit
{ {
this.advert = Object.assign({}, ADVERT_VIDE); this.advert = Object.assign({}, ADVERT_VIDE);
this.advert.interests = []; this.advert.interests = [];
this.urlBackend = "advertiser/add/ad" ; this.urlBackend = "url/add/ad" ;
this.title = "Ajouter annonce" ; this.title = "Ajouter annonce" ;
} }
else else
{ {
this.advert = Object.assign({}, this.data.advert); this.advert = Object.assign({}, this.data.advert);
this.advert.interests = this.data.advert.interests.slice(); this.advert.interests = this.data.advert.interests.slice();
this.urlBackend = "advertiser/update/ad" ; this.urlBackend = "url/update/ad" ;
this.title = "Modifier annonce" ; this.title = "Modifier annonce" ;
} }
} }

View file

@ -34,7 +34,7 @@ export class PopupDeleteAdAdvertiserComponent implements OnInit
// --- VRAI CODE --- // --- VRAI CODE ---
/* /*
this.messageService this.messageService
.sendMessage("advertiser/delete/ad", {"advert": this.advert}) .sendMessage("url/delete/ad", {"advert": this.advert})
.subscribe( retour => { .subscribe( retour => {
if(retour.status === "error") { if(retour.status === "error") {

View file

@ -13,9 +13,15 @@
onerror="this.onerror=null; this.src='assets/profil.png'"> onerror="this.onerror=null; this.src='assets/profil.png'">
</div> </div>
<!-- entreprise -->
<div class="row myRow">
<div class="col-6 myLabel">Entreprise:</div>
<div class="col-6 myValue"> {{advertiser.company}} </div>
</div>
<!-- login --> <!-- login -->
<div class="row myRow"> <div class="row myRow">
<div class="col-6 myLabel">Login:</div> <div class="col-6 myLabel">Pseudo:</div>
<div class="col-6 myValue"> {{advertiser.login}} </div> <div class="col-6 myValue"> {{advertiser.login}} </div>
</div> </div>

View file

@ -10,6 +10,12 @@
<!-- divider --> <!-- divider -->
<br><mat-divider></mat-divider><br> <br><mat-divider></mat-divider><br>
<!-- entreprise -->
<mat-form-field appearance="fill">
<mat-label>Entreprise</mat-label>
<input matInput type="text" [(ngModel)]="advertiserCopy.company">
</mat-form-field><br>
<!-- login --> <!-- login -->
<mat-form-field appearance="fill"> <mat-form-field appearance="fill">
<mat-label>Pseudo</mat-label> <mat-label>Pseudo</mat-label>

View file

@ -39,6 +39,7 @@ export class PopupUpdateAdvertiserComponent implements OnInit
dateOfBirth: advertiser0.dateOfBirth, dateOfBirth: advertiser0.dateOfBirth,
gender: advertiser0.gender, gender: advertiser0.gender,
interests: [], interests: [],
company: advertiser0.company,
isActive: advertiser0.isActive, isActive: advertiser0.isActive,
isAccepted: advertiser0.isAccepted, isAccepted: advertiser0.isAccepted,
createdAt: advertiser0.createdAt, createdAt: advertiser0.createdAt,

View file

@ -42,19 +42,6 @@ input {
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
::ng-deep .mat-pseudo-checkbox-checked {
// aura
::ng-deep .mat-checkbox-ripple .mat-ripple-element {
background-color: grey !important;
}
// contenu coche
::ng-deep .mat-checkbox-checked.mat-accent .mat-checkbox-background {
background-color: black !important; background-color: black !important;
} }
// indeterminate
::ng-deep .mat-checkbox .mat-checkbox-frame {
border: solid 1px black !important;
background-color: white !important;
}

View file

@ -1,7 +1,7 @@
<nav class="navbar navbar-expand-lg"> <nav class="navbar navbar-expand-lg">
<!-- PolyNotFound --> <!-- PolyNotFound -->
<a class="navbar-brand" routerLink="/advertiser/adList"> StreamNotFound </a> <a class="navbar-brand" routerLink="/url/adList"> StreamNotFound </a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>

View file

@ -1,38 +1,36 @@
<div [class]="themeService.getClassTheme()"> <div [class]="themeService.getClassTheme()">
<div class="myContainer"> <div class="bg">
<div class="bg">
<app-navbar-before-connexion pour="login"></app-navbar-before-connexion> <app-navbar-before-connexion pour="login"></app-navbar-before-connexion>
<div class="wrapper fadeInDown"> <div class="wrapper fadeInDown">
<div id="formContent"> <div id="formContent">
<!-- Icon -->
<div class="fadeIn first">
<h1 style="font-family: cursive; font-size: 45px; margin-top: 20px; margin-bottom: 10px">StreamNotFound</h1>
<img src="../../../../assets/logo.png" id="icon" alt="User Icon" style="margin-top: 10px"/>
</div>
<!-- Login Form -->
<form>
<input [(ngModel)]="pseudo" type="text" id="login" class="fadeIn second" name="login" placeholder="Login">
<input [(ngModel)]="password" type="password" id="password" class="fadeIn third" name="login" placeholder="Mot de passe">
<!-- Message d'erreur -->
<div *ngIf="hasError" style="text-align: center; margin-bottom: 20px;">
<span class="mat-error"> {{errorMessage}} </span>
</div>
<input type="submit" class="fadeIn fourth" value="Se connecter" (click)="onSeConnecter()">
</form>
<!-- Oubli mot de passe -->
<div id="formFooter">
<a class="underlineHover" href="https://disney.fandom.com/fr/wiki/Tristesse">J'ai oublié mon mot de passe</a>
</div>
<!-- Icon -->
<div class="fadeIn first">
<h1 style="font-family: cursive; font-size: 45px; margin-top: 20px; margin-bottom: 10px">StreamNotFound</h1>
<img src="../../../../assets/logo.png" id="icon" alt="User Icon" style="margin-top: 10px"/>
</div> </div>
<!-- Login Form -->
<form>
<input [(ngModel)]="pseudo" type="text" id="login" class="fadeIn second" name="login" placeholder="Login">
<input [(ngModel)]="password" type="password" id="password" class="fadeIn third" name="login" placeholder="Mot de passe">
<!-- Message d'erreur -->
<div *ngIf="hasError" style="text-align: center; margin-bottom: 20px;">
<span class="mat-error"> {{errorMessage}} </span>
</div>
<input type="submit" class="fadeIn fourth" value="Se connecter" (click)="onSeConnecter()">
</form>
<!-- Oubli mot de passe -->
<div id="formFooter">
<a class="underlineHover" href="https://disney.fandom.com/fr/wiki/Tristesse">J'ai oublié mon mot de passe</a>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -144,15 +144,10 @@ input[type=text]::placeholder, input[type=password]::placeholder {
color: #cccccc; color: #cccccc;
} }
.myContainer {
height: 100vh;
width: 100vw;
}
.bg{ .bg{
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 80vh; height: 100vh;
width: 100vw; width: 100vw;
overflow-y: hidden; overflow-y: hidden;
overflow-x: hidden; overflow-x: hidden;

View file

@ -124,9 +124,16 @@
<!-- Info personnelles advertiser --> <!-- Info personnelles advertiser -->
<ng-template #advertiserBlock> <ng-template #advertiserBlock>
<!-- Entreprise -->
<mat-form-field appearance="fill">
<mat-label>Entreprise</mat-label>
<input matInput type="text" [(ngModel)]="user.company" required>
</mat-form-field>
<br>
<!-- Login --> <!-- Login -->
<mat-form-field appearance="fill"> <mat-form-field appearance="fill">
<mat-label>Login</mat-label> <mat-label>Pseudo</mat-label>
<input matInput type="text" [(ngModel)]="user.login" required> <input matInput type="text" [(ngModel)]="user.login" required>
</mat-form-field> </mat-form-field>
<br> <br>

View file

@ -32,6 +32,7 @@ export class PageRegisterComponent
dateOfBirth: null, dateOfBirth: null,
gender: "man", gender: "man",
interests: [], interests: [],
company: "",
isActive: false, isActive: false,
isAccepted: false, isAccepted: false,
createdAt: new Date(), createdAt: new Date(),
@ -94,7 +95,11 @@ export class PageRegisterComponent
// Check les champs saisies par l'utilisateur // Check les champs saisies par l'utilisateur
checkField(): void checkField(): void
{ {
if(this.user.login.length === 0) { if((this.user.role.name === 'advertiser') && (this.user.company.length === 0)) {
this.errorMessage = "Veuillez remplir le champ 'entreprise'.";
this.hasError = true;
}
else if(this.user.login.length === 0) {
this.errorMessage = "Veuillez remplir le champ 'login'."; this.errorMessage = "Veuillez remplir le champ 'login'.";
this.hasError = true; this.hasError = true;
} }

View file

@ -15,7 +15,9 @@
text-align: center; text-align: center;
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
padding: 10px 0px 10px 0px; padding: 10px 0px 10px 0px;
background-color: #dcdcdc; //background-color: #dcdcdc;
background: linear-gradient(top, rgba(38,38,38,0.8), #e6e6e6 25%, #fff 38%, #c5c5c5 87%, rgba(38,38,38,0.8));
background: -webkit-linear-gradient(top, #c5c5c5, #e6e6e6 25%, #fff 38%, #c5c5c5 87%, #c5c5c5);
font-size: large; font-size: large;
border-bottom: solid 1px black; border-bottom: solid 1px black;
border-top-left-radius: 10px; border-top-left-radius: 10px;
@ -83,4 +85,10 @@
.btnCreerPlaylist { .btnCreerPlaylist {
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
background: linear-gradient(top, rgba(38,38,38,0.8), #e6e6e6 25%, #fff 38%, #c5c5c5 87%, rgba(38,38,38,0.8));
background: -webkit-linear-gradient(top, #c5c5c5, #e6e6e6 25%, #fff 38%, #c5c5c5 87%, #c5c5c5);
//background: linear-gradient(180deg, #e6e6e6 0%, rgba(0,0,0,0.25) 49%, rgba(38,38,38,0.6) 51%, rgba(0,0,0,0.25) 100%);
} }

View file

@ -1,5 +1,7 @@
.myContainer { .myContainer {
background-color: white ; //background-color: white ;
background: linear-gradient(top, rgba(38,38,38,0.8), #e6e6e6 25%, #fff 38%, #c5c5c5 87%, rgba(38,38,38,0.8));
background: -webkit-linear-gradient(top, #c5c5c5, #e6e6e6 25%, #fff 38%, #c5c5c5 87%, #c5c5c5);
text-align: center; text-align: center;
width: 35vw; width: 35vw;
margin: 1vh 0vh 3vh 0vh; margin: 1vh 0vh 3vh 0vh;
@ -13,7 +15,9 @@
.topBorder { .topBorder {
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
background-color: #dcdcdc; //background-color: #dcdcdc;
background: linear-gradient(top, rgba(38,38,38,0.8), #e6e6e6 25%, #fff 38%, #c5c5c5 87%, rgba(38,38,38,0.8));
background: -webkit-linear-gradient(top, #c5c5c5, #e6e6e6 25%, #fff 38%, #c5c5c5 87%, #c5c5c5);
text-align: left; text-align: left;
padding: 5px 0px 5px 5px; padding: 5px 0px 5px 5px;
border-bottom: solid 1px black; border-bottom: solid 1px black;
@ -68,7 +72,9 @@
.bottomBorder { .bottomBorder {
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
background-color: #dcdcdc; //background-color: #dcdcdc;
background: linear-gradient(top, rgba(38,38,38,0.8), #e6e6e6 25%, #fff 38%, #c5c5c5 87%, rgba(38,38,38,0.8));
background: -webkit-linear-gradient(top, #c5c5c5, #e6e6e6 25%, #fff 38%, #c5c5c5 87%, #c5c5c5);
border-top: solid 1px black; border-top: solid 1px black;
border-bottom: solid 1px black; border-bottom: solid 1px black;
font-size: large; font-size: large;

View file

@ -39,6 +39,7 @@ export class PopupUpdateUserComponent implements OnInit
dateOfBirth: user0.dateOfBirth, dateOfBirth: user0.dateOfBirth,
gender: user0.gender, gender: user0.gender,
interests: [], interests: [],
company: "",
isActive: user0.isActive, isActive: user0.isActive,
isAccepted: user0.isAccepted, isAccepted: user0.isAccepted,
createdAt: user0.createdAt, createdAt: user0.createdAt,

View file

@ -16,7 +16,7 @@
<!-- Info video --> <!-- Info video -->
<mat-grid-list cols="12" style="margin: 0px 0px 0px 0px; font-size: small"> <mat-grid-list cols="12" class="mat-grid-list-info-video">
<!-- logo --> <!-- logo -->
<mat-grid-tile [colspan]="2" [rowspan]="2" class="mat-grid-tile-info-video" (click)="onVideo(tabVideo[indexPage+k])"> <mat-grid-tile [colspan]="2" [rowspan]="2" class="mat-grid-tile-info-video" (click)="onVideo(tabVideo[indexPage+k])">

View file

@ -7,13 +7,12 @@ mat-grid-list {
mat-grid-tile { mat-grid-tile {
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
//border: solid 1px black;
} }
.myCell { .myCell {
margin: 7px 0px 0px 0px; margin: 7px 0px 0px 0px;
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
background-color: #f0f0f0; background-color: white;
border: solid 1px black; border: solid 1px black;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
@ -43,8 +42,6 @@ mat-grid-tile {
} }
.imgVideo { .imgVideo {
//border: solid 1px black;
//width: 20vw;
width: 18vw; width: 18vw;
height: 15vh; height: 15vh;
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
@ -54,9 +51,16 @@ mat-grid-tile {
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
.mat-grid-list-info-video {
margin: 0px 0px 0px 0px;
font-size: small;
}
.mat-grid-tile-info-video { .mat-grid-tile-info-video {
border: none; border: none;
font-size: x-small; font-size: x-small;
//background: linear-gradient(top, rgba(38,38,38,0.8), #e6e6e6 25%, #fff 38%, #c5c5c5 87%, rgba(38,38,38,0.8));
//background: -webkit-linear-gradient(top, #c5c5c5, #e6e6e6 25%, #fff 38%, #c5c5c5 87%, #c5c5c5);
} }
mat-icon { mat-icon {

View file

@ -2,6 +2,7 @@
<span class="helper"></span> <span class="helper"></span>
<img [src]="'assets/pub/'+ad.images[idxImage].url" <img [src]="'assets/pub/'+ad.images[idxImage].url"
[alt]="ad.images[idxImage].url" [alt]="ad.images[idxImage].url"
(click)="onClick()"
id="imgFromSearchOrMyPlaylists"> id="imgFromSearchOrMyPlaylists">
</div> </div>
@ -10,6 +11,7 @@
<img *ngIf="from === 'watchingLeft'" <img *ngIf="from === 'watchingLeft'"
[src]="'assets/pub/'+ad.images[idxImage].url" [src]="'assets/pub/'+ad.images[idxImage].url"
[alt]="ad.images[idxImage].url" [alt]="ad.images[idxImage].url"
(click)="onClick()"
id="imgFromWatchingLeft"> id="imgFromWatchingLeft">
<!-- --------------------------------------------------------------------- --> <!-- --------------------------------------------------------------------- -->
@ -17,4 +19,5 @@
<img *ngIf="from === 'watchingRight'" <img *ngIf="from === 'watchingRight'"
[src]="'assets/pub/'+ad.images[idxImage].url" [src]="'assets/pub/'+ad.images[idxImage].url"
[alt]="ad.images[idxImage].url" [alt]="ad.images[idxImage].url"
(click)="onClick()"
id="imgFromWatchingRight"> id="imgFromWatchingRight">

View file

@ -1,6 +1,6 @@
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
import {Advert} from "../../../../utils/interfaces/advert"; import {Advert} from "../../../../utils/interfaces/advert";
import {ThemeService} from "../../../../utils/services/theme/theme.service"; import {Router} from "@angular/router";
@ -15,16 +15,17 @@ export class AdvertComponent implements OnInit
@Input() from: string = "search"; @Input() from: string = "search";
idxImage: number = 0; idxImage: number = 0;
constructor(private router: Router) { }
constructor(public themeService: ThemeService) { }
ngOnInit(): void ngOnInit(): void
{ {
const nbImages = this.ad.images.length; const nbImages = this.ad.images.length;
this.idxImage = Math.floor(Math.random() * nbImages); this.idxImage = Math.floor(Math.random() * nbImages);
}
onClick(): void
{
document.location.href = this.ad.url;
} }
} }

View file

@ -35,7 +35,9 @@
.topBorder { .topBorder {
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
background-color: #dcdcdc; //background-color: #dcdcdc;
background: linear-gradient(top, rgba(38,38,38,0.8), #e6e6e6 25%, #fff 38%, #c5c5c5 87%, rgba(38,38,38,0.8));
background: -webkit-linear-gradient(top, #c5c5c5, #e6e6e6 25%, #fff 38%, #c5c5c5 87%, #c5c5c5);
text-align: left; text-align: left;
padding: 5px 0px 5px 5px; padding: 5px 0px 5px 5px;
border-bottom: solid 1px black; border-bottom: solid 1px black;

View file

@ -3,7 +3,7 @@ export interface Advert
_id: string, _id: string,
userId: string, userId: string,
title: string, title: string,
advertiser: string, url: string,
images: { images: {
url: string, url: string,
description: string, description: string,
@ -23,7 +23,7 @@ export interface AdvertWithCountViews {
_id: string, _id: string,
userId: string, userId: string,
title: string, title: string,
advertiser: string, url: string,
images: { images: {
url: string, url: string,
description: string, description: string,

View file

@ -12,6 +12,7 @@ export interface User
dateOfBirth: Date, dateOfBirth: Date,
gender: string, gender: string,
interests: string[], interests: string[],
company: string,
isActive: boolean, isActive: boolean,
isAccepted: boolean, isAccepted: boolean,
lastConnexion: Date, lastConnexion: Date,

View file

@ -9,7 +9,7 @@ const TAB_ADVERT: Advert[] = [
_id: "idNutella", _id: "idNutella",
userId: "userId", userId: "userId",
title: "pot de nutella XXL", title: "pot de nutella XXL",
advertiser: "nutella", url: "https://www.nutella.com/fr/fr/",
images: [ images: [
{ url: "nutella_v_1.jpeg", description: "image nutella 1" }, { url: "nutella_v_1.jpeg", description: "image nutella 1" },
{ url: "nutella_v_2.png", description: "image nutella 2" }, { url: "nutella_v_2.png", description: "image nutella 2" },
@ -38,7 +38,7 @@ const TAB_ADVERT: Advert[] = [
_id: "idRolex", _id: "idRolex",
userId: "userId", userId: "userId",
title: "Rolex", title: "Rolex",
advertiser: "rolex", url: "https://www.rolex.com",
images: [ images: [
{ url: "rolex_v_1.jpg", description: "rolex 1" }, { url: "rolex_v_1.jpg", description: "rolex 1" },
{ url: "rolex_v_2.png", description: "rolex 2" }, { url: "rolex_v_2.png", description: "rolex 2" },
@ -66,7 +66,7 @@ const TAB_ADVERT: Advert[] = [
_id: "idAlbion", _id: "idAlbion",
userId: "userId", userId: "userId",
title: "Albion new version", title: "Albion new version",
advertiser: "albion", url: "https://www.rolex.com",
images: [ images: [
{ url: "rolex_v_1.jpg", description: "albion 1" }, { url: "rolex_v_1.jpg", description: "albion 1" },
{ url: "rolex_v_2.png", description: "albion 2" }, { url: "rolex_v_2.png", description: "albion 2" },

View file

@ -17,6 +17,7 @@ const USER: User = {
dateOfBirth: new Date(), dateOfBirth: new Date(),
gender: "man", gender: "man",
interests: ["foot", "jeux-vidéo"], interests: ["foot", "jeux-vidéo"],
company: "",
isActive: true, isActive: true,
isAccepted: true, isAccepted: true,
lastConnexion: new Date(), lastConnexion: new Date(),
@ -37,6 +38,7 @@ const ADVERTISER: User = {
dateOfBirth: null, dateOfBirth: null,
gender: "", gender: "",
interests: [], interests: [],
company: "My company",
isActive: true, isActive: true,
isAccepted: true, isAccepted: true,
lastConnexion: new Date(), lastConnexion: new Date(),
@ -57,6 +59,7 @@ const ADMIN: User = {
dateOfBirth: null, dateOfBirth: null,
gender: "", gender: "",
interests: [], interests: [],
company: "",
isActive: true, isActive: true,
isAccepted: true, isAccepted: true,
lastConnexion: new Date(), lastConnexion: new Date(),