diff --git a/frontend/app.html b/frontend/app.html index 8f10f10..670e2f6 100644 --- a/frontend/app.html +++ b/frontend/app.html @@ -654,6 +654,200 @@ -webkit-overflow-scrolling: touch; } + .admin-users-header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + margin-bottom: 12px; + } + + .admin-users-toolbar { + display: grid; + grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(130px, 1fr)) minmax(84px, 0.6fr) auto; + gap: 10px; + margin-bottom: 10px; + padding: 12px; + border: 1px solid var(--glass-border); + border-radius: 10px; + background: rgba(255, 255, 255, 0.03); + } + + .admin-users-filter { + display: flex; + flex-direction: column; + gap: 6px; + min-width: 0; + } + + .admin-users-filter label { + font-size: 12px; + color: var(--text-secondary); + font-weight: 600; + } + + .admin-users-filter input, + .admin-users-filter select { + width: 100%; + min-width: 0; + padding: 8px 10px; + border: 1px solid var(--glass-border); + border-radius: 8px; + background: var(--bg-secondary); + color: var(--text-primary); + font-size: 13px; + } + + .admin-users-filter input::placeholder { + color: var(--text-muted); + } + + .admin-users-filter-reset { + align-self: end; + justify-content: flex-end; + } + + .admin-users-filter-reset .btn { + height: 36px; + width: 100%; + padding: 0 12px; + white-space: nowrap; + } + + .admin-users-stats { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-bottom: 10px; + } + + .admin-users-stat-chip { + display: inline-flex; + align-items: center; + padding: 5px 10px; + border-radius: 999px; + border: 1px solid var(--glass-border); + background: rgba(255, 255, 255, 0.06); + color: var(--text-secondary); + font-size: 12px; + font-weight: 600; + line-height: 1.2; + } + + .admin-users-empty-state { + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + min-height: 130px; + border: 1px dashed var(--glass-border); + border-radius: 10px; + color: var(--text-muted); + font-size: 14px; + } + + .admin-users-empty-state i { + font-size: 18px; + } + + .admin-users-table thead th { + position: sticky; + top: 0; + z-index: 2; + background: rgba(40, 50, 80, 0.92) !important; + backdrop-filter: blur(6px); + } + + .admin-user-status-tag { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 66px; + padding: 3px 8px; + border-radius: 999px; + font-size: 11px; + font-weight: 700; + line-height: 1.2; + white-space: nowrap; + border: 1px solid transparent; + } + + .admin-user-status-tag.status-active { + color: #22c55e; + background: rgba(34, 197, 94, 0.15); + border-color: rgba(34, 197, 94, 0.35); + } + + .admin-user-status-tag.status-banned { + color: #ef4444; + background: rgba(239, 68, 68, 0.15); + border-color: rgba(239, 68, 68, 0.35); + } + + .admin-user-status-tag.status-unverified { + color: #f59e0b; + background: rgba(245, 158, 11, 0.15); + border-color: rgba(245, 158, 11, 0.35); + } + + .admin-user-status-tag.status-download_blocked { + color: #f97316; + background: rgba(249, 115, 22, 0.14); + border-color: rgba(249, 115, 22, 0.34); + } + + .admin-users-pagination { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + flex-wrap: wrap; + margin-top: 10px; + padding: 10px 12px; + border: 1px solid var(--glass-border); + border-radius: 10px; + background: rgba(255, 255, 255, 0.03); + } + + .admin-users-pagination-info { + color: var(--text-secondary); + font-size: 13px; + } + + .admin-users-pagination-actions { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + } + + .admin-users-pagination-actions .btn { + min-width: 76px; + padding: 6px 10px; + } + + .admin-users-page-indicator { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 78px; + height: 32px; + padding: 0 8px; + border: 1px solid var(--glass-border); + border-radius: 8px; + font-size: 13px; + color: var(--text-secondary); + background: rgba(255, 255, 255, 0.04); + } + + .admin-search-hit { + background: rgba(250, 204, 21, 0.28); + color: var(--text-primary); + padding: 0 2px; + border-radius: 3px; + font-weight: 700; + } + /* 移动端适配 */ @media (max-width: 768px) { @@ -917,6 +1111,39 @@ .admin-log-pager .btn { min-width: 110px; } + .admin-users-header { + flex-direction: column; + align-items: stretch; + } + .admin-users-toolbar { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + .admin-users-filter-search { + grid-column: 1 / -1; + } + .admin-users-filter-reset { + grid-column: 1 / -1; + } + .admin-users-filter-reset .btn { + width: 100%; + } + .admin-users-pagination { + padding: 10px; + } + .admin-users-pagination-info { + width: 100%; + } + .admin-users-pagination-actions { + width: 100%; + justify-content: space-between; + } + .admin-users-pagination-actions .btn { + min-width: 0; + flex: 1; + } + .admin-users-page-indicator { + min-width: 64px; + } .admin-users-table { min-width: 700px !important; } @@ -972,6 +1199,9 @@ .admin-log-actions { grid-template-columns: 1fr; } + .admin-users-toolbar { + grid-template-columns: 1fr; + } .admin-health-summary { font-size: 12px !important; } @@ -993,6 +1223,13 @@ .admin-users-table td:nth-child(7) { display: none; } + .admin-users-pagination-actions { + gap: 6px; + } + .admin-users-pagination-actions .btn { + padding: 6px 8px; + font-size: 12px; + } /* 列表视图在超小屏幕隐藏文件大小列 */ .file-list th:nth-child(2), @@ -3275,115 +3512,222 @@
| ID | -用户名 | -角色 | -邮箱 | -存储权限 | -当前存储 | -存储配额 | -下载流量 | -状态 | -操作 | -
|---|---|---|---|---|---|---|---|---|---|
| {{ u.id }} | - -- - 管理员 - - - 用户 - - | - -- 仅本地 - 仅OSS - 用户选择 - | -- - 本地 - - - OSS - - | -
-
-
- {{ formatBytes(u.local_storage_used) }} / {{ formatBytes(u.local_storage_quota) }}
-
- {{ getAdminUserQuotaPercentage(u) }}%
-
-
-
- {{ formatBytes(u.storage_used || 0) }} / {{ formatBytes(u.oss_storage_quota) }}
-
- {{ getAdminUserOssQuotaPercentage(u) }}%
-
- |
-
-
-
- {{ formatBytes(u.download_traffic_used || 0) }} / {{ formatBytes(u.download_traffic_quota) }}
-
- {{ u.download_traffic_quota === 0 ? '已禁用下载' : (getAdminUserDownloadQuotaPercentage(u) + '%') }}
-
-
-
- {{ formatBytes(u.download_traffic_used || 0) }} / 不限
-
- 不限
-
-
- {{ getDownloadResetCycleText(u.download_traffic_reset_cycle || 'none') }}
-
-
- 到期: {{ formatDate(u.download_traffic_quota_expires_at) }}
-
- |
- - 已封禁 - 未激活 - 正常 - | -
-
-
-
-
-
-
-
- |
-
| ID | +用户名 | +角色 | +邮箱 | +存储权限 | +当前存储 | +存储配额 | +下载流量 | +状态 | +操作 | +
|---|---|---|---|---|---|---|---|---|---|
| {{ u.id }} | + ++ + 管理员 + + + 用户 + + | + ++ 仅本地 + 仅OSS + 用户选择 + | ++ + 本地 + + + OSS + + | +
+
+
+ {{ formatBytes(u.local_storage_used) }} / {{ formatBytes(u.local_storage_quota) }}
+
+ {{ getAdminUserQuotaPercentage(u) }}%
+
+
+
+ {{ formatBytes(u.storage_used || 0) }} / {{ formatBytes(u.oss_storage_quota) }}
+
+ {{ getAdminUserOssQuotaPercentage(u) }}%
+
+ |
+
+
+
+ {{ formatBytes(u.download_traffic_used || 0) }} / {{ formatBytes(u.download_traffic_quota) }}
+
+ {{ u.download_traffic_quota === 0 ? '已禁用下载' : (getAdminUserDownloadQuotaPercentage(u) + '%') }}
+
+
+
+ {{ formatBytes(u.download_traffic_used || 0) }} / 不限
+
+ 不限
+
+
+ {{ getDownloadResetCycleText(u.download_traffic_reset_cycle || 'none') }}
+
+
+ 到期: {{ formatDate(u.download_traffic_quota_expires_at) }}
+
+ |
+ + + {{ getAdminUserStatusLabel(u) }} + + | +
+
+
+
+
+
+
+
+ |
+