Explorar o código

fix(v12): 页脚 CSS 归位、报告中心补区块标题、手机阶段条三列不溢出、字号 11→12 合并

FmodeCode hai 5 días
pai
achega
a53f3b44cf

+ 79 - 79
docs/v12-after-p2.json

@@ -1,6 +1,6 @@
 {
   "tag": "before",
-  "at": "2026-10-30T06:58:30.641Z",
+  "at": "2026-10-30T07:03:50.635Z",
   "pages": [
     {
       "page": "/",
@@ -1389,8 +1389,8 @@
       ],
       "blackText": [],
       "fontSizes": {
-        "11": 416,
-        "12": 36,
+        "11": 276,
+        "12": 176,
         "13": 21,
         "14": 7,
         "16": 105,
@@ -1416,136 +1416,136 @@
           "n": 3,
           "spread": 0,
           "heights": [
-            283,
-            283,
-            283
+            300,
+            300,
+            300
           ]
         },
         {
           "container": "div.cards",
-          "top": 592,
+          "top": 608,
           "n": 3,
           "spread": 0,
           "heights": [
-            262,
-            262,
-            262
+            279,
+            279,
+            279
           ]
         },
         {
           "container": "div.cards",
-          "top": 864,
+          "top": 900,
           "n": 3,
           "spread": 0,
           "heights": [
-            229,
-            229,
-            229
+            246,
+            246,
+            246
           ]
         },
         {
           "container": "div.cards",
-          "top": 1104,
+          "top": 1156,
           "n": 3,
           "spread": 0,
           "heights": [
-            229,
-            229,
-            229
+            246,
+            246,
+            246
           ]
         },
         {
           "container": "div.cards",
-          "top": 1348,
+          "top": 1416,
           "n": 3,
           "spread": 0,
           "heights": [
-            229,
-            229,
-            229
+            246,
+            246,
+            246
           ]
         },
         {
           "container": "div.cards",
-          "top": 1588,
+          "top": 1672,
           "n": 3,
           "spread": 0,
           "heights": [
-            229,
-            229,
-            229
+            246,
+            246,
+            246
           ]
         },
         {
           "container": "div.cards",
-          "top": 1828,
+          "top": 1932,
           "n": 3,
           "spread": 0,
           "heights": [
-            229,
-            229,
-            229
+            246,
+            246,
+            246
           ]
         },
         {
           "container": "div.cards",
-          "top": 2072,
+          "top": 2188,
           "n": 3,
           "spread": 0,
           "heights": [
-            229,
-            229,
-            229
+            246,
+            246,
+            246
           ]
         },
         {
           "container": "div.cards",
-          "top": 2312,
+          "top": 2448,
           "n": 3,
           "spread": 0,
           "heights": [
-            359,
-            359,
-            359
+            376,
+            376,
+            376
           ]
         },
         {
           "container": "div.cards",
-          "top": 2684,
+          "top": 2836,
           "n": 3,
           "spread": 0,
           "heights": [
-            283,
-            283,
-            283
+            300,
+            300,
+            300
           ]
         },
         {
           "container": "div.cards",
-          "top": 2976,
+          "top": 3148,
           "n": 3,
           "spread": 0,
           "heights": [
-            283,
-            283,
-            283
+            300,
+            300,
+            300
           ]
         },
         {
           "container": "div.cards",
-          "top": 3272,
+          "top": 3460,
           "n": 2,
           "spread": 0,
           "heights": [
-            283,
-            283
+            300,
+            300
           ]
         }
       ],
       "blanks": [],
       "clickables": 26,
       "hoverFail": [],
-      "scrollH": 3724,
+      "scrollH": 3928,
       "lastContentBottom": 0,
       "filterLayout": null,
       "wbCols": null,
@@ -1560,7 +1560,7 @@
     {
       "page": "/reports",
       "radii": {
-        "0": 1984,
+        "0": 2004,
         "8": 388,
         "12": 176,
         "circle": 4
@@ -2061,8 +2061,8 @@
       ],
       "blackText": [],
       "fontSizes": {
-        "11": 194,
-        "12": 69,
+        "11": 120,
+        "12": 143,
         "13": 7,
         "14": 15,
         "16": 37,
@@ -2076,62 +2076,62 @@
           "n": 5,
           "spread": 0,
           "heights": [
-            310,
-            310,
-            310,
-            310,
-            310
+            315,
+            315,
+            315,
+            315,
+            315
           ]
         },
         {
           "container": "div.cards",
-          "top": 612,
+          "top": 616,
           "n": 3,
           "spread": 0,
           "heights": [
-            271,
-            271,
-            271
+            284,
+            284,
+            284
           ]
         },
         {
           "container": "div.cards",
-          "top": 892,
+          "top": 912,
           "n": 3,
           "spread": 0,
           "heights": [
-            271,
-            271,
-            271
+            284,
+            284,
+            284
           ]
         },
         {
           "container": "div.cards",
-          "top": 1176,
+          "top": 1208,
           "n": 3,
           "spread": 0,
           "heights": [
-            250,
-            250,
-            250
+            263,
+            263,
+            263
           ]
         },
         {
           "container": "div.cards",
-          "top": 1440,
+          "top": 1484,
           "n": 3,
           "spread": 0,
           "heights": [
-            218,
-            218,
-            218
+            231,
+            231,
+            231
           ]
         }
       ],
       "blanks": [],
       "clickables": 62,
       "hoverFail": [],
-      "scrollH": 1874,
+      "scrollH": 1931,
       "lastContentBottom": 0,
       "filterLayout": null,
       "wbCols": null,
@@ -2147,7 +2147,7 @@
     {
       "name": "圆角种类 ≤ 3 且 ∈ {8,12,20}(0 只允许分割线/非容器)",
       "ok": false,
-      "detail": "容器圆角(≤6px 的量条/色点不计)5:0px×8012、2px×12、8px×1412、12px×756、circlepx×16\n    违禁:2px×12(如 i)"
+      "detail": "容器圆角(≤6px 的量条/色点不计)5:0px×8032、2px×12、8px×1412、12px×756、circlepx×16\n    违禁:2px×12(如 i)"
     },
     {
       "name": "原生外观控件 = 0",
@@ -2167,7 +2167,7 @@
     {
       "name": "字号档 ≤ 5 且无 13.3333px",
       "ok": false,
-      "detail": "7 档:11×844 / 12×111 / 13×100 / 14×38 / 16×164 / 20×51 / 32×9"
+      "detail": "7 档:11×630 / 12×325 / 13×100 / 14×38 / 16×164 / 20×51 / 32×9"
     },
     {
       "name": "同排卡片高度差 ≤ 2px",
@@ -2197,7 +2197,7 @@
     {
       "name": "滚动后视口外可点元素 hover 反馈",
       "ok": false,
-      "detail": "/ 测 33 个,无反馈 0;/pool 测 112 个,无反馈 0;/stages 测 66 个,无反馈 0;/reports 测 89 个,无反馈 1(summary「排序:最新」)"
+      "detail": "/ 测 33 个,无反馈 0;/pool 测 112 个,无反馈 0;/stages 测 74 个,无反馈 0;/reports 测 89 个,无反馈 1(summary「排序:最新」)"
     },
     {
       "name": "P2 同排卡「来源行 / 操作条」底边差 ≤ 2px",
@@ -2207,7 +2207,7 @@
     {
       "name": "页面底部空白 ≤ 120px(视口下 + 滚到底两处都量)",
       "ok": true,
-      "detail": "/ 滚动余量 1028px / 滚到底视口留白 48px;/pool 滚动余量 1779px / 滚到底视口留白 48px;/stages 滚动余量 3724px / 滚到底视口留白 104px;/reports 滚动余量 1874px / 滚到底视口留白 104px"
+      "detail": "/ 滚动余量 1028px / 滚到底视口留白 48px;/pool 滚动余量 1779px / 滚到底视口留白 48px;/stages 滚动余量 3928px / 滚到底视口留白 104px;/reports 滚动余量 1931px / 滚到底视口留白 104px"
     }
   ],
   "errors": []

+ 7 - 7
src/pages/report-card.js

@@ -81,7 +81,7 @@ export const CARD_CSS = css`
   .rc .detail[open] { grid-template-rows: 1fr; opacity: 1; }
   /* 触发点是一条 11px 的「原文」小字:没原文就只留图标,不写「暂无」占一行 */
   .rc .detail > summary { height: 20px; box-sizing: border-box; overflow: hidden; }
-  .rc .detail summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.4; color: var(--kf-ink-3);
+  .rc .detail summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.4; color: var(--kf-ink-3);
     letter-spacing: var(--ls-cn-small); width: max-content; min-height: 20px; }
   .rc .detail.no-quote summary { color: var(--kf-ink-3); opacity: 0.7; }
   .rc .detail summary::-webkit-details-marker { display: none; }
@@ -118,7 +118,7 @@ export const CARD_CSS = css`
   .rc .q { font-size: 11px; color: var(--kf-ink-2); line-height: 1.6; display: flex; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm);
     background: color-mix(in srgb, var(--kf-ink) 4%, transparent); border: 1px solid color-mix(in srgb, var(--kf-ink) 8%, transparent); }
   .rc .q span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
-  .rc .src { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.4; color: var(--kf-ink-2); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--kf-line); min-width: 0; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
+  .rc .src { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--kf-ink-2); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--kf-line); min-width: 0; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
   .rc .src .av, .rc .src .who, .rc .src .it { flex: none; }
   /* 手机(任务书 1.3):来源四要素拆两行 —— 第一行「谁 + Agent」,第二行「方式 + 时间」;图标不变 */
   .rc .src .l1, .rc .src .l2 { display: contents; }
@@ -164,11 +164,11 @@ export const CARD_CSS = css`
   .row .sc b { color: var(--kf-ink); }
   .row .mono.nowrap { white-space: nowrap; }
   .row .up { display: inline-flex; color: var(--kf-ok-text); vertical-align: -0.15em; }
-  /* 页脚(v12 P2):一条收尾,不是空白 —— 左:本页数量;右:两个轻操作。
-     下内边距同时吃掉页尾的滚动余量(卡片区下面是一条看得见的收尾,不是往下无限留白)。 */
-  .cfoot { display: flex; align-items: center; gap: 8px; margin: var(--kf-space-card-gap) 0 0; padding: 12px 4px calc(48px + 8px); border-top: 1px solid var(--kf-line);
-    font-size: 12px; color: var(--kf-ink-3); }
-  .cfoot .cfl { margin-right: auto; font-variant-numeric: tabular-nums; }
+  /* 页脚(v12 P2):卡片区下面的一条「到此为止」收尾线 —— 横跨整行、居中,只写条数。
+     具体的操作(调整筛选 / 回到顶部)不在这里重复:筛选栏一直在吸顶位置,上滚一下就是它。 */
+  .cfoot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 48px 0 0; padding: 20px 4px 12px;
+    border-top: 1px solid var(--kf-line); font-size: 12px; color: var(--kf-ink-3); }
+  .cfoot .cfl { font-variant-numeric: tabular-nums; }
   .cfoot .cfb { appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; margin: 0;
     border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--r-sm); background: transparent;
     font: 500 12px/1 var(--kf-font); color: var(--kf-ink-2); cursor: pointer; transition: background var(--kf-dur) var(--kf-ease), color var(--kf-dur) var(--kf-ease); }

+ 7 - 7
src/pages/view-reports.js

@@ -64,8 +64,8 @@ export class ViewReports extends LitElement {
     .types > a { text-decoration: none; color: inherit; min-width: 0; padding: var(--kf-space-card); box-sizing: border-box; height: 100%; }
     /* 类型片:名称 + 份数 + 近 7 天 sparkline(形状)+ 阶段分布条形(形状)+ 最新一条。文字只剩名字与时间 */
     .t { display: grid; gap: var(--kf-space-in); min-width: 0; align-content: start; height: 100%; }
-    .t .src .it { max-width: 74px; font-size: 11px; }
-    .t .src .who { font-size: 11px; }
+    .t .src .it { max-width: 74px; font-size: 12px; }
+    .t .src .who { font-size: 12px; }
     .t .src .tm { margin-left: 0; }
     .t .h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 4px; }
     .t .ico { width: 32px; height: 32px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--kf-accent-ink);
@@ -84,10 +84,10 @@ export class ViewReports extends LitElement {
     .t .tr { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
     /* 五阶段分布:条形对比(板块二 2.3)替代百分比文字 */
     .t kf-bars { margin-top: 4px; color: var(--kf-accent); }
-    .t .stgmax { font-size: 11px; font-weight: 500; color: var(--kf-ink-3); margin-left: auto; white-space: nowrap; }
+    .t .stgmax { font-size: 12px; font-weight: 500; color: var(--kf-ink-3); margin-left: auto; white-space: nowrap; }
     .t .tr2 { display: flex; justify-content: flex-end; min-height: 16px; }
-    .t .tr .doc { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; letter-spacing: var(--ls-cn-small); color: var(--kf-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
-    .t .last { padding-top: 8px; border-top: 1px solid var(--kf-line); font-size: 11px; font-weight: 500; letter-spacing: var(--ls-cn-small); color: var(--kf-ink-3); min-height: 32px; }
+    .t .tr .doc { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; letter-spacing: var(--ls-cn-small); color: var(--kf-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
+    .t .last { padding-top: 8px; border-top: 1px solid var(--kf-line); font-size: 12px; font-weight: 500; letter-spacing: var(--ls-cn-small); color: var(--kf-ink-3); min-height: 32px; }
     .t .last .src { border-top: 0; padding-top: 0; margin-top: 0; }
     .t .last .src .av { display: none; }
     .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--kf-space-in); margin-top: var(--kf-space-in); }
@@ -156,7 +156,7 @@ export class ViewReports extends LitElement {
           </a>`)}
       </div>
 
