feat(avatar): implement avatar upload processing and validation, update user interface for avatar display

This commit is contained in:
2026-09-11 16:00:48 +02:00
parent e012d6d21c
commit 35ce20cd59
12 changed files with 210 additions and 57 deletions
+4 -1
View File
@@ -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)) ?>