Mise à jours et ajout de fonctionnalités

This commit is contained in:
Julien Gautier
2023-09-13 20:48:18 +02:00
parent 747948a422
commit 1147d5f5bb
24 changed files with 478 additions and 155 deletions
+2
View File
@@ -2,6 +2,8 @@ export * from './accordion';
export * from './confirmed.validator';
export * from './dialogs';
export * from './helpers-jump';
export * from './layout/header.component';
export * from './layout/footer.component';
export * from './layout/full.component';
export * from './list-errors/list-errors.component';
export * from './menu-items';
@@ -1,48 +1,4 @@
<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>
<span *appShowAuthed="true" class="fw-light me-1">@{{ currentUser.username }}</span>
<div *appShowAuthed="true" 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>
<span *appShowAuthed="false">
<button mat-button routerLink="/login" routerLinkActive="active">Se connecter</button>
<button mat-button routerLink="/register" routerLinkActive="active">Créer un compte</button>
</span>
</mat-toolbar>
<huapp-layout-header></huapp-layout-header>
<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">
@@ -123,14 +79,7 @@
</div>
</mat-nav-list>
</div>
<footer class="footer">
<div class="container-fluid text-end">
<a class="me-1" [href]="siteLink" target="_blank">{{ author }}</a>
<span class="copyright">
&copy; {{ today | date: 'yyyy' }}
</span>
</div>
</footer>
<huapp-layout-footer></huapp-layout-footer>
</mat-sidenav>
<mat-sidenav-content class="page-wrapper">
<div class="page-content">
@@ -15,6 +15,7 @@ import { Observable, Subscription } from 'rxjs';
import { User } from 'src/app/core/models';
import { UserService } from 'src/app/core/services';
import { MenuItems, ShowAuthedDirective, SpinnerComponent, AccordionAnchorDirective, AccordionLinkDirective, AccordionDirective } from 'src/app/components/shared';
import { HeaderComponent, FooterComponent } from 'src/app/components/shared/layout';
/** @title Responsive sidenav */
@@ -24,7 +25,7 @@ import { MenuItems, ShowAuthedDirective, SpinnerComponent, AccordionAnchorDirect
imports: [
CommonModule, RouterModule, RouterOutlet,
MatBadgeModule, MatButtonModule, MatIconModule, MatListModule, MatMenuModule, MatSidenavModule, MatToolbarModule,
ShowAuthedDirective, SpinnerComponent,
ShowAuthedDirective, SpinnerComponent, HeaderComponent, FooterComponent,
AccordionAnchorDirective, AccordionLinkDirective, AccordionDirective
],
providers: [ MenuItems ],