-      ${matched.length < all.length ? section('清单', '筛选结果', html`<span>${matched.length} / ${all.length}</span>`) : ''}
+      ${section('清单', matched.length < all.length ? '筛选结果' : '全部卡片', html`<span>${t(`${matched.length} / ${all.length} 份`)}</span>`)}
       ${cardToolbar({ q, counts: cardFacetCounts(all, { ...q, mine: false }), whoList: this.#people(all), shown: matched.length, all: all.length, me: this.me, view: makeToolHandler(this) })}
 
       ${matched.length === 0
@@ -170,7 +170,7 @@ export class ViewReports extends LitElement {
               ${pg.items.map((e) => html`<kf-glass-card surface="2" lift @card-activate=${() => this.#open(e)}>${reportCard({ e, recent: recent(e), typeName: e.typeName, fit: true })}</kf-glass-card>`)}
             </div>`}
       ${/* v12 P2 (b):底部收尾 —— 条数 + 回筛选栏 + 回顶部。条数 < 一页时只留一条轻页脚,不铺分页 */ ''}
-      ${cardFooter({ shown: pg.items.length, all, filtered: matched.length !== all.length, label: '条成果',
+      ${cardFooter({ shown: pg.items.length, all: all.length, filtered: matched.length !== all.length, label: '条成果',
         onFilter: () => this.renderRoot.querySelector('[data-toolbar]')?.scrollIntoView({ behavior: 'smooth', block: 'center' }),
         onTop: () => window.scrollTo({ top: 0, behavior: 'smooth' }) })}
     `;

+ 1 - 0
src/pages/view-stages.js

@@ -127,6 +127,7 @@ export class ViewStages extends LitElement {
         ? html`<div class="cards" data-cards>${items.map((e) => html`<kf-glass-card surface="2" lift @card-activate=${() => this.#open(e)}>${reportCard({ e, expanded: true, fit: true })}</kf-glass-card>`)}</div>`
         : html`<kf-glass-card surface="1"><kf-empty title=${only ? t(`${only} 还没有产出`) : '还没有产出'} action-label=${only || evOnly || mineSel ? '清除筛选' : '去工作台'}
             @empty-action=${() => (only || evOnly || mineSel ? this.#set({ stage: '', ev: '', mine: '' }) : navigate('/'))}></kf-empty></kf-glass-card>`}
+      ${section('口径', '这一页怎么算', html`<span>${t(`按阶段分组,${mineSel ? '只看我的' : '全员'};同一份成果只归一个阶段`)}</span>`)}
       ${cardFooter({ shown: items.length, all: total, filtered: Boolean(only || evOnly || mineSel), label: '条产出',
         onFilter: () => this.renderRoot.querySelector('[data-overview]')?.scrollIntoView({ behavior: 'smooth', block: 'start' }),
         onTop: () => window.scrollTo({ top: 0, behavior: 'smooth' }) })}

+ 4 - 2
src/pages/view-workbench.js

@@ -125,8 +125,10 @@ export class ViewWorkbench extends LitElement {
       .latest { grid-template-columns: minmax(0, 1fr); gap: var(--kf-space-in); }
       .kpi b { font-size: 28px; }
       .kpi kf-spark { display: none; }
-      .stagebar { gap: 4px; }
-      .stg { padding: 6px 8px; }
+      /* 手机:五格放不下一行(39.3 宽 × 5 = 197px 还挤着环),改成两行三列 —— 不再把第五格挤出卡片 */
+      .stagebar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
+      .stg { padding: 8px; grid-template-columns: auto 1fr auto; }
+      .stg kf-ring { width: 32px; height: 32px; }
       .todo li { font-size: 14px; min-height: 44px; }
       .todo li a, .go, .hd .go { min-height: 44px; display: inline-flex; align-items: center; }
       .todo li a { flex: 1; min-width: 0; }