diff --git a/src/App.tsx b/src/App.tsx index fe09a81..ee936e4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,6 +3,7 @@ import { auth } from './auth' import { api } from './api' import { LoginPage, ChangePasswordGate } from './components/LoginPage' import { AdminUsersModal, ChangePasswordModal } from './components/AdminUsersModal' +import { Icon } from './icons' import { store, useStore } from './store' import { TaskSidebar } from './components/TaskSidebar' import { Conversation } from './components/Conversation' @@ -111,12 +112,12 @@ export function App() { ) : (
- - - + + - +
)} diff --git a/src/components/AdminUsersModal.tsx b/src/components/AdminUsersModal.tsx index a176a48..3064fa2 100644 --- a/src/components/AdminUsersModal.tsx +++ b/src/components/AdminUsersModal.tsx @@ -4,6 +4,7 @@ import { useEffect, useState } from 'react' import { api } from '../api' import { store, useStore } from '../store' +import { Icon } from '../icons' import { randomPassword } from '../passwords' interface AdminUserRow { owner: string; name: string; isAdmin: boolean; mustChangePassword: boolean; hasPassword: boolean; passwordSetAt?: string; createdAt: string } @@ -15,7 +16,7 @@ function Shell({ title, onClose, children }: { title: string; onClose: () => voi
{title} - +
{children}
@@ -83,8 +84,8 @@ export function AdminUsersModal({ onClose }: { onClose: () => void }) {

创建后该用户首次登录必须修改此初始密码。

)} - {notice &&
{notice}
} - {err &&
{err}
} + {notice &&
{notice}
} + {err &&
{err}
} {resetFor ? (
重置 {resetFor} 的密码: @@ -152,7 +153,7 @@ export function ChangePasswordModal({ onClose }: { onClose: () => void }) { setNext(e.target.value)} /> setConfirm(e.target.value)} /> - {err &&
{err}
} + {err &&
{err}
}
)} diff --git a/src/components/Conversation.tsx b/src/components/Conversation.tsx index 8b25a26..ec356dd 100644 --- a/src/components/Conversation.tsx +++ b/src/components/Conversation.tsx @@ -1,4 +1,5 @@ // 中栏:消息流(Part 渲染器注册表)+ 流式渲染 + 过程折叠 + HITL 卡片 + 输入区(4.4)。 +import { Icon } from '../icons' import { useEffect, useMemo, useRef, useState } from 'react' import { marked } from 'marked' import { api } from '../api' @@ -38,7 +39,7 @@ function PartView({ part, live }: { part: Part; live?: boolean | null }) { if (art) store.viewArtifact(art) }}>📄 {part.artifact?.name} case 'hitl': - return
❓ {part.hitl?.question} → {part.hitl?.answer || '…'}
+ return
{part.hitl?.question} → {part.hitl?.answer || '…'}
case 'plan': return null // 计划在右栏 Plan 标签呈现 case 'card': { @@ -71,7 +72,7 @@ function ProcessCollapse({ parts }: { parts: Part[] }) { return (
- ⚙ 处程输出 + 过程输出 {hasThinking ? '含思考' : ''}{toolCount > 0 ? ` · ${toolCount} 次工具调用` : ''}(点击展开)
@@ -167,7 +168,7 @@ function HITLCardView({ card }: { card: HITLCard }) { } return (
-
❓ {card.question}
+
{card.question}
{card.choices && (
{card.choices.map(c => ( @@ -270,7 +271,7 @@ export function Conversation() { {profiles.map(p => )} - {active && } + {active && }
} {activeHitl.map(c => )} {messages.length === 0 &&
-
发送消息开始对话
+ +
发送消息开始对话
mock 模式演示指令:#hitl · #agents · #doc · #error · 命令:/help
}
@@ -314,15 +316,15 @@ export function Conversation() {
{attachmentNames.length > 0 && (
- {attachmentNames.map((n, i) => 📎 {n} - { setAttachmentIds(a => a.filter((_, j) => j !== i)); setAttachmentNames(a => a.filter((_, j) => j !== i)) }}>✕ + {attachmentNames.map((n, i) => {n} + { setAttachmentIds(a => a.filter((_, j) => j !== i)); setAttachmentNames(a => a.filter((_, j) => j !== i)) }}> )}
)} {text.startsWith('/') && setText(c)} />}
@@ -166,11 +172,11 @@ export function TaskSidebar() {
{org === 'project' ? (
tglGroup(g.key)}> - ▶ + {g.label} {g.tasks.length} - +
) : (
{g.label}
@@ -183,10 +189,10 @@ export function TaskSidebar() { {/* 工作区快捷图标条(D25:与 ⌘1–9 同一清单) */}
{workspaceEntries().map(e => ( - + ))} - +
{/* 账户区(P7):身份常驻;阶段 1 = API key 即身份(user 即租户 owner) */} @@ -197,17 +203,17 @@ export function TaskSidebar() { {me?.name || me?.owner || '未连接'} {me ? (me.auth ? (me.isAdmin ? '管理员 · 已认证' : '已认证') : '本地模式 · 默认租户') : '…'} - ▿ + - - {pendingBadge > 0 && } + + {pendingBadge > 0 && }
{/* 弹出菜单们 */} setMenu(null)}> - { store.createTask(); setMenu(null) }}>新建任务 · 当前项目⌘N + { store.createTask(); setMenu(null) }}>新建任务 · 当前项目⌘N
- { setCreatingProject(true); setMenu(null) }}>新建项目… + { setCreatingProject(true); setMenu(null) }}>新建项目… {projects.filter(p => p.id !== currentProjectId).slice(0, 6).map(p => ( { store.createTask(p.id); setMenu(null) }}>在「{p.name}」新建任务 ))} @@ -215,10 +221,10 @@ export function TaskSidebar() { setMenu(null)}> {rowTask && <> - { store.pinTask(rowTask.id, !rowTask.pinned); setMenu(null) }}>{rowTask.pinned ? '取消置顶' : '置顶'} - { store.archiveTask(rowTask.id, !rowTask.archived); setMenu(null) }}>{rowTask.archived ? '恢复(移出归档)' : '归档'} + { store.pinTask(rowTask.id, !rowTask.pinned); setMenu(null) }}>{rowTask.pinned ? '取消置顶' : '置顶'} + { store.archiveTask(rowTask.id, !rowTask.archived); setMenu(null) }}>{rowTask.archived ? '恢复(移出归档)' : '归档'}
- { store.setUI({ taskOrg: 'timeline' }); setMenu(null) }}>按时间线查看 + { store.setUI({ taskOrg: 'timeline' }); setMenu(null) }}>按时间线查看 }
@@ -231,13 +237,13 @@ export function TaskSidebar() {
- { store.openSettings(true); setMenu(null) }}>偏好设置 - { store.openInbox(); setMenu(null) }}>收件箱{pendingBadge > 0 ? `(待办 ${pendingBadge})` : ''} - { store.setUI({ changePwOpen: true }); setMenu(null) }}>修改密码… - {me?.isAdmin && { store.setUI({ adminUsersOpen: true }); setMenu(null) }}>用户管理…} + { store.openSettings(true); setMenu(null) }}>偏好设置 + { store.openInbox(); setMenu(null) }}>收件箱{pendingBadge > 0 ? `(待办 ${pendingBadge})` : ''} + { store.setUI({ changePwOpen: true }); setMenu(null) }}>修改密码… + {me?.isAdmin && { store.setUI({ adminUsersOpen: true }); setMenu(null) }}>用户管理…} {me?.auth && <>
- { api.logout().catch(() => undefined); auth.logout() }}>退出登录 + { api.logout().catch(() => undefined); auth.logout() }}>退出登录 }
diff --git a/src/components/Workbench.tsx b/src/components/Workbench.tsx index 10257f1..cffbf9b 100644 --- a/src/components/Workbench.tsx +++ b/src/components/Workbench.tsx @@ -3,6 +3,7 @@ import { store, useStore } from '../store' import type { Run } from '../contracts' import { InboxList, pendingCount, type ActivityCard, type DocBridge } from '@ui' +import { Icon } from '../icons' // 工件解析/打开注入:渲染器纯展示,doc-ref 词汇经此桥接本仓状态(D29)。 export const docBridge: DocBridge = { @@ -23,8 +24,8 @@ export function Workbench() { <>
收件箱{pending > 0 ? ` ${pending}` : ''} - - + +
diff --git a/src/icons.tsx b/src/icons.tsx new file mode 100644 index 0000000..070d027 --- /dev/null +++ b/src/icons.tsx @@ -0,0 +1,91 @@ +// 线性图标集(R4 视觉收敛;Lucide 风格:16px 画布、1.6 描边、圆角端点)。 +// 统一替换此前散落各处的 emoji/字符图标(emoji 跨平台渲染不一致且观感廉价)。 +import type { ButtonHTMLAttributes, ReactNode, SVGProps } from 'react' + +export type IconName = + | 'plus' | 'search' | 'panel-left' | 'inbox' | 'settings' | 'sun' | 'moon' + | 'pin' | 'archive' | 'undo' | 'chevron-right' | 'chevron-down' + | 'folder' | 'message' | 'package' | 'bot' | 'puzzle' | 'grid' + | 'arrow-up' | 'paperclip' | 'more' | 'logout' | 'key' | 'user' | 'users' + | 'shield' | 'x' | 'check' | 'alert' | 'send' | 'sparkles' | 'clock' | 'list' + +const PATHS: Record = { + plus: , + search: <>, + 'panel-left': <>, + inbox: <>, + settings: <>, + sun: <>, + moon: , + pin: , + archive: <>, + undo: <>, + 'chevron-right': , + 'chevron-down': , + folder: , + message: , + package: <>, + bot: <>, + puzzle: , + grid: <>, + 'arrow-up': , + paperclip: , + more: <>, + logout: <>, + key: <>, + user: <>, + users: <>, + shield: , + x: , + check: , + alert: <>, + send: , + sparkles: <>, + clock: <>, + list: , +} + +export function Icon({ name, size = 16, ...rest }: { name: IconName; size?: number } & SVGProps) { + return ( + + ) +} + +type IconButtonProps = { + name: IconName; size?: number; label: string +} & Omit, 'title'> + +/** 通用图标按钮:尺寸/圆角/悬停统一走 .icon-btn 样式。 */ +export function IconButton({ name, size = 16, label, className = '', ...rest }: IconButtonProps) { + return ( + + ) +} + +/** 品牌标(侧栏/登录页共用):星芒 + 渐变底。 */ +export function BrandMark({ size = 22 }: { size?: number }) { + return ( + + + + ) +} + +/** 工作区条目历史 emoji 字符串 → 线性图标。 */ +export function workspaceIcon(char: string | undefined): IconName { + switch (char) { + case '📦': return 'package' + case '🤖': return 'bot' + case '🧩': return 'puzzle' + case '🗂': return 'grid' + default: return 'grid' + } +} diff --git a/src/styles.css b/src/styles.css index b465556..a81f5c6 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,71 +1,112 @@ -/* 设计令牌与 UI 组件样式已迁入 Agent-System-UI(@ui/tokens.css、@ui/ui.css,main.tsx 引入)。 */ +/* 设计令牌与 UI 组件样式已迁入 Agent-System-UI(@ui/tokens.css、@ui/ui.css,main.tsx 引入)。 + R4 视觉收敛(2026-09-30):三级表面阶梯 + 发丝边框 + 圆角标尺 + 克制阴影 + 统一线性图标。 */ * { box-sizing: border-box; } html, body, #root { height: 100%; margin: 0; } -body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; } -button { font-family: inherit; } +body { + font-family: var(--font); background: var(--bg); color: var(--text); + font-size: 13.5px; line-height: 1.55; + -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; +} +button { font-family: inherit; font-size: inherit; color: inherit; } +::selection { background: var(--accent-soft-2); } +:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 2px; } .app { display: flex; height: 100vh; overflow: hidden; } -/* ---- 三栏布局 ---- */ -.left-nav { background: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; flex-shrink: 0; transition: width .08s ease; } +/* ---- 三栏布局:层次靠背景阶梯(bg-panel 侧栏 / bg 主区),边框只发丝勾边 ---- */ +.left-nav { background: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; flex-shrink: 0; transition: width .15s var(--ease); } .left-nav.collapsed { width: 52px !important; } .divider { width: 4px; cursor: col-resize; background: transparent; flex-shrink: 0; position: relative; } -.divider:hover, .divider.dragging { background: var(--accent); } +.divider::before { content: ''; position: absolute; left: 1.5px; top: 0; bottom: 0; width: 1px; background: transparent; transition: background .12s; } +.divider:hover::before, .divider.dragging::before { background: var(--accent); } .divider::after { content: ''; position: absolute; inset: 0 -3px; } /* 拖拽热区加宽 */ .main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); } .right-panel { background: var(--bg-panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; min-width: 0; } .right-panel.collapsed { width: 44px !important; } -/* ---- 左栏:任务中心(方案 A)见文末 tsb-* ---- */ +/* ---- 通用控件 ---- */ +.btn { + background: var(--accent); color: var(--text-on-accent); border: none; + border-radius: var(--radius); padding: 8px 16px; cursor: pointer; + font-size: 13px; font-weight: 550; white-space: nowrap; + box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(8,9,12,.3); + transition: filter .12s var(--ease), transform .12s var(--ease); +} +.btn:hover:not(:disabled) { filter: brightness(1.09); } +.btn:active:not(:disabled) { transform: translateY(1px); } +.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; } +.btn.ghost { background: var(--bg-raised); border: 1px solid var(--border-strong); color: var(--text-dim); box-shadow: none; } +.btn.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--text-faint); filter: none; } +.btn.danger { background: var(--err); } +.icon-btn { + background: none; border: none; color: var(--text-faint); + border-radius: var(--radius-sm); padding: 0; width: 28px; height: 28px; + display: inline-flex; align-items: center; justify-content: center; cursor: pointer; + transition: background .12s, color .12s; +} +.icon-btn:hover { background: var(--bg-hover); color: var(--text); } +.search-input, .cmd-menu input { + background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); + color: var(--text); padding: 7px 11px; font-family: inherit; font-size: 13px; width: 100%; + transition: border-color .12s, box-shadow .12s; +} +.search-input:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; } + /* ---- 中栏对话 ---- */ /* min-height:0 须随列向 flex 链下传(.main→.chat→.chat-body):flex 项的自动最小 高度是内容高度,缺失时消息会撑破 .chat——chat-body 永不滚动、输入栏被顶出视口。 */ .chat { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; } -.chat-header { padding: 10px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; background: var(--bg-raised); } -.chat-title { font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.chat-body { flex: 1; overflow-y: auto; min-height: 0; padding: 18px max(18px, 12%); } -.empty-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-faint); gap: 8px; } -.msg { margin-bottom: 18px; } -.msg-role { font-size: 12px; color: var(--text-faint); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; } -.msg.user .bubble { background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; white-space: pre-wrap; } +.chat-header { padding: 12px 22px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; gap: 10px; background: var(--bg); } +.chat-title { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.chat-body { flex: 1; overflow-y: auto; min-height: 0; padding: 22px max(22px, 13%); } +.empty-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-faint); gap: 10px; font-size: 13.5px; } +.empty-state .es-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-raised); border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center; color: var(--text-faint); margin-bottom: 4px; } +.empty-state svg { opacity: .5; } +.msg { margin-bottom: 20px; } +.msg-role { font-size: 12px; color: var(--text-faint); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; } +.msg-role .role-mark { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-dim); background: var(--bg-raised); border: 1px solid var(--border); } +.msg.user .bubble { + background: var(--accent-soft); border: 1px solid transparent; + border-radius: var(--radius-lg); padding: 11px 16px; white-space: pre-wrap; +} .part { margin: 4px 0; } .part-thinking { color: var(--text-dim); font-size: 12.5px; border-left: 2px solid var(--border); padding-left: 10px; margin: 4px 0; } .part-thinking summary { cursor: pointer; color: var(--text-faint); user-select: none; } .part-thinking .part-thinking-body { white-space: pre-wrap; margin-top: 4px; } .part-tool { font-size: 12.5px; } -.tool-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; margin: 2px 4px 2px 0; font-family: var(--mono); } +.tool-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--bg-inset); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 4px 9px; margin: 2px 4px 2px 0; font-family: var(--mono); } .tool-chip .status-ok { color: var(--ok); } .tool-chip .status-error { color: var(--err); } -.part-text { line-height: 1.65; overflow-wrap: break-word; } +.part-text { line-height: 1.7; overflow-wrap: break-word; } /* 块级间距只由标签自身控制:禁用 pre-wrap(marked 输出的块间换行会被渲染成空行, 叠加出"列表逐项空一行"的松散排版);行内换行语义交给 Markdown 段落。 */ .part-text > *:first-child { margin-top: 0; } .part-text > *:last-child { margin-bottom: 0; } .part-text p { margin: 0.5em 0; } -.part-text :is(h1,h2,h3,h4) { margin: 0.8em 0 0.35em; line-height: 1.35; font-weight: 600; } +.part-text :is(h1,h2,h3,h4) { margin: 0.8em 0 0.35em; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; } .part-text h1 { font-size: 1.3em; } .part-text h2 { font-size: 1.18em; } .part-text h3 { font-size: 1.06em; } .part-text :is(ul,ol) { margin: 0.4em 0; padding-left: 1.6em; } .part-text li { margin: 0.15em 0; } .part-text li > p { margin: 0.2em 0; } -.part-text pre { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; } -.part-text code { font-family: var(--mono); background: var(--bg-raised); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; } +.part-text pre { background: var(--bg-inset); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 11px 13px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; } +.part-text code { font-family: var(--mono); background: var(--bg-raised); border-radius: var(--radius-xs); padding: 1px 5px; font-size: 12.5px; } .part-text pre code { background: none; padding: 0; } -.part-text blockquote { margin: 0.5em 0; padding: 0.1em 0 0.1em 10px; border-left: 3px solid var(--border); color: var(--text-dim); } +.part-text blockquote { margin: 0.5em 0; padding: 0.1em 0 0.1em 10px; border-left: 3px solid var(--border-strong); color: var(--text-dim); } .part-text table { border-collapse: collapse; margin: 0.6em 0; font-size: 0.95em; display: block; max-width: 100%; overflow-x: auto; } .part-text th, .part-text td { border: 1px solid var(--border); padding: 4px 10px; text-align: left; } .part-text th { background: var(--bg-raised); font-weight: 600; } .part-text hr { border: none; border-top: 1px solid var(--border); margin: 0.8em 0; } .part-text a { color: var(--accent); } -.part-error { color: var(--err); background: color-mix(in srgb, var(--err) 8%, transparent); border: 1px solid var(--err); border-radius: var(--radius-sm); padding: 8px 12px; } -.artifact-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 4px 10px; cursor: pointer; font-size: 13px; } -.artifact-chip:hover { filter: brightness(1.15); } +.part-error { color: var(--err); background: var(--err-soft); border: 1px solid var(--err); border-radius: var(--radius-sm); padding: 8px 12px; } +.artifact-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 5px 10px; cursor: pointer; font-size: 13px; transition: background .12s; } +.artifact-chip:hover { background: var(--accent-soft-2); } /* 过程折叠(run 终态后) */ -.process-collapse { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-raised); margin: 6px 0; } -.process-collapse summary { list-style: none; cursor: pointer; padding: 6px 12px; color: var(--text-faint); font-size: 12.5px; display: flex; align-items: center; gap: 8px; user-select: none; } +.process-collapse { border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--bg-panel); margin: 6px 0; } +.process-collapse summary { list-style: none; cursor: pointer; padding: 7px 12px; color: var(--text-faint); font-size: 12.5px; display: flex; align-items: center; gap: 8px; user-select: none; } .process-collapse summary::before { content: '▸'; transition: transform .12s; font-size: 10px; } .process-collapse[open] summary::before { transform: rotate(90deg); } .process-collapse .body { padding: 4px 12px 10px; } @@ -76,41 +117,37 @@ button { font-family: inherit; } @keyframes pulse { 0%,100% { opacity: .4 } 50% { opacity: 1 } } .cursor-blink::after { content: '▍'; animation: pulse 1s infinite; color: var(--accent); } -/* HITL 卡片 */ -.hitl-card { border: 1px solid var(--accent); background: var(--bg-raised); border-radius: var(--radius); padding: 14px; margin: 10px 0; } -.hitl-q { font-weight: 600; margin-bottom: 10px; } +/* HITL 卡片(确认类交互统一绿色语言) */ +.hitl-card { border: 1px solid var(--ok-border); background: var(--ok-soft); border-radius: var(--radius-lg); padding: 14px; margin: 10px 0; } +.hitl-q { font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: flex-start; } +.hitl-q svg { color: var(--ok); flex: none; margin-top: 1px; } .hitl-choices { display: flex; flex-direction: column; gap: 8px; } -.hitl-choice { text-align: left; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; } +.hitl-choice { text-align: left; border: 1px solid var(--border); background: var(--bg-raised); color: var(--text); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; transition: border-color .12s, background .12s; } .hitl-choice:hover { border-color: var(--accent); background: var(--accent-soft); } .hitl-choice .label { font-weight: 600; display: flex; gap: 8px; align-items: center; } .hitl-choice .desc { color: var(--text-dim); font-size: 12.5px; margin-top: 3px; } .hitl-choice .impact { color: var(--warn); font-size: 12px; margin-top: 3px; } -.hitl-choice .rec { font-size: 10.5px; color: var(--accent); border: 1px solid var(--accent); padding: 0 5px; border-radius: 8px; } +.hitl-choice .rec { font-size: 10.5px; color: var(--accent); border: 1px solid var(--accent); padding: 0 5px; border-radius: var(--radius-full); } .hitl-free { display: flex; gap: 8px; margin-top: 10px; } -/* 输入区 */ -.input-bar { border-top: 1px solid var(--border); padding: 12px 18px; background: var(--bg-raised); } +/* 输入区:悬浮卡片式输入壳(外圆角大、聚焦发光) */ +.input-bar { padding: 8px max(16px, 6%) 16px; background: var(--bg); } .attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } -.attach-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--bg-hover); border-radius: var(--radius-sm); padding: 3px 8px; font-size: 12px; } -.input-row { display: flex; gap: 8px; align-items: flex-end; } -.input-row textarea { flex: 1; resize: none; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); padding: 10px 12px; font-family: inherit; font-size: 14px; max-height: 160px; outline: none; } -.input-row textarea:focus { border-color: var(--accent); } -.btn { background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 9px 16px; cursor: pointer; font-size: 13px; white-space: nowrap; } -.btn:disabled { opacity: .45; cursor: not-allowed; } -.btn.ghost { background: none; border: 1px solid var(--border); color: var(--text-dim); } -.btn.ghost:hover { color: var(--text); border-color: var(--text-faint); } -.btn.danger { background: var(--err); } -.icon-btn { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; font-size: 14px; } -.icon-btn:hover { color: var(--text); border-color: var(--text-faint); } -.cmd-menu { border: 1px solid var(--border); background: var(--bg-raised); border-radius: var(--radius-sm); margin-bottom: 6px; max-height: 180px; overflow-y: auto; } +.attach-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px 8px; font-size: 12px; } +.input-row { display: flex; gap: 8px; align-items: flex-end; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px 8px 8px 14px; box-shadow: var(--shadow-md); transition: border-color .12s, box-shadow .12s; } +.input-row:focus-within { border-color: var(--accent); box-shadow: var(--shadow-md), var(--ring); } +.input-row textarea { flex: 1; resize: none; background: transparent; border: none; color: var(--text); padding: 6px 0; font-family: inherit; font-size: 13.5px; max-height: 160px; outline: none; } +.input-row textarea::placeholder { color: var(--text-faint); } +.cmd-menu { border: 1px solid var(--border); background: var(--bg-raised); border-radius: var(--radius); margin-bottom: 6px; max-height: 180px; overflow-y: auto; box-shadow: var(--shadow-md); } .cmd-item { padding: 7px 12px; cursor: pointer; display: flex; gap: 10px; font-size: 13px; } -.cmd-item:hover, .cmd-item.active { background: var(--accent-soft); } +.cmd-item:hover, .cmd-item.active { background: var(--bg-hover); } .cmd-item .name { color: var(--accent); font-family: var(--mono); } /* ---- 右栏 ---- */ -.tabs { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; } -.tab { background: none; border: none; color: var(--text-dim); padding: 9px 12px; cursor: pointer; font-size: 12.5px; border-bottom: 2px solid transparent; white-space: nowrap; } -.tab.active { color: var(--accent); border-bottom-color: var(--accent); } +.tabs { display: flex; border-bottom: 1px solid var(--border-soft); overflow-x: auto; padding: 0 8px; } +.tab { background: none; border: none; color: var(--text-faint); padding: 10px 10px; cursor: pointer; font-size: 12.5px; font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; } +.tab:hover { color: var(--text-dim); } +.tab.active { color: var(--text); border-bottom-color: var(--accent); } .tab-body { flex: 1; overflow-y: auto; padding: 12px; } .step { display: flex; gap: 8px; align-items: flex-start; padding: 6px 4px; font-size: 13px; } .step-icon { width: 16px; text-align: center; flex-shrink: 0; } @@ -131,193 +168,195 @@ button { font-family: inherit; } .status-pending, .status-waiting_hitl { background: var(--warn); } /* ---- 弹窗 / 模态 ---- */ -.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 50; } -.modal { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; width: min(860px, 92vw); max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 18px 60px rgba(0,0,0,.4); } -.modal-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; font-weight: 600; } +.overlay { position: fixed; inset: 0; background: rgba(8, 9, 12, .6); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 50; animation: overlay-in .14s var(--ease); } +@keyframes overlay-in { from { opacity: 0 } } +.modal { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-xl); width: min(860px, 92vw); max-height: 86vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: modal-in .16s var(--ease); } +@keyframes modal-in { from { opacity: 0; transform: translateY(6px) scale(.99) } } +.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; } .modal-header .spacer { flex: 1; } -.modal-body { flex: 1; overflow-y: auto; padding: 16px 18px; } +.modal-body { flex: 1; overflow-y: auto; padding: 18px 20px; } .subagent-tree { font-size: 13px; } -.subagent-node { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 8px; } +.subagent-node { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 8px; background: var(--bg-panel); } .subagent-node .head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; } /* ---- 设置(schema 驱动)---- */ .settings-group { margin-bottom: 18px; } -.settings-group h4 { margin: 0 0 8px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; } -.setting-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; } +.settings-group h4 { margin: 0 0 8px; font-size: 11.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; } +.setting-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; } .setting-row label { color: var(--text-dim); } .setting-row input, .setting-row select { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 7px 10px; font-family: inherit; } -.effect-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-faint); white-space: nowrap; } +.setting-row input:focus, .setting-row select:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; } +.effect-badge { font-size: 10.5px; padding: 2px 7px; border-radius: var(--radius-full); border: 1px solid var(--border); color: var(--text-faint); white-space: nowrap; } .effect-hot { color: var(--ok); border-color: var(--ok); } .effect-new-run { color: var(--warn); border-color: var(--warn); } -/* UI schema 渲染器样式(.ui-*)与 .doc-viewer 已迁入 @ui/ui.css。 */ - /* ---- 杂项 ---- */ -.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--bg-raised); border: 1px solid var(--border); color: var(--text); padding: 9px 16px; border-radius: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.35); z-index: 90; font-size: 13px; } +.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--bg-raised); border: 1px solid var(--border); color: var(--text); padding: 9px 16px; border-radius: var(--radius-full); box-shadow: var(--shadow-lg); z-index: 90; font-size: 13px; } .conn-dot { width: 8px; height: 8px; border-radius: 50%; } .conn-dot.on { background: var(--ok); } .conn-dot.off { background: var(--err); } .doc-toolbar { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; } -.search-input { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 6px 10px; font-family: inherit; width: 100%; } -::-webkit-scrollbar { width: 9px; height: 9px; } -::-webkit-scrollbar-thumb { background: var(--bg-active); border-radius: 5px; } +::-webkit-scrollbar { width: 10px; height: 10px; } +::-webkit-scrollbar-thumb { background: var(--bg-active); border-radius: 6px; border: 3px solid transparent; background-clip: content-box; } +::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: content-box; border: 3px solid transparent; } ::-webkit-scrollbar-track { background: transparent; } -/* ---- 登录门(API key 认证,PG 档默认开启) ---- */ -.login-gate { - position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; - background: var(--bg, #14161a); z-index: 1000; -} -.login-card { - width: 360px; padding: 28px; border-radius: 12px; text-align: center; - background: #1d2026; border: 1px solid #2c313a; box-shadow: 0 8px 32px rgba(0,0,0,.45); -} -.login-card h2 { margin: 0 0 8px; } -.login-hint { font-size: 12px; color: #9aa3b2; margin-bottom: 16px; line-height: 1.6; } -.login-card input { - width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 8px; - border: 1px solid #2c313a; background: #14161a; color: inherit; font-size: 14px; -} -.login-card button { - margin-top: 12px; width: 100%; padding: 9px 0; border: none; border-radius: 8px; - background: #3b82f6; color: #fff; font-size: 14px; cursor: pointer; -} -.login-err { margin-top: 10px; font-size: 12px; color: #f87171; } +/* ---- 品牌标(侧栏 / 登录页 / 头像共用的星芒渐变底) ---- */ +.brand-mark { background: linear-gradient(135deg, #6d8dff, #9d7bff); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); } -/* 工作区快捷区(T4/D26 左栏)与当前任务常驻卡(D25 R4) */ -.current-task{border:1px solid var(--border);border-radius:8px;padding:8px 10px;margin-bottom:8px;background:rgba(120,160,255,.05)} -.ct-head{display:flex;align-items:center;gap:8px;font-weight:600;margin-bottom:6px} -.ct-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} -.ct-progress{font-size:11px;color:var(--text-faint)} -.project-badge{font-size:11px;padding:1px 8px;border-radius:8px;background:rgba(120,160,255,.15);color:var(--accent);white-space:nowrap} -.tab-hint{font-size:10px;color:var(--text-faint);align-self:center} -.empty-note{color:var(--text-faint);font-size:12px;padding:12px 4px} - -/* 收纳策略(T5):收起态角标 + 收纳按钮 */ -.rail-badge{position:absolute;top:-4px;right:-6px;font-size:10px;background:var(--warn,#d29922);color:#fff;border-radius:8px;padding:0 5px;min-width:14px} -.right-panel.collapsed .icon-only button{position:relative} -.tab-action{font-size:11px;color:var(--text-faint)} - -/* ---- 左栏:任务中心(方案 A,提案 2026-09-30) ---- */ -.tsb-brand { display: flex; align-items: center; gap: 8px; padding: 12px 12px 6px; } -.tsb-logo { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; } -.tsb-name { font-weight: 600; font-size: 13.5px; } +/* ---- 左栏:任务中心(方案 A;R4 重造型) ---- */ +.tsb-brand { display: flex; align-items: center; gap: 9px; padding: 14px 14px 8px; } +.tsb-logo { width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg, #6d8dff, #9d7bff); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; } +.tsb-name { font-weight: 650; font-size: 13.5px; letter-spacing: -0.01em; } .tsb-iconbtn { width: 26px; height: 26px; border-radius: var(--radius-sm); background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; position: relative; } .tsb-iconbtn:hover { background: var(--bg-hover); color: var(--text); } .tsb-iconbtn.active { color: var(--accent); background: var(--accent-soft); } -.tsb-actions { padding: 4px 10px 8px; display: flex; flex-direction: column; gap: 6px; } -.tsb-newtask { display: flex; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent-soft); overflow: hidden; } -.tsb-newtask-main { flex: 1; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: none; border: none; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; min-width: 0; } -.tsb-newtask-main:hover { filter: brightness(1.08); } -.tsb-newtask-proj { font-weight: 400; font-size: 11.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.tsb-newtask-caret { width: 28px; border: none; border-left: 1px solid var(--accent); background: none; color: var(--accent); cursor: pointer; font-size: 10px; } -.tsb-newtask-caret:hover { background: var(--accent-soft); } -.tsb-search { height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-raised); color: var(--text); padding: 0 10px; font-size: 12.5px; width: 100%; } -.tsb-search:focus { border-color: var(--accent); outline: none; } -.tsb-search::placeholder { color: var(--text-faint); } +.tsb-actions { padding: 6px 12px 8px; display: flex; flex-direction: column; gap: 7px; } +.tsb-newtask { display: flex; height: 36px; border-radius: var(--radius); background: var(--accent); color: var(--text-on-accent); overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 6px rgba(8,9,12,.28); transition: filter .12s; } +.tsb-newtask:hover { filter: brightness(1.08); } +.tsb-newtask-main { flex: 1; display: flex; align-items: center; gap: 7px; padding: 0 11px; background: none; border: none; color: inherit; font-weight: 600; font-size: 13px; cursor: pointer; min-width: 0; } +.tsb-newtask-main svg { flex: none; } +.tsb-newtask-proj { font-weight: 450; font-size: 11.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.tsb-newtask-caret { width: 30px; border: none; border-left: 1px solid rgba(255,255,255,.18); background: none; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; } +.tsb-newtask-caret:hover { background: rgba(255,255,255,.08); } +.tsb-search { display: flex; align-items: center; gap: 7px; height: 32px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-raised); color: var(--text-faint); padding: 0 10px; transition: border-color .12s, box-shadow .12s; } +.tsb-search:focus-within { border-color: var(--accent); box-shadow: var(--ring); } +.tsb-search svg { flex: none; } +.tsb-search input { flex: 1; border: none; background: none; color: var(--text); font-size: 12.5px; outline: none; min-width: 0; } +.tsb-search input::placeholder { color: var(--text-faint); } -.tsb-orgrow { display: flex; align-items: center; gap: 6px; padding: 0 10px 8px; } -.tsb-pills { flex: 1; display: flex; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; gap: 2px; } -.tsb-pill { flex: 1; height: 22px; border: none; border-radius: 4px; background: none; color: var(--text-faint); font-size: 12px; cursor: pointer; } +.tsb-orgrow { display: flex; align-items: center; gap: 6px; padding: 0 12px 8px; } +.tsb-pills { flex: 1; display: flex; background: var(--bg-inset); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 2px; gap: 2px; } +.tsb-pill { flex: 1; height: 22px; border: none; border-radius: var(--radius-xs); background: none; color: var(--text-faint); font-size: 12px; cursor: pointer; transition: all .12s; } .tsb-pill:hover { color: var(--text-dim); } -.tsb-pill.on { background: var(--bg-active); color: var(--text); font-weight: 500; } +.tsb-pill.on { background: var(--bg-raised); color: var(--text); font-weight: 550; box-shadow: 0 1px 2px rgba(8,9,12,.25); } -.tsb-scroll { flex: 1; overflow-y: auto; padding: 0 8px 8px; min-height: 0; } -.tsb-seclabel { font-size: 11px; color: var(--text-faint); padding: 10px 8px 4px; letter-spacing: .3px; } -.tsb-empty { padding: 18px 12px; color: var(--text-faint); font-size: 12.5px; line-height: 1.8; text-align: center; } +.tsb-scroll { flex: 1; overflow-y: auto; padding: 0 10px 8px; min-height: 0; } +.tsb-seclabel { font-size: 11px; color: var(--text-faint); padding: 12px 8px 4px; letter-spacing: .05em; font-weight: 600; } +.tsb-empty { padding: 20px 14px; color: var(--text-faint); font-size: 12.5px; line-height: 1.9; text-align: center; } .tsb-newproject { padding: 0 2px 8px; } .tsb-group { margin-bottom: 2px; } -.tsb-group-head { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 8px; border-radius: var(--radius-sm); color: var(--text-dim); font-weight: 500; font-size: 13px; cursor: pointer; user-select: none; } +.tsb-group-head { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 4px; border-radius: var(--radius-sm); color: var(--text-dim); font-weight: 550; font-size: 13px; cursor: pointer; user-select: none; } .tsb-group-head:hover { background: var(--bg-hover); } -.tsb-group.closed .tsb-chev { transform: rotate(-90deg); } -.tsb-chev { font-size: 9px; color: var(--text-faint); transition: transform .12s; } +.tsb-group.closed .tsb-chev { transform: rotate(0deg); } +.tsb-chev { display: inline-flex; color: var(--text-faint); transform: rotate(90deg); transition: transform .12s; } .tsb-group-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.tsb-group-cnt { font-size: 11px; color: var(--text-faint); font-weight: 400; } -.tsb-group-add { visibility: hidden; width: 20px; height: 20px; border: none; border-radius: 4px; background: none; color: var(--text-faint); font-size: 12px; cursor: pointer; } +.tsb-group-cnt { font-size: 11px; color: var(--text-faint); font-weight: 400; font-variant-numeric: tabular-nums; } +.tsb-group-add { visibility: hidden; width: 22px; height: 22px; border: none; border-radius: var(--radius-xs); background: none; color: var(--text-faint); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; } .tsb-group-head:hover .tsb-group-add { visibility: visible; } .tsb-group-add:hover { background: var(--bg-active); color: var(--text); } -.tsb-task { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; margin: 1px 0; border-radius: var(--radius-sm); color: var(--text-dim); cursor: pointer; } +.tsb-task { display: flex; align-items: center; gap: 8px; height: 31px; padding: 0 8px; margin: 1px 0; border-radius: var(--radius-sm); color: var(--text-dim); cursor: pointer; position: relative; transition: background .1s, color .1s; } .tsb-task:hover { background: var(--bg-hover); color: var(--text); } .tsb-task.active { background: var(--bg-active); color: var(--text); } +.tsb-task.active::before { content: ''; position: absolute; left: -2px; top: 6px; bottom: 6px; width: 2.5px; border-radius: 2px; background: var(--accent); } .tsb-task.archived .tsb-task-t { text-decoration: line-through; opacity: .6; } .tsb-task-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; } .tsb-task-tm { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; } -.tsb-pbadge { font-size: 10.5px; color: var(--text-faint); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; line-height: 1.5; white-space: nowrap; } +.tsb-pbadge { font-size: 10.5px; color: var(--text-faint); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 0 5px; line-height: 1.5; white-space: nowrap; } .tsb-row-acts { display: none; gap: 2px; } .tsb-task:hover .tsb-row-acts { display: inline-flex; } .tsb-task:hover .tsb-task-tm { display: none; } -.tsb-row-act { border: none; background: none; color: var(--text-faint); font-size: 11px; cursor: pointer; padding: 2px 3px; border-radius: 4px; } +.tsb-row-act { border: none; background: none; color: var(--text-faint); cursor: pointer; padding: 3px; border-radius: var(--radius-xs); display: inline-flex; } .tsb-row-act:hover { background: var(--bg-active); color: var(--text); } -.tsb-wsstrip { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-top: 1px solid var(--border); } -.tsb-wsstrip button { border: none; background: none; color: var(--text-faint); font-size: 13px; cursor: pointer; padding: 4px 5px; border-radius: var(--radius-sm); } +.tsb-wsstrip { display: flex; align-items: center; gap: 2px; padding: 6px 12px; border-top: 1px solid var(--border-soft); } +.tsb-wsstrip button { border: none; background: none; color: var(--text-faint); cursor: pointer; padding: 5px; border-radius: var(--radius-sm); display: inline-flex; } .tsb-wsstrip button:hover { background: var(--bg-hover); color: var(--text); } -.tsb-footer { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); } -.tsb-user { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; height: 38px; padding: 0 7px; border: none; border-radius: var(--radius-sm); background: none; cursor: pointer; text-align: left; } +.tsb-footer { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--border-soft); } +.tsb-user { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; height: 40px; padding: 0 7px; border: none; border-radius: var(--radius); background: none; cursor: pointer; text-align: left; transition: background .12s; } .tsb-user:hover { background: var(--bg-hover); } -.tsb-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; } +.tsb-avatar { width: 27px; height: 27px; border-radius: 50%; background: linear-gradient(135deg, #6d8dff, #9d7bff); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); } .tsb-user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; } .tsb-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tsb-user-sub { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.tsb-user-chev { color: var(--text-faint); font-size: 10px; } +.tsb-user-chev { color: var(--text-faint); display: inline-flex; } -.tsb-menu { position: fixed; z-index: 300; min-width: 210px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.35); padding: 5px; display: flex; flex-direction: column; } -.tsb-mi { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 9px; border: none; border-radius: var(--radius-sm); background: none; color: var(--text-dim); font-size: 13px; cursor: pointer; text-align: left; } +.tsb-menu { position: fixed; z-index: 300; min-width: 216px; background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 5px; display: flex; flex-direction: column; animation: modal-in .12s var(--ease); } +.tsb-mi { display: flex; align-items: center; gap: 9px; min-height: 31px; padding: 4px 9px; border: none; border-radius: var(--radius-sm); background: none; color: var(--text-dim); font-size: 13px; cursor: pointer; text-align: left; } +.tsb-mi svg { color: var(--text-faint); flex: none; } .tsb-mi:hover { background: var(--bg-hover); color: var(--text); } +.tsb-mi:hover svg { color: var(--text-dim); } .tsb-mi.danger { color: var(--err); } .tsb-mi.danger:hover { background: var(--err); color: #fff; } -.tsb-mi kbd { margin-left: auto; font-size: 10.5px; color: var(--text-faint); } -.tsb-menu-div { height: 1px; background: var(--border); margin: 5px 4px; } +.tsb-mi.danger:hover svg { color: #fff; } +.tsb-mi kbd { margin-left: auto; font-size: 10.5px; font-family: var(--mono); color: var(--text-faint); } +.tsb-menu-div { height: 1px; background: var(--border-soft); margin: 5px 4px; } .tsb-acc-head { display: flex; gap: 10px; align-items: center; padding: 8px 9px 6px; } .tsb-acc-name { font-size: 13.5px; font-weight: 600; } .tsb-acc-mail { font-size: 11.5px; color: var(--text-faint); } -/* ---- 登录页与改密门(R2 管理员发放制) ---- */ -.lg-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 500; } -.lg-card { width: 380px; max-width: calc(100vw - 32px); background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 28px 28px 22px; box-shadow: 0 12px 40px rgba(0,0,0,.25); } -.lg-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; margin-bottom: 18px; } -.lg-logo { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; } -.lg-title { margin: 0 0 4px; font-size: 19px; } -.lg-sub { margin: 0 0 16px; font-size: 12.5px; color: var(--text-faint); line-height: 1.6; } -.lg-tabs { display: flex; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 3px; margin-bottom: 14px; } -.lg-tab { flex: 1; height: 28px; border: none; border-radius: 6px; background: none; color: var(--text-faint); font-size: 12.5px; cursor: pointer; } -.lg-tab.on { background: var(--bg-active); color: var(--text); font-weight: 500; } -.lg-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-dim); margin: 10px 0 5px; } -.lg-input { width: 100%; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-raised); color: var(--text); padding: 0 11px; font-size: 13.5px; } -.lg-input:focus { border-color: var(--accent); outline: none; } +/* ---- 登录页与改密门(R4 重造型:宽屏右侧品牌面板) ---- */ +.lg-wrap { position: fixed; inset: 0; display: flex; align-items: stretch; background: var(--bg); z-index: 500; } +.lg-panel { flex: none; width: 46%; max-width: 620px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 64px; color: #dfe4f2; background: linear-gradient(160deg, #171e38 0%, #1d2145 55%, #251d4d 100%); } +.lg-panel::before { content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(closest-side, rgba(109,141,255,.22), transparent 70%); top: -140px; right: -160px; } +.lg-panel::after { content: ''; position: absolute; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(closest-side, rgba(157,123,255,.18), transparent 70%); bottom: -150px; left: -120px; } +.lg-panel h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; margin: 0 0 12px; position: relative; } +.lg-panel p { font-size: 14px; opacity: .72; line-height: 1.75; margin: 0; position: relative; } +.lg-panel ul { margin: 28px 0 0; list-style: none; display: flex; flex-direction: column; gap: 13px; position: relative; } +.lg-panel li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; opacity: .88; } +.lg-panel li svg { margin-top: 2px; color: #8fa8ff; flex: none; } +.lg-panel .lg-foot { position: absolute; bottom: 28px; left: 64px; right: 64px; display: flex; justify-content: space-between; font-size: 11.5px; opacity: .45; } +@media (max-width: 960px) { .lg-panel { display: none; } } +.lg-formside { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; min-width: 0; } +.lg-card { width: 392px; max-width: 100%; } +.lg-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; margin-bottom: 26px; } +.lg-title { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; } +.lg-sub { margin: 0 0 18px; font-size: 12.5px; color: var(--text-faint); line-height: 1.6; } +.lg-tabs { display: flex; background: var(--bg-inset); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 3px; gap: 3px; margin-bottom: 16px; } +.lg-tab { flex: 1; height: 30px; border: none; border-radius: var(--radius-xs); background: none; color: var(--text-faint); font-size: 12.5px; cursor: pointer; transition: all .12s; } +.lg-tab:hover { color: var(--text-dim); } +.lg-tab.on { background: var(--bg-raised); color: var(--text); font-weight: 550; box-shadow: 0 1px 2px rgba(8,9,12,.25); } +.lg-label { display: block; font-size: 12px; font-weight: 550; color: var(--text-dim); margin: 12px 0 6px; } +.lg-input { width: 100%; height: 38px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-raised); color: var(--text); padding: 0 12px; font-size: 13.5px; transition: border-color .12s, box-shadow .12s; } +.lg-input:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; } .lg-mono { font-family: var(--mono); font-size: 12.5px; } -.lg-err { margin-top: 10px; font-size: 12.5px; color: var(--err); background: rgba(224,86,107,.08); border: 1px solid rgba(224,86,107,.3); border-radius: 8px; padding: 7px 10px; } -.lg-submit { width: 100%; height: 36px; margin-top: 14px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; } -.lg-submit:disabled { opacity: .55; cursor: default; } -.lg-submit:not(:disabled):hover { filter: brightness(1.08); } +.lg-err { margin-top: 12px; font-size: 12.5px; color: var(--err); background: var(--err-soft); border: 1px solid color-mix(in srgb, var(--err) 35%, transparent); border-radius: var(--radius); padding: 8px 11px; display: flex; gap: 7px; align-items: flex-start; } +.lg-err svg { flex: none; margin-top: 1px; } +.lg-submit { + width: 100%; height: 38px; margin-top: 16px; border: none; border-radius: var(--radius); + background: var(--accent); color: var(--text-on-accent); font-weight: 600; font-size: 13.5px; cursor: pointer; + box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 8px var(--accent-glow); + transition: filter .12s, transform .12s; +} +.lg-submit:disabled { opacity: .45; cursor: default; box-shadow: none; } +.lg-submit:not(:disabled):hover { filter: brightness(1.09); } +.lg-submit:not(:disabled):active { transform: translateY(1px); } .lg-cancel { width: 100%; margin-top: 8px; border: none; background: none; color: var(--text-faint); font-size: 12.5px; cursor: pointer; } .lg-cancel:hover { color: var(--text-dim); text-decoration: underline; } -.lg-hint { margin: 12px 0 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.7; } -.lg-hint code { font-family: var(--mono); font-size: 10.5px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; } +.lg-hint { margin: 14px 0 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.7; } +.lg-hint code { font-family: var(--mono); font-size: 10.5px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 1px 5px; } /* ---- 用户管理 / 改密弹层 ---- */ -.ad-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow-y: auto; } -.ad-create { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-raised); } +.ad-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow-y: auto; } +.ad-create { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-panel); } .ad-row { display: flex; gap: 8px; align-items: center; } -.ad-row .lg-input { flex: 1; min-width: 0; height: 32px; } +.ad-row .lg-input { flex: 1; min-width: 0; height: 34px; } .ad-check { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; } -.ad-create-btn { width: auto; padding: 0 14px; margin-top: 0; height: 32px; flex: none; } -.ad-mini { border: 1px solid var(--border); background: var(--bg-raised); color: var(--text-dim); border-radius: 6px; padding: 4px 9px; font-size: 12px; cursor: pointer; white-space: nowrap; } +.ad-create-btn { width: auto; padding: 0 14px; margin-top: 0; height: 34px; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); } +.ad-mini { border: 1px solid var(--border); background: var(--bg-raised); color: var(--text-dim); border-radius: var(--radius-sm); padding: 4px 9px; font-size: 12px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; } .ad-mini:hover { color: var(--text); border-color: var(--accent); } .ad-hint { margin: 0; font-size: 11.5px; color: var(--text-faint); } -.ad-notice { font-size: 12.5px; color: var(--ok); background: rgba(65,178,110,.09); border: 1px solid rgba(65,178,110,.3); border-radius: 8px; padding: 8px 11px; } +.ad-notice { font-size: 12.5px; color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok-border); border-radius: var(--radius); padding: 8px 11px; display: flex; gap: 7px; align-items: flex-start; } +.ad-notice svg { flex: none; margin-top: 1px; } .ad-table { width: 100%; border-collapse: collapse; font-size: 12.5px; } -.ad-table th { text-align: left; font-weight: 500; color: var(--text-faint); font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--border); } -.ad-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); } +.ad-table th { text-align: left; font-weight: 600; color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 8px; border-bottom: 1px solid var(--border); } +.ad-table td { padding: 9px 8px; border-bottom: 1px solid var(--border-soft); } +.ad-table tr:last-child td { border-bottom: none; } .ad-mono { font-family: var(--mono); font-size: 12px; } .ad-dim { color: var(--text-faint); } -.ad-chip { font-size: 10px; border-radius: 4px; padding: 1px 6px; font-weight: 700; letter-spacing: .4px; background: var(--bg-hover); color: var(--text-faint); } +.ad-chip { font-size: 10px; border-radius: var(--radius-xs); padding: 2px 7px; font-weight: 700; letter-spacing: .5px; background: var(--bg-hover); color: var(--text-faint); } .ad-chip-admin { background: var(--accent-soft); color: var(--accent); } -.ad-chip-warn { background: rgba(217,155,63,.15); color: var(--warn); } -.ad-reset { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 1px solid var(--warn); border-radius: 10px; padding: 12px; font-size: 12.5px; } +.ad-chip-warn { background: var(--warn-soft); color: var(--warn); } +.ad-reset { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); border-radius: var(--radius-lg); padding: 12px; font-size: 12.5px; } .ad-reset .lg-input { flex: 1; min-width: 160px; height: 32px; } .ad-changepw { display: flex; flex-direction: column; gap: 2px; max-width: 340px; } + +/* ---- 收起轨道(左栏收起态) ---- */ +.icon-only { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 12px; } +.icon-only button { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 0; width: 34px; height: 34px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; position: relative; } +.icon-only button:hover { background: var(--bg-hover); color: var(--text); } +.rail-badge { position: absolute; top: 3px; right: 3px; min-width: 14px; height: 14px; border-radius: 7px; background: var(--warn); color: #fff; font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; } diff --git a/tsconfig.tsbuildinfo b/tsconfig.tsbuildinfo index e4fba48..eb975a8 100644 --- a/tsconfig.tsbuildinfo +++ b/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/App.tsx","./src/api.ts","./src/auth.ts","./src/contracts.ts","./src/main.tsx","./src/passwords.ts","./src/store.ts","./src/tasklist.ts","./src/components/AdminUsersModal.tsx","./src/components/AgentTracker.tsx","./src/components/Conversation.tsx","./src/components/DocViewer.tsx","./src/components/LoginPage.tsx","./src/components/SettingsModal.tsx","./src/components/TaskSidebar.tsx","./src/components/Workbench.tsx","./src/components/Workspaces.tsx","./test/auth.test.ts","./test/contracts.test.ts","./test/tasklist.test.ts"],"version":"5.9.3"} \ No newline at end of file +{"root":["./src/App.tsx","./src/api.ts","./src/auth.ts","./src/contracts.ts","./src/icons.tsx","./src/main.tsx","./src/passwords.ts","./src/store.ts","./src/tasklist.ts","./src/components/AdminUsersModal.tsx","./src/components/AgentTracker.tsx","./src/components/Conversation.tsx","./src/components/DocViewer.tsx","./src/components/LoginPage.tsx","./src/components/SettingsModal.tsx","./src/components/TaskSidebar.tsx","./src/components/Workbench.tsx","./src/components/Workspaces.tsx","./test/auth.test.ts","./test/contracts.test.ts","./test/tasklist.test.ts"],"version":"5.9.3"} \ No newline at end of file