feat : bump 1.0.0 => 1.1.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "trouve-ton-profile",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "bash replace-prod-env.sh src/environments/environment.development.ts $ENV_URL && ng serve",
|
||||
|
||||
@@ -55,9 +55,9 @@ describe('AppComponent', () => {
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have the 'TrouveTonProfile' title`, () => {
|
||||
it(`should have the 'TrouveTonProfil' title`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('TrouveTonProfile');
|
||||
expect(app.title).toEqual('TrouveTonProfil');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,6 +13,6 @@ import { ThemeService } from '@app/core/services/theme/theme.service';
|
||||
styleUrl: './app.component.scss',
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'TrouveTonProfile';
|
||||
title = 'TrouveTonProfil';
|
||||
themeService = inject(ThemeService);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export class PbProfileRepository implements ProfileRepository {
|
||||
private pb = new PocketBase(environment.baseUrl);
|
||||
|
||||
private defaultOptions = {
|
||||
expand: 'utilisateur',
|
||||
expand: 'utilisateur,secteur',
|
||||
};
|
||||
|
||||
list(params?: SearchFilters): Observable<ProfilePaginated> {
|
||||
@@ -53,7 +53,7 @@ export class PbProfileRepository implements ProfileRepository {
|
||||
|
||||
if (params) {
|
||||
if (params.secteur) {
|
||||
filters.push(`secteur ~ '${params.secteur}'`);
|
||||
filters.push(`secteur.nom ~ '${params.secteur}'`);
|
||||
}
|
||||
|
||||
if (params.profession) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<span
|
||||
class="text-xl sm:text-2xl font-semibold text-gray-900 dark:text-white group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors"
|
||||
>
|
||||
TrouveTonProfile
|
||||
TrouveTonProfil
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<!-- Copyright (optionnel) -->
|
||||
<div class="pt-6 border-t border-gray-200 dark:border-gray-800">
|
||||
<p class="text-center text-xs sm:text-sm text-gray-500 dark:text-gray-500">
|
||||
© {{ currentYear }} TrouveTonProfile. Tous droits réservés.
|
||||
© {{ currentYear }} TrouveTonProfil. Tous droits réservés.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,37 +17,7 @@
|
||||
</a>
|
||||
|
||||
<!-- Actions utilisateur -->
|
||||
<div class="flex items-center gap-2 sm:gap-3">
|
||||
<!-- Avatar utilisateur (si connecté) -->
|
||||
@if (isAuthenticated() && isEmailVerified() && user()) {
|
||||
<a
|
||||
[routerLink]="['my-profile']"
|
||||
[state]="{ user: user() }"
|
||||
class="w-9 h-9 sm:w-10 sm:h-10 rounded-full overflow-hidden bg-gray-200 border-2 border-transparent hover:border-indigo-500 dark:hover:border-indigo-400 transition-all ring-2 ring-transparent hover:ring-2 hover:ring-indigo-200 dark:hover:ring-indigo-900"
|
||||
aria-label="Mon profil"
|
||||
>
|
||||
@if (user()!.avatar) {
|
||||
<img
|
||||
[alt]="user()!.username"
|
||||
class="object-cover w-full h-full"
|
||||
[src]="
|
||||
environment.baseUrl + '/api/files/users/' + user()!.id + '/' + user()!.avatar
|
||||
"
|
||||
loading="lazy"
|
||||
/>
|
||||
} @else {
|
||||
<img
|
||||
[alt]="user()!.username"
|
||||
class="object-cover w-full h-full"
|
||||
src="https://api.dicebear.com/9.x/initials/svg?seed={{
|
||||
user()!.name ? user()!.name : user()!.username ? user()!.username : user()!.email
|
||||
}}"
|
||||
loading="lazy"
|
||||
/>
|
||||
}
|
||||
</a>
|
||||
}
|
||||
|
||||
<div class="flex items-center gap-2 sm:gap-4">
|
||||
<!-- Toggle thème -->
|
||||
<button
|
||||
type="button"
|
||||
@@ -88,51 +58,128 @@
|
||||
}
|
||||
</button>
|
||||
|
||||
<!-- Séparateur -->
|
||||
<div class="h-6 w-px bg-gray-300 dark:bg-gray-700"></div>
|
||||
|
||||
<!-- Bouton de connexion/déconnexion -->
|
||||
@if (isAuthenticated() && isEmailVerified()) {
|
||||
<a
|
||||
[routerLink]="['/auth']"
|
||||
(click)="authFacade.logout()"
|
||||
class="flex items-center gap-2 px-3 py-2 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
|
||||
aria-label="Se déconnecter"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="w-5 h-5"
|
||||
<!-- Menu utilisateur connecté -->
|
||||
<div class="flex items-center gap-2">
|
||||
<!-- Lien Mon Profil - visible sur desktop -->
|
||||
<a
|
||||
[routerLink]="['my-profile']"
|
||||
[state]="{ user: user() }"
|
||||
class="hidden sm:flex items-center gap-2 px-4 py-2 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors font-medium"
|
||||
aria-label="Mon profil"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"
|
||||
/>
|
||||
</svg>
|
||||
<span class="hidden sm:inline text-sm font-medium">Déconnexion</span>
|
||||
</a>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="w-5 h-5"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"
|
||||
/>
|
||||
</svg>
|
||||
<span class="text-sm">Mon Profil</span>
|
||||
</a>
|
||||
|
||||
<!-- Icône Mon Profil - visible sur mobile uniquement -->
|
||||
<a
|
||||
[routerLink]="['my-profile']"
|
||||
[state]="{ user: user() }"
|
||||
class="sm:hidden p-2 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
|
||||
aria-label="Mon profil"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="w-5 h-5"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<!-- Séparateur (desktop seulement) -->
|
||||
<div class="hidden sm:block h-6 w-px bg-gray-300 dark:bg-gray-700"></div>
|
||||
|
||||
<!-- Bouton Déconnexion - version desktop -->
|
||||
<a
|
||||
[routerLink]="['/auth']"
|
||||
(click)="authFacade.logout()"
|
||||
class="hidden sm:flex items-center gap-2 px-4 py-2 rounded-lg bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 hover:bg-red-100 dark:hover:bg-red-900/30 transition-colors font-medium border border-red-200 dark:border-red-800"
|
||||
aria-label="Se déconnecter"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="w-5 h-5"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"
|
||||
/>
|
||||
</svg>
|
||||
<span class="text-sm">Déconnexion</span>
|
||||
</a>
|
||||
|
||||
<!-- Icône Déconnexion - version mobile -->
|
||||
<a
|
||||
[routerLink]="['/auth']"
|
||||
(click)="authFacade.logout()"
|
||||
class="sm:hidden p-2 rounded-lg bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 hover:bg-red-100 dark:hover:bg-red-900/30 transition-colors border border-red-200 dark:border-red-800"
|
||||
aria-label="Se déconnecter"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="w-5 h-5"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
} @else {
|
||||
<a
|
||||
[routerLink]="['/auth']"
|
||||
class="flex items-center gap-2 px-3 py-2 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
|
||||
aria-label="Se connecter"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 -960 960 960"
|
||||
fill="currentColor"
|
||||
class="w-5 h-5"
|
||||
<!-- Boutons pour utilisateur non connecté -->
|
||||
<div class="flex items-center gap-2">
|
||||
<!-- Bouton Connexion mis en valeur -->
|
||||
<a
|
||||
[routerLink]="['/auth']"
|
||||
class="flex items-center gap-2 px-4 py-2 rounded-lg bg-indigo-600 dark:bg-indigo-500 text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 transition-colors font-medium shadow-md hover:shadow-lg"
|
||||
aria-label="Se connecter"
|
||||
>
|
||||
<path
|
||||
d="M234-276q51-39 114-61.5T480-360q69 0 132 22.5T726-276q35-41 54.5-93T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 59 19.5 111t54.5 93Zm246-164q-59 0-99.5-40.5T340-580q0-59 40.5-99.5T480-720q59 0 99.5 40.5T620-580q0 59-40.5 99.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q53 0 100-15.5t86-44.5q-39-29-86-44.5T480-280q-53 0-100 15.5T294-220q39 29 86 44.5T480-160Zm0-360q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm0-60Zm0 360Z"
|
||||
/>
|
||||
</svg>
|
||||
<span class="hidden sm:inline text-sm font-medium">Connexion</span>
|
||||
</a>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 -960 960 960"
|
||||
fill="currentColor"
|
||||
class="w-5 h-5"
|
||||
>
|
||||
<path
|
||||
d="M234-276q51-39 114-61.5T480-360q69 0 132 22.5T726-276q35-41 54.5-93T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 59 19.5 111t54.5 93Zm246-164q-59 0-99.5-40.5T340-580q0-59 40.5-99.5T480-720q59 0 99.5 40.5T620-580q0 59-40.5 99.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q53 0 100-15.5t86-44.5q-39-29-86-44.5T480-280q-53 0-100 15.5T294-220q39 29 86 44.5T480-160Zm0-360q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm0-60Zm0 360Z"
|
||||
/>
|
||||
</svg>
|
||||
<span class="text-sm">Connexion</span>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -55,6 +55,7 @@ export class FilterComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.sectorFacade.load();
|
||||
this.profileFacade.load();
|
||||
this.initFormValues();
|
||||
}
|
||||
|
||||
// Vérifier si des filtres sont actifs pour afficher le bouton "Effacer"
|
||||
@@ -65,5 +66,19 @@ export class FilterComponent implements OnInit {
|
||||
|
||||
clearAllFilters(): void {
|
||||
this.searchService.reset();
|
||||
this.onFilterChange.emit(this.activeFilters());
|
||||
this.initFormValues();
|
||||
}
|
||||
|
||||
private initFormValues() {
|
||||
const filters = this.searchService.getFilters();
|
||||
this.activeFilters.set(filters());
|
||||
|
||||
this.filterForm.setValue({
|
||||
verified: this.activeFilters().verified,
|
||||
secteur: this.activeFilters().secteur,
|
||||
profession: this.activeFilters().profession,
|
||||
sort: this.activeFilters().sort || 'recent',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ export class AuthFacade {
|
||||
|
||||
logout() {
|
||||
this.logoutUseCase.execute();
|
||||
this.isAuthenticated.set(false);
|
||||
this.getCurrentUser();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user