mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-27 16:50:22 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b3f8ede49 |
No files matched your search
@@ -1145,6 +1145,23 @@ body[data-ds-dark-theme] .dshp-launch{background:color-mix(in srgb,var(--dsw-ali
|
||||
.dshp-dock[data-theme="white"] .dshp-dock-body .rt-err{color:#9a3434!important}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-err{color:#f0b4b4!important}
|
||||
.dshp-dock-body .rt-rep-http,.dshp-dock-body pre{background:var(--rt-well)!important;color:var(--dshp-ink)!important;border:1px solid var(--dshp-line)!important}
|
||||
/* #196:暗色宿主里 --dsw-alias-brand-primary 解析为近白色(neutral-bluish-50 #f9fafb),
|
||||
任何“品牌色作底 + 白字”的按钮都会变成白底白字。暗色下主按钮统一改用绿色实底。 */
|
||||
body[data-ds-dark-theme] .dshp-btn-primary,
|
||||
.dshp-root[data-theme="dusk"] .dshp-btn-primary,
|
||||
.dshp-dock[data-theme="dusk"] .dshp-btn-primary,
|
||||
.dshp-restart-mask[data-theme="dusk"] .dshp-btn-primary{background:#3d8f68!important;border-color:#3d8f68!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
|
||||
body[data-ds-dark-theme] .dshp-btn-primary:hover:not(:disabled),
|
||||
.dshp-root[data-theme="dusk"] .dshp-btn-primary:hover:not(:disabled),
|
||||
.dshp-dock[data-theme="dusk"] .dshp-btn-primary:hover:not(:disabled),
|
||||
.dshp-restart-mask[data-theme="dusk"] .dshp-btn-primary:hover:not(:disabled){background:#347a59!important;border-color:#347a59!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
|
||||
body[data-ds-dark-theme] .rt-btn-primary,
|
||||
body[data-ds-dark-theme] .rt-btn-primary:hover:not(:disabled),
|
||||
.dshp-dock[data-theme="dusk"] .rt-btn-primary,
|
||||
.dshp-dock[data-theme="dusk"] .rt-btn-primary:hover:not(:disabled),
|
||||
body[data-ds-dark-theme] .dshp-dock-body .rt-btn-primary,
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-btn-primary{background:#3d8f68!important;border-color:#3d8f68!important;color:#fff!important;-webkit-text-fill-color:#fff!important;backdrop-filter:none}
|
||||
body[data-ds-dark-theme] .rt-rep-step-no,.dshp-dock[data-theme="dusk"] .rt-rep-step-no{background:#3d8f68;color:#fff}
|
||||
`;
|
||||
|
||||
function formatSize(bytes) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dsh-purge",
|
||||
"version": "1.1.84",
|
||||
"version": "1.1.85",
|
||||
"description": "DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
# 1.1.85
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本 **1.1.85**。
|
||||
- **#196**:修复深色模式下部分按钮白底白字、完全看不清的问题。
|
||||
- 根因:宿主暗色主题把 `--dsw-alias-brand-primary` 解析成近白色(`neutral-bluish-50` `#f9fafb`)。插件里凡是"品牌色作底 + 白字"的按钮(设置页的「应用」「保存注入」、演练台的「保存」「检索」「检测连通性」以及各类主按钮)在暗色下就变成一整块白。
|
||||
- 现在暗色(`body[data-ds-dark-theme]`、`[data-theme="dusk"]`)下主按钮统一用绿色实底 `#3d8f68` + 白字,悬停用更深的 `#347a59`;`-webkit-text-fill-color` 一并显式指定,避免宿主强制白字穿透。
|
||||
- 报告里的步骤序号圆点(`.rt-rep-step-no`)同样改为绿底白字。
|
||||
- 浅色模式表现不变;新增 `test/client-dark-theme.test.js` 静态守护这几条暗色规则。
|
||||
- 测试:84/84 通过。
|
||||
|
||||
## English
|
||||
|
||||
- **1.1.85**.
|
||||
- **#196**: fix buttons in dark mode rendering as a solid white block (white text on white background).
|
||||
- Root cause: the host dark theme resolves `--dsw-alias-brand-primary` to a near-white token (`neutral-bluish-50`, `#f9fafb`). Every plugin button that used "brand color as background + white text" (settings **Apply**, **Save injection**, drill console **Save**, **Search**, **Test connectivity**, and other primary buttons) turned into a white block in dark mode.
|
||||
- Primary buttons under dark themes (`body[data-ds-dark-theme]`, `[data-theme="dusk"]`) now use a solid green `#3d8f68` with white text, with `#347a59` on hover; `-webkit-text-fill-color` is set explicitly so host-forced white text cannot leak through.
|
||||
- The report step-number dots (`.rt-rep-step-no`) are switched to the same green/white pair.
|
||||
- Light mode is unchanged; added `test/client-dark-theme.test.js` to guard these dark-mode rules.
|
||||
- Tests: 84/84 pass.
|
||||
|
||||
# 1.1.84
|
||||
|
||||
## 中文
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import test from "node:test";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const client = readFileSync(join(root, "client.js"), "utf8");
|
||||
|
||||
function rule(selector) {
|
||||
const at = client.indexOf(selector);
|
||||
if (at < 0) return "";
|
||||
const brace = client.indexOf("{", at);
|
||||
const end = client.indexOf("}", brace);
|
||||
return brace < 0 || end < 0 ? "" : client.slice(brace + 1, end);
|
||||
}
|
||||
|
||||
test("#196 暗色宿主主按钮不再使用近白色品牌底", () => {
|
||||
// 宿主暗色下 --dsw-alias-brand-primary = #f9fafb,直接拿它作底会白底白字。
|
||||
for (const selector of [
|
||||
'body[data-ds-dark-theme] .dshp-btn-primary',
|
||||
'.dshp-root[data-theme="dusk"] .dshp-btn-primary',
|
||||
'.dshp-dock[data-theme="dusk"] .dshp-btn-primary',
|
||||
'body[data-ds-dark-theme] .rt-btn-primary',
|
||||
'.dshp-dock[data-theme="dusk"] .rt-btn-primary',
|
||||
'.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-btn-primary',
|
||||
]) {
|
||||
const body = rule(selector);
|
||||
assert.match(body, /background:#3d8f68!important/, selector);
|
||||
assert.match(body, /color:#fff!important/, selector);
|
||||
}
|
||||
});
|
||||
|
||||
test("#196 暗色主按钮悬停仍有可读底色", () => {
|
||||
const body = rule('body[data-ds-dark-theme] .dshp-btn-primary:hover:not(:disabled)');
|
||||
assert.match(body, /background:#347a59!important/);
|
||||
});
|
||||
|
||||
test("#196 报告步骤序号圆点暗色下保持绿底白字", () => {
|
||||
const at = client.indexOf('body[data-ds-dark-theme] .rt-rep-step-no,.dshp-dock[data-theme="dusk"] .rt-rep-step-no');
|
||||
assert.notEqual(at, -1);
|
||||
const body = client.slice(at, client.indexOf("}", at));
|
||||
assert.match(body, /background:#3d8f68/);
|
||||
assert.match(body, /color:#fff/);
|
||||
});
|
||||
Reference in new issue
Block a user