feat: 前端HESUPIPE品牌化+管道文案+GDPR提示
- 品牌色橙#f08a31→HESUPIPE蓝#066fc0(取自官网主题CSS a:hover/导航主色),7槽位色板三处同步:theme.js/widget.js内联副本/style.css :root - chat.html/widget.js/js/chat.js:标题HESUPIPE Support、管道场景描述、欢迎语、热门话题Get Quotation/Pipe Specifications/Delivery & Shipping、WhatsApp+8615937108317、邮箱hesu@hesuu.com - 邀请卡文案管道化(pipe specs, MOQ, delivery timing)+GDPR小字;聊天面板footer GDPR行(复用.chat-footer) - admin.html VOLT→HESUPIPE;头像PIL重绘为品牌蓝底白H(512/128px) - widget-test.html色值同步+断言基准更新(浏览器断言9/9 Δ=0);.gitignore排除.playwright-mcp/ Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+12
-12
@@ -24,11 +24,11 @@
|
||||
p { color: #666; line-height: 1.6; }
|
||||
ul { color: #666; }
|
||||
.test-list li { margin-bottom: 8px; }
|
||||
.test-list li::before { content: "☐ "; color: #f08a31; font-weight: bold; }
|
||||
.test-list li::before { content: "☐ "; color: #066fc0; font-weight: bold; }
|
||||
#assertions div { padding: 4px 0; border-bottom: 1px solid #eee; font-family: Consolas, monospace; font-size: 13px; }
|
||||
#assertions div:last-child { border-bottom: none; }
|
||||
#colorPicker { width: 48px; height: 32px; padding: 0; border: 1px solid #ccc; border-radius: 4px; vertical-align: middle; cursor: pointer; }
|
||||
.btn { padding: 8px 16px; background: #f08a31; color: white; border: none; border-radius: 4px; cursor: pointer; margin-right: 6px; }
|
||||
.btn { padding: 8px 16px; background: #066fc0; color: white; border: none; border-radius: 4px; cursor: pointer; margin-right: 6px; }
|
||||
.btn:hover { opacity: 0.9; }
|
||||
</style>
|
||||
</head>
|
||||
@@ -39,11 +39,11 @@
|
||||
<p><strong>Expected behavior:</strong></p>
|
||||
<ul class="test-list">
|
||||
<li>Invite card appears after 5 seconds</li>
|
||||
<li>Invite card has orange gradient header with robot emoji</li>
|
||||
<li>Two topic buttons: "Get Quotation" and "Distributor Cooperation"</li>
|
||||
<li>Invite card has blue gradient header with robot emoji</li>
|
||||
<li>Three topic buttons: "Get Quotation", "Pipe Specifications" and "Delivery & Shipping"</li>
|
||||
<li>Action buttons: "Start Chat" and "No Thanks"</li>
|
||||
<li>Click "Get Quotation" → invite closes → chat opens → message auto-sends</li>
|
||||
<li>Click "Distributor Cooperation" → invite closes → chat opens → message auto-sends</li>
|
||||
<li>Click "Pipe Specifications" → invite closes → chat opens → message auto-sends</li>
|
||||
<li>Click "Start Chat" → invite closes → chat opens</li>
|
||||
<li>Click "No Thanks" → invite permanently closes</li>
|
||||
<li>Click "No Thanks" or X → refresh → invite stays hidden AND the old card area stays clickable (no invisible overlay; regression 2026-09-01)</li>
|
||||
@@ -64,9 +64,9 @@
|
||||
<h2>Theme Color Preview</h2>
|
||||
<p>Pick a color and Apply, or use a preset. Each click tears down the old widget (host + script + invite dismissal state) and re-embeds with <code>data-color</code>. "Test Broken Avatar" points <code>data-avatar</code> at a missing image to verify the 🤖 emoji fallback.</p>
|
||||
<p>
|
||||
<input type="color" id="colorPicker" value="#f08a31">
|
||||
<input type="color" id="colorPicker" value="#066fc0">
|
||||
<button class="btn" onclick="applyColor()">Apply</button>
|
||||
<button class="btn" onclick="applyColor('#f08a31')">Orange</button>
|
||||
<button class="btn" onclick="applyColor('#066fc0')">Brand Blue</button>
|
||||
<button class="btn" onclick="applyColor('#1a73e8')">Blue</button>
|
||||
<button class="btn" onclick="applyColor('#16a34a')">Green</button>
|
||||
<button class="btn" onclick="applyColor('#7c3aed')">Purple</button>
|
||||
@@ -103,7 +103,7 @@
|
||||
"data-mobile": "true",
|
||||
"data-debug": "true",
|
||||
"data-whatsapp": "https://wa.me/8613800138000",
|
||||
"data-email": "mailto:demo@hesu-auto.com"
|
||||
"data-email": "mailto:demo@hesupipe.com"
|
||||
};
|
||||
|
||||
var rebuildLoading = false, rebuildPending = null;
|
||||
@@ -142,9 +142,9 @@
|
||||
}
|
||||
|
||||
/* ===== 断言面板(spec §8.2) ===== */
|
||||
var CURRENT_HARDCODED = { // 现状代表值(spec §4),Δ ≤ 8/通道
|
||||
primary: "#f08a31", gradientEnd: "#F08A34", deepText: "#8C4D1D",
|
||||
captionText: "#C16C2E", softBg: "#FFF8F3", borderSoft: "#F0D5BF"
|
||||
var CURRENT_HARDCODED = { // 现状代表值(HESUPIPE 品牌蓝 #066fc0 派生),Δ ≤ 8/通道
|
||||
primary: "#066fc0", gradientEnd: "#0666bb", deepText: "#14517a",
|
||||
captionText: "#2174ab", softBg: "#f3f9fe", borderSoft: "#bbdcf2"
|
||||
};
|
||||
function hexToRgb6(h) {
|
||||
h = String(h).replace(/^#/, "");
|
||||
@@ -161,7 +161,7 @@
|
||||
if (!t || !d) {
|
||||
rows.push("❌ theme.js / widget debug 钩子未就绪");
|
||||
} else {
|
||||
var p = t.derivePalette("#f08a31");
|
||||
var p = t.derivePalette("#066fc0");
|
||||
Object.keys(CURRENT_HARDCODED).forEach(function (k) {
|
||||
var delta = channelDelta(p[k], CURRENT_HARDCODED[k]);
|
||||
check("default " + k + " Δ≤8", delta <= 8, p[k] + " vs " + CURRENT_HARDCODED[k] + ", Δ=" + delta);
|
||||
|
||||
Reference in New Issue
Block a user