Repository navigation
Releases: Maple-Yoli/dsh-notice-card
Release list
v0.2.1
0.2.1 — 文字改用 ClearType,卡片跟随系统
一、修复内容
- 文字发虚、边缘发胖、像素不均匀:全部文字改用 GDI ClearType 绘制,字号只取整数像素,行高与换行宽度用同一套算法,坐标取整改为
AwayFromZero。字形边缘落在像素网格上,不再是一条灰色过渡带。 - 页脚右侧的短会话名不显示:会话名只有一两个字时那一段完全空白,现在正常显示。
- 升级后卡片全都不弹:现在每次弹卡都会核对编译产物是否还在、是否对应当前源码,旧版本的 exe 也不再删除。
二、更新内容
- 跟随系统主题:深浅色自动切换,高对比度时改用系统配色。每次弹卡读一次,切换后弹出的卡立刻是新配色。
- 跟随系统缩放与文本大小:卡片按屏幕宽度比例缩放,字号有下限;辅助功能里的文本大小调过,整张卡一起放大。
- 四角可选:
corner默认auto,跟任务栏方向走;也可钉死top-left/top-right/bottom-left/bottom-right。上边贴屏幕顶,下边贴任务栏上沿。 - 落在鼠标那块屏幕:副屏不会跑丢。
- 叠放上限:默认最多 3 张,超出关掉最老的。实际张数还受屏幕高度限制,不会有卡片落到屏幕外。
- 底部信息:弹出时刻(按系统短时间格式)、会话名(无标题时显示会话 id 前 6 位)、当前权限范围。
- 字体跟界面语言:中文微软雅黑 UI、日文 Yu Gothic UI、韩文 Malgun Gothic、其它 Segoe UI。从右往左的语言按钮镜像、页脚换边。
- 触摸屏:按钮放大到 36px,不做悬停高亮。滚轮行数读系统鼠标设置。
- 省电与动画:系统关掉动画或进省电模式,卡片直接落到位置,不滑入淡出。
- 免打扰:专注助手和演示模式下任务结束卡不弹;审批卡和提问卡照弹。
三、注意事项
- 要完全退出 DSH 再启动。插件行是已有 id,改代码不会热重载。
- 改
corner或maxStack也要重启,同样属于改已有插件的 config。 - npm 上的
0.2.0不能用。那个版本是旧代码打的包,装了不工作,已加 deprecate 标注。npm 不允许覆盖已发布版本,所以本次发0.2.1。
怎么升级
npm i dsh-notice-card@0.2.1profile 里 pin 的是旧版本,改成 0.2.1,然后完全退出 DSH 再打开。
0.2.1 — ClearType text, and a card that follows the system
1. What was fixed
- Blurry text, swollen glyph edges, uneven pixels. All text now draws through GDI ClearType, font sizes are whole pixels, line height and wrap width come from the same calculation, and coordinates round with
AwayFromZero. Glyph edges land on the pixel grid instead of trailing a grey band. - Short session names in the footer did not show. Names of one or two characters came out completely blank. They display now.
- Cards going silently missing after an upgrade. Every card now verifies that its compiled binary is still present and still matches the current source, and old versions are no longer deleted.
2. What is new
- Follows the system theme. Light and dark switch automatically, and high contrast substitutes the system palette. Read once per card, so a card raised after you switch already has the new colours.
- Follows the system scale and text size. The card scales with the monitor width, with a floor on the text; raising the accessibility text size grows the whole card with it.
- Four corners to choose from.
cornerdefaults toauto, which follows the taskbar; pintop-left/top-right/bottom-left/bottom-rightinstead. The top two sit flush with the screen edge, the bottom two rest on the taskbar. - Lands on the monitor under the pointer. A second screen does not lose the card.
- Stack cap. At most 3 cards by default, the oldest closed past that. The screen height still limits how many fit, so no card lands off the edge.
- Footer. The time in your own short-time pattern, the session name (the first six characters of the id when it has no title), and the current permission mode.
- Typeface follows the interface language. Microsoft YaHei UI for Chinese, Yu Gothic UI for Japanese, Malgun Gothic for Korean, Segoe UI otherwise. Right-to-left languages mirror the buttons and swap the ends of the footer.
- Touch screen. The corner buttons grow to 36px and drop the hover highlight. Wheel scrolling follows the mouse setting.
- Battery saver and animations. With animations off in Windows, or the machine in battery saver, the card lands in place instead of sliding and fading.
- Quiet hours. A turn-end card is not drawn in focus assist or presentation mode; approvals and questions still appear.
3. Notes
- Quit DSH completely and start it again. The plugin row keeps its existing id, so changed code does not hot-reload.
- Changing
cornerormaxStackalso needs a restart, since that edits the config of an already-loaded plugin. 0.2.0on npm does not work. That version was built from old code and is broken; it is deprecated. npm does not allow reusing a version, so this release is0.2.1.
How to upgrade
npm i dsh-notice-card@0.2.1If your profile pins an older version, change it to 0.2.1, then quit DSH completely and start it again.
0.1.8 - 全屏时不再挡鼠标 / Mouse no longer blocked over fullscreen
0.1.8 -- 全屏时卡片不再挡住鼠标
修了什么
上一版卡片改成 C# 独立进程之后,全屏看视频时右下角会留下一块鼠标进不去的区域。原因在窗口的命中测试:卡片是一个 420×160 的窗口,鼠标落在这个矩形里时,点击全被卡片接走,下面的播放器收不到。因为卡片一直显示着,这块区域就一直是死的。
现在只要前台窗口铺满整个屏幕,卡片就自动把命中测试关掉(WS_EX_TRANSPARENT | WS_EX_LAYERED),鼠标和点击全部落到下面的窗口。退出全屏后自动恢复可点。有一点容易漏:只设 WS_EX_TRANSPARENT 不够,必须同时是 layered 窗口并显式设 alpha,否则命中测试不会跳过这个窗口。
文档
- 两份 README 都加了居中标题和徽章,中文默认、英文单独一份
README.en.md,顶部互相切换 - 「反馈」和「更新日志」升为一级标题,指向 Issues 和 Releases
- 全文改成平实说法,删掉了读起来像机器生成的句子
- 自测命令改成可以直接复制的写法
环境要求
| 项目 | 要求 |
|---|---|
| 系统 | Windows |
| DSH | 0.1.0-rc.1 或更高 |
| Node | 20 或更高(只有 DSH 加载插件时用得到) |
| .NET Framework | 4.x,Windows 自带,不用另外装 |
怎么升级
npm i dsh-notice-card@0.1.8profile 里写的是 0.1.7 的话要改成 0.1.8,然后完全退出 DSH 再打开。已经在跑的插件行改了版本号不会自己重新加载。
0.1.8 -- The card no longer blocks the mouse over fullscreen
What was fixed
Since the card became its own C# process, watching a fullscreen video left a patch in the bottom-right corner where the cursor could not go. The cause was window hit-testing: the card is a 420x160 window, and any click inside that rectangle was taken by the card instead of the player below. While the card stayed up, the patch stayed dead.
Now, whenever the foreground window covers the whole screen, the card turns hit-testing off (WS_EX_TRANSPARENT | WS_EX_LAYERED) and the cursor and every click go to the window underneath. Leave fullscreen and the card becomes clickable again. One detail is easy to miss: WS_EX_TRANSPARENT alone does nothing for the mouse, the window must also be layered with an explicit alpha, otherwise hit-testing does not skip it.
Docs
- Both READMEs got a centered header with badges; Chinese stays the default and English lives in
README.en.md, with a switcher at the top - Feedback and Changelog are now top-level headings pointing at Issues and Releases
- Rewrote the prose in plain language and dropped sentences that read like machine output
- The self-test command is now copy-pasteable
Requirements
| Item | Requirement |
|---|---|
| System | Windows |
| DSH | 0.1.0-rc.1 or newer |
| Node | 20 or newer (used only by DSH to load the plugin) |
| .NET Framework | 4.x, comes with Windows, nothing extra to install |
How to upgrade
npm i dsh-notice-card@0.1.8If your profile pins 0.1.7, change it to 0.1.8, then quit DSH completely and start it again. A plugin row that is already running does not reload when its version changes.
0.1.7 - 原生编译卡片 / Native compiled cards
0.1.7 —— 卡片更稳了,审批卡不会自己消失
以前为什么有时候不弹
以前卡片是靠一个一直在后台跑的 PowerShell 脚本来画的。这个脚本同一时间只能画一张卡。画的过程中一旦出错,Windows 会弹出一个报错窗口,把脚本卡在那儿不动。从那一刻起,后面所有卡片都排进这个已经卡死的脚本里,一张也出不来。
现在改用 C# 画卡。第一次弹卡的时候,插件用 Windows 自带的 csc.exe 把代码编译成一个 exe 存起来,以后每张卡都是一个独立的小程序。一张卡出问题只影响它自己,下一张照常弹。也不用再有一个后台脚本一直跑着。
这次改了什么
- 删掉了旧的 PowerShell 后台脚本,卡片改由 C# 画
- 修好了全屏判断。以前用无边框全屏看视频(比如腾讯视频)时,卡片会被当成「现在不能打扰」而完全不弹。现在只有真正的独占全屏游戏才会让卡片等一会儿,最多等 2 秒,超过就照样弹出来
- 任务结束卡:显示
seconds秒(默认 10 秒)后自动消失 - 审批卡和提问卡:不会自己消失。请求答完了还不够,还要 DSH 窗口在这之前或之后出现在过最前面,卡片才关。这样万一请求在后台被答掉了、你根本没看到卡片,卡片会一直留在屏幕上,提醒你回去看一眼,不会让对话卡在那儿没人管
- 最少显示 1.2 秒,不会闪一下就没了
- DSH 关掉以后,还留在屏幕上的卡片会自动关闭
- 卡片不会抢走焦点,你该打字打字;多张卡从下往上叠,最先出现的那张在最前面
环境要求
| 项目 | 要求 |
|---|---|
| 系统 | Windows |
| DSH | 0.1.0-rc.1 或更高 |
| Node | 20 或更高(只有 DSH 加载插件时用得到) |
| .NET Framework | 4.x,Windows 自带,不用另外装 |
怎么升级
npm i dsh-notice-card@0.1.7如果你 profile 里写的是 0.1.6,要改成 0.1.7,然后完全退出 DSH 再打开。已经在跑的插件行改了版本号或配置不会自动重新加载。
0.1.7 — Cards appear more reliably, and approval cards no longer disappear on their own
Why a card sometimes never showed up
The card used to be drawn by a PowerShell script that stayed running in the background. That script could only draw one card at a time. If something went wrong while drawing, Windows opened an error dialog and left the script stuck. From then on every new card was handed to that stuck script and none of them ever appeared.
The card is now drawn in C#. On the first card the plugin uses the csc.exe that comes with Windows to compile it into an exe, and from then on every card is its own small program. A card that goes wrong only affects itself; the next one appears as usual. There is no background script left running.
What changed
- The old PowerShell background script is gone; cards are drawn in C#
- Fixed the fullscreen check. Watching video in borderless fullscreen (Tencent Video, for example) used to make the card think it must not disturb you, so it never appeared at all. Now only a real exclusive-fullscreen game makes the card wait, and at most 2 seconds — after that it appears anyway
- Turn-end cards disappear on their own after
seconds(10 by default) - Approval and question cards do not disappear on their own. Answering the request is not enough: the DSH window must also have been in front, before or after that moment, for the card to close. If a request gets answered in the background and you never saw the card, the card stays on screen so you notice it instead of a conversation sitting there stuck
- A card stays visible for at least 1.2 seconds, so it never flashes and vanishes
- Cards that are still on screen close themselves when DSH quits
- Cards never take focus away from you, and several cards stack upward with the oldest one in front
Requirements
| Item | Requirement |
|---|---|
| System | Windows |
| DSH | 0.1.0-rc.1 or newer |
| Node | 20 or newer (used only by DSH to load the plugin) |
| .NET Framework | 4.x, comes with Windows, nothing extra to install |
How to upgrade
npm i dsh-notice-card@0.1.7If your profile pins 0.1.6, change it to 0.1.7, then quit DSH completely and start it again. A plugin row that is already running does not reload when its version or config changes.