@morehao/dsh-github-trending 0.8.10 → 0.8.11

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 +36 -30
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.8.11] - 2026-11-02
4
+
5
+ ### Fixes
6
+
7
+ - **client**: 自更新恢复提示改为顶部常驻横条 (#96)
8
+
9
+ **Full Changelog**: https://github.com/morehao/dsh-github-trending/compare/v0.8.10...v0.8.11
10
+
3
11
  ## [v0.8.10] - 2026-11-02
4
12
 
5
13
  ### Features
package/client.js CHANGED
@@ -285,7 +285,8 @@ var DICT = {
285
285
  "shell.update.cancel": "取消",
286
286
  "restoreNotice.title": "已更新到 v{version}",
287
287
  "restoreNotice.titleBare": "更新已安装",
288
- "restoreNotice.body": "请彻底退出 DSH(⌘Q)再重新打开,更新才会生效。",
288
+ "restoreNotice.body": "请彻底退出 DSH(⌘Q)再重新打开,更新才会生效。此提示会保留到你点「知道了」。",
289
+ "restoreNotice.restart": "退出并重启",
289
290
  "restoreNotice.dismiss": "知道了",
290
291
  "time.in.minutes": "{minutes} 分钟后",
291
292
  "time.in.hours": "{hours} 小时 {minutes} 分后",
@@ -835,7 +836,8 @@ var DICT = {
835
836
  "shell.update.cancel": "Cancel",
836
837
  "restoreNotice.title": "Updated to v{version}",
837
838
  "restoreNotice.titleBare": "Update installed",
838
- "restoreNotice.body": "Quit DSH completely (⌘Q) and reopen it so the update takes effect.",
839
+ "restoreNotice.body": "Quit DSH completely (⌘Q) and reopen it so the update takes effect. This notice stays until you click Got it.",
840
+ "restoreNotice.restart": "Quit & Restart",
839
841
  "restoreNotice.dismiss": "Got it",
840
842
  "time.in.minutes": "in {minutes} min",
841
843
  "time.in.hours": "in {hours} h {minutes} min",
@@ -1244,13 +1246,14 @@ var CSS = `
1244
1246
  .dshgt-modal-mask{position:fixed;inset:0;background:var(--dsw-alias-bg-mask-1,rgba(15,23,42,.38));display:flex;align-items:center;justify-content:center;z-index:2147483000;}
1245
1247
  .dshgt-modal{background:var(--gt-bg);border-radius:12px;border:1px solid var(--gt-border);max-width:640px;width:calc(100% - 32px);max-height:80vh;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:10px;box-shadow:0 20px 50px rgba(15,23,42,.25);}
1246
1248
 
1247
- /* ——— 自更新后的恢复提示(右下角,约 6 秒后自动消失) ——— */
1248
- .dshgt-restore{position:fixed;right:20px;bottom:20px;z-index:2147483000;max-width:360px;display:flex;flex-direction:column;gap:10px;padding:14px 16px;border-radius:12px;border:1px solid var(--gt-border);background:var(--gt-bg);box-shadow:0 16px 40px rgba(15,23,42,.28);animation:dshgt-restore-in .18s ease-out;}
1249
- .dshgt-restore-text{display:flex;flex-direction:column;gap:4px;}
1250
- .dshgt-restore-title{font-size:13px;font-weight:600;color:var(--gt-fg);}
1251
- .dshgt-restore-body{font-size:12px;line-height:1.5;color:var(--gt-muted);}
1252
- .dshgt-restore-actions{display:flex;justify-content:flex-end;gap:8px;}
1253
- @keyframes dshgt-restore-in{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}
1249
+ /* ——— 自更新后的恢复提示(正文顶部醒目横条,点「知道了」才收起) ——— */
1250
+ .dshgt-restore{flex:none;display:flex;align-items:flex-start;gap:12px;padding:12px 16px;border-radius:10px;border:1px solid color-mix(in srgb,var(--gt-accent) 45%,var(--gt-border));border-left:4px solid var(--gt-accent);background:color-mix(in srgb,var(--gt-accent) 9%,var(--gt-bg));animation:dshgt-restore-in .18s ease-out;}
1251
+ .dshgt-restore-icon{flex:none;width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:1;color:var(--gt-accent);background:color-mix(in srgb,var(--gt-accent) 16%,transparent);}
1252
+ .dshgt-restore-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;}
1253
+ .dshgt-restore-title{font-size:13.5px;font-weight:600;color:var(--gt-fg);}
1254
+ .dshgt-restore-body{font-size:12.5px;line-height:1.5;color:var(--gt-muted);}
1255
+ .dshgt-restore-actions{flex:none;display:flex;align-items:center;gap:8px;align-self:center;}
1256
+ @keyframes dshgt-restore-in{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:translateY(0);}}
1254
1257
 
1255
1258
  /* ——— GitHub 设备码登录弹窗 ——— */
1256
1259
  .dshgt-authmodal{max-width:420px;gap:14px;}
@@ -1534,13 +1537,13 @@ var CSS = `
1534
1537
  .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
1538
  .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
1539
  .dshgt-about-close:focus-visible{outline:2px solid color-mix(in srgb,var(--gt-accent) 45%,transparent);outline-offset:1px;}
1537
- /* 应用身份:顶部渐变横幅(Hero),logo / 名称 / 版本胶囊居中;用背景替代纯留白,收窄整体高度 */
1538
- .dshgt-about-identity{position:relative;margin:-16px -16px 0;padding:16px;border-radius:12px 12px 0 0;display:flex;flex-direction:column;align-items:center;gap:7px;border-bottom:1px solid var(--gt-border);background:radial-gradient(120% 150% at 50% 0%,color-mix(in srgb,var(--gt-accent) 15%,var(--gt-bg)),var(--gt-bg));}
1539
- .dshgt-about-logo svg{width:32px;height:32px;border-radius:12px;display:block;box-shadow:0 3px 10px rgba(0,0,0,.16);}
1540
+ /* 应用身份:logo / 名称 / 版本胶囊居中;与信息表整卡同色(不再用渐变、无分隔边、无图标阴影) */
1541
+ .dshgt-about-identity{position:relative;margin:-16px -16px 0;padding:16px;border-radius:12px 12px 0 0;display:flex;flex-direction:column;align-items:center;gap:7px;background:var(--gt-bg);}
1542
+ .dshgt-about-logo svg{width:32px;height:32px;border-radius:12px;display:block;}
1540
1543
  .dshgt-about-name{font-size:13.5px;font-weight:680;letter-spacing:-.01em;line-height:1.2;}
1541
1544
  .dshgt-about-ver{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;color:var(--gt-fg);background:var(--gt-card);border:1px solid var(--gt-border);border-radius:999px;padding:0 8px;line-height:16px;}
1542
- /* 信息表:上方一条分割线,左对齐 label/value */
1543
- .dshgt-about .dshgt-kv{grid-template-columns:88px minmax(0,1fr);border-top:1px solid var(--gt-border);padding-top:2px;}
1545
+ /* 信息表:无上方分割线,左对齐 label/value */
1546
+ .dshgt-about .dshgt-kv{grid-template-columns:88px minmax(0,1fr);padding-top:2px;}
1544
1547
  .dshgt-about .dshgt-kv a{color:var(--gt-accent);text-decoration:none;}
1545
1548
  .dshgt-about .dshgt-kv a:hover{text-decoration:underline;}
1546
1549
  .dshgt-about .dshgt-kv dd{min-width:0;overflow-wrap:anywhere;}
@@ -5936,16 +5939,12 @@ function IdentityBar(props) {
5936
5939
  }
5937
5940
 
5938
5941
  // client/restore-notice.ts
5939
- var AUTO_DISMISS_MS = 6e3;
5940
- function RestoreNotice({ t, version, onDismiss }) {
5941
- import_react.default.useEffect(() => {
5942
- const timer = setTimeout(() => onDismiss(), AUTO_DISMISS_MS);
5943
- return () => clearTimeout(timer);
5944
- }, [onDismiss]);
5942
+ function RestoreNotice({ t, version, onDismiss, onRestart }) {
5945
5943
  const title = version !== void 0 && version !== "" ? t("restoreNotice.title", { version }) : t("restoreNotice.titleBare");
5946
5944
  return h(
5947
5945
  "div",
5948
5946
  { className: "dshgt-restore", role: "status", "aria-live": "polite" },
5947
+ h("span", { className: "dshgt-restore-icon", "aria-hidden": "true" }, "⟳"),
5949
5948
  h(
5950
5949
  "div",
5951
5950
  { className: "dshgt-restore-text" },
@@ -5955,7 +5954,8 @@ function RestoreNotice({ t, version, onDismiss }) {
5955
5954
  h(
5956
5955
  "div",
5957
5956
  { className: "dshgt-restore-actions" },
5958
- h(Btn, { small: true, variant: "primary", onClick: () => onDismiss() }, t("restoreNotice.dismiss"))
5957
+ onRestart === void 0 ? null : h(Btn, { small: true, variant: "primary", onClick: () => onRestart() }, t("restoreNotice.restart")),
5958
+ h(Btn, { small: true, onClick: () => onDismiss() }, t("restoreNotice.dismiss"))
5959
5959
  )
5960
5960
  );
5961
5961
  }
@@ -6144,6 +6144,20 @@ function apply(ctx) {
6144
6144
  h(
6145
6145
  "div",
6146
6146
  { className: "dshgt-app" },
6147
+ pendingUpdate === null ? null : h(RestoreNotice, {
6148
+ t,
6149
+ version: pendingUpdate.to,
6150
+ onRestart: () => {
6151
+ const reloader = ctx.restart;
6152
+ if (typeof reloader === "function") reloader();
6153
+ clearPendingUpdate();
6154
+ setPendingUpdate(null);
6155
+ },
6156
+ onDismiss: () => {
6157
+ clearPendingUpdate();
6158
+ setPendingUpdate(null);
6159
+ }
6160
+ }),
6147
6161
  plugin === void 0 ? null : h(IdentityBar, { t, plugin, onOpenAbout: openAbout }),
6148
6162
  h(
6149
6163
  "div",
@@ -6236,15 +6250,7 @@ function apply(ctx) {
6236
6250
  h("div", { className: "dshgt-main-body" }, view === "settings" ? viewNode : h("div", { className: "dshgt-scroll" }, viewNode))
6237
6251
  )
6238
6252
  ),
6239
- aboutOpen && state !== null ? h(AboutDialog, { t, state, onClose: () => setAboutOpen(false) }) : null,
6240
- pendingUpdate ? h(RestoreNotice, {
6241
- t,
6242
- version: pendingUpdate.to,
6243
- onDismiss: () => {
6244
- clearPendingUpdate();
6245
- setPendingUpdate(null);
6246
- }
6247
- }) : null
6253
+ aboutOpen && state !== null ? h(AboutDialog, { t, state, onClose: () => setAboutOpen(false) }) : null
6248
6254
  );
6249
6255
  }
6250
6256
  disposers.push(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morehao/dsh-github-trending",
3
- "version": "0.8.10",
3
+ "version": "0.8.11",
4
4
  "description": "GitHub 趋势日报的 DeepSeek Harness 插件:按日 / 周 / 月周期定时 spawn 本地 trendradar 核心,抓取 Trending、生成中文简介与周期总结,并可选把订阅仓库的新 Release 合成中文摘要,一起提交到你的仓库、自动开 PR 合并;内置概览 / 榜单 / 运行记录 / 订阅 / 设置工作台。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",