Upload beautify

This commit is contained in:
2026-02-17 17:14:43 +01:00
parent b053c0cc48
commit 41287914aa
106 changed files with 4948 additions and 906 deletions

View File

@@ -119,9 +119,9 @@
}
try {
$profile = \Illuminate\Support\Facades\DB::table('user_profiles')->where('user_id', $userId)->first();
$avatar = $profile->avatar ?? null;
$avatarHash = $profile->avatar_hash ?? null;
} catch (\Throwable $e) {
$avatar = null;
$avatarHash = null;
}
$displayName = auth()->user()->name ?: (auth()->user()->username ?? '');
@endphp
@@ -141,9 +141,7 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle c-white" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
@if($avatar)
<img src="/storage/{{ ltrim($avatar, '/') }}" alt="{{ $displayName }}" width="18">&nbsp;&nbsp;
@endif
<img src="{{ \App\Support\AvatarUrl::forUser((int) $userId, $avatarHash ?? null, 32) }}" alt="{{ $displayName }}" width="18">&nbsp;&nbsp;
<span class="username">{{ $displayName }}</span>
&nbsp;<i class="fa fa-angle-down"></i>
</a>