image video à la place de iframe

This commit is contained in:
MiharyR 2021-11-19 15:42:51 +01:00
parent 500b32626e
commit b045f507d2
92 changed files with 945 additions and 656 deletions

View file

@ -2,11 +2,12 @@ import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} f
import {COMMA, ENTER} from "@angular/cdk/keycodes";
import {FormControl} from "@angular/forms";
import {Observable} from "rxjs";
import {FictitiousDatasService} from "../../../utils/services/fictitiousDatas/fictitious-datas.service";
import {MessageService} from "../../../utils/services/message/message.service";
import {map, startWith} from "rxjs/operators";
import {MatChipInputEvent} from "@angular/material/chips";
import {MatAutocompleteSelectedEvent} from "@angular/material/autocomplete";
import {FictitiousUtilsService} from "../../../utils/services/fictitiousDatas/fictitiousUtils/fictitious-utils.service";
@Component({
@ -27,7 +28,7 @@ export class InputInterestsProfilComponent implements OnInit
@ViewChild('tagInput') tagInput: ElementRef<HTMLInputElement>;
constructor( private fictitiousDatasService: FictitiousDatasService,
constructor( private fictitiousUtilsService: FictitiousUtilsService,
private messageService: MessageService ) {}
@ -38,7 +39,7 @@ export class InputInterestsProfilComponent implements OnInit
map((fruit: string | null) => fruit ? this._filter(fruit) : this.allInterests.slice()));
// --- FAUX CODE ---
this.allInterests = this.fictitiousDatasService.getTags();
this.allInterests = this.fictitiousUtilsService.getTags();
this.allInterests.sort();
}

View file

@ -9,7 +9,7 @@
<!-- Photo de profil -->
<div style="text-align: center">
<img [src]="user.profilePictureUrl" onerror="this.onerror=null; this.src='assets/profil.png'">
<img [src]="user.profileImageUrl" onerror="this.onerror=null; this.src='assets/profil.png'">
</div>
<!-- Col gauche & droite -->
@ -41,10 +41,10 @@
<div class="col-4 myValue"> {{user.login}} </div>
</div>
<!-- mail -->
<!-- email -->
<div class="row myRow">
<div class="col-8 myLabel">Mail:</div>
<div class="col-4 myValue"> {{user.mail}} </div>
<div class="col-4 myValue"> {{user.email}} </div>
</div>
<!-- gender -->

View file

@ -1,10 +1,10 @@
import { Component, OnInit } from '@angular/core';
import {ThemeService} from "../../../utils/services/theme/theme.service";
import {FictitiousDatasService} from "../../../utils/services/fictitiousDatas/fictitious-datas.service";
import {User} from "../../../utils/interfaces/user";
import {MatDialog} from "@angular/material/dialog";
import {MatSnackBar} from "@angular/material/snack-bar";
import {PopupUpdateUserComponent} from "../popup-update-user/popup-update-user.component";
import {FictitiousUsersService} from "../../../utils/services/fictitiousDatas/fictitiousUsers/fictitious-users.service";
@ -19,14 +19,14 @@ export class PageProfilUserComponent implements OnInit
constructor( public themeService: ThemeService,
private fictitiousDatasService: FictitiousDatasService,
private fictitiousUsersService: FictitiousUsersService,
public dialog: MatDialog,
private snackBar: MatSnackBar ) { }
ngOnInit(): void
{
this.user = this.fictitiousDatasService.getUser();
this.user = this.fictitiousUsersService.getUser();
}

View file

@ -2,12 +2,12 @@
<!-- Photo de profil -->
<div style="text-align: center; font-size: small">
<img [src]="userCopy.profilePictureUrl" onerror="this.onerror=null; this.src='assets/profil.png'"><br>
<img [src]="userCopy.profileImageUrl" onerror="this.onerror=null; this.src='assets/profil.png'"><br>
<input title="lien vers image"
type="text"
class="form-control inputUrlImage"
style="font-size: small"
[(ngModel)]="userCopy.profilePictureUrl">
[(ngModel)]="userCopy.profileImageUrl">
</div><br>
<!-- Col gauche & droite -->

View file

@ -30,12 +30,12 @@ export class PopupUpdateUserComponent implements OnInit
_id: user0._id,
login: user0.login,
hashPass: user0.hashPass,
mail: user0.mail,
email: user0.mail,
role: {
name: user0.role.name,
permission: user0.role.permission,
},
profilePictureUrl: user0.profilePictureUrl,
profileImageUrl: user0.profileImageUrl,
dateOfBirth: user0.dateOfBirth,
gender: user0.gender,
interests: [],
@ -70,11 +70,11 @@ export class PopupUpdateUserComponent implements OnInit
this.errorMessage = "Veuillez remplir le champ 'login'." ;
this.hasError = true;
}
else if(this.userCopy.mail.length === 0) {
else if(this.userCopy.email.length === 0) {
this.errorMessage = "Veuillez remplir le champ 'email'." ;
this.hasError = true;
}
else if(!this.isValidEmail(this.userCopy.mail)) {
else if(!this.isValidEmail(this.userCopy.email)) {
this.errorMessage = "Email invalide." ;
this.hasError = true;
}