Upload beautify
This commit is contained in:
@@ -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">
|
||||
@endif
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $userId, $avatarHash ?? null, 32) }}" alt="{{ $displayName }}" width="18">
|
||||
<span class="username">{{ $displayName }}</span>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user