feat: add admin user edit page with avatar, banner, and photo gallery
- Backend: adminGetUser query returns user + photos; adminUpdateUser now accepts avatarId/bannerId; new adminAddUserPhoto and adminRemoveUserPhoto mutations; AdminUserDetailType added to GraphQL schema - Frontend: /admin/users/[id] page for editing name, avatar, banner, and managing the model photo gallery (upload multiple, delete individually) - Admin users list: edit button per row linking to the detail page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -160,15 +160,20 @@
|
||||
</td>
|
||||
<td class="px-4 py-3 text-muted-foreground">{formatDate(user.date_created)}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<Button
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
class="text-destructive hover:text-destructive hover:bg-destructive/10"
|
||||
disabled={user.id === currentUserId}
|
||||
onclick={() => confirmDelete(user)}
|
||||
>
|
||||
<span class="icon-[ri--delete-bin-line] h-4 w-4"></span>
|
||||
</Button>
|
||||
<div class="flex items-center justify-end gap-1">
|
||||
<Button size="sm" variant="ghost" href="/admin/users/{user.id}">
|
||||
<span class="icon-[ri--edit-line] h-4 w-4"></span>
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
class="text-destructive hover:text-destructive hover:bg-destructive/10"
|
||||
disabled={user.id === currentUserId}
|
||||
onclick={() => confirmDelete(user)}
|
||||
>
|
||||
<span class="icon-[ri--delete-bin-line] h-4 w-4"></span>
|
||||
</Button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user