feat: 错误监控面板、生成通知、社区搜索、任务队列优化
- AdminMonitor: admin用户可见的客户端错误实时监控面板,右下角浮窗 - generationNotifier: 生成完成浏览器通知 + 站内Toast - CommunityPage: 新增搜索框,标题/描述/标签模糊匹配,防抖300ms - App.tsx: 全局unhandled error/rejection监听上报 - WorkbenchPage: 任务并发提示改为显示当前任务数 - serverConnection: 后端client-errors路由注册 - WelcomeSplash: 欢迎按钮全程显示 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -642,3 +642,187 @@
|
||||
.info-popover__links a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* ── Admin monitor ──────────────────────────── */
|
||||
.admin-monitor-trigger {
|
||||
position: fixed;
|
||||
bottom: 16px;
|
||||
right: 16px;
|
||||
z-index: 200;
|
||||
display: grid;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
place-items: center;
|
||||
border: 1px solid rgba(var(--accent-rgb), 0.3);
|
||||
border-radius: 50%;
|
||||
background: var(--bg-panel);
|
||||
cursor: pointer;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.admin-monitor-trigger__dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
animation: admin-monitor-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes admin-monitor-pulse {
|
||||
0%, 100% { opacity: 0.4; transform: scale(1); }
|
||||
50% { opacity: 1; transform: scale(1.3); }
|
||||
}
|
||||
|
||||
.admin-monitor {
|
||||
position: fixed;
|
||||
bottom: 60px;
|
||||
right: 16px;
|
||||
z-index: 199;
|
||||
width: min(480px, calc(100vw - 32px));
|
||||
max-height: 70vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--border-normal);
|
||||
border-radius: 12px;
|
||||
background: var(--bg-panel);
|
||||
box-shadow: 0 8px 40px rgba(0,0,0,0.35);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.admin-monitor__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--border-weak);
|
||||
}
|
||||
|
||||
.admin-monitor__header strong {
|
||||
font-size: 13px;
|
||||
color: var(--fg-body);
|
||||
}
|
||||
|
||||
.admin-monitor__actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.admin-monitor__actions button {
|
||||
padding: 3px 12px;
|
||||
border: 1px solid var(--border-normal);
|
||||
border-radius: 5px;
|
||||
background: transparent;
|
||||
color: var(--fg-muted);
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.admin-monitor__actions button:hover:not(:disabled) {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.admin-monitor__list {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.admin-monitor__empty {
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
color: var(--fg-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.admin-monitor__item {
|
||||
border-bottom: 1px solid var(--border-weak);
|
||||
}
|
||||
|
||||
.admin-monitor__item summary {
|
||||
display: grid;
|
||||
grid-template-columns: 60px 1fr 36px 100px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 4px;
|
||||
cursor: pointer;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.admin-monitor__source {
|
||||
display: inline-block;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
background: rgba(var(--accent-rgb), 0.12);
|
||||
color: var(--accent);
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.admin-monitor__msg {
|
||||
overflow: hidden;
|
||||
color: var(--fg-body);
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.admin-monitor__count {
|
||||
display: inline-block;
|
||||
min-width: 24px;
|
||||
padding: 1px 5px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 107, 53, 0.15);
|
||||
color: #ff6b35;
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.admin-monitor__item time {
|
||||
color: var(--fg-muted);
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.admin-monitor__detail {
|
||||
padding: 8px 12px 12px;
|
||||
color: var(--fg-muted);
|
||||
font-size: 11px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.admin-monitor__detail pre {
|
||||
margin-top: 6px;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
background: var(--bg-inset);
|
||||
font-size: 10px;
|
||||
max-height: 120px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.admin-monitor__pager {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
padding: 8px;
|
||||
border-top: 1px solid var(--border-weak);
|
||||
font-size: 11px;
|
||||
color: var(--fg-muted);
|
||||
}
|
||||
|
||||
.admin-monitor__pager button {
|
||||
padding: 2px 10px;
|
||||
border: 1px solid var(--border-normal);
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
color: var(--fg-muted);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.admin-monitor__pager button:hover:not(:disabled) {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user