feat(ui): 交付手环升级(DFU固件升级)6件套物料并保持全局视觉家族统一
1. 【手环升级 / DFU固件升级】:完成6件套标准物料交付(原图+image.png+baseline_ui.html+DESIGN_SPEC.md+implementation_plan.md+CARD任务卡): - 视觉体系与【手环配置】、【自动连接配置】达成 100% 家族风格统一; - 严格遵循全局主色蓝规范 #2563EB(深色 #1D4ED8、浅底 #EFF6FF、高亮 #1E40AF); - 左侧布局:待升级手环硬件状态卡片(ID/版本/电量参数瓦片+取消升级按钮)与固件包版本源(检查服务端版本+使用内置固件); - 右侧布局:升级进度条、毫秒级百分比读数、传输速率与极客暗晶升级日志控制台 Terminal; - 弹窗交互:居中底部抽拉式 Sheet(560px 宽度自适应居中),配备顶部阻尼把手、左上角动态雷达声呐动效与 BLE 协议胶囊标签; - 交互闭环:支持手环信道建立、固件下发传输、校验重启与安全取消全流程; - Chrome Headless 自动渲染生成官方 image.png 交付图。 2. 更新 README.md 项目进度(已完成 6/11 页面)。
This commit is contained in:
@@ -0,0 +1,766 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>方案 1:Fluid Studio 现代流体仪表盘 (与手环配置同系统一)</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.25);
|
||||
--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;
|
||||
--danger: #EF4444;
|
||||
--danger-light: #FEF2F2;
|
||||
--warning: #F59E0B;
|
||||
--warning-light: #FEF3C7;
|
||||
--success: #10B981;
|
||||
--success-light: #ECFDF5;
|
||||
--terminal-bg: #0F172A;
|
||||
}
|
||||
|
||||
* { 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: clamp(16px, 2.5vw, 32px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.device-wrapper {
|
||||
width: 100%;
|
||||
max-width: min(100%, 1160px);
|
||||
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: 640px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 1. AppBar 统一全局规范 */
|
||||
.appbar {
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20px;
|
||||
border-bottom: 1px solid var(--divider);
|
||||
background: var(--surface);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.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;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
.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-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||
|
||||
/* 2. 主体流体双栏仪表盘 */
|
||||
.main-dashboard {
|
||||
padding: clamp(20px, 2.5vw, 30px);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1.15fr;
|
||||
gap: clamp(16px, 2vw, 24px);
|
||||
background: #F8FAFC;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
max-height: calc(100vh - 120px);
|
||||
}
|
||||
|
||||
.dash-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.card-box {
|
||||
background: var(--surface);
|
||||
border: 1.5px solid var(--divider);
|
||||
border-radius: 16px;
|
||||
padding: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.card-box:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05); }
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid var(--divider);
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
.card-title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.conn-badge {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
padding: 3px 9px;
|
||||
border-radius: 100px;
|
||||
background: #F1F5F9;
|
||||
color: var(--text-sub);
|
||||
}
|
||||
.conn-badge.online { background: var(--success-light); color: var(--success); }
|
||||
|
||||
/* 2.1 手环升级目标设备卡片 */
|
||||
.device-profile-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
.device-art-icon {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 14px;
|
||||
background: var(--color-primary-light);
|
||||
border: 1.5px solid var(--color-primary-border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.device-art-icon svg { width: 34px; height: 34px; fill: var(--color-primary); }
|
||||
|
||||
.device-props-grid {
|
||||
flex: 1;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
.prop-item {
|
||||
background: #F8FAFC;
|
||||
border: 1px solid var(--divider);
|
||||
border-radius: 8px;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
.prop-k { font-size: 11px; color: var(--text-sub); }
|
||||
.prop-v { font-size: 13.5px; font-weight: 700; color: var(--text-main); font-family: ui-monospace, monospace; margin-top: 2px; }
|
||||
|
||||
.btn-cancel-upgrade {
|
||||
background: #FEF3C7;
|
||||
color: #D97706;
|
||||
border: 1px solid #FDE68A;
|
||||
padding: 8px 18px;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
align-self: flex-end;
|
||||
}
|
||||
.btn-cancel-upgrade:hover { background: #FDE68A; }
|
||||
|
||||
/* 2.2 固件包信息卡片 */
|
||||
.firmware-meta-card {
|
||||
background: #F8FAFC;
|
||||
border: 1px solid var(--divider);
|
||||
border-radius: 12px;
|
||||
padding: 14px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
.fw-name-text {
|
||||
font-size: 13.5px;
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
font-family: ui-monospace, monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
.fw-source-tag {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.fw-action-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
}
|
||||
.btn-fw-action {
|
||||
background: #FFFFFF;
|
||||
border: 1.5px solid var(--divider);
|
||||
border-radius: 10px;
|
||||
padding: 10px 12px;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
text-align: center;
|
||||
}
|
||||
.btn-fw-action:hover {
|
||||
border-color: var(--color-primary);
|
||||
background: var(--color-primary-light);
|
||||
}
|
||||
|
||||
/* 2.3 升级进度与控制台 */
|
||||
.progress-track-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
background: #F8FAFC;
|
||||
border: 1px solid var(--divider);
|
||||
border-radius: 12px;
|
||||
padding: 14px 16px;
|
||||
}
|
||||
.progress-info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.progress-bar-bg {
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
background: #E2E8F0;
|
||||
border-radius: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.progress-bar-fill {
|
||||
width: 0%;
|
||||
height: 100%;
|
||||
background: var(--color-primary-gradient);
|
||||
border-radius: 100px;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
.btn-start-upgrade {
|
||||
width: 100%;
|
||||
background: var(--color-primary-gradient);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 13px;
|
||||
border-radius: 12px;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 16px var(--color-primary-glow);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.btn-start-upgrade:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 6px 20px var(--color-primary-glow);
|
||||
}
|
||||
|
||||
.terminal-hud {
|
||||
background: var(--terminal-bg);
|
||||
border-radius: 12px;
|
||||
border: 1px solid #334155;
|
||||
padding: 12px 14px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 11.5px;
|
||||
color: #94A3B8;
|
||||
height: 140px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
}
|
||||
.term-line { line-height: 1.5; }
|
||||
.term-line.info { color: #38BDF8; }
|
||||
.term-line.success { color: #4ADE80; }
|
||||
.term-line.warn { color: #FBBF24; }
|
||||
|
||||
/* 3. 右下角悬浮蓝牙按钮 (FAB) */
|
||||
.bluetooth-fab {
|
||||
position: absolute;
|
||||
bottom: 24px;
|
||||
right: 24px;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 16px;
|
||||
background: var(--surface);
|
||||
border: 1.5px solid var(--divider);
|
||||
box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
z-index: 50;
|
||||
}
|
||||
.bluetooth-fab:hover {
|
||||
transform: scale(1.08) translateY(-2px);
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 14px 30px var(--color-primary-glow);
|
||||
}
|
||||
.bluetooth-fab svg { width: 24px; height: 24px; fill: var(--color-primary); }
|
||||
|
||||
/* 4. 居中底部抽拉式 Sheet */
|
||||
.bottom-sheet-mask {
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
background: rgba(15, 23, 42, 0.45);
|
||||
backdrop-filter: blur(4px);
|
||||
z-index: 100;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.bottom-sheet-mask.open { opacity: 1; pointer-events: auto; }
|
||||
|
||||
.bottom-sheet {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(100%);
|
||||
width: min(92%, 560px);
|
||||
background: var(--surface);
|
||||
border-radius: 24px 24px 0 0;
|
||||
border: 1.5px solid var(--divider);
|
||||
border-bottom: none;
|
||||
box-shadow: 0 -16px 45px rgba(15, 23, 42, 0.2);
|
||||
transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 490px;
|
||||
z-index: 101;
|
||||
}
|
||||
.bottom-sheet-mask.open .bottom-sheet { transform: translateX(-50%) translateY(0); }
|
||||
|
||||
.sheet-handle-bar {
|
||||
width: 44px;
|
||||
height: 5px;
|
||||
border-radius: 10px;
|
||||
background: #CBD5E1;
|
||||
margin: 10px auto 4px;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.sheet-head {
|
||||
padding: 12px 24px 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid var(--divider);
|
||||
}
|
||||
.sheet-title-box { display: flex; align-items: center; gap: 10px; }
|
||||
|
||||
.radar-scanner {
|
||||
position: relative;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 50%;
|
||||
background: var(--color-primary-light);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.radar-ring {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--color-primary);
|
||||
animation: radarWave 1.8s infinite ease-out;
|
||||
}
|
||||
@keyframes radarWave {
|
||||
0% { transform: scale(0.6); opacity: 1; }
|
||||
100% { transform: scale(1.6); opacity: 0; }
|
||||
}
|
||||
.radar-scanner svg { width: 18px; height: 18px; fill: var(--color-primary); z-index: 2; }
|
||||
|
||||
.sheet-close-btn {
|
||||
width: 32px; height: 32px; border-radius: 50%; border: none; background: #F1F5F9;
|
||||
cursor: pointer; display: flex; align-items: center; justify-content: center;
|
||||
color: var(--text-sub); font-size: 16px; font-weight: 700; transition: all 0.15s;
|
||||
}
|
||||
.sheet-close-btn:hover { background: #E2E8F0; color: var(--text-main); }
|
||||
|
||||
.sheet-chips-line {
|
||||
padding: 10px 24px;
|
||||
background: #F8FAFC;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
border-bottom: 1px solid var(--divider);
|
||||
overflow-x: auto;
|
||||
}
|
||||
.filter-chip {
|
||||
padding: 5px 14px;
|
||||
border-radius: 100px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
border: 1px solid var(--divider);
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
.filter-chip.active {
|
||||
background: var(--color-primary-light);
|
||||
color: var(--color-primary);
|
||||
border-color: var(--color-primary-border);
|
||||
}
|
||||
|
||||
.sheet-device-list {
|
||||
padding: 14px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
overflow-y: auto;
|
||||
max-height: 220px;
|
||||
}
|
||||
.device-item-card {
|
||||
border: 1.5px solid var(--divider);
|
||||
border-radius: 14px;
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: white;
|
||||
transition: all 0.15s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
.device-item-card:hover {
|
||||
border-color: var(--color-primary);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
|
||||
}
|
||||
.dev-badge-ble-right {
|
||||
background: var(--color-primary-light);
|
||||
color: var(--color-primary);
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
padding: 4px 10px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--color-primary-border);
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.sheet-foot {
|
||||
padding: 14px 24px 20px;
|
||||
border-top: 1px solid var(--divider);
|
||||
background: #F8FAFC;
|
||||
}
|
||||
.btn-pause-scan {
|
||||
width: 100%;
|
||||
background: #DCFCE7;
|
||||
color: #15803D;
|
||||
border: 1px solid #BBF7D0;
|
||||
padding: 10px;
|
||||
border-radius: 12px;
|
||||
font-size: 13.5px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="device-wrapper">
|
||||
<!-- 1. AppBar 统一规范 -->
|
||||
<header class="appbar">
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<!-- 2. 主体双栏布局 -->
|
||||
<main class="main-dashboard">
|
||||
<!-- 左列:待升级手环与固件包配置 -->
|
||||
<div class="dash-column">
|
||||
<!-- 待升级手环状态卡片 -->
|
||||
<section class="card-box">
|
||||
<div class="card-header">
|
||||
<span class="card-title">待升级手环状态</span>
|
||||
<span class="conn-badge" id="targetConnBadge">状态:未连接</span>
|
||||
</div>
|
||||
<div class="device-profile-box">
|
||||
<div class="device-art-icon">
|
||||
<svg viewBox="0 0 24 24"><path d="M15 1H9c-.55 0-1 .45-1 1v2.17C5.84 5.38 4 7.97 4 11v2c0 3.03 1.84 5.62 4 6.83V22c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.17c2.16-1.21 4-3.8 4-6.83v-2c0-3.03-1.84-5.62-4-6.83V2c0-.55-.45-1-1-1zm-3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></svg>
|
||||
</div>
|
||||
<div class="device-props-grid">
|
||||
<div class="prop-item"><div class="prop-k">ID:</div><div class="prop-v" id="devIdVal">未连接</div></div>
|
||||
<div class="prop-item"><div class="prop-k">版本:</div><div class="prop-v" id="devVerVal">未知</div></div>
|
||||
<div class="prop-item" style="grid-column: span 2;"><div class="prop-k">电量:</div><div class="prop-v" id="devBatVal">未知</div></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-cancel-upgrade" onclick="cancelUpgrade()">取消升级</button>
|
||||
</section>
|
||||
|
||||
<!-- 固件包信息与源卡片 -->
|
||||
<section class="card-box">
|
||||
<div class="card-header">
|
||||
<span class="card-title">固件包与版本源</span>
|
||||
</div>
|
||||
<div class="firmware-meta-card">
|
||||
<div class="fw-name-text" id="fwFileName">SC106_FW1.00.0036_HW0.1_20260720_DFU.zip (内置 v1.00.0036)</div>
|
||||
<div class="fw-source-tag">固件来源: 内置 (优先)</div>
|
||||
</div>
|
||||
<div class="fw-action-grid">
|
||||
<button class="btn-fw-action" onclick="checkServerFw()">检查服务端版本</button>
|
||||
<button class="btn-fw-action" onclick="useBuiltinFw()">使用内置固件</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- 右列:升级进度与控制台 -->
|
||||
<div class="dash-column">
|
||||
<section class="card-box" style="flex: 1;">
|
||||
<div class="card-header">
|
||||
<span class="card-title">升级进度与控制</span>
|
||||
<span id="stageBadge" style="font-size: 12px; font-weight: 700; color: var(--color-primary);">等待就绪</span>
|
||||
</div>
|
||||
|
||||
<div class="progress-track-box">
|
||||
<div class="progress-info-row">
|
||||
<span>升级进度</span>
|
||||
<span id="progressPercent" style="color: var(--color-primary);">0%</span>
|
||||
</div>
|
||||
<div class="progress-bar-bg">
|
||||
<div class="progress-bar-fill" id="progressBar"></div>
|
||||
</div>
|
||||
<div style="font-size: 12px; color: var(--text-sub); display: flex; justify-content: space-between;">
|
||||
<span id="progressStatus">状态: 待开始</span>
|
||||
<span id="speedTxt">传输速率: -- KB/s</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn-start-upgrade" id="btnStartDfu" onclick="startDfuProcess()">开始升级</button>
|
||||
|
||||
<!-- 同步日志控制台 -->
|
||||
<div style="display: flex; flex-direction: column; gap: 6px; flex: 1; margin-top: 4px;">
|
||||
<span style="font-size: 13px; font-weight: 700; color: var(--text-main);">升级日志控制台</span>
|
||||
<div class="terminal-hud" id="dfuTerminal">
|
||||
<div class="term-line info">[DFU-Core] 固件升级引导服务已就绪...</div>
|
||||
<div class="term-line">等待配对手环并下发 DFU 引导指令...</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- 右下角悬浮蓝牙按钮 (FAB) -->
|
||||
<button class="bluetooth-fab" onclick="openBottomSheet()" title="扫描并选择待升级手环">
|
||||
<svg viewBox="0 0 24 24"><path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88z"/></svg>
|
||||
</button>
|
||||
|
||||
<!-- 居中底部抽拉式 Sheet -->
|
||||
<div class="bottom-sheet-mask" id="sheetMask" onclick="if(event.target===this) closeBottomSheet()">
|
||||
<div class="bottom-sheet">
|
||||
<div class="sheet-handle-bar"></div>
|
||||
<div class="sheet-head">
|
||||
<div class="sheet-title-box">
|
||||
<div class="radar-scanner">
|
||||
<div class="radar-ring"></div>
|
||||
<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></svg>
|
||||
</div>
|
||||
<h2 style="font-size: 16px; font-weight: 700;">选择设备</h2>
|
||||
</div>
|
||||
<button class="sheet-close-btn" onclick="closeBottomSheet()">✕</button>
|
||||
</div>
|
||||
<div class="sheet-chips-line">
|
||||
<span class="filter-chip active" onclick="toggleChip(this)">✓ 扫描顺序</span>
|
||||
<span class="filter-chip" onclick="toggleChip(this)">名称</span>
|
||||
<span class="filter-chip" onclick="toggleChip(this)">信号强度</span>
|
||||
<span class="filter-chip" onclick="toggleChip(this)">类型</span>
|
||||
</div>
|
||||
<div class="sheet-device-list">
|
||||
<div class="device-item-card" onclick="connectTarget('CL831-62200026', 'v1.00.0035', '88%')">
|
||||
<div>
|
||||
<div style="font-weight: 700; font-size: 14.5px; font-family: monospace;">CL831-62200026</div>
|
||||
<div style="font-size: 11.5px; color: var(--text-sub); margin-top: 3px;">D9:24:0F:1C:55:FA · 信号: -89 dBm</div>
|
||||
</div>
|
||||
<span class="dev-badge-ble-right">BLE</span>
|
||||
</div>
|
||||
<div class="device-item-card" onclick="connectTarget('CL831-2200006', 'v1.00.0032', '95%')">
|
||||
<div>
|
||||
<div style="font-weight: 700; font-size: 14.5px; font-family: monospace;">CL831-2200006</div>
|
||||
<div style="font-size: 11.5px; color: var(--text-sub); margin-top: 3px;">DF:16:BC:22:2E:5B · 信号: -98 dBm</div>
|
||||
</div>
|
||||
<span class="dev-badge-ble-right">BLE</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sheet-foot">
|
||||
<button class="btn-pause-scan" id="btnScan" onclick="toggleScan()">暂停扫描</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let isConnected = false;
|
||||
let isUpgrading = false;
|
||||
let upgradeTimer = null;
|
||||
|
||||
function appendLog(t, type = '') {
|
||||
const b = document.getElementById('dfuTerminal');
|
||||
const d = document.createElement('div');
|
||||
d.className = `term-line ${type}`;
|
||||
d.innerText = `[${new Date().toTimeString().split(' ')[0]}] ${t}`;
|
||||
b.appendChild(d);
|
||||
b.scrollTop = b.scrollHeight;
|
||||
}
|
||||
|
||||
function openBottomSheet() {
|
||||
document.getElementById('sheetMask').classList.add('open');
|
||||
appendLog("展开【选择设备】面板,正在侦听周围待升级 BLE 广播...", "info");
|
||||
}
|
||||
|
||||
function closeBottomSheet() {
|
||||
document.getElementById('sheetMask').classList.remove('open');
|
||||
}
|
||||
|
||||
function toggleChip(el) {
|
||||
document.querySelectorAll('.filter-chip').forEach(c => {
|
||||
c.classList.remove('active');
|
||||
c.innerText = c.innerText.replace('✓ ', '');
|
||||
});
|
||||
el.classList.add('active');
|
||||
el.innerText = '✓ ' + el.innerText;
|
||||
appendLog(`切换设备扫描排序: ${el.innerText}`, "info");
|
||||
}
|
||||
|
||||
function connectTarget(name, ver, bat) {
|
||||
closeBottomSheet();
|
||||
appendLog(`正在连接待升级手环 [${name}]...`, "info");
|
||||
setTimeout(() => {
|
||||
isConnected = true;
|
||||
document.getElementById('devIdVal').innerText = name;
|
||||
document.getElementById('devVerVal').innerText = ver;
|
||||
document.getElementById('devBatVal').innerText = bat;
|
||||
document.getElementById('targetConnBadge').innerText = "状态:已就绪";
|
||||
document.getElementById('targetConnBadge').classList.add('online');
|
||||
document.getElementById('stageBadge').innerText = "可开始升级";
|
||||
appendLog(`已成功与 [${name}] 建立 DFU 控制信道,当前版本: ${ver},电量充足 (${bat})。`, "success");
|
||||
}, 600);
|
||||
}
|
||||
|
||||
function startDfuProcess() {
|
||||
if (!isConnected) {
|
||||
alert("请先点击右下角蓝牙按钮选择待升级手环!");
|
||||
openBottomSheet();
|
||||
return;
|
||||
}
|
||||
if (isUpgrading) return;
|
||||
isUpgrading = true;
|
||||
let progress = 0;
|
||||
document.getElementById('btnStartDfu').disabled = true;
|
||||
document.getElementById('btnStartDfu').innerText = "正在传输固件...";
|
||||
document.getElementById('progressStatus').innerText = "状态: 固件分包传输中 (GATT Write No Response)";
|
||||
document.getElementById('stageBadge').innerText = "传输中 (0%)";
|
||||
appendLog("启动 DFU 传输协议,握手 Secure Bootloader 校验公钥...", "info");
|
||||
|
||||
upgradeTimer = setInterval(() => {
|
||||
progress += Math.floor(Math.random() * 8) + 5;
|
||||
if (progress > 100) progress = 100;
|
||||
document.getElementById('progressBar').style.width = progress + '%';
|
||||
document.getElementById('progressPercent').innerText = progress + '%';
|
||||
document.getElementById('stageBadge').innerText = `传输中 (${progress}%)`;
|
||||
document.getElementById('speedTxt').innerText = `传输速率: ${(Math.random()*4 + 18).toFixed(1)} KB/s`;
|
||||
|
||||
if (progress >= 100) {
|
||||
clearInterval(upgradeTimer);
|
||||
document.getElementById('progressStatus').innerText = "状态: CRC 校验成功,手环正在重启应用新固件...";
|
||||
document.getElementById('stageBadge').innerText = "升级完成";
|
||||
document.getElementById('devVerVal').innerText = "v1.00.0036 (已最新)";
|
||||
document.getElementById('btnStartDfu').innerText = "升级完成";
|
||||
appendLog("固件数据包 100% 写入完成,CRC32 校验通过!手环正在重启生效...", "success");
|
||||
setTimeout(() => {
|
||||
alert("手环固件升级成功!新版本已生效。");
|
||||
document.getElementById('btnStartDfu').disabled = false;
|
||||
document.getElementById('btnStartDfu').innerText = "开始升级";
|
||||
isUpgrading = false;
|
||||
}, 1000);
|
||||
}
|
||||
}, 400);
|
||||
}
|
||||
|
||||
function cancelUpgrade() {
|
||||
if (isUpgrading) {
|
||||
clearInterval(upgradeTimer);
|
||||
isUpgrading = false;
|
||||
document.getElementById('btnStartDfu').disabled = false;
|
||||
document.getElementById('btnStartDfu').innerText = "开始升级";
|
||||
document.getElementById('progressBar').style.width = '0%';
|
||||
document.getElementById('progressPercent').innerText = '0%';
|
||||
document.getElementById('progressStatus').innerText = "状态: 升级已取消";
|
||||
document.getElementById('stageBadge').innerText = "已中断";
|
||||
appendLog("用户手动触发 [取消升级],已终止固件传输。", "warn");
|
||||
alert("已取消手环固件升级。");
|
||||
} else {
|
||||
appendLog("当前未处于升级传输过程中。", "info");
|
||||
}
|
||||
}
|
||||
|
||||
function checkServerFw() {
|
||||
appendLog("正在请求服务端云端固件库 API...", "info");
|
||||
setTimeout(() => {
|
||||
appendLog("检查完成:当前内置固件 v1.00.0036 已为官方最新稳定版。", "success");
|
||||
alert("服务端版本检查:当前内置固件已是最新版!");
|
||||
}, 800);
|
||||
}
|
||||
|
||||
function useBuiltinFw() {
|
||||
appendLog("已切换为本地内置固件源:SC106_FW1.00.0036_HW0.1_20260720_DFU.zip", "info");
|
||||
alert("已切换并锁定为本地内置固件!");
|
||||
}
|
||||
|
||||
function toggleScan() {
|
||||
const b = document.getElementById('btnScan');
|
||||
if (b.innerText === "暂停扫描") {
|
||||
b.innerText = "继续扫描";
|
||||
b.style.background = "#FEF3C7";
|
||||
b.style.color = "#D97706";
|
||||
appendLog("已暂停 BLE 设备广播扫描。", "warn");
|
||||
} else {
|
||||
b.innerText = "暂停扫描";
|
||||
b.style.background = "#DCFCE7";
|
||||
b.style.color = "#15803D";
|
||||
appendLog("已恢复 BLE 广播扫描...", "info");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,214 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>方案 2:Neo-Bento 固件工控工作台</title>
|
||||
<style>
|
||||
:root {
|
||||
--color-primary: #2563EB;
|
||||
--color-primary-dark: #1D4ED8;
|
||||
--color-primary-light: #EFF6FF;
|
||||
--color-primary-border: #DBEAFE;
|
||||
--color-primary-glow: rgba(37, 99, 235, 0.25);
|
||||
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
|
||||
--bg: #EEF2F6;
|
||||
--surface: #FFFFFF;
|
||||
--text-main: #0F172A;
|
||||
--text-sub: #64748B;
|
||||
--divider: #E2E8F0;
|
||||
--terminal-bg: #0F172A;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
||||
padding: clamp(16px, 2.5vw, 32px); display: flex; flex-direction: column;
|
||||
}
|
||||
.device-wrapper {
|
||||
width: 100%; max-width: min(100%, 1160px); 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: 640px; display: flex; flex-direction: column;
|
||||
}
|
||||
.appbar {
|
||||
height: 60px; 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:hover, .appbar-more:hover { background: rgba(15, 23, 42, 0.06); }
|
||||
.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; }
|
||||
|
||||
.bento-dash {
|
||||
padding: clamp(20px, 2.5vw, 30px); display: grid; grid-template-columns: 1fr 1fr;
|
||||
gap: 18px; background: #F8FAFC; flex: 1; overflow-y: auto; max-height: calc(100vh - 120px);
|
||||
}
|
||||
.bento-card {
|
||||
background: var(--surface); border: 1.5px solid var(--divider); border-radius: 16px;
|
||||
padding: 20px; display: flex; flex-direction: column; gap: 14px;
|
||||
}
|
||||
.b-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider); padding-bottom: 10px; }
|
||||
.b-title { font-size: 15.5px; font-weight: 700; color: var(--color-primary); }
|
||||
|
||||
.param-grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
||||
.p-tile { background: #F8FAFC; border: 1px solid var(--divider); border-radius: 8px; padding: 8px 12px; }
|
||||
|
||||
.btn-wide-blue {
|
||||
width: 100%; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 700;
|
||||
background: var(--color-primary-gradient); color: white; border: none; cursor: pointer;
|
||||
box-shadow: 0 4px 14px var(--color-primary-glow);
|
||||
}
|
||||
|
||||
.terminal-box {
|
||||
background: var(--terminal-bg); border-radius: 10px; padding: 10px 12px; font-family: monospace; font-size: 11.5px;
|
||||
color: #38BDF8; height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
|
||||
}
|
||||
|
||||
/* FAB */
|
||||
.bluetooth-fab {
|
||||
position: absolute; bottom: 24px; right: 24px; width: 52px; height: 52px; border-radius: 16px;
|
||||
background: var(--surface); border: 1.5px solid var(--divider); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
|
||||
display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 50;
|
||||
}
|
||||
.bluetooth-fab svg { width: 24px; height: 24px; fill: var(--color-primary); }
|
||||
|
||||
/* Sheet */
|
||||
.bottom-sheet-mask {
|
||||
position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.45);
|
||||
backdrop-filter: blur(4px); z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s;
|
||||
}
|
||||
.bottom-sheet-mask.open { opacity: 1; pointer-events: auto; }
|
||||
.bottom-sheet {
|
||||
position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
|
||||
width: min(92%, 560px); background: var(--surface); border-radius: 24px 24px 0 0; border: 1.5px solid var(--divider);
|
||||
border-bottom: none; box-shadow: 0 -16px 45px rgba(15, 23, 42, 0.2); transition: transform 0.35s ease;
|
||||
display: flex; flex-direction: column; max-height: 480px; z-index: 101;
|
||||
}
|
||||
.bottom-sheet-mask.open .bottom-sheet { transform: translateX(-50%) translateY(0); }
|
||||
</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="bento-dash">
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<section class="bento-card">
|
||||
<div class="b-head">
|
||||
<span class="b-title">待升级手环状态</span>
|
||||
<span id="bConnTag" style="font-size: 11.5px; color: var(--text-sub);">状态:未连接</span>
|
||||
</div>
|
||||
<div class="param-grid-4">
|
||||
<div class="p-tile"><div style="font-size: 11px; color: var(--text-sub);">ID:</div><div style="font-weight: 700; font-family: monospace;" id="bId">未连接</div></div>
|
||||
<div class="p-tile"><div style="font-size: 11px; color: var(--text-sub);">版本:</div><div style="font-weight: 700; font-family: monospace;" id="bVer">未知</div></div>
|
||||
<div class="p-tile" style="grid-column: span 2;"><div style="font-size: 11px; color: var(--text-sub);">电量:</div><div style="font-weight: 700; font-family: monospace;" id="bBat">未知</div></div>
|
||||
</div>
|
||||
<button style="align-self: flex-end; background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; padding: 6px 14px; border-radius: 6px; font-weight: 700; cursor: pointer;" onclick="bCancel()">取消升级</button>
|
||||
</section>
|
||||
|
||||
<section class="bento-card">
|
||||
<div class="b-head"><span class="b-title">固件包与版本源</span></div>
|
||||
<div style="background: #F8FAFC; border: 1px solid var(--divider); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; font-family: monospace; font-weight: 700;">
|
||||
SC106_FW1.00.0036_HW0.1_20260720_DFU.zip (内置 v1.00.0036)
|
||||
<div style="color: var(--color-primary); font-size: 11.5px; margin-top: 4px;">固件来源: 内置 (优先)</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 8px;">
|
||||
<button style="background: white; border: 1.5px solid var(--divider); padding: 8px; border-radius: 8px; font-weight: 700; color: var(--color-primary); cursor: pointer;" onclick="bCheck()">检查服务端版本</button>
|
||||
<button style="background: white; border: 1.5px solid var(--divider); padding: 8px; border-radius: 8px; font-weight: 700; color: var(--color-primary); cursor: pointer;" onclick="bUse()">使用内置固件</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<section class="bento-card" style="flex: 1;">
|
||||
<div class="b-head"><span class="b-title">升级进度与控制</span></div>
|
||||
<div style="background: #F8FAFC; border: 1px solid var(--divider); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px;">
|
||||
<div style="display: flex; justify-content: space-between; font-size: 13px; font-weight: 700;">
|
||||
<span>升级进度</span><span id="bPct" style="color: var(--color-primary);">0%</span>
|
||||
</div>
|
||||
<div style="width: 100%; height: 8px; background: #E2E8F0; border-radius: 10px; overflow: hidden;">
|
||||
<div id="bBar" style="width: 0%; height: 100%; background: var(--color-primary-gradient); transition: width 0.3s;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-wide-blue" id="bStartBtn" onclick="bStart()">开始升级</button>
|
||||
|
||||
<span style="font-size: 12.5px; font-weight: 700;">升级日志控制台</span>
|
||||
<div class="terminal-box" id="bLog">
|
||||
<div>[INIT] DFU 引导核心就绪...</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- FAB -->
|
||||
<button class="bluetooth-fab" onclick="openBSheet()"><svg viewBox="0 0 24 24"><path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88z"/></svg></button>
|
||||
|
||||
<!-- Sheet -->
|
||||
<div class="bottom-sheet-mask" id="bSheet" onclick="if(event.target===this) closeBSheet()">
|
||||
<div class="bottom-sheet">
|
||||
<div style="width: 44px; height: 4px; border-radius: 4px; background: #CBD5E1; margin: 10px auto 4px;"></div>
|
||||
<div style="padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider);">
|
||||
<div style="display: flex; align-items: center; gap: 8px;"><span style="font-size: 16px;">📡</span><h2 style="font-size: 15.5px; font-weight: 700;">选择设备</h2></div>
|
||||
<span style="cursor: pointer;" onclick="closeBSheet()">✕</span>
|
||||
</div>
|
||||
<div style="padding: 14px 20px; display: flex; flex-direction: column; gap: 8px;">
|
||||
<div style="border: 1.5px solid var(--divider); padding: 12px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer;" onclick="bPick('CL831-62200026', 'v1.00.0035', '88%')">
|
||||
<div>
|
||||
<div style="font-weight: 700; font-family: monospace;">CL831-62200026</div>
|
||||
<div style="font-size: 11px; color: var(--text-sub);">D9:24:0F:1C:55:FA · -89 dBm</div>
|
||||
</div>
|
||||
<span style="background: var(--color-primary-light); color: var(--color-primary); font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--color-primary-border);">BLE</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function bLog(t) {
|
||||
const b = document.getElementById('bLog');
|
||||
const d = document.createElement('div');
|
||||
d.innerText = `[${new Date().toTimeString().split(' ')[0]}] ${t}`;
|
||||
b.appendChild(d); b.scrollTop = b.scrollHeight;
|
||||
}
|
||||
function openBSheet() { document.getElementById('bSheet').classList.add('open'); bLog("展开【选择设备】面板..."); }
|
||||
function closeBSheet() { document.getElementById('bSheet').classList.remove('open'); }
|
||||
function bPick(n, v, bat) {
|
||||
closeBSheet();
|
||||
bLog(`连接目标手环 [${n}]...`);
|
||||
setTimeout(() => {
|
||||
document.getElementById('bId').innerText = n;
|
||||
document.getElementById('bVer').innerText = v;
|
||||
document.getElementById('bBat').innerText = bat;
|
||||
document.getElementById('bConnTag').innerText = "状态:已就绪";
|
||||
document.getElementById('bConnTag').style.color = "#10B981";
|
||||
bLog(`手环 [${n}] DFU 握手成功!`);
|
||||
}, 500);
|
||||
}
|
||||
function bStart() {
|
||||
bLog("开始下发固件分包...");
|
||||
let p = 0;
|
||||
const tm = setInterval(() => {
|
||||
p += 15;
|
||||
if (p > 100) p = 100;
|
||||
document.getElementById('bBar').style.width = p + '%';
|
||||
document.getElementById('bPct').innerText = p + '%';
|
||||
if (p >= 100) { clearInterval(tm); bLog("固件升级完成!手环重启中...", "success"); alert("固件升级成功!"); }
|
||||
}, 300);
|
||||
}
|
||||
function bCancel() { bLog("取消固件升级。"); alert("升级已取消"); }
|
||||
function bCheck() { bLog("检查服务端最新版本..."); alert("当前为最新版本!"); }
|
||||
function bUse() { bLog("锁定使用内置固件。"); alert("已选择内置固件!"); }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>方案 3:Nordic Slate 极简极净工作室</title>
|
||||
<style>
|
||||
:root {
|
||||
--color-primary: #2563EB;
|
||||
--color-primary-light: #EFF6FF;
|
||||
--color-primary-border: #DBEAFE;
|
||||
--bg: #F8FAFC;
|
||||
--surface: #FFFFFF;
|
||||
--text-main: #0F172A;
|
||||
--text-sub: #64748B;
|
||||
--divider: #E2E8F0;
|
||||
--terminal-bg: #0F172A;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
background: #F1F5F9; color: var(--text-main); min-height: 100vh;
|
||||
padding: clamp(16px, 2.5vw, 32px); display: flex; flex-direction: column;
|
||||
}
|
||||
.device-wrapper {
|
||||
width: 100%; max-width: min(100%, 1160px); 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: 640px; display: flex; flex-direction: column;
|
||||
}
|
||||
.appbar {
|
||||
height: 60px; 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:hover, .appbar-more:hover { background: rgba(15, 23, 42, 0.06); }
|
||||
.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; }
|
||||
|
||||
.nordic-dash {
|
||||
padding: clamp(20px, 2.5vw, 30px); display: grid; grid-template-columns: 1fr 1fr;
|
||||
gap: 20px; background: #FFFFFF; flex: 1; overflow-y: auto; max-height: calc(100vh - 120px);
|
||||
}
|
||||
.nordic-box {
|
||||
border: 1px solid var(--divider); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
|
||||
}
|
||||
.n-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider); padding-bottom: 10px; }
|
||||
.n-title { font-size: 15.5px; font-weight: 700; color: var(--color-primary); }
|
||||
|
||||
.n-tile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||
.n-tile { background: #F8FAFC; border: 1px solid var(--divider); border-radius: 8px; padding: 8px 12px; }
|
||||
|
||||
.btn-n-blue {
|
||||
width: 100%; padding: 11px; border-radius: 8px; background: var(--color-primary); color: white; border: none;
|
||||
font-weight: 700; cursor: pointer;
|
||||
}
|
||||
.nordic-term {
|
||||
background: var(--terminal-bg); border-radius: 8px; padding: 12px; font-family: monospace; font-size: 11.5px;
|
||||
color: #38BDF8; height: 130px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
|
||||
}
|
||||
|
||||
/* FAB */
|
||||
.bluetooth-fab {
|
||||
position: absolute; bottom: 24px; right: 24px; width: 50px; height: 50px; border-radius: 14px;
|
||||
background: var(--surface); border: 1.5px solid var(--divider); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
|
||||
display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 50;
|
||||
}
|
||||
.bluetooth-fab svg { width: 22px; height: 22px; fill: var(--color-primary); }
|
||||
|
||||
/* Sheet */
|
||||
.bottom-sheet-mask {
|
||||
position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.4);
|
||||
backdrop-filter: blur(4px); z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s;
|
||||
}
|
||||
.bottom-sheet-mask.open { opacity: 1; pointer-events: auto; }
|
||||
.bottom-sheet {
|
||||
position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
|
||||
width: min(92%, 560px); background: var(--surface); border-radius: 24px 24px 0 0; border: 1.5px solid var(--divider);
|
||||
border-bottom: none; box-shadow: 0 -16px 45px rgba(15, 23, 42, 0.2); transition: transform 0.35s ease;
|
||||
display: flex; flex-direction: column; max-height: 480px; z-index: 101;
|
||||
}
|
||||
.bottom-sheet-mask.open .bottom-sheet { transform: translateX(-50%) translateY(0); }
|
||||
</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="nordic-dash">
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<section class="nordic-box">
|
||||
<div class="n-head">
|
||||
<span class="n-title">待升级手环状态</span>
|
||||
<span id="nTag" style="font-size: 11.5px; color: var(--text-sub);">状态:未连接</span>
|
||||
</div>
|
||||
<div class="n-tile-row">
|
||||
<div class="n-tile"><div style="font-size: 11px; color: var(--text-sub);">ID:</div><div style="font-weight: 700; font-family: monospace;" id="nId">未连接</div></div>
|
||||
<div class="n-tile"><div style="font-size: 11px; color: var(--text-sub);">版本:</div><div style="font-weight: 700; font-family: monospace;" id="nVer">未知</div></div>
|
||||
<div class="n-tile" style="grid-column: span 2;"><div style="font-size: 11px; color: var(--text-sub);">电量:</div><div style="font-weight: 700; font-family: monospace;" id="nBat">未知</div></div>
|
||||
</div>
|
||||
<button style="align-self: flex-end; background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; padding: 6px 14px; border-radius: 6px; font-weight: 700; cursor: pointer;" onclick="nCancel()">取消升级</button>
|
||||
</section>
|
||||
|
||||
<section class="nordic-box">
|
||||
<div class="n-head"><span class="n-title">固件包与版本源</span></div>
|
||||
<div style="background: #F8FAFC; border: 1px solid var(--divider); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; font-family: monospace; font-weight: 700;">
|
||||
SC106_FW1.00.0036_HW0.1_20260720_DFU.zip (内置 v1.00.0036)
|
||||
<div style="color: var(--color-primary); font-size: 11.5px; margin-top: 4px;">固件来源: 内置 (优先)</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 8px;">
|
||||
<button style="background: white; border: 1px solid var(--divider); padding: 8px; border-radius: 6px; font-weight: 700; color: var(--color-primary); cursor: pointer;" onclick="nCheck()">检查服务端版本</button>
|
||||
<button style="background: white; border: 1px solid var(--divider); padding: 8px; border-radius: 6px; font-weight: 700; color: var(--color-primary); cursor: pointer;" onclick="nUse()">使用内置固件</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<section class="nordic-box" style="flex: 1;">
|
||||
<div class="n-head"><span class="n-title">升级进度与控制</span></div>
|
||||
<div style="background: #F8FAFC; border: 1px solid var(--divider); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 6px;">
|
||||
<div style="display: flex; justify-content: space-between; font-size: 13px; font-weight: 700;">
|
||||
<span>升级进度</span><span id="nPct" style="color: var(--color-primary);">0%</span>
|
||||
</div>
|
||||
<div style="width: 100%; height: 8px; background: #E2E8F0; border-radius: 10px; overflow: hidden;">
|
||||
<div id="nBar" style="width: 0%; height: 100%; background: var(--color-primary); transition: width 0.3s;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-n-blue" onclick="nStart()">开始升级</button>
|
||||
|
||||
<span style="font-size: 12.5px; font-weight: 700;">升级日志控制台</span>
|
||||
<div class="nordic-term" id="nLog">
|
||||
<div>[NORDIC] DFU Manager Ready...</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- FAB -->
|
||||
<button class="bluetooth-fab" onclick="openNSheet()"><svg viewBox="0 0 24 24"><path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88z"/></svg></button>
|
||||
|
||||
<!-- Sheet -->
|
||||
<div class="bottom-sheet-mask" id="nSheet" onclick="if(event.target===this) closeNSheet()">
|
||||
<div class="bottom-sheet">
|
||||
<div style="width: 44px; height: 4px; border-radius: 4px; background: #CBD5E1; margin: 10px auto 4px;"></div>
|
||||
<div style="padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider);">
|
||||
<div style="display: flex; align-items: center; gap: 8px;"><span style="font-size: 16px;">📡</span><h2 style="font-size: 15.5px; font-weight: 700;">选择设备</h2></div>
|
||||
<span style="cursor: pointer;" onclick="closeNSheet()">✕</span>
|
||||
</div>
|
||||
<div style="padding: 14px 20px; display: flex; flex-direction: column; gap: 8px;">
|
||||
<div style="border: 1px solid var(--divider); padding: 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; cursor: pointer;" onclick="nPick('CL831-62200026', 'v1.00.0035', '88%')">
|
||||
<div>
|
||||
<div style="font-weight: 700; font-family: monospace;">CL831-62200026</div>
|
||||
<div style="font-size: 11px; color: var(--text-sub);">D9:24:0F:1C:55:FA · -89 dBm</div>
|
||||
</div>
|
||||
<span style="background: var(--color-primary-light); color: var(--color-primary); font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--color-primary-border);">BLE</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function nLog(t) {
|
||||
const b = document.getElementById('nLog'); const d = document.createElement('div');
|
||||
d.innerText = `[${new Date().toTimeString().split(' ')[0]}] ${t}`;
|
||||
b.appendChild(d); b.scrollTop = b.scrollHeight;
|
||||
}
|
||||
function openNSheet() { document.getElementById('nSheet').classList.add('open'); nLog("开启设备选择 Sheet..."); }
|
||||
function closeNSheet() { document.getElementById('nSheet').classList.remove('open'); }
|
||||
function nPick(n, v, bat) {
|
||||
closeNSheet(); nLog(`配对手环 [${n}]...`);
|
||||
setTimeout(() => {
|
||||
document.getElementById('nId').innerText = n; document.getElementById('nVer').innerText = v; document.getElementById('nBat').innerText = bat;
|
||||
document.getElementById('nTag').innerText = "状态:已就绪"; document.getElementById('nTag').style.color = "#10B981";
|
||||
nLog(`手环 [${n}] DFU 握手成功!`);
|
||||
}, 500);
|
||||
}
|
||||
function nStart() {
|
||||
nLog("下发固件分包中...");
|
||||
let p = 0;
|
||||
const tm = setInterval(() => {
|
||||
p += 20; if (p > 100) p = 100;
|
||||
document.getElementById('nBar').style.width = p + '%'; document.getElementById('nPct').innerText = p + '%';
|
||||
if (p >= 100) { clearInterval(tm); nLog("固件升级成功!", "success"); alert("固件升级完成!"); }
|
||||
}, 300);
|
||||
}
|
||||
function nCancel() { nLog("取消升级。"); alert("升级已取消"); }
|
||||
function nCheck() { nLog("检查云端版本..."); alert("当前为最新版本!"); }
|
||||
function nUse() { nLog("锁定内置固件。"); alert("已选择内置固件!"); }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>方案 4:Cyber Precision 极客遥测风</title>
|
||||
<style>
|
||||
:root {
|
||||
--color-primary: #2563EB;
|
||||
--accent-cyan: #38BDF8;
|
||||
--bg: #0B0F19;
|
||||
--surface: #111827;
|
||||
--card-bg: #1F2937;
|
||||
--text-main: #F8FAFC;
|
||||
--text-sub: #94A3B8;
|
||||
--divider: #374151;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
|
||||
background: #030712; color: var(--text-main); min-height: 100vh;
|
||||
padding: clamp(16px, 2.5vw, 32px); display: flex; flex-direction: column;
|
||||
}
|
||||
.device-wrapper {
|
||||
width: 100%; max-width: min(100%, 1160px); margin: 0 auto; background: var(--surface);
|
||||
border-radius: 20px; border: 1px solid #1F2937; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
|
||||
overflow: hidden; position: relative; min-height: 640px; display: flex; flex-direction: column;
|
||||
}
|
||||
.appbar {
|
||||
height: 60px; display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 0 20px; border-bottom: 1px solid var(--divider); background: #111827;
|
||||
}
|
||||
.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:hover, .appbar-more:hover { background: rgba(255, 255, 255, 0.08); }
|
||||
.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; }
|
||||
|
||||
.cyber-grid {
|
||||
padding: clamp(20px, 2.5vw, 30px); display: grid; grid-template-columns: 1fr 1fr;
|
||||
gap: 20px; background: #0B0F19; flex: 1; overflow-y: auto; max-height: calc(100vh - 120px);
|
||||
}
|
||||
.cyber-card {
|
||||
background: #111827; border: 1px solid var(--divider); border-radius: 14px; padding: 20px;
|
||||
display: flex; flex-direction: column; gap: 14px;
|
||||
}
|
||||
.c-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider); padding-bottom: 10px; }
|
||||
.c-title { font-size: 15px; font-weight: 700; color: var(--accent-cyan); }
|
||||
|
||||
.c-cell-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
||||
.c-cell { background: #1F2937; border: 1px solid #374151; border-radius: 8px; padding: 8px 12px; }
|
||||
|
||||
.btn-cyber-blue {
|
||||
width: 100%; padding: 12px; border-radius: 8px; background: var(--color-primary); color: white; border: none;
|
||||
font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
|
||||
}
|
||||
.cyber-term {
|
||||
background: #030712; border: 1px solid #1F2937; border-radius: 8px; padding: 12px; font-family: monospace; font-size: 11.5px;
|
||||
color: #38BDF8; height: 130px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
|
||||
}
|
||||
|
||||
/* FAB */
|
||||
.bluetooth-fab {
|
||||
position: absolute; bottom: 24px; right: 24px; width: 50px; height: 50px; border-radius: 14px;
|
||||
background: var(--color-primary); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
|
||||
display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 50; border: none;
|
||||
}
|
||||
.bluetooth-fab svg { width: 22px; height: 22px; fill: white; }
|
||||
|
||||
/* Sheet */
|
||||
.bottom-sheet-mask {
|
||||
position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7);
|
||||
backdrop-filter: blur(4px); z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s;
|
||||
}
|
||||
.bottom-sheet-mask.open { opacity: 1; pointer-events: auto; }
|
||||
.bottom-sheet {
|
||||
position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
|
||||
width: min(92%, 560px); background: #111827; border-radius: 24px 24px 0 0; border: 1px solid var(--divider);
|
||||
box-shadow: 0 -16px 45px rgba(0,0,0,0.6); transition: transform 0.35s ease;
|
||||
display: flex; flex-direction: column; max-height: 480px; z-index: 101;
|
||||
}
|
||||
.bottom-sheet-mask.open .bottom-sheet { transform: translateX(-50%) translateY(0); }
|
||||
</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="cyber-grid">
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<section class="cyber-card">
|
||||
<div class="c-head">
|
||||
<span class="c-title">待升级手环状态</span>
|
||||
<span id="cTag" style="font-size: 11px; color: var(--text-sub);">状态:未连接</span>
|
||||
</div>
|
||||
<div class="c-cell-grid">
|
||||
<div class="c-cell"><div style="font-size: 11px; color: var(--text-sub);">ID:</div><div style="font-weight: 700; font-family: monospace;" id="cId">未连接</div></div>
|
||||
<div class="c-cell"><div style="font-size: 11px; color: var(--text-sub);">版本:</div><div style="font-weight: 700; font-family: monospace;" id="cVer">未知</div></div>
|
||||
<div class="c-cell" style="grid-column: span 2;"><div style="font-size: 11px; color: var(--text-sub);">电量:</div><div style="font-weight: 700; font-family: monospace;" id="cBat">未知</div></div>
|
||||
</div>
|
||||
<button style="align-self: flex-end; background: #374151; color: #F59E0B; border: none; padding: 6px 14px; border-radius: 6px; font-weight: 700; cursor: pointer;" onclick="cCancel()">取消升级</button>
|
||||
</section>
|
||||
|
||||
<section class="cyber-card">
|
||||
<div class="c-head"><span class="c-title">固件包与版本源</span></div>
|
||||
<div style="background: #1F2937; border: 1px solid var(--divider); border-radius: 8px; padding: 10px 12px; font-size: 12px; font-family: monospace; color: #FFF;">
|
||||
SC106_FW1.00.0036_HW0.1_20260720_DFU.zip (内置 v1.00.0036)
|
||||
<div style="color: var(--accent-cyan); font-size: 11px; margin-top: 4px;">固件来源: 内置 (优先)</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 8px;">
|
||||
<button style="background: #1F2937; border: 1px solid var(--divider); color: var(--accent-cyan); padding: 8px; border-radius: 6px; font-weight: 700; cursor: pointer;" onclick="cCheck()">检查服务端版本</button>
|
||||
<button style="background: #1F2937; border: 1px solid var(--divider); color: var(--accent-cyan); padding: 8px; border-radius: 6px; font-weight: 700; cursor: pointer;" onclick="cUse()">使用内置固件</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<section class="cyber-card" style="flex: 1;">
|
||||
<div class="c-head"><span class="c-title">升级进度与控制</span></div>
|
||||
<div style="background: #1F2937; border: 1px solid var(--divider); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 6px;">
|
||||
<div style="display: flex; justify-content: space-between; font-size: 13px; font-weight: 700;">
|
||||
<span>升级进度</span><span id="cPct" style="color: var(--accent-cyan);">0%</span>
|
||||
</div>
|
||||
<div style="width: 100%; height: 8px; background: #030712; border-radius: 10px; overflow: hidden;">
|
||||
<div id="cBar" style="width: 0%; height: 100%; background: var(--color-primary); transition: width 0.3s;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-cyber-blue" onclick="cStart()">开始升级</button>
|
||||
|
||||
<span style="font-size: 12px; font-weight: 700; color: #FFF;">升级日志控制台</span>
|
||||
<div class="cyber-term" id="cLog">
|
||||
<div>[CYBER] DFU Engine Ready...</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- FAB -->
|
||||
<button class="bluetooth-fab" onclick="openCSheet()"><svg viewBox="0 0 24 24"><path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88z"/></svg></button>
|
||||
|
||||
<!-- Sheet -->
|
||||
<div class="bottom-sheet-mask" id="cSheet" onclick="if(event.target===this) closeCSheet()">
|
||||
<div class="bottom-sheet">
|
||||
<div style="width: 44px; height: 4px; border-radius: 4px; background: #4B5563; margin: 10px auto 4px;"></div>
|
||||
<div style="padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider);">
|
||||
<div style="display: flex; align-items: center; gap: 8px;"><span style="font-size: 16px;">📡</span><h2 style="font-size: 15px; font-weight: 700; color: #FFF;">选择设备</h2></div>
|
||||
<span style="cursor: pointer;" onclick="closeCSheet()">✕</span>
|
||||
</div>
|
||||
<div style="padding: 14px 20px; display: flex; flex-direction: column; gap: 8px;">
|
||||
<div style="border: 1px solid var(--divider); background: #1F2937; padding: 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; cursor: pointer;" onclick="cPick('CL831-62200026', 'v1.00.0035', '88%')">
|
||||
<div>
|
||||
<div style="font-weight: 700; font-family: monospace; color: #FFF;">CL831-62200026</div>
|
||||
<div style="font-size: 11px; color: var(--text-sub);">D9:24:0F:1C:55:FA · -89 dBm</div>
|
||||
</div>
|
||||
<span style="background: rgba(37,99,235,0.2); color: #38BDF8; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(56,189,248,0.3);">BLE</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function cLog(t) {
|
||||
const b = document.getElementById('cLog'); const d = document.createElement('div');
|
||||
d.innerText = `[${new Date().toTimeString().split(' ')[0]}] ${t}`;
|
||||
b.appendChild(d); b.scrollTop = b.scrollHeight;
|
||||
}
|
||||
function openCSheet() { document.getElementById('cSheet').classList.add('open'); cLog("唤起设备选择面板..."); }
|
||||
function closeCSheet() { document.getElementById('cSheet').classList.remove('open'); }
|
||||
function cPick(n, v, bat) {
|
||||
closeCSheet(); cLog(`连接设备 [${n}]...`);
|
||||
setTimeout(() => {
|
||||
document.getElementById('cId').innerText = n; document.getElementById('cVer').innerText = v; document.getElementById('cBat').innerText = bat;
|
||||
document.getElementById('cTag').innerText = "状态:已就绪"; document.getElementById('cTag').style.color = "#38BDF8";
|
||||
cLog(`手环 [${n}] 通信通道开启!`);
|
||||
}, 500);
|
||||
}
|
||||
function cStart() {
|
||||
cLog("写入固件分包...");
|
||||
let p = 0;
|
||||
const tm = setInterval(() => {
|
||||
p += 20; if (p > 100) p = 100;
|
||||
document.getElementById('cBar').style.width = p + '%'; document.getElementById('cPct').innerText = p + '%';
|
||||
if (p >= 100) { clearInterval(tm); cLog("固件升级成功!", "success"); alert("固件升级完成!"); }
|
||||
}, 300);
|
||||
}
|
||||
function cCancel() { cLog("终止固件传输。"); alert("升级已取消"); }
|
||||
function cCheck() { cLog("云端检索最新版本..."); alert("当前为最新版本!"); }
|
||||
function cUse() { cLog("选用内置固件包。"); alert("已选择内置固件!"); }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,202 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>方案 5:Master-Detail Inset Pro 分栏卡片风</title>
|
||||
<style>
|
||||
:root {
|
||||
--color-primary: #2563EB;
|
||||
--color-primary-light: #EFF6FF;
|
||||
--color-primary-border: #DBEAFE;
|
||||
--bg: #EEF2F6;
|
||||
--surface: #FFFFFF;
|
||||
--text-main: #0F172A;
|
||||
--text-sub: #64748B;
|
||||
--divider: #E2E8F0;
|
||||
--terminal-bg: #0F172A;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
||||
padding: clamp(16px, 2.5vw, 32px); display: flex; flex-direction: column;
|
||||
}
|
||||
.device-wrapper {
|
||||
width: 100%; max-width: min(100%, 1160px); 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: 640px; display: flex; flex-direction: column;
|
||||
}
|
||||
.appbar {
|
||||
height: 60px; 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:hover, .appbar-more:hover { background: rgba(15, 23, 42, 0.06); }
|
||||
.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; }
|
||||
|
||||
.inset-layout {
|
||||
padding: clamp(20px, 2.5vw, 30px); display: grid; grid-template-columns: 380px 1fr;
|
||||
gap: 20px; background: #F8FAFC; flex: 1; overflow-y: auto; max-height: calc(100vh - 120px);
|
||||
}
|
||||
.inset-card {
|
||||
background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; padding: 20px;
|
||||
display: flex; flex-direction: column; gap: 14px;
|
||||
}
|
||||
.i-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider); padding-bottom: 10px; }
|
||||
.i-title { font-size: 15.5px; font-weight: 700; color: var(--color-primary); }
|
||||
|
||||
.prop-pill-grid { display: flex; flex-direction: column; gap: 8px; }
|
||||
.prop-pill { background: #F8FAFC; border: 1px solid var(--divider); border-radius: 8px; padding: 10px 14px; display: flex; justify-content: space-between; }
|
||||
|
||||
.btn-inset-blue {
|
||||
width: 100%; padding: 12px; border-radius: 10px; background: var(--color-primary); color: white; border: none;
|
||||
font-weight: 700; cursor: pointer;
|
||||
}
|
||||
.term-inset {
|
||||
background: var(--terminal-bg); border-radius: 10px; padding: 12px; font-family: monospace; font-size: 11.5px;
|
||||
color: #38BDF8; height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
|
||||
}
|
||||
|
||||
/* FAB */
|
||||
.bluetooth-fab {
|
||||
position: absolute; bottom: 24px; right: 24px; width: 52px; height: 52px; border-radius: 16px;
|
||||
background: var(--surface); border: 1.5px solid var(--divider); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
|
||||
display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 50;
|
||||
}
|
||||
.bluetooth-fab svg { width: 24px; height: 24px; fill: var(--color-primary); }
|
||||
|
||||
/* Sheet */
|
||||
.bottom-sheet-mask {
|
||||
position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.45);
|
||||
backdrop-filter: blur(4px); z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s;
|
||||
}
|
||||
.bottom-sheet-mask.open { opacity: 1; pointer-events: auto; }
|
||||
.bottom-sheet {
|
||||
position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
|
||||
width: min(92%, 560px); background: var(--surface); border-radius: 24px 24px 0 0; border: 1.5px solid var(--divider);
|
||||
border-bottom: none; box-shadow: 0 -16px 45px rgba(15, 23, 42, 0.2); transition: transform 0.35s ease;
|
||||
display: flex; flex-direction: column; max-height: 480px; z-index: 101;
|
||||
}
|
||||
.bottom-sheet-mask.open .bottom-sheet { transform: translateX(-50%) translateY(0); }
|
||||
</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="inset-layout">
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<section class="inset-card">
|
||||
<div class="i-head">
|
||||
<span class="i-title">待升级手环状态</span>
|
||||
<span id="iTag" style="font-size: 11.5px; color: var(--text-sub);">未连接</span>
|
||||
</div>
|
||||
<div class="prop-pill-grid">
|
||||
<div class="prop-pill"><span style="color: var(--text-sub); font-size: 12px;">手环 ID</span><b id="iId" style="font-family: monospace;">未连接</b></div>
|
||||
<div class="prop-pill"><span style="color: var(--text-sub); font-size: 12px;">当前版本</span><b id="iVer" style="font-family: monospace;">未知</b></div>
|
||||
<div class="prop-pill"><span style="color: var(--text-sub); font-size: 12px;">剩余电量</span><b id="iBat" style="font-family: monospace;">未知</b></div>
|
||||
</div>
|
||||
<button style="background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; padding: 8px; border-radius: 8px; font-weight: 700; cursor: pointer;" onclick="iCancel()">取消升级</button>
|
||||
</section>
|
||||
|
||||
<section class="inset-card">
|
||||
<div class="i-head"><span class="i-title">固件包与版本源</span></div>
|
||||
<div style="background: #F8FAFC; border: 1px solid var(--divider); border-radius: 8px; padding: 10px 12px; font-size: 12px; font-family: monospace; font-weight: 700;">
|
||||
SC106_FW1.00.0036_HW0.1_20260720_DFU.zip (内置 v1.00.0036)
|
||||
<div style="color: var(--color-primary); font-size: 11px; margin-top: 4px;">固件来源: 内置 (优先)</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 8px;">
|
||||
<button style="background: white; border: 1px solid var(--divider); padding: 8px; border-radius: 8px; font-weight: 700; color: var(--color-primary); cursor: pointer;" onclick="iCheck()">检查服务端版本</button>
|
||||
<button style="background: white; border: 1px solid var(--divider); padding: 8px; border-radius: 8px; font-weight: 700; color: var(--color-primary); cursor: pointer;" onclick="iUse()">使用内置固件</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<section class="inset-card" style="flex: 1;">
|
||||
<div class="i-head"><span class="i-title">升级进度与控制</span></div>
|
||||
<div style="background: #F8FAFC; border: 1px solid var(--divider); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px;">
|
||||
<div style="display: flex; justify-content: space-between; font-size: 13px; font-weight: 700;">
|
||||
<span>升级进度</span><span id="iPct" style="color: var(--color-primary);">0%</span>
|
||||
</div>
|
||||
<div style="width: 100%; height: 8px; background: #E2E8F0; border-radius: 10px; overflow: hidden;">
|
||||
<div id="iBar" style="width: 0%; height: 100%; background: var(--color-primary); transition: width 0.3s;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-inset-blue" onclick="iStart()">开始升级</button>
|
||||
|
||||
<span style="font-size: 12.5px; font-weight: 700;">升级日志控制台</span>
|
||||
<div class="term-inset" id="iLog">
|
||||
<div>[INSET] DFU Core Initialized...</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- FAB -->
|
||||
<button class="bluetooth-fab" onclick="openISheet()"><svg viewBox="0 0 24 24"><path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88z"/></svg></button>
|
||||
|
||||
<!-- Sheet -->
|
||||
<div class="bottom-sheet-mask" id="iSheet" onclick="if(event.target===this) closeISheet()">
|
||||
<div class="bottom-sheet">
|
||||
<div style="width: 44px; height: 4px; border-radius: 4px; background: #CBD5E1; margin: 10px auto 4px;"></div>
|
||||
<div style="padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider);">
|
||||
<div style="display: flex; align-items: center; gap: 8px;"><span style="font-size: 16px;">📡</span><h2 style="font-size: 15.5px; font-weight: 700;">选择设备</h2></div>
|
||||
<span style="cursor: pointer;" onclick="closeISheet()">✕</span>
|
||||
</div>
|
||||
<div style="padding: 14px 20px; display: flex; flex-direction: column; gap: 8px;">
|
||||
<div style="border: 1px solid var(--divider); padding: 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; cursor: pointer;" onclick="iPick('CL831-62200026', 'v1.00.0035', '88%')">
|
||||
<div>
|
||||
<div style="font-weight: 700; font-family: monospace;">CL831-62200026</div>
|
||||
<div style="font-size: 11px; color: var(--text-sub);">D9:24:0F:1C:55:FA · -89 dBm</div>
|
||||
</div>
|
||||
<span style="background: var(--color-primary-light); color: var(--color-primary); font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--color-primary-border);">BLE</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function iLog(t) {
|
||||
const b = document.getElementById('iLog'); const d = document.createElement('div');
|
||||
d.innerText = `[${new Date().toTimeString().split(' ')[0]}] ${t}`;
|
||||
b.appendChild(d); b.scrollTop = b.scrollHeight;
|
||||
}
|
||||
function openISheet() { document.getElementById('iSheet').classList.add('open'); iLog("打开选择设备弹窗..."); }
|
||||
function closeISheet() { document.getElementById('iSheet').classList.remove('open'); }
|
||||
function iPick(n, v, bat) {
|
||||
closeISheet(); iLog(`选择手环 [${n}]...`);
|
||||
setTimeout(() => {
|
||||
document.getElementById('iId').innerText = n; document.getElementById('iVer').innerText = v; document.getElementById('iBat').innerText = bat;
|
||||
document.getElementById('iTag').innerText = "已就绪"; document.getElementById('iTag').style.color = "#10B981";
|
||||
iLog(`手环 [${n}] 就绪!`);
|
||||
}, 500);
|
||||
}
|
||||
function iStart() {
|
||||
iLog("写入固件中...");
|
||||
let p = 0;
|
||||
const tm = setInterval(() => {
|
||||
p += 20; if (p > 100) p = 100;
|
||||
document.getElementById('iBar').style.width = p + '%'; document.getElementById('iPct').innerText = p + '%';
|
||||
if (p >= 100) { clearInterval(tm); iLog("升级完成!", "success"); alert("固件升级成功!"); }
|
||||
}, 300);
|
||||
}
|
||||
function iCancel() { iLog("取消升级。"); alert("升级已取消"); }
|
||||
function iCheck() { iLog("检查服务端最新版本..."); alert("当前为最新版本!"); }
|
||||
function iUse() { iLog("锁定内置固件。"); alert("已选择内置固件!"); }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>手环升级 (DFU) - 5套重构方案大比武与决策中心</title>
|
||||
<style>
|
||||
:root {
|
||||
--primary: #2563EB;
|
||||
--bg: #0B0F19;
|
||||
--panel: #131B2E;
|
||||
--border: #1E293B;
|
||||
--text: #F8FAFC;
|
||||
--text-sub: #94A3B8;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", Roboto, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.header-bar {
|
||||
padding: 16px 24px;
|
||||
background: var(--panel);
|
||||
border-bottom: 1px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.hub-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
|
||||
.tabs-row { display: flex; gap: 8px; }
|
||||
.tab-btn {
|
||||
padding: 8px 16px;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
border: 1px solid var(--border);
|
||||
background: #1E293B;
|
||||
color: var(--text-sub);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.tab-btn.active {
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
|
||||
}
|
||||
.preview-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
}
|
||||
iframe {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 16px;
|
||||
background: white;
|
||||
min-height: 720px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header-bar">
|
||||
<div class="hub-title">
|
||||
<span>⚡ 手环升级 (DFU) 5套候选方案决策中心</span>
|
||||
<span style="font-size: 12px; background: rgba(37,99,235,0.2); color: #60A5FA; padding: 2px 8px; border-radius: 100px;">严格遵照 #2563EB 全局主色蓝规范</span>
|
||||
</div>
|
||||
<div class="tabs-row">
|
||||
<button class="tab-btn active" onclick="switchOpt(1, this)">方案 1:Fluid Studio (推荐·家族风)</button>
|
||||
<button class="tab-btn" onclick="switchOpt(2, this)">方案 2:Neo-Bento 磁贴</button>
|
||||
<button class="tab-btn" onclick="switchOpt(3, this)">方案 3:Nordic Slate 极简</button>
|
||||
<button class="tab-btn" onclick="switchOpt(4, this)">方案 4:Cyber Precision 遥测</button>
|
||||
<button class="tab-btn" onclick="switchOpt(5, this)">方案 5:Master-Detail 分栏</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preview-container">
|
||||
<iframe id="previewFrame" src="option_1_fluid_studio.html"></iframe>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const files = {
|
||||
1: 'option_1_fluid_studio.html',
|
||||
2: 'option_2_neo_bento.html',
|
||||
3: 'option_3_nordic_slate.html',
|
||||
4: 'option_4_cyber_precision.html',
|
||||
5: 'option_5_master_detail.html'
|
||||
};
|
||||
function switchOpt(num, btn) {
|
||||
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
|
||||
btn.classList.add('active');
|
||||
document.getElementById('previewFrame').src = files[num];
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
Reference in New Issue
Block a user