@morehao/dsh-github-trending 0.8.11 → 0.8.13
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.
- package/CHANGELOG.md +8 -0
- package/client.js +217 -100
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/client.js
CHANGED
|
@@ -278,16 +278,17 @@ var DICT = {
|
|
|
278
278
|
"shell.update.failed": "更新失败",
|
|
279
279
|
"shell.update.checkFailed": "检查失败,可稍后重试",
|
|
280
280
|
"shell.update.available": "有新版本 v{latest}",
|
|
281
|
+
"shell.update.badgeTitle": "最新版本 v{version}",
|
|
281
282
|
"shell.update.latest": "已是最新 v{version}",
|
|
282
283
|
"shell.update.apply": "更新到 v{version}",
|
|
283
284
|
"shell.update.confirmHint": "更新会重装插件,需重启 DSH 生效",
|
|
284
285
|
"shell.update.confirmYes": "确认更新",
|
|
285
286
|
"shell.update.cancel": "取消",
|
|
286
287
|
"restoreNotice.title": "已更新到 v{version}",
|
|
288
|
+
"restoreNotice.titleInstalled": "新版本已安装",
|
|
287
289
|
"restoreNotice.titleBare": "更新已安装",
|
|
288
|
-
"restoreNotice.body": "请彻底退出 DSH(⌘Q
|
|
289
|
-
"restoreNotice.
|
|
290
|
-
"restoreNotice.dismiss": "知道了",
|
|
290
|
+
"restoreNotice.body": "请彻底退出 DSH(⌘Q)再重新打开,更新才会生效。",
|
|
291
|
+
"restoreNotice.dismiss": "关闭",
|
|
291
292
|
"time.in.minutes": "{minutes} 分钟后",
|
|
292
293
|
"time.in.hours": "{hours} 小时 {minutes} 分后",
|
|
293
294
|
"time.in.days": "{days} 天后",
|
|
@@ -829,16 +830,17 @@ var DICT = {
|
|
|
829
830
|
"shell.update.failed": "Update failed",
|
|
830
831
|
"shell.update.checkFailed": "Check failed, try again later",
|
|
831
832
|
"shell.update.available": "v{latest} available",
|
|
833
|
+
"shell.update.badgeTitle": "Latest version v{version}",
|
|
832
834
|
"shell.update.latest": "Up to date · v{version}",
|
|
833
835
|
"shell.update.apply": "Update to v{version}",
|
|
834
836
|
"shell.update.confirmHint": "Reinstalls the plugin; restart DSH to apply",
|
|
835
837
|
"shell.update.confirmYes": "Confirm",
|
|
836
838
|
"shell.update.cancel": "Cancel",
|
|
837
839
|
"restoreNotice.title": "Updated to v{version}",
|
|
840
|
+
"restoreNotice.titleInstalled": "New version installed",
|
|
838
841
|
"restoreNotice.titleBare": "Update installed",
|
|
839
|
-
"restoreNotice.body": "Quit DSH completely (⌘Q) and reopen it so the update takes effect.
|
|
840
|
-
"restoreNotice.
|
|
841
|
-
"restoreNotice.dismiss": "Got it",
|
|
842
|
+
"restoreNotice.body": "Quit DSH completely (⌘Q) and reopen it so the update takes effect.",
|
|
843
|
+
"restoreNotice.dismiss": "Close",
|
|
842
844
|
"time.in.minutes": "in {minutes} min",
|
|
843
845
|
"time.in.hours": "in {hours} h {minutes} min",
|
|
844
846
|
"time.in.days": "in {days} d",
|
|
@@ -1178,7 +1180,7 @@ var CSS = `
|
|
|
1178
1180
|
.dshgt-tab[aria-selected="true"]{color:var(--gt-fg);border-bottom-color:var(--gt-accent);font-weight:600;white-space:nowrap;}
|
|
1179
1181
|
.dshgt-shell{height:100%;min-height:0;overflow:hidden;}
|
|
1180
1182
|
.dshgt-content{flex:1;min-height:0;display:flex;}
|
|
1181
|
-
.dshgt-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;
|
|
1183
|
+
.dshgt-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;}
|
|
1182
1184
|
.dshgt-settings{flex:1;min-height:0;display:grid;grid-template-columns:150px minmax(0,1fr);gap:16px;}
|
|
1183
1185
|
.dshgt-vtabs{display:flex;flex-direction:column;gap:2px;border-right:1px solid var(--gt-border);padding-right:8px;overflow-y:auto;}
|
|
1184
1186
|
.dshgt-vtab{appearance:none;border:none;background:none;text-align:left;padding:7px 10px;border-radius:7px;color:var(--gt-muted);cursor:pointer;font:inherit;font-size:12px;display:flex;align-items:center;gap:6px;}
|
|
@@ -1246,14 +1248,22 @@ var CSS = `
|
|
|
1246
1248
|
.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;}
|
|
1247
1249
|
.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);}
|
|
1248
1250
|
|
|
1249
|
-
/* ———
|
|
1250
|
-
.dshgt-restore{
|
|
1251
|
-
.dshgt-restore
|
|
1252
|
-
.dshgt-restore-
|
|
1253
|
-
.dshgt-restore-
|
|
1254
|
-
.dshgt-restore-
|
|
1255
|
-
.dshgt-restore-
|
|
1256
|
-
|
|
1251
|
+
/* ——— 自更新后的恢复提示:居中弹层,唯一动作「关闭」,版本跨栏当主角 ——— */
|
|
1252
|
+
.dshgt-restore-mask{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--dsw-alias-bg-mask-1,rgba(15,23,42,.38));animation:dshgt-restore-mask-in .14s ease-out;}
|
|
1253
|
+
.dshgt-restore{width:100%;max-width:448px;padding:18px 20px 12px;border-radius:10px;border:1px solid var(--gt-border);background:var(--gt-bg);box-shadow:0 24px 60px rgba(15,23,42,.28),0 2px 8px rgba(15,23,42,.08);animation:dshgt-restore-in .16s cubic-bezier(.2,.8,.3,1);}
|
|
1254
|
+
.dshgt-restore-versions{display:flex;align-items:center;gap:8px;}
|
|
1255
|
+
.dshgt-restore-version{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-weight:500;line-height:24px;color:var(--gt-muted);}
|
|
1256
|
+
.dshgt-restore-version.is-new{font-weight:650;padding:0 8px;border-radius:6px;color:var(--gt-accent);background:color-mix(in srgb,var(--gt-accent) 9%,var(--gt-bg));}
|
|
1257
|
+
.dshgt-restore-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--gt-muted);}
|
|
1258
|
+
.dshgt-restore-title{font-size:15px;font-weight:600;letter-spacing:-.008em;color:var(--gt-fg);}
|
|
1259
|
+
.dshgt-restore-versions + .dshgt-restore-title{margin-top:12px;}
|
|
1260
|
+
.dshgt-restore-body{margin:5px 0 0;font-size:13px;line-height:1.6;color:var(--gt-muted);}
|
|
1261
|
+
.dshgt-restore-foot{display:flex;justify-content:flex-end;margin-top:14px;}
|
|
1262
|
+
.dshgt-restore-close{appearance:none;font:inherit;font-size:13px;cursor:pointer;padding:5px 10px;border-radius:7px;border:1px solid transparent;background:none;color:var(--gt-accent);}
|
|
1263
|
+
.dshgt-restore-close:hover{background:color-mix(in srgb,var(--gt-accent) 10%,transparent);}
|
|
1264
|
+
@keyframes dshgt-restore-in{from{opacity:0;transform:translateY(6px) scale(.985);}to{opacity:1;transform:none;}}
|
|
1265
|
+
@keyframes dshgt-restore-mask-in{from{opacity:0;}to{opacity:1;}}
|
|
1266
|
+
@media (prefers-reduced-motion:reduce){.dshgt-restore-mask,.dshgt-restore{animation:none;}}
|
|
1257
1267
|
|
|
1258
1268
|
/* ——— GitHub 设备码登录弹窗 ——— */
|
|
1259
1269
|
.dshgt-authmodal{max-width:420px;gap:14px;}
|
|
@@ -1272,7 +1282,11 @@ var CSS = `
|
|
|
1272
1282
|
|
|
1273
1283
|
/* ——— 01 工作台外壳 ——— */
|
|
1274
1284
|
.dshgt-shell{gap:0;height:100%;min-height:0;overflow:hidden;}
|
|
1275
|
-
|
|
1285
|
+
/* 全页统一内容框:五个 tab 的身份条 / tab 条 / 页头 / 正文共用同一条
|
|
1286
|
+
「内容宽度 + 左右留白」规则,宽屏居中、窄屏退化为最小 gutter。
|
|
1287
|
+
页面内不要再给单个视图加 max-width / margin-inline:auto,否则又会出现
|
|
1288
|
+
一半居中一半靠左。 */
|
|
1289
|
+
.dshgt-app{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--gt-bg);--dshgt-frame:1100px;--dshgt-gutter:30px;--dshgt-inset:max(var(--dshgt-gutter),calc((100% - var(--dshgt-frame)) / 2));}
|
|
1276
1290
|
.dshgt-rail{background:color-mix(in srgb,var(--gt-fg) 3%,var(--gt-bg));border-right:1px solid var(--gt-border);display:flex;flex-direction:column;padding:14px 10px 12px;min-height:0;overflow:hidden;}
|
|
1277
1291
|
.dshgt-brand{display:flex;align-items:center;gap:9px;padding:2px 6px 16px;}
|
|
1278
1292
|
.dshgt-brand svg{flex:none;border-radius:8px;}
|
|
@@ -1302,18 +1316,18 @@ var CSS = `
|
|
|
1302
1316
|
.dshgt-pkg-copy:hover{background:color-mix(in srgb,var(--gt-fg) 7%,var(--gt-bg));color:var(--gt-fg);}
|
|
1303
1317
|
.dshgt-pkg-copy:disabled{opacity:.4;cursor:not-allowed;}
|
|
1304
1318
|
.dshgt-main{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--gt-bg);}
|
|
1305
|
-
.dshgt-page-head{display:flex;align-items:flex-start;gap:16px;padding:20px
|
|
1319
|
+
.dshgt-page-head{display:flex;align-items:flex-start;gap:16px;padding:20px var(--dshgt-inset) 14px;border-bottom:1px solid color-mix(in srgb,var(--gt-border) 70%,transparent);flex:none;}
|
|
1306
1320
|
.dshgt-page-heading{min-width:0;}
|
|
1307
1321
|
.dshgt-page-head h1{margin:0;font-size:21px;line-height:1.25;font-weight:650;letter-spacing:-.012em;}
|
|
1308
1322
|
.dshgt-dek{margin:4px 0 0;font-size:13px;color:var(--gt-muted);max-width:580px;line-height:1.5;}
|
|
1309
1323
|
.dshgt-head-actions{margin-left:auto;display:flex;align-items:center;gap:8px;padding-top:2px;flex:none;}
|
|
1310
1324
|
.dshgt-main-body{flex:1;min-height:0;display:flex;min-width:0;}
|
|
1311
|
-
.dshgt-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;}
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
.dshgt-view{padding:22px
|
|
1325
|
+
.dshgt-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable both-edges;}
|
|
1326
|
+
/* 设置页不在 .dshgt-scroll 里(自己管理左右分栏滚动),但内容框必须与其它四页完全一致。 */
|
|
1327
|
+
.dshgt-main-body > .dshgt-settings{flex:1;min-height:0;padding:22px var(--dshgt-inset) 30px;width:100%;}
|
|
1328
|
+
/* 五个 tab 共用同一个内容框:宽屏居中、窄屏贴最小 gutter;内容本身铺满框内宽度。
|
|
1329
|
+
只有空态文案这类「短句」用 text-align / 自身 max-width 控制,不再靠外层居中。 */
|
|
1330
|
+
.dshgt-view{padding:22px var(--dshgt-inset) 38px;width:100%;display:flex;flex-direction:column;gap:18px;}
|
|
1317
1331
|
.dshgt-grow{flex:1;min-width:0;}
|
|
1318
1332
|
.dshgt-dim{font-size:12px;color:var(--gt-muted);}
|
|
1319
1333
|
.dshgt-empty{padding:48px 0;text-align:center;color:var(--gt-muted);font-size:13px;}
|
|
@@ -1321,7 +1335,7 @@ var CSS = `
|
|
|
1321
1335
|
.dshgt-inline-tag{margin-left:6px;vertical-align:1px;}
|
|
1322
1336
|
|
|
1323
1337
|
/* ——— 顶部身份条(第一行):名称 / 版本 / 完整包名 / GitHub / 检查更新 ——— */
|
|
1324
|
-
.dshgt-idbar{display:flex;align-items:center;gap:9px;height:48px;padding:0
|
|
1338
|
+
.dshgt-idbar{display:flex;align-items:center;gap:9px;height:48px;padding:0 var(--dshgt-inset);border-bottom:1px solid var(--gt-border);flex:none;background:var(--gt-bg);min-width:0;}
|
|
1325
1339
|
.dshgt-idbar .dshgt-brand{display:flex;align-items:center;gap:9px;padding:0;flex:none;min-width:0;}
|
|
1326
1340
|
.dshgt-idbar .dshgt-brand svg{width:22px;height:22px;flex:none;border-radius:6px;}
|
|
1327
1341
|
.dshgt-brand-name{font-size:13.5px;font-weight:650;letter-spacing:-.01em;white-space:nowrap;line-height:1.3;}
|
|
@@ -1329,18 +1343,37 @@ var CSS = `
|
|
|
1329
1343
|
.dshgt-id-sep{width:1px;height:16px;background:var(--gt-border);flex:none;}
|
|
1330
1344
|
.dshgt-id-pkg{appearance:none;border:0;background:none;padding:2px 4px;border-radius:5px;color:var(--gt-muted);cursor:pointer;font-size:12px;max-width:min(44vw,360px);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto;}
|
|
1331
1345
|
.dshgt-id-pkg:hover{color:var(--gt-fg);background:color-mix(in srgb,var(--gt-fg) 5%,var(--gt-bg));}
|
|
1332
|
-
.dshgt-idbar-right{margin-left:auto;display:flex;align-items:center;gap:10px;flex:none;min-width:0;}
|
|
1346
|
+
.dshgt-idbar-right{margin-left:auto;position:relative;display:flex;align-items:center;gap:10px;flex:none;min-width:0;}
|
|
1333
1347
|
.dshgt-id-gh{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;color:var(--gt-muted);border:1px solid transparent;flex:none;}
|
|
1334
1348
|
.dshgt-id-gh:hover{color:var(--gt-fg);background:color-mix(in srgb,var(--gt-fg) 6%,var(--gt-bg));border-color:var(--gt-border);}
|
|
1335
|
-
|
|
1336
|
-
.dshgt-
|
|
1337
|
-
|
|
1338
|
-
.dshgt-
|
|
1339
|
-
|
|
1340
|
-
|
|
1349
|
+
/* 更新入口:版本徽标 + 纯图标刷新,作为一个整体;与 GitHub 图标同形制 */
|
|
1350
|
+
.dshgt-upd-unit{display:inline-flex;align-items:center;gap:4px;flex:none;}
|
|
1351
|
+
/* 版本徽标:仅「有新版本」时出现,透明底细描边,高度对齐图标按钮中线 */
|
|
1352
|
+
.dshgt-ver-badge{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:22px;padding:0 8px;border-radius:999px;
|
|
1353
|
+
border:1px solid color-mix(in srgb,var(--gt-warn) 42%,transparent);background:transparent;color:var(--gt-warn);
|
|
1354
|
+
font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer;
|
|
1355
|
+
transition:background .12s ease,border-color .12s ease;}
|
|
1356
|
+
.dshgt-ver-badge:hover{background:color-mix(in srgb,var(--gt-warn) 12%,transparent);border-color:color-mix(in srgb,var(--gt-warn) 60%,transparent);}
|
|
1357
|
+
.dshgt-ver-badge:focus-visible{outline:2px solid var(--gt-accent);outline-offset:1px;}
|
|
1358
|
+
/* 纯图标刷新:状态靠图标颜色 + 角标 + 旋转表达,文案走 title(tooltip) */
|
|
1359
|
+
.dshgt-refresh{position:relative;}
|
|
1360
|
+
.dshgt-refresh svg{display:block;transition:color .12s ease;}
|
|
1361
|
+
.dshgt-refresh[data-state="available"]{color:var(--gt-warn);}
|
|
1362
|
+
.dshgt-refresh[data-state="available"]::after{content:"";position:absolute;top:3px;right:3px;width:6px;height:6px;border-radius:50%;background:var(--gt-warn);box-shadow:0 0 0 1.5px var(--gt-bg);}
|
|
1363
|
+
.dshgt-refresh[data-state="checking"]{color:var(--gt-muted);cursor:default;}
|
|
1364
|
+
.dshgt-refresh[data-state="checking"] svg{animation:dshgt-refresh-spin .9s linear infinite;}
|
|
1365
|
+
.dshgt-refresh[data-state="error"]{color:var(--gt-err);}
|
|
1366
|
+
.dshgt-refresh[data-state="ok-flash"]{color:var(--gt-ok);}
|
|
1367
|
+
@keyframes dshgt-refresh-spin{to{transform:rotate(360deg);}}
|
|
1368
|
+
/* 确认气泡:贴刷新图标右下方弹出 */
|
|
1369
|
+
.dshgt-confirm-pop{position:absolute;top:calc(100% + 8px);right:0;z-index:30;box-sizing:border-box;min-width:210px;max-width:280px;
|
|
1370
|
+
display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;background:var(--gt-card);border:1px solid var(--gt-border);
|
|
1371
|
+
box-shadow:0 12px 32px rgba(0,0,0,.28);}
|
|
1372
|
+
.dshgt-confirm-title{font-size:12.5px;color:var(--gt-fg);line-height:1.45;}
|
|
1373
|
+
.dshgt-confirm-actions{display:flex;gap:8px;justify-content:flex-end;}
|
|
1341
1374
|
|
|
1342
1375
|
/* ——— 横向 tab(第二行)+ 右侧状态 ——— */
|
|
1343
|
-
.dshgt-tabsbar{display:flex;align-items:stretch;gap:12px;height:46px;padding:0
|
|
1376
|
+
.dshgt-tabsbar{display:flex;align-items:stretch;gap:12px;height:46px;padding:0 var(--dshgt-inset);border-bottom:1px solid var(--gt-border);flex:none;background:var(--gt-bg);min-width:0;}
|
|
1344
1377
|
.dshgt-tabnav{display:flex;align-items:stretch;gap:2px;height:100%;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;}
|
|
1345
1378
|
.dshgt-tabnav::-webkit-scrollbar{display:none;}
|
|
1346
1379
|
.dshgt-tab{display:flex;align-items:center;gap:7px;padding:0 12px;border:0;background:none;color:var(--gt-muted);cursor:pointer;font:inherit;font-size:13.5px;position:relative;border-bottom:2px solid transparent;margin-bottom:-1px;flex:none;white-space:nowrap;}
|
|
@@ -1413,17 +1446,17 @@ var CSS = `
|
|
|
1413
1446
|
@keyframes dshgt-spin{to{transform:rotate(360deg);}}
|
|
1414
1447
|
|
|
1415
1448
|
/* ——— 日报 ——— */
|
|
1416
|
-
/*
|
|
1417
|
-
|
|
1418
|
-
.dshgt-digest
|
|
1449
|
+
/* 日报不再自己限宽 / 居中:整页与其它四个 tab 共用 .dshgt-view 的内容框,
|
|
1450
|
+
工具栏和纸面左右边缘和页头、正文完全对齐。 */
|
|
1451
|
+
.dshgt-digest{gap:12px;}
|
|
1419
1452
|
.dshgt-digest-subbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
|
|
1420
1453
|
.dshgt-datenav{display:flex;align-items:center;gap:2px;border:1px solid var(--gt-border);border-radius:8px;background:var(--gt-card);padding:2px;}
|
|
1421
1454
|
.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;}
|
|
1422
1455
|
.dshgt-icon-btn:hover:not(:disabled){background:color-mix(in srgb,var(--gt-fg) 7%,var(--gt-bg));border-color:var(--gt-border);}
|
|
1423
1456
|
.dshgt-icon-btn:disabled{opacity:.3;cursor:not-allowed;}
|
|
1424
1457
|
.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;}
|
|
1425
|
-
/*
|
|
1426
|
-
.dshgt-digest-sheet{
|
|
1458
|
+
/* 日报预览纸面:铺满统一内容框;阅读行宽由内边距与字号控制。 */
|
|
1459
|
+
.dshgt-digest-sheet{width:100%;border:1px solid var(--gt-border);border-radius:12px;background:var(--gt-card);overflow:hidden;}
|
|
1427
1460
|
.dshgt-digest-body{display:flex;flex-direction:column;min-width:0;}
|
|
1428
1461
|
.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));}
|
|
1429
1462
|
.dshgt-seg{display:inline-flex;border:1px solid var(--gt-border);border-radius:8px;padding:2px;background:var(--gt-bg);gap:2px;}
|
|
@@ -1433,7 +1466,7 @@ var CSS = `
|
|
|
1433
1466
|
.dshgt-doc-meta{display:flex;gap:12px;flex-wrap:wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;color:var(--gt-muted);padding-bottom:12px;border-bottom:1px solid color-mix(in srgb,var(--gt-border) 70%,transparent);}
|
|
1434
1467
|
.dshgt-digest-raw{margin:0;padding:22px 28px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.75;white-space:pre-wrap;word-break:break-word;color:var(--gt-muted);background:color-mix(in srgb,var(--gt-fg) 2.5%,var(--gt-card));max-height:640px;overflow:auto;}
|
|
1435
1468
|
.dshgt-digest-loading{padding:40px 28px;color:var(--gt-muted);font-size:13px;}
|
|
1436
|
-
.dshgt-digest-empty{padding:42px 36px 46px;
|
|
1469
|
+
.dshgt-digest-empty{padding:42px 36px 46px;}
|
|
1437
1470
|
.dshgt-status-line{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--gt-muted);}
|
|
1438
1471
|
.dshgt-status-line b{color:var(--gt-fg);font-weight:600;white-space:nowrap;}
|
|
1439
1472
|
.dshgt-digest-empty h2{margin:14px 0 6px;font-size:20px;font-weight:650;letter-spacing:-.012em;}
|
|
@@ -1557,7 +1590,7 @@ var CSS = `
|
|
|
1557
1590
|
.dshgt-gh{width:15px;height:15px;display:block;fill:currentColor;}
|
|
1558
1591
|
|
|
1559
1592
|
/* ——— 订阅:命令栏 + 四列表格 + 选择条 + 发版记录抽屉 ——— */
|
|
1560
|
-
.dshgt-subs{gap:12px;
|
|
1593
|
+
.dshgt-subs{gap:12px;}
|
|
1561
1594
|
/* 工具条:搜索 + 添加 + 选择 + 生成变更分析;列表在上方操作区之下 */
|
|
1562
1595
|
.dshgt-subs-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid color-mix(in srgb,var(--gt-border) 70%,transparent);}
|
|
1563
1596
|
.dshgt-subs-search{position:relative;flex:1;min-width:180px;max-width:340px;display:flex;align-items:center;}
|
|
@@ -1687,8 +1720,10 @@ var CSS = `
|
|
|
1687
1720
|
}
|
|
1688
1721
|
|
|
1689
1722
|
@media (max-width:1100px){
|
|
1690
|
-
.dshgt-
|
|
1691
|
-
.dshgt-
|
|
1723
|
+
.dshgt-app{--dshgt-gutter:22px;}
|
|
1724
|
+
.dshgt-page-head{padding-block:18px 12px;}
|
|
1725
|
+
.dshgt-view{padding-block:18px 30px;}
|
|
1726
|
+
.dshgt-main-body > .dshgt-settings{padding-block:18px 22px;}
|
|
1692
1727
|
.dshgt-facts{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:10px;}
|
|
1693
1728
|
.dshgt-fact:nth-child(3){padding-left:0;border-left:0;}
|
|
1694
1729
|
.dshgt-week{flex-wrap:wrap;}
|
|
@@ -1702,20 +1737,19 @@ var CSS = `
|
|
|
1702
1737
|
@media (max-width:980px){
|
|
1703
1738
|
.dshgt-page-head h1{font-size:19px;}
|
|
1704
1739
|
.dshgt-dek{font-size:12.5px;}
|
|
1705
|
-
.dshgt-main-body > .dshgt-settings{padding:
|
|
1706
|
-
}
|
|
1707
|
-
@media (max-width:900px){
|
|
1708
|
-
.dshgt-main-body > .dshgt-settings{padding:14px 16px 18px;}
|
|
1740
|
+
.dshgt-main-body > .dshgt-settings{padding-block:16px 18px;}
|
|
1709
1741
|
}
|
|
1710
1742
|
@media (max-width:760px){
|
|
1711
|
-
.dshgt-
|
|
1743
|
+
.dshgt-app{--dshgt-gutter:18px;}
|
|
1744
|
+
.dshgt-idbar{gap:8px;}
|
|
1712
1745
|
.dshgt-id-pkg{max-width:26vw;}
|
|
1713
1746
|
.dshgt-id-status{display:none;}
|
|
1714
|
-
.dshgt-tabsbar{
|
|
1747
|
+
.dshgt-tabsbar{gap:8px;}
|
|
1715
1748
|
.dshgt-tabsbar-status{display:none;}
|
|
1716
|
-
.dshgt-page-head{flex-wrap:wrap;padding:16px
|
|
1749
|
+
.dshgt-page-head{flex-wrap:wrap;padding-block:16px 12px;gap:10px 16px;}
|
|
1717
1750
|
.dshgt-head-actions{margin-left:0;width:100%;justify-content:flex-start;padding-top:0;flex-wrap:wrap;}
|
|
1718
|
-
.dshgt-view{padding:16px
|
|
1751
|
+
.dshgt-view{padding-block:16px 28px;}
|
|
1752
|
+
.dshgt-main-body > .dshgt-settings{padding-block:14px 18px;}
|
|
1719
1753
|
.dshgt-runs-filter{margin-left:0;width:100%;flex-wrap:wrap;}
|
|
1720
1754
|
.dshgt-run-row{grid-template-columns:14px 92px 46px minmax(0,1fr) 20px;gap:8px;padding:0 2px;}
|
|
1721
1755
|
.dshgt-run-item.has-tokens .dshgt-run-row{grid-template-columns:14px 92px 46px minmax(0,1fr) 64px 20px;}
|
|
@@ -5868,48 +5902,54 @@ function githubIcon() {
|
|
|
5868
5902
|
d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"
|
|
5869
5903
|
}));
|
|
5870
5904
|
}
|
|
5905
|
+
function refreshIcon() {
|
|
5906
|
+
return h(
|
|
5907
|
+
"svg",
|
|
5908
|
+
{ width: 15, height: 15, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" },
|
|
5909
|
+
h("path", { d: "M20 12a8 8 0 1 1-2.34-5.66" }),
|
|
5910
|
+
h("path", { d: "M20 4v5h-5" })
|
|
5911
|
+
);
|
|
5912
|
+
}
|
|
5871
5913
|
function IdentityBar(props) {
|
|
5872
5914
|
const { t, plugin } = props;
|
|
5873
5915
|
const [confirming, setConfirming] = import_react.default.useState(false);
|
|
5874
5916
|
const [updateState, controller] = usePluginUpdate();
|
|
5875
5917
|
const view = updateState.view;
|
|
5876
5918
|
const status = updateState.status;
|
|
5877
|
-
import_react.default.useEffect(() => {
|
|
5878
|
-
if (status === "applying" || status === "restart-required" || status === "applied") setConfirming(false);
|
|
5879
|
-
}, [status]);
|
|
5880
5919
|
const busy = status === "checking" || status === "applying";
|
|
5881
5920
|
const settled = status === "restart-required" || status === "applied";
|
|
5882
5921
|
const latestVersion = view === null ? "" : view.latestVersion ?? "";
|
|
5883
5922
|
const updateAvailable = view !== null && view.updateAvailable;
|
|
5884
|
-
const actionable = updateAvailable && view !== null && view.canApply && !
|
|
5923
|
+
const actionable = updateAvailable && view !== null && view.canApply && !busy && !settled;
|
|
5885
5924
|
const currentVersion = view === null ? plugin.version : view.currentVersion ?? plugin.version;
|
|
5886
|
-
|
|
5887
|
-
if (
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
if (status === "
|
|
5891
|
-
if (
|
|
5892
|
-
if (
|
|
5893
|
-
return {
|
|
5925
|
+
import_react.default.useEffect(() => {
|
|
5926
|
+
if (!updateAvailable || busy || settled) setConfirming(false);
|
|
5927
|
+
}, [updateAvailable, busy, settled]);
|
|
5928
|
+
function stateAndTip() {
|
|
5929
|
+
if (status === "checking" || view === null) return { state: "checking", tip: t("shell.update.checking") };
|
|
5930
|
+
if (status === "applying") return { state: "checking", tip: t("shell.update.applying", { version: latestVersion }) };
|
|
5931
|
+
if (status === "restart-required" || status === "applied") return { state: "ok-flash", tip: t("shell.update.done", { version: latestVersion }) };
|
|
5932
|
+
if (status === "failed") return { state: "error", tip: updateState.error?.code === "CHECK_FAILED" ? t("shell.update.checkFailed") : t("shell.update.failed") };
|
|
5933
|
+
if (view.checkFailed) return { state: "error", tip: t("shell.update.checkFailed") };
|
|
5934
|
+
if (view.updateAvailable) return { state: "available", tip: t("shell.update.available", { latest: latestVersion }) };
|
|
5935
|
+
return { state: "latest", tip: t("shell.update.latest", { version: currentVersion }) };
|
|
5894
5936
|
}
|
|
5895
|
-
|
|
5896
|
-
|
|
5937
|
+
const st = stateAndTip();
|
|
5938
|
+
function onRefreshClick() {
|
|
5939
|
+
if (busy) return;
|
|
5897
5940
|
if (actionable) {
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
h(Btn, { key: "yes", small: true, variant: "danger", onClick: () => {
|
|
5901
|
-
setConfirming(false);
|
|
5902
|
-
writePendingUpdate(currentVersion, latestVersion);
|
|
5903
|
-
void controller.apply();
|
|
5904
|
-
} }, t("shell.update.confirmYes")),
|
|
5905
|
-
h(Btn, { key: "no", small: true, onClick: () => setConfirming(false) }, t("shell.update.cancel"))
|
|
5906
|
-
];
|
|
5907
|
-
}
|
|
5908
|
-
return h(Btn, { small: true, variant: "primary", onClick: () => setConfirming(true) }, t("shell.update.apply", { version: latestVersion }));
|
|
5941
|
+
setConfirming((v) => !v);
|
|
5942
|
+
return;
|
|
5909
5943
|
}
|
|
5910
|
-
|
|
5944
|
+
void controller.check({ fresh: true });
|
|
5945
|
+
}
|
|
5946
|
+
function onConfirmUpdate() {
|
|
5947
|
+
setConfirming(false);
|
|
5948
|
+
writePendingUpdate(currentVersion, latestVersion);
|
|
5949
|
+
void controller.apply();
|
|
5911
5950
|
}
|
|
5912
|
-
const
|
|
5951
|
+
const showBadge = Boolean(updateAvailable && view?.canApply && !busy && !settled);
|
|
5952
|
+
const confirmOpen = confirming && actionable;
|
|
5913
5953
|
return h(
|
|
5914
5954
|
"div",
|
|
5915
5955
|
{ className: "dshgt-idbar" },
|
|
@@ -5929,33 +5969,115 @@ function IdentityBar(props) {
|
|
|
5929
5969
|
"div",
|
|
5930
5970
|
{ className: "dshgt-idbar-right" },
|
|
5931
5971
|
h(
|
|
5932
|
-
"
|
|
5933
|
-
{ className: "dshgt-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5972
|
+
"div",
|
|
5973
|
+
{ className: "dshgt-upd-unit" },
|
|
5974
|
+
showBadge ? h(
|
|
5975
|
+
"button",
|
|
5976
|
+
{
|
|
5977
|
+
type: "button",
|
|
5978
|
+
className: "dshgt-ver-badge",
|
|
5979
|
+
title: t("shell.update.badgeTitle", { version: latestVersion }),
|
|
5980
|
+
"aria-label": t("shell.update.badgeTitle", { version: latestVersion }),
|
|
5981
|
+
onClick: () => setConfirming((v) => !v)
|
|
5982
|
+
},
|
|
5983
|
+
`v${latestVersion}`
|
|
5984
|
+
) : null,
|
|
5985
|
+
h(
|
|
5986
|
+
"button",
|
|
5987
|
+
{
|
|
5988
|
+
type: "button",
|
|
5989
|
+
className: "dshgt-id-gh dshgt-refresh",
|
|
5990
|
+
"data-state": st.state,
|
|
5991
|
+
disabled: busy,
|
|
5992
|
+
title: st.tip,
|
|
5993
|
+
"aria-label": st.tip,
|
|
5994
|
+
"aria-expanded": confirmOpen ? "true" : void 0,
|
|
5995
|
+
onClick: onRefreshClick
|
|
5996
|
+
},
|
|
5997
|
+
refreshIcon()
|
|
5998
|
+
)
|
|
5999
|
+
),
|
|
6000
|
+
confirmOpen ? h(
|
|
6001
|
+
"div",
|
|
6002
|
+
{ className: "dshgt-confirm-pop", role: "dialog", "aria-label": t("shell.update.confirmHint") },
|
|
6003
|
+
h("div", { className: "dshgt-confirm-title" }, t("shell.update.confirmHint")),
|
|
6004
|
+
h(
|
|
6005
|
+
"div",
|
|
6006
|
+
{ className: "dshgt-confirm-actions" },
|
|
6007
|
+
h(Btn, { small: true, onClick: () => setConfirming(false) }, t("shell.update.cancel")),
|
|
6008
|
+
h(Btn, { small: true, variant: "primary", onClick: onConfirmUpdate }, t("shell.update.confirmYes"))
|
|
6009
|
+
)
|
|
6010
|
+
) : null
|
|
5937
6011
|
)
|
|
5938
6012
|
);
|
|
5939
6013
|
}
|
|
5940
6014
|
|
|
5941
6015
|
// client/restore-notice.ts
|
|
5942
|
-
function
|
|
5943
|
-
|
|
6016
|
+
function vLabel(value) {
|
|
6017
|
+
if (value === void 0) return void 0;
|
|
6018
|
+
const text = value.trim();
|
|
6019
|
+
if (text === "") return void 0;
|
|
6020
|
+
return text.startsWith("v") ? text : `v${text}`;
|
|
6021
|
+
}
|
|
6022
|
+
var ARROW = h(
|
|
6023
|
+
"svg",
|
|
6024
|
+
{
|
|
6025
|
+
width: 14,
|
|
6026
|
+
height: 14,
|
|
6027
|
+
viewBox: "0 0 16 16",
|
|
6028
|
+
fill: "none",
|
|
6029
|
+
stroke: "currentColor",
|
|
6030
|
+
strokeWidth: 1.6,
|
|
6031
|
+
strokeLinecap: "round",
|
|
6032
|
+
strokeLinejoin: "round",
|
|
6033
|
+
"aria-hidden": "true",
|
|
6034
|
+
focusable: "false"
|
|
6035
|
+
},
|
|
6036
|
+
h("path", { d: "M3 8h9" }),
|
|
6037
|
+
h("polyline", { points: "8.5 4.5 12 8 8.5 11.5" })
|
|
6038
|
+
);
|
|
6039
|
+
function RestoreNotice({ t, version, from, onDismiss }) {
|
|
6040
|
+
const fromLabel = vLabel(from);
|
|
6041
|
+
const toLabel = vLabel(version);
|
|
6042
|
+
const pair = fromLabel !== void 0 && toLabel !== void 0 && fromLabel !== toLabel;
|
|
6043
|
+
const title = pair ? t("restoreNotice.titleInstalled") : toLabel !== void 0 ? t("restoreNotice.title", { version: toLabel.replace(/^v/, "") }) : t("restoreNotice.titleBare");
|
|
6044
|
+
import_react.default.useEffect(() => {
|
|
6045
|
+
if (typeof document === "undefined") return void 0;
|
|
6046
|
+
const onKeyDown = (event) => {
|
|
6047
|
+
if (event.key === "Escape") onDismiss();
|
|
6048
|
+
};
|
|
6049
|
+
document.addEventListener("keydown", onKeyDown);
|
|
6050
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
6051
|
+
}, [onDismiss]);
|
|
5944
6052
|
return h(
|
|
5945
6053
|
"div",
|
|
5946
|
-
{ className: "dshgt-restore
|
|
5947
|
-
h("span", { className: "dshgt-restore-icon", "aria-hidden": "true" }, "⟳"),
|
|
5948
|
-
h(
|
|
5949
|
-
"div",
|
|
5950
|
-
{ className: "dshgt-restore-text" },
|
|
5951
|
-
h("div", { className: "dshgt-restore-title" }, title),
|
|
5952
|
-
h("div", { className: "dshgt-restore-body" }, t("restoreNotice.body"))
|
|
5953
|
-
),
|
|
6054
|
+
{ className: "dshgt-restore-mask" },
|
|
5954
6055
|
h(
|
|
5955
6056
|
"div",
|
|
5956
|
-
{
|
|
5957
|
-
|
|
5958
|
-
|
|
6057
|
+
{
|
|
6058
|
+
className: "dshgt-restore",
|
|
6059
|
+
role: "dialog",
|
|
6060
|
+
"aria-modal": "true",
|
|
6061
|
+
"aria-labelledby": "dshgt-restore-title"
|
|
6062
|
+
},
|
|
6063
|
+
pair ? h(
|
|
6064
|
+
"div",
|
|
6065
|
+
{ className: "dshgt-restore-versions" },
|
|
6066
|
+
h("span", { className: "dshgt-restore-version" }, fromLabel),
|
|
6067
|
+
h("span", { className: "dshgt-restore-arrow" }, ARROW),
|
|
6068
|
+
h("span", { className: "dshgt-restore-version is-new" }, toLabel)
|
|
6069
|
+
) : null,
|
|
6070
|
+
h("div", { className: "dshgt-restore-title", id: "dshgt-restore-title" }, title),
|
|
6071
|
+
h("p", { className: "dshgt-restore-body" }, t("restoreNotice.body")),
|
|
6072
|
+
h(
|
|
6073
|
+
"div",
|
|
6074
|
+
{ className: "dshgt-restore-foot" },
|
|
6075
|
+
h(
|
|
6076
|
+
"button",
|
|
6077
|
+
{ type: "button", className: "dshgt-restore-close", autoFocus: true, onClick: () => onDismiss() },
|
|
6078
|
+
t("restoreNotice.dismiss")
|
|
6079
|
+
)
|
|
6080
|
+
)
|
|
5959
6081
|
)
|
|
5960
6082
|
);
|
|
5961
6083
|
}
|
|
@@ -6147,12 +6269,7 @@ function apply(ctx) {
|
|
|
6147
6269
|
pendingUpdate === null ? null : h(RestoreNotice, {
|
|
6148
6270
|
t,
|
|
6149
6271
|
version: pendingUpdate.to,
|
|
6150
|
-
|
|
6151
|
-
const reloader = ctx.restart;
|
|
6152
|
-
if (typeof reloader === "function") reloader();
|
|
6153
|
-
clearPendingUpdate();
|
|
6154
|
-
setPendingUpdate(null);
|
|
6155
|
-
},
|
|
6272
|
+
from: pendingUpdate.from,
|
|
6156
6273
|
onDismiss: () => {
|
|
6157
6274
|
clearPendingUpdate();
|
|
6158
6275
|
setPendingUpdate(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morehao/dsh-github-trending",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.13",
|
|
4
4
|
"description": "GitHub 趋势日报的 DeepSeek Harness 插件:按日 / 周 / 月周期定时 spawn 本地 trendradar 核心,抓取 Trending、生成中文简介与周期总结,并可选把订阅仓库的新 Release 合成中文摘要,一起提交到你的仓库、自动开 PR 合并;内置概览 / 榜单 / 运行记录 / 订阅 / 设置工作台。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|