refactor: simplify plugin branding

This commit is contained in:
xmanrui 2026-08-20 17:37:44 +08:00
parent 4c5d9722e8
commit e85dfa6a79
5 changed files with 15 additions and 34 deletions

View file

@ -113,7 +113,8 @@ test('IM settings renders nine compact logo channel tabs without enable switches
assert.match(markup, /IM机器人/);
assert.match(markup, /让 DeepSeek Harness 触手可及/);
assert.match(markup, /class="dim-brand"/);
assert.match(markup, /<img class="dim-brandLogo" src="assets\/logo-plugin-phone\.png" alt="dsh-im" width="48" height="48"\/>/);
assert.match(markup, /<strong class="dim-brandName">DSH-IM<\/strong>/);
assert.doesNotMatch(markup, /dim-brandLogo|<img/);
assert.match(markup, /href="https:\/\/github\.com\/xmanrui\/dsh-im"/);
assert.match(markup, /target="_blank"/);
assert.match(markup, /rel="noopener noreferrer"/);
@ -121,10 +122,10 @@ test('IM settings renders nine compact logo channel tabs without enable switches
assert.match(markup, /aria-describedby="[^"]+"/);
assert.match(markup, /role="tooltip"[^>]*>帮助与反馈 · 前往 GitHub</);
assert.match(styles, /\.dim-title \{[^}]*margin: 0 0 18px;/);
assert.match(styles, /\.dim-title p \{[^}]*color: var\(--dsw-alias-label-primary, #1f2329\);[^}]*font-size: 14px;[^}]*font-weight: 600;/);
assert.match(styles, /\.dim-brand \{[^}]*display: flex;[^}]*align-items: center;[^}]*gap: 12px;/);
assert.match(styles, /\.dim-brandLogo \{[^}]*width: 48px;[^}]*height: 48px;[^}]*object-fit: contain;/);
assert.doesNotMatch(styles, /\.dim-brandLogo \{[^}]*filter:/);
assert.match(styles, /\.dim-title p \{[^}]*color: var\(--dsw-alias-label-secondary, #646a73\);[^}]*font-size: 12px;[^}]*font-weight: 500;/);
assert.match(styles, /\.dim-brand \{[^}]*display: flex;[^}]*flex-direction: column;[^}]*align-items: flex-start;[^}]*gap: 1px;/);
assert.match(styles, /\.dim-brandName \{[^}]*font-size: 20px;[^}]*font-weight: 800;[^}]*letter-spacing: \.04em;/);
assert.doesNotMatch(styles, /\.dim-brandLogo/);
assert.match(styles, /\.dim-githubLink \{[^}]*border: 1px solid var\(--dsw-alias-border-l2, #dfe1e5\);[^}]*text-decoration: none;/);
assert.match(styles, /\.dim-githubTooltip \{[^}]*bottom: calc\(100% \+ 8px\);[^}]*transform: translateY\(3px\);/);
assert.match(styles, /\.dim-githubAction:hover \.dim-githubTooltip, \.dim-githubAction:focus-within \.dim-githubTooltip \{[^}]*opacity: 1;[^}]*visibility: visible;/);