fix(ui): 顶部栏Logo居中预览、移除预设选择器,并完善版本信息OTA下载进度条交互

1. Logo授权管理:
   - 顶部导航栏预览舱实现 Logo 图像与文本绝对居中对齐展示;
   - 移除快速预设体验模块,聚焦纯净的本地图片上传与拖拽交互;
   - 重新无头渲染 1200x800 高清效果图。
2. 版本信息:
   - 落地 OTA 固件下载进度条,精准内嵌于【系统更新】卡片内部;
   - 按钮支持 下载 -> 暂停/继续 -> 验证完成(立即安装重启) 四态动态联动。
This commit is contained in:
zhy200308
2026-08-17 18:57:11 +08:00
parent fa961c8820
commit a9747c9a78
7 changed files with 399 additions and 129 deletions
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Logo 授权管理 - Master-Detail Inset Studio (全功能交互版)</title>
<title>Logo 授权管理 - Master-Detail Inset Studio (居中预览版)</title>
<style>
/* =========================================================================
全局统一色彩与 Design Tokens (严格对齐 #2563EB 体系)
@@ -141,19 +141,23 @@ body {
}
.studio-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
/* 顶部栏实时预览模拟舱 (Live Mockup Bar) */
/* 顶部栏实时预览模拟舱 (Live Mockup Bar - 居中核心结构) */
.live-mockup-container {
display: flex; flex-direction: column; gap: 8px;
}
.mockup-label { font-size: 13px; font-weight: 700; color: var(--text-sub); display: flex; align-items: center; gap: 6px; }
.mockup-appbar-frame {
height: 56px; background: #F8FAFC; border: 1.5px dashed #94A3B8; border-radius: 12px;
display: flex; align-items: center; padding: 0 16px; gap: 12px; transition: all 0.2s ease;
display: flex; align-items: center; justify-content: center; position: relative; padding: 0 16px;
transition: all 0.2s ease;
}
.mockup-arrow { width: 20px; height: 20px; fill: var(--text-main); }
.mockup-brand-text { font-size: 17px; font-weight: 700; color: var(--text-main); letter-spacing: -0.01em; }
.mockup-brand-img { max-height: 32px; max-width: 160px; object-fit: contain; }
.mockup-arrow {
width: 20px; height: 20px; fill: var(--text-main); position: absolute; left: 16px;
}
.mockup-center-slot {
display: inline-flex; align-items: center; justify-content: center; max-width: calc(100% - 80px);
}
.mockup-brand-text { font-size: 17px; font-weight: 700; color: var(--text-main); letter-spacing: -0.01em; text-align: center; }
.mockup-brand-img { max-height: 36px; max-width: 200px; object-fit: contain; }
/* 文本模式表单 */
.brand-form-stack { display: flex; flex-direction: column; gap: 16px; }
@@ -276,15 +280,17 @@ body {
<div>
<div class="studio-section-header">
<span class="studio-title">顶部栏实时效果预览</span>
<span style="font-size: 12px; color: var(--text-sub);">所见即所得 · 打字/选图即时同步渲染</span>
<span style="font-size: 12px; color: var(--text-sub);">所见即所得 · 居中实时同步渲染</span>
</div>
<!-- 顶部栏实时预览模拟舱 (Live Mockup Bar) -->
<!-- 顶部栏实时预览模拟舱 (居中展示) -->
<div class="live-mockup-container" style="margin-top: 14px;">
<div class="mockup-appbar-frame" id="mockupFrame">
<svg class="mockup-arrow" viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
<span class="mockup-brand-text" id="mockupText">EAP Manage</span>
<img class="mockup-brand-img" id="mockupImg" src="" style="display: none;" alt="Logo Preview">
<div class="mockup-center-slot">
<span class="mockup-brand-text" id="mockupText">EAP Manage</span>
<img class="mockup-brand-img" id="mockupImg" src="" style="display: none;" alt="Logo Preview">
</div>
</div>
</div>
</div>
@@ -301,24 +307,15 @@ body {
</div>
</div>
<!-- 图片模式表单 (可点击真机上传文件,也可选择预设) -->
<!-- 图片模式表单 (点击或拖拽上传企业Logo图片) -->
<div class="brand-form-stack" id="imageModeForm" style="display: none;">
<input type="file" id="realFileInput" accept="image/png, image/svg+xml, image/jpeg" style="display: none;" onchange="handleRealFileSelected(event)">
<div class="image-upload-dropzone" onclick="document.getElementById('realFileInput').click()">
<svg style="width: 36px; height: 36px; fill: var(--color-primary);" viewBox="0 0 24 24"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></svg>
<b style="font-size: 14.5px; color: var(--color-primary);" id="uploadZoneText">点击或拖拽上传企业 Logo 图片</b>
<svg style="width: 42px; height: 42px; fill: var(--color-primary);" viewBox="0 0 24 24"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></svg>
<b style="font-size: 15px; color: var(--color-primary);" id="uploadZoneText">点击或拖拽上传企业 Logo 图片</b>
<span style="font-size: 12px; color: var(--text-sub);">支持 PNG / SVG 透明背景,建议尺寸 180×48 px,单张小于 2MB</span>
</div>
<div>
<span style="font-size: 12.5px; font-weight: 700; color: var(--text-sub);">快速预设体验:</span>
<div class="preset-logos-row">
<button class="preset-chip" onclick="applyPresetLogo('MedTech', '%23059669', '🏥 MedTech Pro')">🏥 医疗健康 (MedTech)</button>
<button class="preset-chip" onclick="applyPresetLogo('GymHub', '%232563EB', '⚡ GYM HUB')">⚡ 极客健身 (GymHub)</button>
<button class="preset-chip" onclick="applyPresetLogo('UmiLab', '%23E11D48', '🧬 UmiLab AI')">🧬 智能实验室 (UmiLab)</button>
</div>
</div>
</div>
</div>
</main>
@@ -399,7 +396,7 @@ body {
const mockupImg = document.getElementById('mockupImg');
mockupImg.src = e.target.result;
document.getElementById('uploadZoneText').innerText = `已载入: ${file.name} (${Math.round(file.size/1024)} KB)`;
showToast(`已成功载入图片 ${file.name}!顶部栏已即时预览`);
showToast(`已成功载入图片 ${file.name}!顶部栏已居中实时预览`);
};
reader.readAsDataURL(file);
}