Skip to content
Merged

5.2.3 #184

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
404 changes: 202 additions & 202 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gameon-front",
"version": "5.2.2",
"version": "5.2.3",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand All @@ -10,19 +10,19 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^19.2.7",
"@angular/cdk": "^19.2.10",
"@angular/common": "^19.2.7",
"@angular/compiler": "^19.2.7",
"@angular/core": "^19.2.7",
"@angular/forms": "^19.2.7",
"@angular/platform-browser": "^19.2.7",
"@angular/platform-browser-dynamic": "^19.2.7",
"@angular/router": "^19.2.7",
"@angular/animations": "^19.2.9",
"@angular/cdk": "^19.2.14",
"@angular/common": "^19.2.9",
"@angular/compiler": "^19.2.9",
"@angular/core": "^19.2.9",
"@angular/forms": "^19.2.9",
"@angular/platform-browser": "^19.2.9",
"@angular/platform-browser-dynamic": "^19.2.9",
"@angular/router": "^19.2.9",
"@fortawesome/angular-fontawesome": "^1.0.0",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@ngrx/store": "^19.1.0",
"@tailwindcss/postcss": "^4.1.4",
"@tailwindcss/postcss": "^4.1.5",
"chart.js": "^4.4.9",
"flowbite": "^3.1.2",
"keycloak-angular": "^19.0.2",
Expand All @@ -34,9 +34,9 @@
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^19.2.8",
"@angular/cli": "^19.2.8",
"@angular/compiler-cli": "^19.2.7",
"@angular-devkit/build-angular": "^19.2.10",
"@angular/cli": "^19.2.10",
"@angular/compiler-cli": "^19.2.9",
"@types/jasmine": "~5.1.0",
"autoprefixer": "^10.4.20",
"jasmine-core": "~5.1.0",
Expand Down
70 changes: 34 additions & 36 deletions src/app/routes/profile/profile.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/>

