@morehao/dsh-github-trending 0.8.8 → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.js +77 -31
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.8.9] - 2026-11-02
4
+
5
+ ### Fixes
6
+
7
+ - **client**: 修复宽屏自适应、运行记录筛选与关于弹层 (#90)
8
+
9
+ **Full Changelog**: https://github.com/morehao/dsh-github-trending/compare/v0.8.8...v0.8.9
10
+
3
11
  ## [v0.8.7] - 2026-11-02
4
12
 
5
13
  ### Features
package/client.js CHANGED
@@ -332,6 +332,7 @@ var DICT = {
332
332
  "runs.filter.monthly": "月榜",
333
333
  "runs.filter.failed": "失败",
334
334
  "runs.filter.dry": "试跑",
335
+ "runs.filterHintSubs": "周期 / 试跑筛选仅对日报有效,订阅不受此限制",
335
336
  "runs.type.all": "全部",
336
337
  "runs.type.digest": "日报",
337
338
  "runs.type.release": "订阅",
@@ -881,6 +882,7 @@ var DICT = {
881
882
  "runs.filter.monthly": "Monthly",
882
883
  "runs.filter.failed": "Failed",
883
884
  "runs.filter.dry": "Dry run",
885
+ "runs.filterHintSubs": "Period / dry-run filters apply to digests only; subscriptions are exempt",
884
886
  "runs.type.all": "All",
885
887
  "runs.type.digest": "Digest",
886
888
  "runs.type.release": "Subs",
@@ -1231,6 +1233,7 @@ var CSS = `
1231
1233
  .dshgt-period{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--gt-fg);}
1232
1234
  .dshgt-period-check{color:var(--gt-ok);font-size:12px;line-height:1;}
1233
1235
  .dshgt-chip{appearance:none;font:inherit;cursor:pointer;border:1px solid var(--gt-border);background:var(--gt-bg);border-radius:999px;padding:2px 10px;font-size:12px;color:var(--gt-muted);}
1236
+ .dshgt-chip:disabled{cursor:not-allowed;opacity:.4;}
1234
1237
  .dshgt-chip[aria-pressed="true"]{background:color-mix(in srgb,var(--gt-accent) 14%,var(--gt-bg));border-color:var(--gt-accent);color:var(--gt-fg);}
1235
1238
  .dshgt-switch{appearance:none;cursor:pointer;width:36px;height:20px;border-radius:999px;border:1px solid var(--gt-border);background:var(--gt-muted);position:relative;transition:background .15s;}
1236
1239
  .dshgt-switch::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .15s;}
@@ -1303,8 +1306,11 @@ var CSS = `
1303
1306
  .dshgt-head-actions{margin-left:auto;display:flex;align-items:center;gap:8px;padding-top:2px;flex:none;}
1304
1307
  .dshgt-main-body{flex:1;min-height:0;display:flex;min-width:0;}
1305
1308
  .dshgt-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;}
1306
- .dshgt-main-body > .dshgt-settings{flex:1;min-height:0;padding:16px 24px 20px;}
1307
- .dshgt-view{padding:22px 30px 38px;max-width:1180px;width:100%;display:flex;flex-direction:column;gap:18px;}
1309
+ .dshgt-main-body > .dshgt-settings{flex:1;min-height:0;padding:16px 24px 20px;width:100%;max-width:1240px;margin-inline:auto;}
1310
+ /* 视图区随可用宽度自适应:不再硬卡 1180,避免超宽屏右侧留大片空白。
1311
+ 结构化内容(卡片 / 网格 / 表格 / 列表)铺满;只有长文阅读块(日报正文、空态说明)
1312
+ 单独限制行宽并居中,保证可读性。与 .dshgt-page-head 的左/右内边距保持一致。 */
1313
+ .dshgt-view{padding:22px 30px 38px;width:100%;display:flex;flex-direction:column;gap:18px;}
1308
1314
  .dshgt-grow{flex:1;min-width:0;}
1309
1315
  .dshgt-dim{font-size:12px;color:var(--gt-muted);}
1310
1316
  .dshgt-empty{padding:48px 0;text-align:center;color:var(--gt-muted);font-size:13px;}
@@ -1404,14 +1410,17 @@ var CSS = `
1404
1410
  @keyframes dshgt-spin{to{transform:rotate(360deg);}}
1405
1411
 
1406
1412
  /* ——— 日报 ——— */
1413
+ /* 日报是阅读页:整列(工具栏 + 纸面)统一限宽并居中,避免超宽屏下工具栏与正文两段式错位。 */
1407
1414
  .dshgt-digest{padding-top:20px;gap:12px;}
1415
+ .dshgt-digest > *{width:100%;max-width:920px;margin-inline:auto;}
1408
1416
  .dshgt-digest-subbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
1409
1417
  .dshgt-datenav{display:flex;align-items:center;gap:2px;border:1px solid var(--gt-border);border-radius:8px;background:var(--gt-card);padding:2px;}
1410
1418
  .dshgt-icon-btn{width:28px;height:28px;display:grid;place-items:center;border:1px solid transparent;background:var(--gt-bg);border-radius:6px;color:var(--gt-fg);font-family:inherit;font-size:18px;line-height:1;cursor:pointer;flex:none;}
1411
1419
  .dshgt-icon-btn:hover:not(:disabled){background:color-mix(in srgb,var(--gt-fg) 7%,var(--gt-bg));border-color:var(--gt-border);}
1412
1420
  .dshgt-icon-btn:disabled{opacity:.3;cursor:not-allowed;}
1413
1421
  .dshgt-dateselect{appearance:none;height:28px;border:0;background:transparent;font-family:inherit;font-size:13px;color:var(--gt-fg);padding:0 8px;min-width:210px;max-width:320px;cursor:pointer;}
1414
- .dshgt-digest-sheet{max-width:900px;width:100%;border:1px solid var(--gt-border);border-radius:12px;background:var(--gt-card);overflow:hidden;}
1422
+ /* 日报预览纸面:阅读类长文,限制行宽。整体列宽由 .dshgt-digest 视图统一居中约束。 */
1423
+ .dshgt-digest-sheet{max-width:920px;width:100%;border:1px solid var(--gt-border);border-radius:12px;background:var(--gt-card);overflow:hidden;}
1415
1424
  .dshgt-digest-body{display:flex;flex-direction:column;min-width:0;}
1416
1425
  .dshgt-digest-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid color-mix(in srgb,var(--gt-border) 70%,transparent);background:color-mix(in srgb,var(--gt-fg) 2.5%,var(--gt-card));}
1417
1426
  .dshgt-seg{display:inline-flex;border:1px solid var(--gt-border);border-radius:8px;padding:2px;background:var(--gt-bg);gap:2px;}
@@ -1483,7 +1492,10 @@ var CSS = `
1483
1492
 
1484
1493
  /* ——— 运行记录 ——— */
1485
1494
  .dshgt-runs-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
1486
- .dshgt-runs-filter{display:flex;gap:4px;margin-left:auto;}
1495
+ .dshgt-runs-filter{display:flex;align-items:center;gap:4px;margin-left:auto;flex-wrap:wrap;}
1496
+ /* 两个筛选维度:记录类型 与 周期/状态,用竖线隔开,避免同名胶囊混淆。 */
1497
+ .dshgt-chipgroup{display:flex;align-items:center;gap:4px;flex-wrap:wrap;}
1498
+ .dshgt-chipgroup-sep{width:1px;align-self:stretch;min-height:14px;background:var(--gt-border);margin:0 4px;}
1487
1499
  .dshgt-run-list{border-top:1px solid var(--gt-border);}
1488
1500
  .dshgt-run-item{border-bottom:1px solid color-mix(in srgb,var(--gt-border) 70%,transparent);}
1489
1501
  .dshgt-run-row{display:grid;grid-template-columns:18px 120px 56px minmax(0,1fr) 78px 74px 20px;align-items:center;gap:12px;min-height:52px;width:100%;padding:0 6px;border:0;background:none;text-align:left;font-family:inherit;color:var(--gt-fg);cursor:pointer;border-radius:6px;}
@@ -1519,10 +1531,11 @@ var CSS = `
1519
1531
  .dshgt-about{max-width:460px;width:100%;}
1520
1532
  .dshgt-about-head{display:flex;align-items:center;gap:10px;}
1521
1533
  .dshgt-about-title{margin:0;font-size:15px;font-weight:600;}
1522
- .dshgt-about-close{margin-left:auto;appearance:none;font:inherit;font-size:12px;cursor:pointer;border-radius:7px;border:1px solid var(--gt-border);background:var(--gt-bg);padding:4px 11px;color:var(--gt-muted);}
1523
- .dshgt-about-close:hover{color:var(--gt-fg);border-color:color-mix(in srgb,var(--gt-accent) 40%,var(--gt-border));}
1534
+ .dshgt-about-close{margin-left:auto;flex:none;display:grid;place-items:center;width:28px;height:28px;padding:0;appearance:none;font:inherit;cursor:pointer;border-radius:7px;border:1px solid transparent;background:transparent;color:var(--gt-muted);}
1535
+ .dshgt-about-close:hover{color:var(--gt-fg);background:color-mix(in srgb,var(--gt-fg) 7%,var(--gt-bg));border-color:var(--gt-border);}
1536
+ .dshgt-about-close:focus-visible{outline:2px solid color-mix(in srgb,var(--gt-accent) 45%,transparent);outline-offset:1px;}
1524
1537
  /* 居中的应用身份区块:logo / 名称 / 版本胶囊 */
1525
- .dshgt-about-identity{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 0 18px;}
1538
+ .dshgt-about-identity{display:flex;flex-direction:column;align-items:center;gap:8px;padding:4px 0 16px;}
1526
1539
  .dshgt-about-logo svg{width:56px;height:56px;border-radius:14px;display:block;box-shadow:0 4px 14px rgba(0,0,0,.18);}
1527
1540
  .dshgt-about-name{font-size:16px;font-weight:650;letter-spacing:-.01em;}
1528
1541
  .dshgt-about-ver{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;color:var(--gt-fg);background:var(--gt-card);border:1px solid var(--gt-border);border-radius:999px;padding:1px 9px;line-height:17px;}
@@ -3944,38 +3957,51 @@ function RunsView(props) {
3944
3957
  h(
3945
3958
  "div",
3946
3959
  { className: "dshgt-runs-filter" },
3947
- KINDS.map(
3948
- (item) => h(
3949
- "button",
3950
- {
3951
- key: item.id,
3952
- type: "button",
3953
- className: "dshgt-chip",
3954
- "aria-pressed": kind === item.id ? "true" : "false",
3955
- onClick: () => {
3956
- setKind(item.id);
3957
- if (item.id === "release") setFilter("all");
3958
- }
3959
- },
3960
- t(item.key)
3961
- )
3962
- ),
3963
- kind === "release" ? null : h("span", { key: "sep", className: "dshgt-hint" }, "·"),
3964
- kind === "release" ? null : FILTERS.filter((item) => item.id !== "all").map(
3965
- (item) => (
3966
- // 再点一次当前项 = 取消该筛选,这样不必再摆一个和「全部」重名的胶囊。
3967
- h(
3960
+ // 记录类型:全部 / 日报 / 订阅,始终可选。
3961
+ h(
3962
+ "div",
3963
+ { key: "kind", className: "dshgt-chipgroup" },
3964
+ KINDS.map(
3965
+ (item) => h(
3968
3966
  "button",
3969
3967
  {
3970
3968
  key: item.id,
3971
3969
  type: "button",
3972
3970
  className: "dshgt-chip",
3973
- "aria-pressed": filter === item.id ? "true" : "false",
3974
- onClick: () => setFilter(filter === item.id ? "all" : item.id)
3971
+ "aria-pressed": kind === item.id ? "true" : "false",
3972
+ onClick: () => {
3973
+ setKind(item.id);
3974
+ if (item.id === "release") setFilter("all");
3975
+ }
3975
3976
  },
3976
3977
  t(item.key)
3977
3978
  )
3978
3979
  )
3980
+ ),
3981
+ // 周期 / 状态:只对日报有意义。切到订阅时不清空标签,而是置灰禁用,
3982
+ // 让筛选维度保持可见、只是不适用,避免出现「选项突然变少」的错觉。
3983
+ h("span", { key: "sep", className: "dshgt-chipgroup-sep", "aria-hidden": "true" }),
3984
+ h(
3985
+ "div",
3986
+ { key: "filter", className: "dshgt-chipgroup" },
3987
+ FILTERS.filter((item) => item.id !== "all").map(
3988
+ (item) => (
3989
+ // 再点一次当前项 = 取消该筛选,这样不必再摆一个和「全部」重名的胶囊。
3990
+ h(
3991
+ "button",
3992
+ {
3993
+ key: item.id,
3994
+ type: "button",
3995
+ className: "dshgt-chip",
3996
+ "aria-pressed": filter === item.id ? "true" : "false",
3997
+ disabled: kind === "release",
3998
+ title: kind === "release" ? t("runs.filterHintSubs") : void 0,
3999
+ onClick: () => setFilter(filter === item.id ? "all" : item.id)
4000
+ },
4001
+ t(item.key)
4002
+ )
4003
+ )
4004
+ )
3979
4005
  )
3980
4006
  )
3981
4007
  ),
@@ -5558,7 +5584,27 @@ function AboutDialog(props) {
5558
5584
  "div",
5559
5585
  { className: "dshgt-about-head" },
5560
5586
  h("h3", { className: "dshgt-about-title" }, t("about.title")),
5561
- h("button", { type: "button", className: "dshgt-about-close", onClick: () => props.onClose() }, t("about.close"))
5587
+ h(
5588
+ "button",
5589
+ {
5590
+ type: "button",
5591
+ className: "dshgt-about-close",
5592
+ title: t("about.close"),
5593
+ "aria-label": t("about.close"),
5594
+ onClick: () => props.onClose()
5595
+ },
5596
+ h(
5597
+ "svg",
5598
+ { viewBox: "0 0 16 16", width: 16, height: 16, "aria-hidden": "true", focusable: "false" },
5599
+ h("path", {
5600
+ d: "M4 4l8 8M12 4l-8 8",
5601
+ fill: "none",
5602
+ stroke: "currentColor",
5603
+ strokeWidth: 1.6,
5604
+ strokeLinecap: "round"
5605
+ })
5606
+ )
5607
+ )
5562
5608
  ),
5563
5609
  h(
5564
5610
  "div",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morehao/dsh-github-trending",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "description": "GitHub 趋势日报的 DeepSeek Harness 插件:按日 / 周 / 月周期定时 spawn 本地 trendradar 核心,抓取 Trending、生成中文简介与周期总结,并可选把订阅仓库的新 Release 合成中文摘要,一起提交到你的仓库、自动开 PR 合并;内置概览 / 榜单 / 运行记录 / 订阅 / 设置工作台。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",