Mise à jours du dashboard

This commit is contained in:
Julien Gautier
2023-09-14 18:28:02 +02:00
parent 0e6b3ef1c7
commit 92b204c769
41 changed files with 981 additions and 852 deletions
@@ -30,7 +30,7 @@
<!-- Numero Column -->
<ng-container matColumnDef="numero">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Numero </th>
<td class="text-right pl-3 pr-3" mat-cell *matCellDef="let element">
<td class="text-end pl-3 pr-3" mat-cell *matCellDef="let element">
<ng-container *ngIf="element.numero"><a [routerLink]="['/jump', element.slug]">{{element.numero}}</a></ng-container>
<ng-container *ngIf="!element.numero"><ngx-skeleton-loader [theme]="{width: '30px', height: '13px', marginBottom: '0px'}"></ngx-skeleton-loader></ng-container>
</td>
@@ -94,7 +94,7 @@
<!-- Taille Column -->
<ng-container matColumnDef="taille">
<th class="pl-3" mat-header-cell *matHeaderCellDef> Taille </th>
<td class="text-nowrap text-right pl-3 pr-3" mat-cell *matCellDef="let element">
<td class="text-nowrap text-end pl-3 pr-3" mat-cell *matCellDef="let element">
<ng-container *ngIf="element.taille">{{element.taille}}</ng-container>
<ng-container *ngIf="!element.numero"><ngx-skeleton-loader [theme]="{width: '30px', height: '13px', marginBottom: '0px'}"></ngx-skeleton-loader></ng-container>
</td>
@@ -118,7 +118,7 @@
<!-- Participants Column -->
<ng-container matColumnDef="participants">
<th class="pl-3" mat-header-cell *matHeaderCellDef> Participants </th>
<td class="text-right pl-3 pr-3" mat-cell *matCellDef="let element">
<td class="text-end pl-3 pr-3" mat-cell *matCellDef="let element">
<ng-container *ngIf="element.participants">{{element.participants}}</ng-container>
<ng-container *ngIf="!element.numero"><ngx-skeleton-loader [theme]="{width: '30px', height: '13px', marginBottom: '0px'}"></ngx-skeleton-loader></ng-container>
</td>
@@ -1,7 +1,54 @@
<huapp-layout-header></huapp-layout-header>
<mat-toolbar color="primary" class="topbar">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">
<span>
<img src="assets/images/logo-light-icon.svg" alt="homepage" class="light-logo">
</span>
<span>
<img src="assets/images/logo-light-text.svg" alt="homepage" class="light-logo">
</span>
</a>
</div>
<button mat-icon-button (click)="snav.toggle()" value="sidebarclosed">
<mat-icon fontIcon="menu"></mat-icon>
</button>
<span class="flex-spacer"></span>
<ng-container *appShowAuthed="true">
<span class="fw-light me-1">@{{ currentUser.username }}</span>
<div class="position-relative">
<button [matMenuTriggerFor]="profile" mat-icon-button>
<img [src]="currentUser.image" alt="user" class="profile-pic">
</button>
<mat-menu #profile="matMenu">
<button mat-menu-item [routerLink]="['/profile', currentUser.username]" routerLinkActive="active">
<mat-icon fontIcon="account_circle" color="primary"></mat-icon> Mon compte
</button>
<button mat-menu-item routerLink="/settings" routerLinkActive="active">
<mat-icon fontIcon="settings" color="primary"></mat-icon> Paramètres
</button>
<button mat-menu-item (click)="goToGitHub()">
<mat-icon fontIcon="code" color="primary"></mat-icon> GitHub
</button>
<button mat-menu-item>
<mat-icon fontIcon="notifications_off" color="primary"></mat-icon> Désactiver les notifications
</button>
<hr class="my-0" />
<button mat-menu-item (click)="logout()">
<mat-icon fontIcon="logout" color="warn"></mat-icon> Se déconnecter
</button>
</mat-menu>
</div>
</ng-container>
<ng-container *appShowAuthed="false">
<span>
<button mat-button routerLink="/login" routerLinkActive="active">Se connecter</button>
<button mat-button routerLink="/register" routerLinkActive="active">Créer un compte</button>
</span>
</ng-container>
</mat-toolbar>
<mat-sidenav-container class="app-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 0 : 0">
<mat-sidenav #snav id="snav" class="dark-sidebar pl-xs" [mode]="mobileQuery.matches ? 'side' : 'over'" fixedTopGap="0" [opened]="mobileQuery.matches" [disableClose]="mobileQuery.matches" >
<div *appShowAuthed="true">
<mat-sidenav #snav id="snav" class="dark-sidebar pl-xs" [mode]="mobileQuery.matches ? 'side' : 'over'" fixedTopGap="0" [opened]="mobileQuery.matches" [disableClose]="mobileQuery.matches">
<ng-container *appShowAuthed="true">
<div class="user-profile" style="background-image: url('{{ currentUser.bg_image }}');">
<div class="profile-img"> <img [src]="currentUser.image" alt="user"> </div>
<div class="profile-text">
@@ -48,8 +95,8 @@
</mat-list-item>
</div>
</mat-nav-list>
</div>
<div *appShowAuthed="false">
</ng-container>
<ng-container *appShowAuthed="false">
<div class="user-profile">
<!-- <div class="profile-img"> <img src="/assets/images/users/user.jpg" alt="user"> </div> -->
</div>
@@ -78,7 +125,7 @@
</mat-list-item>
</div>
</mat-nav-list>
</div>
</ng-container>
<huapp-layout-footer></huapp-layout-footer>
</mat-sidenav>
<mat-sidenav-content class="page-wrapper">
@@ -20,10 +20,12 @@ import { UserService } from 'src/app/core/services';
]
})
export class HeaderComponent implements OnInit, OnDestroy {
private _currentUser: Subscription = new Subscription();
private _isAuthenticated: Subscription = new Subscription();
private isAuthenticated = false;
currentUser: User = {} as User;
constructor(
private router: Router,
private userService: UserService