feat(V0.2): 视图切换移入项目栏 —— 紧凑段控 + 按钮收纳 (按设计稿)
Docker Build and Push / build-image (push) Successful in 1m5s

- 项目栏一行: 项目名(省略) + 列表/看板紧凑段控(vseg 26px) + 已归档/管理/+新增
- 「项目管理」文案收窄为「管理」, mini-btn 内边距收窄
- 移除原 .pv-head 大段控; 视图记忆逻辑不变 (T-VW-02/03)
This commit is contained in:
jif2.zhang
2026-10-25 23:51:09 +08:00
parent 368e99a380
commit f83deefa47
2 changed files with 12 additions and 14 deletions
+5 -7
View File
@@ -242,20 +242,18 @@ export default function ProjectView({ projectId, onProjectChanged, onProjectExit
<div className="pv-embed"> <div className="pv-embed">
<div className="navbar-sub task-projbar"> <div className="navbar-sub task-projbar">
<span className="title">{project.name}</span> <span className="title">{project.name}</span>
<div className="vseg">
<div className={mode === 'list' ? 'on' : ''} onClick={() => switchMode('list')}>列表</div>
<div className={mode === 'board' ? 'on' : ''} onClick={() => switchMode('board')}>看板</div>
</div>
<div className="right"> <div className="right">
<span className="mini-btn" onClick={() => setArchivedOpen(true)}>已归档</span> <span className="mini-btn" onClick={() => setArchivedOpen(true)}>已归档</span>
<span className="mini-btn" onClick={() => setShowManage(true)}>项目管理</span> <span className="mini-btn" onClick={() => setShowManage(true)}>管理</span>
<span className="mini-btn solid" onClick={() => setAdding((v) => !v)}>+ 新增</span> <span className="mini-btn solid" onClick={() => setAdding((v) => !v)}>+ 新增</span>
</div> </div>
</div> </div>
<div className={`task-content${mode === 'board' ? ' is-board' : ''}`}> <div className={`task-content${mode === 'board' ? ' is-board' : ''}`}>
<div className="pv-head">
<div className="seg">
<div className={mode === 'list' ? 'on' : ''} onClick={() => switchMode('list')}>列表</div>
<div className={mode === 'board' ? 'on' : ''} onClick={() => switchMode('board')}>看板</div>
</div>
</div>
{adding && ( {adding && (
<div className="quick-add"> <div className="quick-add">
+7 -7
View File
@@ -1001,11 +1001,10 @@ body.me-safe-top .app-safe-top { height: 0; }
.badge { font-size: 10px; color: #ad6800; background: #fff7e6; border-radius: 4px; padding: 0 5px; font-weight: 400; } .badge { font-size: 10px; color: #ad6800; background: #fff7e6; border-radius: 4px; padding: 0 5px; font-weight: 400; }
/* ---- 视图头部 / 快速新增 ---- */ /* ---- 视图头部 / 快速新增 ---- */
.pv-head { padding: 10px 14px 8px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; } /* 视图切换段控: 移入项目栏, 紧凑 26px (设计稿 docs/V0.2/任务模块/视图切换移入项目栏-设计稿.html) */
.pv-head .seg { display: flex; background: #f2f3f5; border-radius: 8px; padding: 3px; width: 112px; } .vseg { display: flex; background: #f2f3f5; border-radius: 8px; padding: 2px; flex-shrink: 0; }
.pv-head .seg div { flex: 1; text-align: center; font-size: 13px; padding: 5px 0; border-radius: 6px; color: var(--color-muted); cursor: pointer; } .vseg div { font-size: 12px; line-height: 1; padding: 6px 11px; border-radius: 6px; color: var(--color-muted); cursor: pointer; white-space: nowrap; }
.pv-head .seg div.on { background: #fff; color: var(--color-text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); } .vseg div.on { background: #fff; color: var(--color-text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pv-head .right { margin-left: auto; display: flex; gap: 6px; }
.mini-btn { .mini-btn {
font-size: 11px; border: 1px solid var(--color-primary); color: var(--color-primary); font-size: 11px; border: 1px solid var(--color-primary); color: var(--color-primary);
border-radius: 999px; padding: 3px 10px; background: #fff; white-space: nowrap; cursor: pointer; border-radius: 999px; padding: 3px 10px; background: #fff; white-space: nowrap; cursor: pointer;
@@ -1254,8 +1253,9 @@ textarea.inp { resize: vertical; }
background: #fff; border-bottom: 1px solid var(--color-border); flex-shrink: 0; margin-top: 4px; background: #fff; border-bottom: 1px solid var(--color-border); flex-shrink: 0; margin-top: 4px;
} }
.task-projbar .back { font-size: 20px; color: #666; line-height: 1; cursor: pointer; } .task-projbar .back { font-size: 20px; color: #666; line-height: 1; cursor: pointer; }
.task-projbar .title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .task-projbar .title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.task-projbar .right { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; } .task-projbar .right { margin-left: auto; display: flex; gap: 5px; flex-shrink: 0; }
.task-projbar .mini-btn { padding: 5px 8px; font-size: 11px; }
.pv-embed .task-content { flex: 1 1 auto; } .pv-embed .task-content { flex: 1 1 auto; }
/* ---- 项目列表拖动排序 (bug#3) ---- */ /* ---- 项目列表拖动排序 (bug#3) ---- */