- Главная
- Плагины
- Улучшения UI
- dsh-whale-brand
dsh-whale-brand
hijoelee/dsh-whale-brand
Puts your own animated vector logo over the DSH brand mark in the sidebar and beside the start-page headline, taking over the three single slots sidebar.brand.mark, sidebar.brand.name and conversation.hero.brand.mark. The bundled patch only inserts the plugin into the loader — the official brand plugin (@deepseek-ai/dsh-client-ui-brand-official) holds those slots too, so you must disable it in the profile's cordis.patch.yml and restart. Ships a swimming whale that follows light and dark themes through currentColor and is tuned to stay legible at the sidebar's 24 px.
Установка
dsh plugin --profile web add github:hijoelee/dsh-whale-brandREADME
dsh-whale-brand(侧栏与首屏品牌标记)
把 DeepSeek Harness 侧栏和首屏标题旁的品牌标记,换成你自己的矢量 Logo——带动效、跟随明暗主题、任意缩放不糊。
默认带的是一只会游动的鲸鱼:形状与 DSH 官方那只一致,只是活了。想换成自己的图形,替换 lib/client.js 里那段 SVG 即可。
它换了哪三处
| 位置 | slot | 外壳传下来的尺寸 |
|---|---|---|
| 侧栏展开态的图形标记 | sidebar.brand.mark | 24px |
| 侧栏展开态的文字 | sidebar.brand.name | — |
| 首屏标题左侧的标记 | conversation.hero.brand.mark | 34px |
三个 slot 都是 single(全客户端只能有一个占位者),所以装完必须把官方那版停用掉,见下。
安装
dsh plugin --profile desktop add dsh-whale-brand
装完重启 DSH,并刷新一次页面(Cmd+R)。两步缺一不可:host 只在启动时读插件清单;重启之后页面拿到的可能仍是旧插件图,刷新即好。
装完必须做的一步:停用官方品牌插件
sidebar.brand.mark 是 single slot——注册条目是唯一被允许渲染该键的条目。官方那版由 @deepseek-ai/dsh-client-ui-brand-official 占着,不先停用它,两者会在加载时撞车。
在 profile 的 cordis.patch.yml 里加三行:
- id: ui-brand-official
name: "@deepseek-ai/dsh-client-ui-brand-official"
disabled: true
改完重启 DSH。
本包自带的
cordis.patch.yml只负责把自己插进 loader。停用官方那三行要写在 profile 层,因为官方那一行是官方 bundle 声明的,不是本包能覆盖的。
换成你自己的 Logo
lib/client.js 顶部的 SVG 常量就是全部图形。替换时注意两点:
- 填色用
currentColor,浅色/深色主题就都自动跟随; - 给 class 与 keyframes 加唯一前缀(本包用
wb-)。同一页面里如果还有别的内联 SVG 用了同名@keyframes,后定义的那份会覆盖先定义的——这个坑踩过,症状是"参数改了却没反应"。
改完把文件拷进 profile 的 node_modules/dsh-whale-brand/lib/,刷新页面即可,不用重启(只有改 host 侧代码或 package.json 才需要重启)。
调动作
SVG 的 <style> 里三个动画:
| 动画 | 作用 | 默认值 |
|---|---|---|
wb-swim | 整体上下浮动 + 轻微旋转 | ±2.5(viewBox 单位)/ ±1.6° |
wb-wag | 尾巴摆动 | ±9° |
wb-blink | 眨眼 | 每 5.2 秒一次 |
小尺寸有个门槛:摆尾 ±4° 放到侧栏那个 24px 上,尾尖位移只有约 0.3px,肉眼等于没动。要让动作在 24px 站得住,摆幅得给到 ±9°、整体浮动 ±2.5 单位(各约 0.8px)。
三个周期取 5.2 / 2.6 / 5.2 秒,是为了互相整除、循环无接缝。
prefers-reduced-motion: reduce 下动画全部关闭,并且保持睁眼(覆盖层的静态默认值就是 scaleY(0))。
已知限制
- 需要 DSH 0.1.7 这一线(按
sidebar.brand.*与conversation.hero.brand.mark三个 slot 的当前形态实现)。 - 官方首屏那只本来是「默认静止、hover 才游」。本包给它加了常驻动作;想保留原来的克制感,删掉 SVG 里
.wb-whale的animation即可——外壳的 hover 动画仍会照常触发(它挂在 slot 传下来的className上)。 - 侧栏文字(
deepseek HARNESS)默认沿用官方字形,只换图形。要连文字一起换,改OfficialBrandName组件。
License
MIT
Похожие плагины
dsh-web (dsh-task-board)
zhu1090093659/dsh-web
dsh-web (dsh-web-all)
zhu1090093659/dsh-web
dsh-web-ui (dsh-task-board)
zhu1090093659/dsh-web-ui
dsh-web-ui (dsh-web-ui-all)
zhu1090093659/dsh-web-ui