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> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>方案 1 (子视图 · 图片Logo模式)</title> <title>方案 1 (图片Logo模式 - 居中预览与纯净上传)</title>
<style> <style>
:root { :root {
--color-primary: #2563EB; --color-primary: #2563EB;
@@ -22,14 +22,11 @@
--text-sub: #64748B; --text-sub: #64748B;
--text-dim: #94A3B8; --text-dim: #94A3B8;
--divider: #E2E8F0; --divider: #E2E8F0;
--border-card: #E2E8F0;
--color-success: #059669; --color-success: #059669;
--color-success-bg: #ECFDF5; --color-success-bg: #ECFDF5;
--color-success-border: #A7F3D0; --color-success-border: #A7F3D0;
--corner-card: 16px;
--corner-item: 10px;
--content-max-width: 1160px; --content-max-width: 1160px;
--content-gutter: clamp(16px, 2.5vw, 32px); --content-gutter: clamp(16px, 2.5vw, 32px);
--appbar-height: 60px; --appbar-height: 60px;
@@ -39,7 +36,7 @@
body { body {
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", Roboto, sans-serif; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", Roboto, sans-serif;
background: var(--bg); color: var(--text-main); min-height: 100vh; background: var(--bg); color: var(--text-main); min-height: 100vh;
padding: var(--content-gutter); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; padding: var(--content-gutter); display: flex; flex-direction: column;
} }
.device-wrapper { .device-wrapper {
@@ -48,102 +45,67 @@ body {
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column; overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
} }
/* 1. AppBar */
.appbar { .appbar {
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between; height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface); flex-shrink: 0; padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
} }
.appbar-left { display: flex; align-items: center; } .appbar-left { display: flex; align-items: center; }
.appbar-nav, .appbar-more { .appbar-nav, .appbar-more {
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
cursor: pointer; background: transparent; border: none; transition: all 0.15s ease; cursor: pointer; background: transparent; border: none;
} }
.appbar-nav:hover, .appbar-more:hover { background: rgba(15, 23, 42, 0.06); transform: scale(0.96); }
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); } .appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; } .appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
/* 2. 经典 360px 1fr 双栏布局 */
.split-body { .split-body {
padding: clamp(20px, 2.5vw, 30px); background: #F8FAFC; flex: 1; overflow-y: auto; padding: clamp(20px, 2.5vw, 30px); background: #F8FAFC; flex: 1; overflow-y: auto;
display: grid; grid-template-columns: 360px 1fr; gap: 20px; max-height: calc(100vh - 120px); display: grid; grid-template-columns: 360px 1fr; gap: 20px;
} }
/* 左侧 360px 品牌控制面板 */
.left-brand-panel { .left-brand-panel {
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 22px; background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 22px;
display: flex; flex-direction: column; justify-content: space-between; gap: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
} }
.panel-header-title { font-size: 17.5px; font-weight: 700; color: var(--color-primary); display: flex; align-items: center; gap: 8px; }
.panel-header-desc { font-size: 12.5px; color: var(--text-sub); margin-top: 4px; }
/* 分段控制器 */
.segmented-control-box { .segmented-control-box {
background: #F1F5F9; border-radius: 10px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #F1F5F9; border-radius: 10px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
} }
.seg-btn { .seg-btn {
height: 38px; border-radius: 8px; border: none; font-size: 13.5px; font-weight: 700; cursor: pointer; height: 38px; border-radius: 8px; border: none; font-size: 13.5px; font-weight: 700; cursor: pointer;
display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-sub); background: transparent;
color: var(--text-sub); background: transparent;
}
.seg-btn.active {
background: white; color: var(--color-primary); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
} }
.seg-btn.active { background: white; color: var(--color-primary); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08); }
/* 品牌授权说明卡片 */
.brand-info-card { .brand-info-card {
background: var(--color-primary-light); border: 1.5px solid var(--color-primary-border); border-radius: 12px; background: var(--color-primary-light); border: 1.5px solid var(--color-primary-border); border-radius: 12px;
padding: 14px; display: flex; flex-direction: column; gap: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px;
} }
.info-row { display: flex; justify-content: space-between; font-size: 12.5px; }
/* 底部全宽保存与恢复按钮 */
.side-actions-stack { display: flex; flex-direction: column; gap: 10px; }
.btn-dynamic-full { .btn-dynamic-full {
width: 100%; height: 44px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; width: 100%; height: 44px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.15s ease; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid transparent;
border: 1.5px solid transparent;
} }
.btn-primary-gradient { .btn-primary-gradient {
background: var(--color-primary-gradient); color: white; background: var(--color-primary-gradient); color: white; box-shadow: 0 4px 12px var(--color-primary-glow);
box-shadow: 0 4px 12px var(--color-primary-glow);
} }
.btn-primary-gradient:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--color-primary-glow); } .btn-secondary-ghost { background: #FFFFFF; color: var(--text-sub); border-color: #CBD5E1; }
.btn-secondary-ghost {
background: #FFFFFF; color: var(--text-sub); border-color: #CBD5E1;
}
.btn-secondary-ghost:hover { background: #F1F5F9; color: var(--text-main); }
/* 右侧 1fr 预览舱与编辑工坊 */
.right-studio-panel { .right-studio-panel {
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 24px; background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 24px;
display: flex; flex-direction: column; gap: 22px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03); display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
} }
.studio-section-header { /* 顶部栏实时预览模拟舱 (居中核心结构) */
display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--divider);
padding-bottom: 12px;
}
.studio-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
/* 顶部栏实时预览模拟舱 */
.live-mockup-container {
display: flex; flex-direction: column; gap: 8px;
}
.mockup-appbar-frame { .mockup-appbar-frame {
height: 56px; background: #F8FAFC; border: 1.5px dashed #94A3B8; border-radius: 12px; height: 56px; background: #F8FAFC; border: 1.5px dashed #94A3B8; border-radius: 12px;
display: flex; align-items: center; padding: 0 16px; gap: 12px; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 16px;
} }
.mockup-arrow { width: 20px; height: 20px; fill: var(--text-main); } .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; }
/* 图片 Logo 模式上传卡 */
.image-upload-dropzone { .image-upload-dropzone {
border: 2px dashed #93C5FD; border-radius: 12px; background: var(--color-primary-light); padding: 32px 24px; border: 2px dashed #93C5FD; border-radius: 12px; background: var(--color-primary-light); padding: 40px 24px;
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer;
cursor: pointer; transition: all 0.2s ease;
} }
</style> </style>
</head> </head>
@@ -151,54 +113,43 @@ body {
<div class="device-wrapper"> <div class="device-wrapper">
<header class="appbar"> <header class="appbar">
<div class="appbar-left"> <div class="appbar-left">
<button class="appbar-nav" title="返回"><svg 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></button> <button class="appbar-nav"><svg 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></button>
<h1 class="appbar-title">Logo 授权管理</h1> <h1 class="appbar-title">Logo 授权管理</h1>
</div> </div>
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button> <button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
</header> </header>
<main class="split-body"> <main class="split-body">
<!-- 左侧 360px 模式切换与授权大盘 -->
<div class="left-brand-panel"> <div class="left-brand-panel">
<div style="display: flex; flex-direction: column; gap: 18px;"> <div style="display: flex; flex-direction: column; gap: 18px;">
<div> <div>
<h2 class="panel-header-title">🛡️ 品牌授权中心</h2> <h2 style="font-size: 17.5px; font-weight: 700; color: var(--color-primary);">🛡️ 品牌授权中心</h2>
<p class="panel-header-desc">自定义顶部导航栏团队标识与商业品牌</p> <p style="font-size: 12.5px; color: var(--text-sub); margin-top: 4px;">自定义顶部导航栏团队标识与商业品牌</p>
</div> </div>
<!-- 分段控制器 (激活图片Logo) -->
<div class="segmented-control-box"> <div class="segmented-control-box">
<button class="seg-btn"> <button class="seg-btn"><span>文本 Logo</span></button>
<svg style="width: 16px; height: 16px; fill: currentColor;" viewBox="0 0 24 24"><path d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></svg> <button class="seg-btn active"><span>图片 Logo</span></button>
<span>文本 Logo</span>
</button>
<button class="seg-btn active">
<svg style="width: 16px; height: 16px; fill: currentColor;" viewBox="0 0 24 24"><path d="M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2zM8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-4.5z"/></svg>
<span>图片 Logo</span>
</button>
</div> </div>
<!-- 授权规则说明卡片 -->
<div class="brand-info-card"> <div class="brand-info-card">
<div class="info-row"> <div style="display: flex; justify-content: space-between; font-size: 12.5px;">
<span style="color: var(--text-sub);">当前模式</span> <span style="color: var(--text-sub);">当前模式</span>
<b style="color: var(--color-primary);">自定义图片 Logo</b> <b style="color: var(--color-primary);">自定义图片 Logo</b>
</div> </div>
<div class="info-row"> <div style="display: flex; justify-content: space-between; font-size: 12.5px;">
<span style="color: var(--text-sub);">建议尺寸</span> <span style="color: var(--text-sub);">建议尺寸</span>
<span style="font-weight: 700; color: var(--text-main);">180 × 48 px (PNG/SVG)</span> <span style="font-weight: 700;">180 × 48 px (PNG/SVG)</span>
</div> </div>
<div class="info-row"> <div style="display: flex; justify-content: space-between; font-size: 12.5px;">
<span style="color: var(--text-sub);">全端同步</span> <span style="color: var(--text-sub);">全端同步</span>
<span style="color: var(--color-success); font-weight: 700;">实时生效</span> <span style="color: var(--color-success); font-weight: 700;">实时生效</span>
</div> </div>
</div> </div>
</div> </div>
<!-- 底部全宽保存与恢复按钮 --> <div style="display: flex; flex-direction: column; gap: 10px;">
<div class="side-actions-stack">
<button class="btn-dynamic-full btn-primary-gradient"> <button class="btn-dynamic-full btn-primary-gradient">
<svg style="width: 16px; height: 16px; fill: currentColor;" viewBox="0 0 24 24"><path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"/></svg>
<span>保存图片配置</span> <span>保存图片配置</span>
</button> </button>
<button class="btn-dynamic-full btn-secondary-ghost"> <button class="btn-dynamic-full btn-secondary-ghost">
@@ -207,24 +158,25 @@ body {
</div> </div>
</div> </div>
<!-- 右侧 1fr 实时效果模拟舱与配置工坊 -->
<div class="right-studio-panel"> <div class="right-studio-panel">
<div class="studio-section-header"> <div>
<span class="studio-title">顶部栏实时效果预览</span> <div style="display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider); padding-bottom: 12px;">
<span style="font-size: 12px; color: var(--text-sub);">图片 Logo 实时模拟</span> <span style="font-size: 15px; font-weight: 700;">顶部栏实时效果预览</span>
<span style="font-size: 12px; color: var(--text-sub);">居中实时模拟</span>
</div> </div>
<!-- 顶部栏实时预览模拟舱 (展现图片预览) --> <!-- 顶部栏实时预览模拟舱 (居中展示图片 Logo) -->
<div class="live-mockup-container"> <div class="mockup-appbar-frame" style="margin-top: 14px;">
<div class="mockup-appbar-frame">
<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> <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>
<div style="height: 30px; padding: 0 12px; background: #2563EB; border-radius: 6px; display: flex; align-items: center; color: white; font-weight: 800; font-size: 13px; letter-spacing: 0.05em;"> <div class="mockup-center-slot">
<div style="height: 32px; padding: 0 16px; background: #2563EB; border-radius: 6px; display: flex; align-items: center; color: white; font-weight: 800; font-size: 13.5px; letter-spacing: 0.05em; box-shadow: 0 2px 8px rgba(37,99,235,0.25);">
COMPANY LOGO COMPANY LOGO
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- 图片上传工坊 --> <!-- 图片上传工坊 (纯净上传拖拽槽,无预设扰动) -->
<div class="image-upload-dropzone"> <div class="image-upload-dropzone">
<svg style="width: 44px; height: 44px; 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> <svg style="width: 44px; height: 44px; 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);">点击或拖拽上传企业 Logo 图片</b> <b style="font-size: 15px; color: var(--color-primary);">点击或拖拽上传企业 Logo 图片</b>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

@@ -0,0 +1,206 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>版本信息 - OTA 下载中进度条展示 (68%)</title>
<style>
:root {
--color-primary: #2563EB;
--color-primary-dark: #1D4ED8;
--color-on-primary-container: #1E40AF;
--color-primary-light: #EFF6FF;
--color-primary-container: #EFF6FF;
--color-primary-border: #DBEAFE;
--color-primary-glow: rgba(37, 99, 235, 0.22);
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
--bg: #EEF2F6;
--surface: #FFFFFF;
--surface-sub: #F8FAFC;
--text-main: #0F172A;
--text-sub: #64748B;
--text-dim: #94A3B8;
--divider: #E2E8F0;
--color-success: #059669;
--color-success-bg: #ECFDF5;
--color-warning: #D97706;
--color-warning-bg: #FFFBEB;
--color-danger: #E11D48;
--color-danger-bg: #FFF1F2;
--color-danger-border: #FFE4E6;
--content-max-width: 1160px;
--content-gutter: clamp(16px, 2.5vw, 32px);
--appbar-height: 60px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", Roboto, sans-serif;
background: var(--bg); color: var(--text-main); min-height: 100vh;
padding: var(--content-gutter); display: flex; flex-direction: column;
}
.device-wrapper {
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
}
.appbar {
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
}
.appbar-left { display: flex; align-items: center; }
.appbar-nav, .appbar-more {
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
cursor: pointer; background: transparent; border: none;
}
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
.split-body {
padding: clamp(20px, 2.5vw, 30px); background: #F8FAFC; flex: 1; overflow-y: auto;
display: grid; grid-template-columns: 360px 1fr; gap: 20px;
}
.left-version-hero {
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 24px;
display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.hero-header-box {
display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
padding-bottom: 18px; border-bottom: 1px solid var(--divider);
}
.app-logo-box {
width: 72px; height: 72px; border-radius: 18px; background: linear-gradient(135deg, #FF6B6B 0%, #EE5253 100%);
display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(238, 82, 83, 0.25);
}
.app-logo-box svg { width: 38px; height: 38px; fill: white; }
.app-title-name { font-size: 18px; font-weight: 800; color: var(--text-main); }
.app-version-badge {
font-size: 13px; font-weight: 700; color: var(--color-primary); background: var(--color-primary-light);
border: 1px solid var(--color-primary-border); padding: 4px 12px; border-radius: 20px;
font-family: ui-monospace, monospace;
}
.ota-update-card {
background: var(--color-primary-light); border: 1.5px solid var(--color-primary-border); border-radius: 12px;
padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.ota-card-title {
font-size: 13px; font-weight: 700; color: var(--color-on-primary-container); display: flex; align-items: center; justify-content: space-between;
}
.ota-badge-status {
font-size: 11px; background: #FFFBEB; color: #D97706; padding: 2px 8px; border-radius: 4px; font-weight: 700;
}
/* 进度条 */
.download-progress-block {
display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--color-primary-border);
}
.progress-meta-row {
display: flex; justify-content: space-between; align-items: center; font-size: 12px;
}
.progress-percent-val {
font-family: ui-monospace, monospace; font-weight: 800; color: var(--color-primary); font-size: 13.5px;
}
.progress-track-bg {
width: 100%; height: 8px; background: #DBEAFE; border-radius: 10px; overflow: hidden;
}
.progress-fill-bar {
height: 100%; width: 68%; background: var(--color-primary-gradient); border-radius: 10px;
}
.progress-stats-row {
display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); font-family: ui-monospace, monospace;
}
.btn-downloading-ghost {
width: 100%; height: 46px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
background: #FFFFFF; color: var(--text-main); border: 1.5px solid #CBD5E1; display: flex; align-items: center; justify-content: center;
}
.right-details-panel { display: flex; flex-direction: column; gap: 16px; }
.info-card-block {
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 20px 24px;
display: flex; flex-direction: column; gap: 14px;
}
.kv-table { display: flex; flex-direction: column; gap: 12px; }
.kv-row-item { display: flex; align-items: center; justify-content: space-between; }
</style>
</head>
<body>
<div class="device-wrapper">
<header class="appbar">
<div class="appbar-left">
<button class="appbar-nav"><svg 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></button>
<h1 class="appbar-title">版本信息</h1>
</div>
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
</header>
<main class="split-body">
<div class="left-version-hero">
<div style="display: flex; flex-direction: column; gap: 18px;">
<div class="hero-header-box">
<div class="app-logo-box">
<svg viewBox="0 0 24 24"><path d="M5 9.2h3V19H5V9.2zM10.6 5h2.8v14h-2.8V5zm5.6 8H19v6h-2.8v-6z"/></svg>
</div>
<div class="app-title-name">EAP Manage Team</div>
<div class="app-version-badge">版本号 1.00.0000</div>
</div>
<div class="ota-update-card">
<div class="ota-card-title">
<span>系统更新</span>
<span class="ota-badge-status">下载中</span>
</div>
<div style="display: flex; justify-content: space-between; align-items: baseline;">
<span style="font-size: 12.5px; color: var(--text-sub);">目标版本:</span>
<span style="font-size: 16px; font-weight: 800; color: var(--color-primary); font-family: monospace;">1.00.0001</span>
</div>
<!-- 下载进度条 -->
<div class="download-progress-block">
<div class="progress-meta-row">
<span style="font-weight: 600; color: var(--text-main);">正在下载固件包...</span>
<span class="progress-percent-val">68%</span>
</div>
<div class="progress-track-bg">
<div class="progress-fill-bar"></div>
</div>
<div class="progress-stats-row">
<span>26.1 MB / 38.4 MB</span>
<span>2.8 MB/s · 剩余 4秒</span>
</div>
</div>
</div>
</div>
<button class="btn-downloading-ghost">
<span>⏸️ 暂停下载</span>
</button>
</div>
<div class="right-details-panel">
<div class="info-card-block">
<div style="font-size: 15px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--divider);">📱 设备信息</div>
<div class="kv-table">
<div class="kv-row-item"><span style="color: var(--text-sub);">硬件 ID</span><b style="font-family: monospace;">15EA5B1C22D14D97</b></div>
<div class="kv-row-item"><span style="color: var(--text-sub);">设备型号</span><b>TB375FC</b></div>
<div class="kv-row-item"><span style="color: var(--text-sub);">Android 版本</span><b>16 (API 36)</b></div>
</div>
</div>
<div class="info-card-block">
<div style="font-size: 15px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--divider);">🛠️ 构建信息</div>
<div class="kv-table">
<div class="kv-row-item"><span style="color: var(--text-sub);">构建类型</span><span style="background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid var(--color-danger-border); padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 12px;">Debug</span></div>
<div class="kv-row-item"><span style="color: var(--text-sub);">编译环境</span><span style="font-family: monospace; font-size: 13px;">UmiLab CI/CD Pipeline</span></div>
</div>
</div>
<div style="text-align: center; font-size: 12px; color: var(--text-dim); margin-top: auto;">© 2026 UmiLab. All rights reserved.</div>
</div>
</main>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <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> <style>
/* ========================================================================= /* =========================================================================
全局统一色彩与 Design Tokens (严格对齐 #2563EB 体系) 全局统一色彩与 Design Tokens (严格对齐 #2563EB 体系)
@@ -141,19 +141,23 @@ body {
} }
.studio-title { font-size: 15px; font-weight: 700; color: var(--text-main); } .studio-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
/* 顶部栏实时预览模拟舱 (Live Mockup Bar) */ /* 顶部栏实时预览模拟舱 (Live Mockup Bar - 居中核心结构) */
.live-mockup-container { .live-mockup-container {
display: flex; flex-direction: column; gap: 8px; 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 { .mockup-appbar-frame {
height: 56px; background: #F8FAFC; border: 1.5px dashed #94A3B8; border-radius: 12px; 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-arrow {
.mockup-brand-text { font-size: 17px; font-weight: 700; color: var(--text-main); letter-spacing: -0.01em; } width: 20px; height: 20px; fill: var(--text-main); position: absolute; left: 16px;
.mockup-brand-img { max-height: 32px; max-width: 160px; object-fit: contain; } }
.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; } .brand-form-stack { display: flex; flex-direction: column; gap: 16px; }
@@ -276,18 +280,20 @@ body {
<div> <div>
<div class="studio-section-header"> <div class="studio-section-header">
<span class="studio-title">顶部栏实时效果预览</span> <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> </div>
<!-- 顶部栏实时预览模拟舱 (Live Mockup Bar) --> <!-- 顶部栏实时预览模拟舱 (居中展示) -->
<div class="live-mockup-container" style="margin-top: 14px;"> <div class="live-mockup-container" style="margin-top: 14px;">
<div class="mockup-appbar-frame" id="mockupFrame"> <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> <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>
<div class="mockup-center-slot">
<span class="mockup-brand-text" id="mockupText">EAP Manage</span> <span class="mockup-brand-text" id="mockupText">EAP Manage</span>
<img class="mockup-brand-img" id="mockupImg" src="" style="display: none;" alt="Logo Preview"> <img class="mockup-brand-img" id="mockupImg" src="" style="display: none;" alt="Logo Preview">
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- 文本模式表单 --> <!-- 文本模式表单 -->
<div class="brand-form-stack" id="textModeForm"> <div class="brand-form-stack" id="textModeForm">
@@ -301,24 +307,15 @@ body {
</div> </div>
</div> </div>
<!-- 图片模式表单 (可点击真机上传文件,也可选择预设) --> <!-- 图片模式表单 (点击或拖拽上传企业Logo图片) -->
<div class="brand-form-stack" id="imageModeForm" style="display: none;"> <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)"> <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()"> <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> <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: 14.5px; color: var(--color-primary);" id="uploadZoneText">点击或拖拽上传企业 Logo 图片</b> <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> <span style="font-size: 12px; color: var(--text-sub);">支持 PNG / SVG 透明背景,建议尺寸 180×48 px,单张小于 2MB</span>
</div> </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>
</div> </div>
</main> </main>
@@ -399,7 +396,7 @@ body {
const mockupImg = document.getElementById('mockupImg'); const mockupImg = document.getElementById('mockupImg');
mockupImg.src = e.target.result; mockupImg.src = e.target.result;
document.getElementById('uploadZoneText').innerText = `已载入: ${file.name} (${Math.round(file.size/1024)} KB)`; document.getElementById('uploadZoneText').innerText = `已载入: ${file.name} (${Math.round(file.size/1024)} KB)`;
showToast(`已成功载入图片 ${file.name}!顶部栏已即时预览`); showToast(`已成功载入图片 ${file.name}!顶部栏已居中实时预览`);
}; };
reader.readAsDataURL(file); reader.readAsDataURL(file);
} }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>版本信息 - Master-Detail Inset Station (360px 1fr)</title> <title>版本信息 - Master-Detail Inset Station (OTA 下载进度与状态联动版)</title>
<style> <style>
/* ========================================================================= /* =========================================================================
全局统一色彩与 Design Tokens (严格对齐 #2563EB 体系) 全局统一色彩与 Design Tokens (严格对齐 #2563EB 体系)
@@ -30,6 +30,7 @@
--color-success: #059669; --color-success: #059669;
--color-success-bg: #ECFDF5; --color-success-bg: #ECFDF5;
--color-success-border: #A7F3D0; --color-success-border: #A7F3D0;
--color-success-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
--color-warning: #D97706; --color-warning: #D97706;
--color-warning-bg: #FFFBEB; --color-warning-bg: #FFFBEB;
@@ -88,7 +89,7 @@ body {
.hero-header-box { .hero-header-box {
display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
padding-bottom: 20px; border-bottom: 1px solid var(--divider); padding-bottom: 18px; border-bottom: 1px solid var(--divider);
} }
.app-logo-box { .app-logo-box {
width: 72px; height: 72px; border-radius: 18px; background: linear-gradient(135deg, #FF6B6B 0%, #EE5253 100%); width: 72px; height: 72px; border-radius: 18px; background: linear-gradient(135deg, #FF6B6B 0%, #EE5253 100%);
@@ -102,23 +103,51 @@ body {
font-family: ui-monospace, monospace; font-family: ui-monospace, monospace;
} }
/* OTA 系统更新卡片 */ /* OTA 系统更新卡片 (内嵌高质感动态进度条) */
.ota-update-card { .ota-update-card {
background: var(--color-primary-light); border: 1.5px solid var(--color-primary-border); border-radius: 12px; background: var(--color-primary-light); border: 1.5px solid var(--color-primary-border); border-radius: 12px;
padding: 16px; display: flex; flex-direction: column; gap: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: all 0.3s ease;
} }
.ota-card-title { .ota-card-title {
font-size: 13px; font-weight: 700; color: var(--color-on-primary-container); display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--color-on-primary-container); display: flex; align-items: center; justify-content: space-between;
} }
.ota-badge-status {
font-size: 11px; background: #DBEAFE; color: var(--color-primary); padding: 2px 8px; border-radius: 4px; font-weight: 700;
transition: all 0.2s ease;
}
.ota-new-version { .ota-new-version {
display: flex; align-items: baseline; justify-content: space-between; display: flex; align-items: baseline; justify-content: space-between;
} }
.ota-version-code { font-size: 16px; font-weight: 800; color: var(--color-primary); font-family: ui-monospace, monospace; } .ota-version-code { font-size: 16px; font-weight: 800; color: var(--color-primary); font-family: ui-monospace, monospace; }
/* 底部贯穿式升级按钮 */ /* 动态进度条区域 (下载时平滑展示) */
.download-progress-block {
display: none; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--color-primary-border);
}
.progress-meta-row {
display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-sub);
}
.progress-percent-val {
font-family: ui-monospace, monospace; font-weight: 800; color: var(--color-primary); font-size: 13px;
}
.progress-track-bg {
width: 100%; height: 8px; background: #DBEAFE; border-radius: 10px; overflow: hidden; position: relative;
}
.progress-fill-bar {
height: 100%; width: 0%; background: var(--color-primary-gradient); border-radius: 10px;
transition: width 0.2s linear; box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}
.progress-stats-row {
display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); font-family: ui-monospace, monospace;
}
/* 底部贯穿式升级按钮组 */
.btn-dynamic-full { .btn-dynamic-full {
width: 100%; height: 46px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; width: 100%; height: 46px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.15s ease; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s ease;
border: 1.5px solid transparent; border: 1.5px solid transparent;
} }
.btn-primary-gradient { .btn-primary-gradient {
@@ -127,6 +156,17 @@ body {
} }
.btn-primary-gradient:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--color-primary-glow); } .btn-primary-gradient:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--color-primary-glow); }
.btn-success-gradient {
background: var(--color-success-gradient); color: white;
box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}
.btn-success-gradient:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35); }
.btn-downloading-ghost {
background: #FFFFFF; color: var(--text-main); border: 1.5px solid #CBD5E1;
}
.btn-downloading-ghost:hover { background: #F1F5F9; border-color: var(--text-sub); }
/* 右侧 1fr 设备与底层系统信息矩阵 */ /* 右侧 1fr 设备与底层系统信息矩阵 */
.right-details-panel { .right-details-panel {
display: flex; flex-direction: column; gap: 16px; display: flex; flex-direction: column; gap: 16px;
@@ -184,24 +224,39 @@ body {
<div class="app-version-badge">版本号 1.00.0000</div> <div class="app-version-badge">版本号 1.00.0000</div>
</div> </div>
<!-- 系统更新卡片 --> <!-- 系统更新卡片 (内嵌动态展开进度条) -->
<div class="ota-update-card"> <div class="ota-update-card" id="otaCard">
<div class="ota-card-title"> <div class="ota-card-title">
<span>系统更新</span> <span>系统更新</span>
<span style="font-size: 11px; background: #DBEAFE; color: var(--color-primary); padding: 2px 6px; border-radius: 4px;">OTA 就绪</span> <span class="ota-badge-status" id="otaBadge">OTA 就绪</span>
</div> </div>
<div class="ota-new-version"> <div class="ota-new-version">
<span style="font-size: 12.5px; color: var(--text-sub);">有新版本可用:</span> <span style="font-size: 12.5px; color: var(--text-sub);" id="otaLabelText">有新版本可用:</span>
<span class="ota-version-code">1.00.0001</span> <span class="ota-version-code" id="otaVersionCode">1.00.0001</span>
</div>
<!-- 动态下载进度容器 -->
<div class="download-progress-block" id="progressBlock">
<div class="progress-meta-row">
<span style="font-weight: 600; color: var(--text-main);" id="progressStateText">正在下载固件包...</span>
<span class="progress-percent-val" id="progressPercent">0%</span>
</div>
<div class="progress-track-bg">
<div class="progress-fill-bar" id="progressFill"></div>
</div>
<div class="progress-stats-row">
<span id="progressMbStats">0.0 MB / 38.4 MB</span>
<span id="progressSpeedStats">2.8 MB/s</span>
</div>
</div> </div>
</div> </div>
</div> </div>
<!-- 底部贯穿式下载更新按钮 --> <!-- 底部贯穿式升级与多态操作按钮 -->
<div> <div>
<button class="btn-dynamic-full btn-primary-gradient" onclick="handleDownloadUpdate()"> <button class="btn-dynamic-full btn-primary-gradient" id="btnUpdateAction" onclick="handleUpdateActionClick()">
<svg style="width: 17px; height: 17px; fill: currentColor;" 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.96zM17 13l-5 5-5-5h3V9h4v4h3z"/></svg> <svg style="width: 17px; height: 17px; fill: currentColor;" id="btnActionIcon" 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.96zM17 13l-5 5-5-5h3V9h4v4h3z"/></svg>
<span>下载更新 (1.00.0001)</span> <span id="btnActionText">下载更新 (1.00.0001)</span>
</button> </button>
</div> </div>
</div> </div>
@@ -254,8 +309,68 @@ body {
</div> </div>
<script> <script>
function handleDownloadUpdate() { let downloadState = 'IDLE'; // IDLE | DOWNLOADING | PAUSED | COMPLETED
alert('开始下载固件包 v1.00.0001 (共 38.4 MB)...'); let progress = 0;
let timer = null;
const totalSize = 38.4; // MB
function handleUpdateActionClick() {
const btn = document.getElementById('btnUpdateAction');
const btnText = document.getElementById('btnActionText');
const badge = document.getElementById('otaBadge');
const progressBlock = document.getElementById('progressBlock');
const fill = document.getElementById('progressFill');
const percentText = document.getElementById('progressPercent');
const mbStats = document.getElementById('progressMbStats');
const speedStats = document.getElementById('progressSpeedStats');
if (downloadState === 'IDLE') {
// 开始下载
downloadState = 'DOWNLOADING';
progressBlock.style.display = 'flex';
badge.innerText = '下载中';
badge.style.background = '#FFFBEB';
badge.style.color = '#D97706';
btn.className = 'btn-dynamic-full btn-downloading-ghost';
btnText.innerText = '暂停下载';
timer = setInterval(() => {
if (progress < 100) {
progress += Math.floor(Math.random() * 8) + 4;
if (progress > 100) progress = 100;
fill.style.width = `${progress}%`;
percentText.innerText = `${progress}%`;
const currentMb = ((progress / 100) * totalSize).toFixed(1);
mbStats.innerText = `${currentMb} MB / ${totalSize} MB`;
speedStats.innerText = `${(Math.random() * 0.8 + 2.2).toFixed(1)} MB/s`;
if (progress === 100) {
clearInterval(timer);
downloadState = 'COMPLETED';
badge.innerText = '验证通过';
badge.style.background = '#ECFDF5';
badge.style.color = '#059669';
document.getElementById('progressStateText').innerText = '固件包下载完成 (SHA256 校验通过)';
btn.className = 'btn-dynamic-full btn-success-gradient';
btnText.innerText = '⚡ 立即安装并重启';
}
}
}, 300);
} else if (downloadState === 'DOWNLOADING') {
// 暂停
clearInterval(timer);
downloadState = 'PAUSED';
badge.innerText = '已暂停';
btnText.innerText = '继续下载';
} else if (downloadState === 'PAUSED') {
// 继续
downloadState = 'DOWNLOADING';
badge.innerText = '下载中';
btnText.innerText = '暂停下载';
handleUpdateActionClick();
} else if (downloadState === 'COMPLETED') {
alert('正在触发系统 OTA 升级安装... 系统将自动重启并更新至 v1.00.0001');
}
} }
</script> </script>
</body> </body>