Arknights: Endfield industrial-editorial theme for the DSH Web UI: cream paper, ink text, zero border radius, two switchable accent palettes (signal yellow / teal-cyan), plus optional marching-squares contour background, ENDFIELD watermark and boot progress plate.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-theme-endfield
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ymh0000123/dsh-theme-endfield
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
参考《明日方舟:终末地》官网风格的 DSH Web 主题插件:奶油纸底、墨黑文字、信号黄/武陵青强调色、全直角工业编辑风。
- Client 侧(
client.js):通过主题令牌与样式覆盖界面。 - Host 侧(
index.js):设置持久化与可选的音频通知(派生系统播放器子进程)。
两侧都不修改应用自身代码。
安装
dsh plugin --profile web add github:ymh0000123/dsh-theme-endfield
重启或重新加载 web profile 后生效。卸载:
dsh plugin --profile web rm dsh-theme-endfield
更新插件文件时的加载时机
| 改动 | 生效方式 |
|---|---|
Client 半 client.js |
Host 按请求从磁盘读取,浏览器刷新即可 |
Host 半 index.js |
只在 profile 启动时 import 一次,必须整进程重启 DSH |
dsh-hmr 的 watch 默认忽略 **/node_modules,软链安装的仓库文件不在其观察范围内;只刷新页面时,运行的仍是启动时那份 Host 代码。
功能
开关集中在 设置 › 终末地主题设置:
- 主题:总开关、谷地黄/武陵青配色、直角/圆角模式。
- 背景:等高线背景(默认关闭)及动态开关、
24 / 60 / 120 FPS、速度1x / 2x / 4x;可选鼠标轨迹(鼠标附近的等高线局部变形并逐渐恢复,默认关闭);背景水印及持续显示。 - 动画:输出滚动动画(默认开启,强度分
柔和 / 标准 / 轻快)——把模型流式输出的「整段跳一大格」摊成逐帧滑动,不改动应用自己的滚动位置,因此跟随不会中断,向上滚动、读者手势与系统「减少动态效果」下都保持瞬时;启动加载动画。 - 娱乐:雷霆大字及入场动画;顶部余额胶囊(默认关闭)。
- 音频:启动音、任务开始/结束音、需要回应时提示,音量与自定义音效目录可调(默认关闭)。
几处需要单独说明的行为:
- 顶部余额胶囊:悬浮显示 DeepSeek API 余额与峰谷时段(高峰为工作日
9-12点、14-18点;周末、法定节假日与落在周末的调休日都按低谷半价)。会话使用 dsh-codearts-auth 渠道模型时自动切换为该渠道的剩余额度与积分消耗进度,随渠道切换实时跟随,主读数可在设置中选择右侧百分比显示剩余或已用。 - 输出滚动动画与渠道额度模式的完整行为、默认值与边界情况见 docs/features.md。
- 音频通知的防噪规则与自定义音效见 docs/audio-notifications.md。
所有设置由 DSH 自己的设置服务持久化,与页面 origin/端口无关,DSH web 与 DSH Desktop 都能正确保存并在重启/换端口后恢复(不再使用会被 Desktop 随机端口清空的 localStorage)。设置文案支持中英文;动态等高线尊重系统「减少动态效果」,动画帧率与速度可独立调整。
DSH 版本支持与设置持久化
| DSH | 设置持久化 | 备注 |
|---|---|---|
| 0.2.x(在 0.2.0-rc.2 与 0.2.1-rc.2 上实测;0.2.2-rc.1 的 composer seat 改动见下) | Host 导出 Config,浏览器 ctx.configForms |
当前支持目标 |
| 0.1.7 – 0.1.x | 同一套 Config/configForms 接缝 | 无需改动 |
| ≤ 0.1.5 | ctx.settings.register + ctx.settingsScope |
自动回落,无需配置 |
- 0.2.x / 0.1.7+:Host
index.js导出一份 34 个字段全部.volatile()的 schemasteryConfig(命名空间 = 本插件 profile entry idtheme-endfield),浏览器client.js通过ctx.configForms读写并订阅,值随<profile>/cordis.patch.yml落盘。 - ≤ 0.1.5:回落到
ctx.settings.register('dsh-theme-endfield', schema)+ctx.settingsScope(<dshHome>/settings.yaml)。 - 0.1.7 升级后旧设置需要在设置页重设一次(
settings.yaml已被 DSH 废弃,见 engineering-notes.md § DSH 0.1.7-rc.1 换掉了整套 settings API)。
0.2 改动(v1.1.6 已跟进)
0.2 改动了四处本插件依赖的应用侧细节,旧写法在 0.2 上会静默失效:
回合状态标签(“Deep diving…”)从
@deepseek-ai/dsh-client-ui-conversation的渐变文字搬到@deepseek-ai/dsh-client-ui-chat的遮罩扫光文字,不再有turnStatus类名;着色改由--dsw-alias-label-deep-diving/-shimmer两个令牌承担,因此旧规则已删除,改在theme.overrideTokens层换色(留着旧规则时该令牌仍是应用自带值,标签完全没有主题色)。右侧栏列名由
_detailsCol改为_rightbarCol,且不透明底色移到列元素本身——等高线图层在右侧栏打开时不会再被整块盖住。插件卡片展示文案改由
locale/<语言>.json的meta.title/meta.description提供;package.json的dsh.client.inject也不再列 0.2 已删除的@deepseek-ai/dsh-client-runtime与@deepseek-ai/dsh-client-ui-slots,改为列出 0.2 真正的提供方。composer seat 的
will-change: transform(0.2.2-rc.1):它会让 seat 成为position: fixed后代的 containing block,而审批白条正是靠 fixed 铺满视口——白条因此塌成窗口底部的一条线,只剩「等待审批」可见(#41)。主题在审批面板挂载期间把该提示降回auto,不改 DOM、也不长期关掉上游的合成提示。工作区会话行高亮两侧留缝:app 原生高亮是零几何结构——每行自带 3px 透明描边框,选中态只换背景色;原生淡色下内缩不明显,主题的强高亮色让未上色的描边框透出栏底。主题照原生的结构只换颜色——把描边框刷成同一个高亮色,高亮贴满行盒,文字、栏距、滚动条、圆角(圆角模式 12px)全部保持 app 原生,不再触碰滚动容器的裁剪边界。
细节见 docs/engineering-notes.md。
开关总是「刷新后复位」
先看 Host 侧有没有这份 Config(Config.listConfigs 对该 entry 报 absent 就是没有)。没有 Config 时 DSH 不投影任何表单,Host apply() 会打一行 warn 并在 profile 目录留下报告文件 theme-endfield-diagnostic.json(Config 构建成功时会自动删除它;报告里的 schemaMode / loaded / loadError 会写明走了哪条解析路径、以及某个副本是否「解析得到却加载失败」)。排查与判据见 docs/testing.md#设置页。
另外注意:改 Host 半(index.js)必须整进程重启 DSH,刷新页面只重载 client.js。
文档
| 文档 | 内容 |
|---|---|
| docs/design-language.md | 色板、令牌映射与对比度规则 |
| docs/features.md | 功能行为、默认值、存储键与边界情况 |
| docs/engineering-notes.md | 算法、层叠、动画和性能实现说明 |
| docs/testing.md | 校验脚本与测试套件说明 |
| docs/contour-trail.md | 鼠标轨迹的采样、衰减与验证 |
| docs/contour-worker.md | 可选 Worker / WebGL 等高线渲染与回退 |
| docs/contour-scan-bounds.md | 等高线提取的分块边界算法 |
| docs/audio-notifications.md | 音频通知的实现、防噪规则与自定义音效 |
| docs/glass.md | 可选磨砂玻璃:模糊档位与刻意排除的部件 |
| docs/PR-description.md | 音频通知那次改动的 PR 描述草稿 |
开发与验证
node check.js
node selftest.js
npm test
npm test 覆盖样式不变量、配色、设置页、真实浏览器渲染、等高线平滑/尖点、动画可访问性、覆盖率和 24/60/120 FPS 性能预算。部分浏览器测试需要本机安装 Chrome 或 Edge。
版本与 CI 口径(三者不是同一个集合):
| Node | 测试范围 | |
|---|---|---|
插件运行(package.json 的 engines) |
>=18 |
— |
本地 npm test |
Node 22+ | 全量 |
CI 阻塞门禁(test:ci) |
Node 22 | 全量减去下面三项 |
| CI 非阻塞 job | Node 22 | test:perf + test:coverage,continue-on-error,结果只写进摘要 |
跑测试请用 Node 22+:浏览器 fixture 依赖全局 WebSocket/fetch,版本不足会在测试处明确报错(插件本身的运行没有这个要求)。npm test 比 CI 的 test:ci 多出 contour-coverage、contour-perf 两项:这两项重(渲染全图 / 性能计时),由 CI 的非阻塞 job 单独跑(continue-on-error),结果只写进 PR 摘要而不阻塞合并。
项目结构
src/client/ Client 侧源码片段(拼接顺序见 src/client/manifest.js)
src/host/ Host 侧源码片段(拼接顺序见 src/host/manifest.js)
src/styles/ theme.css:主题样式表(那一整个模板字面量的内容)
src/contour/ 等高线 worker 源码:contour-worker.js + contour-webgl.js(npm run build:worker 嵌入产物)
client.js Client 侧产物,由 src/client/ + src/styles/ 拼接而来
index.js Host 侧产物,由 src/host/ 拼接而来;package.json 的 main 与 exports["."] 都指向它
scripts/ 构建与门禁:lib/bundle-build.js 拼接器 + build-*.js 入口
lib/ 音频通知:槽位定义、WAV 合成与播放运行时
locale/ 插件卡片的展示文案(meta.title / meta.description)
sounds/ 生成的通知音(npm run sound:build 重新生成)
cordis.patch.yml Bundle 注入配置
check.js 样式表静态校验
selftest.js 校验器自检
test/ 渲染、设置、配色与性能测试(tools/ 为截图与目视检查脚本)
docs/ 设计、功能、工程与测试文档
SECURITY.md 安全边界:发布产物清单与运行时权限(由 CI 的 package-check.js 与 files 白名单逐项核对)
screenshots.json 界面截图清单(对应 assets/ 下的 webp)
.github/ CI 工作流与检查脚本(不进发布产物)
client.js 与 index.js 是构建产物,不要直接编辑:改 src/ 下的片段,再跑
npm run build:client / npm run build:host(等高线 worker 走 npm run build:worker)。
npm run check 与 CI 都用 --check 验证产物没有过期:产物与源码不一致时报出第一个差异行。
片段划分与改动规则见 docs/engineering-notes.md 的「源码是真源,产物是拼出来的」。
素材归属
本插件是非官方同人作品,与鹰角网络(Hypergryph)不存在任何隶属、赞助或背书关系。
- 《明日方舟:终末地》(Arknights: Endfield)的游戏名称、标识、商标、官网视觉与设计语言及相关美术素材,版权归**鹰角网络(上海鹰角网络科技有限公司,Hypergryph Network Technology)**所有。
- 本仓库中的部分素材(如
assets/下的界面截图,以及主题中还原的ENDFIELD字标、信号黄配色与工业编辑风版式)源自或参考上述作品及其官网,仅用于学习、展示与非商业用途;其权利仍归鹰角网络所有,不在本项目的 MIT 许可证覆盖范围内。 - 本项目的原创代码(
client.js、index.js、src/、scripts/、test/等)以 MIT 许可证发布。 - 若权利方认为本仓库中的任何素材使用不当,请通过 Issue 联系,我们会立即删除或替换相关内容。
许可证
MIT,仅覆盖本项目的原创代码;第三方素材的归属见素材归属。
Star History
Links
More in this category
elysia395/dsh-wallpaper-engine★ 7716
Requires DeepSeek Harness 0.1.5-rc.1+ (DSH Desktop >= 2.0.7) and dsh-better-sidebar >= 0.19.0 - update both before installing or updating this plugin. Plays local Wallpaper Engine Video/Web wallpapers behind the chat, renders Scene wallpapers as extracted static frames, and adds content-rating/type filters, custom uploads and an iOS-style liquid-glass settings window.
Small-tailqwq/dsh-deep-whale#maid-atelier★ 3129
Whale-girl skin series for the DSH Web UI (maid-atelier).
Nwflower/dsh-claude-style★ 672
Claude Code Desktop look-and-feel for the DSH Web GUI — ivory/warm-black dual canvas, clay accent, three-font typography, permission segmented control and brand switcher, via CSS overrides and client DOM overrides.
kingOfSoySauce/dsh-liang-skin★ 402
Adaptive reasoning slider skin that maps each model's available reasoning efforts onto a 0–30 visual intensity scale, with synchronized portraits, background, and interface colors.
d-dev0101/open-sea-skin★ 399
Realtime WebGPU ocean skin with quick controls for waves, daylight, glass opacity, and an automatic day cycle.
webkubor/dsh-bloom-theme★ 307
Bloom Morandi theme: fifteen variants (mist, cinnabar, petal, ripple, sage, stone, lapis, amber, aurora, lavender, mint, tangerine, silverrose, dawn, osmanthus) built on OKLCH so light and dark stay perceptually even; twelve are featured in the top-bar switcher, grouped by color family, and all 30 foreground/background pairs are measured at WCAG AA or better.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.