feat(avatar): implement avatar upload processing and validation, update user interface for avatar display
This commit is contained in:
@@ -783,7 +783,10 @@ require_once __DIR__ . '/includes/header.php';
|
||||
<td class="py-3 px-4">
|
||||
<div class="flex items-center space-x-2.5">
|
||||
<?php if (!empty($usr['avatar_url'])): ?>
|
||||
<img src="<?= htmlspecialchars($usr['avatar_url']) ?>" alt="Avatar" class="w-7 h-7 rounded-full object-cover border border-slate-200 dark:border-slate-700">
|
||||
<img src="<?= htmlspecialchars($usr['avatar_url']) ?>" alt="Avatar" class="w-7 h-7 rounded-full object-cover border border-slate-200 dark:border-slate-700" onerror="this.classList.add('hidden'); if(this.nextElementSibling) this.nextElementSibling.classList.remove('hidden');">
|
||||
<div class="hidden w-7 h-7 rounded-full bg-indigo-100 dark:bg-indigo-900/60 text-indigo-700 dark:text-indigo-300 font-bold flex items-center justify-center text-[10px]">
|
||||
<?= strtoupper(substr($usr['name'], 0, 1)) ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="w-7 h-7 rounded-full bg-indigo-100 dark:bg-indigo-900/60 text-indigo-700 dark:text-indigo-300 font-bold flex items-center justify-center text-[10px]">
|
||||
<?= strtoupper(substr($usr['name'], 0, 1)) ?>
|
||||
|
||||
Reference in New Issue
Block a user