user => clean archi
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@if (user != undefined) {
|
||||
@if (user() != undefined) {
|
||||
<a
|
||||
[routerLink]="[user.username ? user.username : user.id]"
|
||||
[state]="{ user, profile }"
|
||||
[routerLink]="[user().username ? user().username : user().id]"
|
||||
[state]="{ user: user(), profile }"
|
||||
class="block group"
|
||||
>
|
||||
<!-- Card du profil -->
|
||||
@@ -33,18 +33,18 @@
|
||||
<!-- Avatar avec bordure gradient -->
|
||||
<div class="relative inline-block mb-4">
|
||||
<div class="w-32 h-32 rounded-full bg-gradient-to-br from-indigo-500 to-purple-600 p-1">
|
||||
@if (user.avatar) {
|
||||
@if (user().avatar) {
|
||||
<img
|
||||
class="w-full h-full rounded-full object-cover grayscale group-hover:grayscale-0 transition-all duration-500 group-hover:scale-105"
|
||||
src="{{ environment.baseUrl }}/api/files/users/{{ user.id }}/{{ user.avatar }}"
|
||||
alt="{{ user.username }}"
|
||||
src="{{ environment.baseUrl }}/api/files/users/{{ user().id }}/{{ user().avatar }}"
|
||||
alt="{{ user().username }}"
|
||||
loading="lazy"
|
||||
/>
|
||||
} @else {
|
||||
<img
|
||||
class="w-full h-full rounded-full object-cover grayscale group-hover:grayscale-0 transition-all duration-500 group-hover:scale-105"
|
||||
src="https://api.dicebear.com/9.x/adventurer/svg?seed={{ user.username }}"
|
||||
alt="{{ user.username }}"
|
||||
src="https://api.dicebear.com/9.x/adventurer/svg?seed={{ user().username }}"
|
||||
alt="{{ user().username }}"
|
||||
loading="lazy"
|
||||
/>
|
||||
}
|
||||
@@ -52,17 +52,17 @@
|
||||
</div>
|
||||
|
||||
<!-- Nom -->
|
||||
@if (user.name) {
|
||||
@if (user().name) {
|
||||
<h3
|
||||
class="text-lg font-bold text-gray-900 dark:text-white mb-2 group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors"
|
||||
>
|
||||
{{ user.name }}
|
||||
{{ user().name }}
|
||||
</h3>
|
||||
} @else if (user.username) {
|
||||
} @else if (user().username) {
|
||||
<h3
|
||||
class="text-lg font-bold text-gray-900 dark:text-white mb-2 group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors"
|
||||
>
|
||||
{{ user.username }}
|
||||
{{ user().username }}
|
||||
</h3>
|
||||
} @else {
|
||||
<h3 class="text-lg font-bold text-gray-500 dark:text-gray-400 mb-2">Non mentionné</h3>
|
||||
|
||||
Reference in New Issue
Block a user