<span
class="mt-2 text-xl font-semibold text-primary dark:text-primaryDark"
class="text-primary dark:text-primaryDark mt-2 text-xl font-semibold"
>{{ currentPlayer.nickname }}</span
>
<span class="text-gray-500 dark:text-gray-400">{{
Expand All @@ -46,28 +46,28 @@

<div class="mt-8">
<div
class="mt-4 flex animate-fade justify-between px-4"
class="animate-fade mt-4 flex justify-between px-4"
*ngIf="
loading == false && isAdmin == true && (player$ | async) as currentPlayer
"
>
<span class="text-lg font-semibold text-primary dark:text-primaryDark"
<span class="text-primary dark:text-primaryDark text-lg font-semibold"
>Administration</span
>
</div>

<section
id="player-admin"
class="mt-4 animate-fade px-4"
class="animate-fade mt-4 px-4"
*ngIf="
loading == false && isAdmin == true && (player$ | async) as currentPlayer
"
>
<div
class="rounded-lg bg-bgLight p-4 text-sm drop-shadow-lg dark:bg-bgDark"
class="bg-bgLight dark:bg-bgDark rounded-lg p-4 text-sm drop-shadow-lg"
>
<div
class="flex cursor-pointer flex-row justify-between text-customRed"
class="text-customRed flex cursor-pointer flex-row justify-between"
[routerLink]="['/admin']"
>
<a
Expand All @@ -81,7 +81,7 @@
<hr class="my-4" />

<div
class="flex cursor-pointer flex-row justify-between text-customYellow"
class="text-customYellow flex cursor-pointer flex-row justify-between"
[cdkCopyToClipboard]="token"
>
<a
Expand All @@ -94,24 +94,24 @@
</section>

<div
class="mt-4 flex animate-fade justify-between px-4"
class="animate-fade mt-4 flex justify-between px-4"
*ngIf="loading == false && (player$ | async) as currentPlayer"
>
<span class="text-lg font-semibold text-primary dark:text-primaryDark"
<span class="text-primary dark:text-primaryDark text-lg font-semibold"
>FIFA</span
>
</div>

<section
id="player-fifa"
class="mt-4 animate-fade px-4"
class="animate-fade mt-4 px-4"
*ngIf="loading == false && (player$ | async) as currentPlayer"
>
<div
class="rounded-lg bg-bgLight p-4 text-sm drop-shadow-lg dark:bg-bgDark"
class="bg-bgLight dark:bg-bgDark rounded-lg p-4 text-sm drop-shadow-lg"
>
<div
class="flex cursor-pointer flex-row justify-between text-primary dark:text-primaryDark"
class="text-primary dark:text-primaryDark flex cursor-pointer flex-row justify-between"
[routerLink]="['/player', currentPlayer.id]"
>
<a
Expand All @@ -125,17 +125,17 @@
</section>

<div
class="mt-4 flex animate-fade justify-between px-4"
class="animate-fade mt-4 flex justify-between px-4"
*ngIf="loading == false && (player$ | async) as currentPlayer"
>
<span class="text-lg font-semibold text-primary dark:text-primaryDark"
<span class="text-primary dark:text-primaryDark text-lg font-semibold"
>League of Legends</span
>
</div>

<section
id="player-lol"
class="mt-4 animate-fade"
class="animate-fade mt-4"
*ngIf="loading == false && (player$ | async) as currentPlayer"
>
<app-info-message
Expand All @@ -146,10 +146,10 @@
></app-info-message>

<div
class="mx-4 rounded-lg bg-bgLight p-4 text-sm drop-shadow-lg dark:bg-bgDark"
class="bg-bgLight dark:bg-bgDark mx-4 rounded-lg p-4 text-sm drop-shadow-lg"
>
<div
class="flex cursor-pointer flex-row justify-between text-primary dark:text-primaryDark"
class="text-primary dark:text-primaryDark flex cursor-pointer flex-row justify-between"
[routerLink]="['/lol/summoner', currentPlayer.id]"
>
<div class="flex items-center space-x-2">
Expand All @@ -163,24 +163,24 @@
</section>

<div
class="mt-4 flex animate-fade justify-between px-4"
class="animate-fade mt-4 flex justify-between px-4"
*ngIf="loading == false && (player$ | async) as currentPlayer"
>
<span class="text-lg font-semibold text-primary dark:text-primaryDark"
<span class="text-primary dark:text-primaryDark text-lg font-semibold"
>Préférences</span
>
</div>

<section
id="player-preferences"
class="mt-4 animate-fade px-4"
class="animate-fade mt-4 px-4"
*ngIf="loading == false && (player$ | async) as currentPlayer"
>
<div
class="rounded-lg bg-bgLight p-4 text-sm drop-shadow-lg dark:bg-bgDark"
class="bg-bgLight dark:bg-bgDark rounded-lg p-4 text-sm drop-shadow-lg"
>
<div
class="flex cursor-pointer flex-row justify-between text-primary dark:text-primaryDark"
class="text-primary dark:text-primaryDark flex cursor-pointer flex-row justify-between"
>
<span
><fa-icon [icon]="calendarIcon" class="mr-2"></fa-icon>
Expand All @@ -195,13 +195,13 @@
<input
type="text"
id="fullname"
class="peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm text-primary focus:border-secondary focus:outline-none focus:ring-0 dark:text-primaryDark"
class="peer text-primary focus:border-secondary dark:text-primaryDark block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm focus:ring-0 focus:outline-none"
required
formControlName="fullName"
/>
<label
for="fullname"
class="absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium peer-focus:text-secondary"
class="peer-focus:text-secondary absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium"
>
Nom complet
<span class="text-customRed">*</span>
Expand All @@ -212,13 +212,13 @@
<input
type="text"
id="nickname"
class="peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm text-primary focus:border-secondary focus:outline-none focus:ring-0 dark:text-primaryDark"
class="peer text-primary focus:border-secondary dark:text-primaryDark block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm focus:ring-0 focus:outline-none"
required
formControlName="nickname"
/>
<label
for="nickname"
class="absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium peer-focus:text-secondary"
class="peer-focus:text-secondary absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium"
>
Pseudo
<span class="text-customRed">*</span>
Expand All @@ -229,16 +229,14 @@
<input
type="text"
id="profilePictureUrl"
class="peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm text-primary focus:border-secondary focus:outline-none focus:ring-0 dark:text-primaryDark"
required
class="peer text-primary focus:border-secondary dark:text-primaryDark block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm focus:ring-0 focus:outline-none"
formControlName="profilePictureUrl"
/>
<label
for="profilePictureUrl"
class="absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium peer-focus:text-secondary"
class="peer-focus:text-secondary absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium"
>
Photo de profil (URL)
<span class="text-customRed">*</span>
</label>
</div>

Expand All @@ -248,13 +246,13 @@
<input
type="text"
id="riotGamesNickname"
class="peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm text-primary focus:border-secondary focus:outline-none focus:ring-0 dark:text-primaryDark"
class="peer text-primary focus:border-secondary dark:text-primaryDark block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm focus:ring-0 focus:outline-none"
required
formControlName="riotGamesNickname"
/>
<label
for="riotGamesNickname"
class="absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium peer-focus:text-secondary"
class="peer-focus:text-secondary absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium"
>
Nom de compte Riot Games
</label>
Expand All @@ -264,21 +262,21 @@
<input
type="text"
id="riotGamesTagLine"
class="peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm text-primary focus:border-secondary focus:outline-none focus:ring-0 dark:text-primaryDark"
class="peer text-primary focus:border-secondary dark:text-primaryDark block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm focus:ring-0 focus:outline-none"
required
formControlName="riotGamesTagLine"
/>
<label
for="riotGamesTagLine"
class="absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium peer-focus:text-secondary"
class="peer-focus:text-secondary absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 transform text-sm text-gray-300 duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:font-medium"
>
Tag (exemple: EUW)
</label>
</div>

<button
(click)="updateUser()"
class="delay-50 w-full rounded-lg border border-customGreen bg-bgLight px-5 py-2.5 text-center text-sm text-customGreen transition ease-in-out hover:bg-customGreen hover:text-white focus:outline-none focus:ring-4 focus:ring-customGreen dark:bg-bgDark"
class="border-customGreen bg-bgLight text-customGreen hover:bg-customGreen focus:ring-customGreen dark:bg-bgDark w-full rounded-lg border px-5 py-2.5 text-center text-sm transition delay-50 ease-in-out hover:text-white focus:ring-4 focus:outline-none"
>
Mettre à jour
</button>
Expand All @@ -287,7 +285,7 @@
<hr class="my-4" />

<div
class="flex cursor-pointer flex-row justify-between text-customRed"
class="text-customRed flex cursor-pointer flex-row justify-between"
(click)="logout()"
>
<a><fa-icon [icon]="logoutIcon" class="mr-2"></fa-icon> Déconnexion </a>
Expand Down
21 changes: 18 additions & 3 deletions src/app/routes/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ export class ProfilePageComponent implements OnInit, OnChanges {
@Output() successMessageChange = new EventEmitter<boolean>();

updatePlayerForm = new FormGroup({
fullName: new FormControl('', [Validators.maxLength(100)]),
nickname: new FormControl('', [Validators.maxLength(100)]),
fullName: new FormControl('', [
Validators.maxLength(100),
Validators.required,
]),
nickname: new FormControl('', [
Validators.maxLength(100),
Validators.required,
]),
profilePictureUrl: new FormControl('', [Validators.maxLength(500)]),
riotGamesNickname: new FormControl('', [Validators.maxLength(500)]),
riotGamesTagLine: new FormControl('', [Validators.maxLength(500)]),
Expand Down Expand Up @@ -131,6 +137,15 @@ export class ProfilePageComponent implements OnInit, OnChanges {
if (this.loading == false) {
let riotGamesNickname: string | undefined = undefined;
let riotGamesTagLine: string | undefined = undefined;
let profilePictureUrl: string | undefined = undefined;

if (
this.updatePlayerForm.controls['profilePictureUrl'].value != null &&
this.updatePlayerForm.controls['profilePictureUrl'].value != ''
) {
profilePictureUrl =
this.updatePlayerForm.controls['profilePictureUrl'].value;
}

if (
this.updatePlayerForm.controls['riotGamesNickname'].value != null &&
Expand All @@ -153,7 +168,7 @@ export class ProfilePageComponent implements OnInit, OnChanges {
.update(
this.updatePlayerForm.controls['fullName'].value,
this.updatePlayerForm.controls['nickname'].value,
this.updatePlayerForm.controls['profilePictureUrl'].value,
profilePictureUrl,
riotGamesNickname,
riotGamesTagLine,
)
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/services/common/gameon-player.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class GameOnPlayerService {
update(
fullName: any,
nickname: any,
profilePicUrl: any,
profilePicUrl?: any,
riotGamesNickname?: string,
riotGamesTagLine?: string,
): Observable<Player> {
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const environment = {
realm: 'gameon',
clientId: 'gameon-front',
},
currentLoLPatch: '15.7.1',
currentLoLPatch: '15.9.1',
};
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const environment = {
realm: 'gameon',
clientId: 'gameon-front-dev',
},
currentLoLPatch: '15.7.1',
currentLoLPatch: '15.9.1',
};