背景
主题 / 皮肤类插件(如 maid-atelier,Small-tailqwq/dsh-deep-whale)会在 body 上把全局令牌 --dsw-alias-bg-base 改成 transparent,以实现自己的玻璃质感背景。
问题
src/client/TerminalView.tsx:64 附近:
const background = tokenValue('--dsw-alias-bg-base') || (dark ? '#111114' : '#ffffff')
当令牌被改成 transparent 时,tokenValue 返回的是有值但透明的字符串,|| 回退不会触发——终端背景因此变透明,画面直接叠在皮肤的固定背景图上滚动渲染,可读性和性能都受损(该皮肤场景下流式输出明显更卡)。
建议
对「无视觉效力的值」也走回退,例如:
const raw = tokenValue('--dsw-alias-bg-base')
const background = raw && raw !== 'transparent' ? raw : (dark ? '#111114' : '#ffffff')
这样任何主题乱改令牌都伤不到终端可读性。实测环境:Windows 11 / dsh-better-sidebar 0.12.1 / maid-atelier 0.0.1。
TerminalView.tsx reads --dsw-alias-bg-base with an || fallback, but skin plugins set the token to transparent (truthy), so the fallback never fires and the terminal becomes see-through. Suggest also falling back on transparent.
背景
主题 / 皮肤类插件(如 maid-atelier,
Small-tailqwq/dsh-deep-whale)会在 body 上把全局令牌--dsw-alias-bg-base改成transparent,以实现自己的玻璃质感背景。问题
src/client/TerminalView.tsx:64附近:当令牌被改成
transparent时,tokenValue返回的是有值但透明的字符串,||回退不会触发——终端背景因此变透明,画面直接叠在皮肤的固定背景图上滚动渲染,可读性和性能都受损(该皮肤场景下流式输出明显更卡)。建议
对「无视觉效力的值」也走回退,例如:
这样任何主题乱改令牌都伤不到终端可读性。实测环境:Windows 11 / dsh-better-sidebar 0.12.1 / maid-atelier 0.0.1。
TerminalView.tsxreads--dsw-alias-bg-basewith an||fallback, but skin plugins set the token totransparent(truthy), so the fallback never fires and the terminal becomes see-through. Suggest also falling back ontransparent.