feat(admin): 用户列表添加角色列
- 新增"角色"列,显示"管理员"或"用户"标签 - 管理员显示紫色渐变背景+皇冠图标 - 普通用户显示灰色背景+用户图标 - 调整列宽适配新增列 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2029,13 +2029,14 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr style="border-bottom: 2px solid #ddd; background: #f5f5f5;">
|
<tr style="border-bottom: 2px solid #ddd; background: #f5f5f5;">
|
||||||
<th style="padding: 10px; text-align: left; width: 5%;">ID</th>
|
<th style="padding: 10px; text-align: left; width: 5%;">ID</th>
|
||||||
<th style="padding: 10px; text-align: left; width: 12%;">用户名</th>
|
<th style="padding: 10px; text-align: left; width: 11%;">用户名</th>
|
||||||
<th style="padding: 10px; text-align: left; width: 15%;">邮箱</th>
|
<th style="padding: 10px; text-align: center; width: 8%;">角色</th>
|
||||||
<th style="padding: 10px; text-align: center; width: 10%;">存储权限</th>
|
<th style="padding: 10px; text-align: left; width: 14%;">邮箱</th>
|
||||||
<th style="padding: 10px; text-align: center; width: 10%;">当前存储</th>
|
<th style="padding: 10px; text-align: center; width: 9%;">存储权限</th>
|
||||||
<th style="padding: 10px; text-align: center; width: 13%;">配额使用</th>
|
<th style="padding: 10px; text-align: center; width: 9%;">当前存储</th>
|
||||||
<th style="padding: 10px; text-align: center; width: 10%;">状态</th>
|
<th style="padding: 10px; text-align: center; width: 12%;">配额使用</th>
|
||||||
<th style="padding: 10px; text-align: center; width: 25%;">操作</th>
|
<th style="padding: 10px; text-align: center; width: 8%;">状态</th>
|
||||||
|
<th style="padding: 10px; text-align: center; width: 24%;">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -2043,12 +2044,17 @@
|
|||||||
<td style="padding: 10px;">{{ u.id }}</td>
|
<td style="padding: 10px;">{{ u.id }}</td>
|
||||||
<td style="padding: 10px; overflow: hidden;">
|
<td style="padding: 10px; overflow: hidden;">
|
||||||
<div style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" :title="u.username">
|
<div style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" :title="u.username">
|
||||||
<span>{{ u.username }}</span>
|
{{ u.username }}
|
||||||
<span v-if="u.is_admin" style="color: #28a745; margin-left: 5px; white-space: nowrap;" title="管理员">
|
|
||||||
<i class="fas fa-crown"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td style="padding: 10px; text-align: center; font-size: 12px;">
|
||||||
|
<span v-if="u.is_admin" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 3px 10px; border-radius: 4px;">
|
||||||
|
<i class="fas fa-crown"></i> 管理员
|
||||||
|
</span>
|
||||||
|
<span v-else style="background: #e9ecef; color: #495057; padding: 3px 10px; border-radius: 4px;">
|
||||||
|
<i class="fas fa-user"></i> 用户
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
<td style="padding: 10px; font-size: 12px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" :title="u.email">{{ u.email }}</td>
|
<td style="padding: 10px; font-size: 12px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" :title="u.email">{{ u.email }}</td>
|
||||||
<td style="padding: 10px; text-align: center; font-size: 12px;">
|
<td style="padding: 10px; text-align: center; font-size: 12px;">
|
||||||
<span v-if="u.storage_permission === 'local_only'" style="background: #667eea; color: white; padding: 3px 8px; border-radius: 4px;">仅本地</span>
|
<span v-if="u.storage_permission === 'local_only'" style="background: #667eea; color: white; padding: 3px 8px; border-radius: 4px;">仅本地</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user