fix : homogeneisation de l'image de profil
This commit is contained in:
@@ -78,8 +78,12 @@
|
|||||||
<img
|
<img
|
||||||
alt="{{ user()!.username }}"
|
alt="{{ user()!.username }}"
|
||||||
class="object-cover w-full h-full"
|
class="object-cover w-full h-full"
|
||||||
src="https://api.dicebear.com/9.x/adventurer/svg?seed={{
|
src="https://api.dicebear.com/9.x/initials/svg?seed={{
|
||||||
user()!.username
|
user().name
|
||||||
|
? user().name
|
||||||
|
: user().username
|
||||||
|
? user().username
|
||||||
|
: user().email
|
||||||
}}"
|
}}"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,25 +19,29 @@
|
|||||||
<!-- Actions utilisateur -->
|
<!-- Actions utilisateur -->
|
||||||
<div class="flex items-center gap-2 sm:gap-3">
|
<div class="flex items-center gap-2 sm:gap-3">
|
||||||
<!-- Avatar utilisateur (si connecté) -->
|
<!-- Avatar utilisateur (si connecté) -->
|
||||||
@if (isAuthenticated() && isEmailVerified() && user(); as user) {
|
@if (isAuthenticated() && isEmailVerified() && user()) {
|
||||||
<a
|
<a
|
||||||
[routerLink]="['my-profile']"
|
[routerLink]="['my-profile']"
|
||||||
[state]="{ user }"
|
[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"
|
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"
|
aria-label="Mon profil"
|
||||||
>
|
>
|
||||||
@if (user.avatar) {
|
@if (user()!.avatar) {
|
||||||
<img
|
<img
|
||||||
[alt]="user.username"
|
[alt]="user()!.username"
|
||||||
class="object-cover w-full h-full"
|
class="object-cover w-full h-full"
|
||||||
[src]="environment.baseUrl + '/api/files/users/' + user.id + '/' + user.avatar"
|
[src]="
|
||||||
|
environment.baseUrl + '/api/files/users/' + user()!.id + '/' + user()!.avatar
|
||||||
|
"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
} @else {
|
} @else {
|
||||||
<img
|
<img
|
||||||
[alt]="user.username"
|
[alt]="user()!.username"
|
||||||
class="object-cover w-full h-full"
|
class="object-cover w-full h-full"
|
||||||
[src]="'https://api.dicebear.com/9.x/adventurer/svg?seed=' + user.username"
|
src="https://api.dicebear.com/9.x/initials/svg?seed={{
|
||||||
|
user()!.name ? user()!.name : user()!.username ? user()!.username : user()!.email
|
||||||
|
}}"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,9 @@
|
|||||||
<img
|
<img
|
||||||
alt="{{ user!.username }}"
|
alt="{{ user!.username }}"
|
||||||
class="object-cover object-center h-full w-full rounded-full"
|
class="object-cover object-center h-full w-full rounded-full"
|
||||||
src="https://api.dicebear.com/9.x/adventurer/svg?seed={{ user.username }}"
|
src="https://api.dicebear.com/9.x/initials/svg?seed={{
|
||||||
|
user.name ? user.name : user.username ? user.username : user.email
|
||||||
|
}}"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,10 +44,10 @@
|
|||||||
class="w-full sm:w-auto px-6 sm:px-8 py-3 sm:py-2.5 rounded-full sm:rounded-l-none sm:rounded-r-full bg-purple-600 hover:bg-purple-700 active:bg-purple-800 text-white font-medium text-sm sm:text-base transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
class="w-full sm:w-auto px-6 sm:px-8 py-3 sm:py-2.5 rounded-full sm:rounded-l-none sm:rounded-r-full bg-purple-600 hover:bg-purple-700 active:bg-purple-800 text-white font-medium text-sm sm:text-base transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
>
|
>
|
||||||
<span class="hidden sm:inline">{{
|
<span class="hidden sm:inline">{{
|
||||||
searchForm.value!.search! === '' ? 'Voir tout' : 'Rechercher'
|
searchForm.value!.search! === '' ? 'Explorer' : 'Rechercher'
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="sm:hidden">{{
|
<span class="sm:hidden">{{
|
||||||
searchForm.value!.search! === '' ? 'Tout' : 'Rechercher'
|
searchForm.value!.search! === '' ? 'Explorer' : 'Rechercher'
|
||||||
}}</span>
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user