dsh-annual-activity 1.1.0 → 1.1.2
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/README.md +5 -3
- package/lib/client.js +19 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,9 +22,11 @@
|
|
|
22
22
|
└──────────────────────────────────────────────────────────────────────────────┘
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
入口在**会话头部右上角**:紧挨「打开右侧边栏」按钮的左边,同高同圆角(28×28
|
|
26
|
-
图标是**最近 14
|
|
27
|
-
|
|
25
|
+
入口在**会话头部右上角**:紧挨「打开右侧边栏」按钮的左边,同高同圆角(28×28)。
|
|
26
|
+
图标是**最近 14 天的迷你热力图**(等级越高颜色越深);按钮带常驻底色与 1px 细边
|
|
27
|
+
(用官方 token,深浅主题都跟随),悬停加深一档。鼠标悬浮时说明浮层出现在**按钮下方**
|
|
28
|
+
(不会遮挡按钮与会话标题),显示今日 / 今年 / 连登摘要;点击展开上面的年度面板。
|
|
29
|
+
有新版本时按钮右上角带一个小圆点。
|
|
28
30
|
|
|
29
31
|
## 安装
|
|
30
32
|
|
package/lib/client.js
CHANGED
|
@@ -641,7 +641,7 @@ window.__ModuleLoader__.load({
|
|
|
641
641
|
open ? React.createElement(ActivityPanel, { onClose: () => setOpen(false) }) : null);
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
/**
|
|
644
|
+
/** 入口悬浮说明:固定定位在按钮**下方**(放在上方会遮住按钮与标题行)。 */
|
|
645
645
|
function EntryTip({ tip }) {
|
|
646
646
|
const { today: rec, stats, x, y } = tip;
|
|
647
647
|
const rows = [
|
|
@@ -662,22 +662,33 @@ window.__ModuleLoader__.load({
|
|
|
662
662
|
.daa-host{position:relative;display:flex;align-items:center;
|
|
663
663
|
font-family:'Inter','PingFang SC','Microsoft YaHei',ui-sans-serif,system-ui,sans-serif;
|
|
664
664
|
color:var(--dsh-text-1,#1f2937);}
|
|
665
|
-
/* ---------- 头部入口按钮(对齐「打开右侧边栏」:28×28 / radius 28 / 16px
|
|
665
|
+
/* ---------- 头部入口按钮(对齐「打开右侧边栏」:28×28 / radius 28 / 16px 图标)
|
|
666
|
+
官方按钮是纯透明底,放在标题行里太「隐形」,所以这里给一个比悬停态更浅的
|
|
667
|
+
常驻底色 + 一层细边(同样是官方 token,深色主题自动跟随)。---------- */
|
|
666
668
|
.daa-hbtn{position:relative;box-sizing:border-box;width:28px;height:28px;flex:none;padding:6px;
|
|
667
669
|
display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
|
|
668
|
-
background:
|
|
669
|
-
|
|
670
|
-
|
|
670
|
+
background:var(--dsw-alias-interactive-bg-hover,rgba(38,49,72,.06));
|
|
671
|
+
border:none;border-radius:28px;box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2,rgba(0,0,0,.10));
|
|
672
|
+
color:var(--dsw-alias-label-secondary,#4b5563);
|
|
673
|
+
transition:background .14s ease,color .14s ease,box-shadow .14s ease;}
|
|
674
|
+
.daa-hbtn:hover{background:var(--dsw-alias-interactive-bg-active,rgba(38,49,72,.10));
|
|
675
|
+
box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l3,rgba(0,0,0,.16));
|
|
671
676
|
color:var(--dsw-alias-label-primary,#111827);}
|
|
672
|
-
.daa-hbtn.on{background:var(--dsw-alias-interactive-bg-active,rgba(
|
|
677
|
+
.daa-hbtn.on{background:var(--dsw-alias-interactive-bg-active,rgba(38,49,72,.10));
|
|
678
|
+
box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l3,rgba(0,0,0,.16));
|
|
673
679
|
color:var(--dsw-alias-label-primary,#111827);}
|
|
674
680
|
.daa-glyph{display:grid;grid-template-columns:repeat(7,2px);grid-template-rows:repeat(2,2px);gap:1px;}
|
|
675
681
|
.daa-glyph-cell{width:2px;height:2px;border-radius:.5px;}
|
|
676
682
|
.daa-glyph-void{background:transparent;}
|
|
677
|
-
.daa-hbtn-dot{position:absolute;top:
|
|
683
|
+
.daa-hbtn-dot{position:absolute;top:2px;right:2px;width:7px;height:7px;border-radius:50%;
|
|
678
684
|
background:var(--dsw-alias-state-business-primary,#f59e0b);
|
|
679
|
-
box-shadow:0 0 0 1.5px var(--dsw-alias-bg-
|
|
685
|
+
box-shadow:0 0 0 1.5px var(--dsw-alias-bg-layer-1,#fff);}
|
|
686
|
+
/* 入口悬浮说明:贴在按钮下方(放在上方会盖住按钮本身与会话标题) */
|
|
680
687
|
.daa-tip-below{transform:translate(-50%,0);}
|
|
688
|
+
.daa-tip-below::before{content:'';position:absolute;left:50%;top:-4px;width:8px;height:8px;
|
|
689
|
+
margin-left:-4px;transform:rotate(45deg);background:inherit;
|
|
690
|
+
border-left:1px solid var(--dsh-border,#e5e7eb);border-top:1px solid var(--dsh-border,#e5e7eb);
|
|
691
|
+
border-top-left-radius:2px;}
|
|
681
692
|
/* ---------- 遮罩 + 卡片 ---------- */
|
|
682
693
|
.daa-backdrop{position:fixed;inset:0;pointer-events:auto;background:rgba(15,23,42,.42);
|
|
683
694
|
display:flex;align-items:center;justify-content:center;padding:24px;animation:daa-fade .14s ease-out;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-annual-activity",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "全年活跃记录 (Annual Activity) — 一个纯本地的 DSH 活跃度统计面板:Host 半区扫描 $DSH_HOME/sessions 下的历史会话日志,按本地日期聚合每一天的活跃天/轮次/工具调用/Token 消耗,Client 半区以「年度热力图」面板渲染(统计行 + 5 级色块 + 月份轴 + 年份切换 + 连登统计),数据全部来自本机会话文件,不联网、不上报。",
|
|
5
5
|
"author": "spartaattack",
|
|
6
6
|
"type": "module",
|