docs(frontend): 实现初始化向导全4步骤UI选型方案及三套视觉联动
This commit is contained in:
parent
4144b554d5
commit
b3badc9e1f
828
frontend/design-proposals/app.js
Normal file
828
frontend/design-proposals/app.js
Normal file
@ -0,0 +1,828 @@
|
||||
/**
|
||||
* Scert 首次初始化向导 - 全 4 步骤 UI 设计方案选型核心脚本
|
||||
* 支持 3 套视觉体系(Deck、Ops、Minimal)无缝切换与全 4 步无损联动
|
||||
*/
|
||||
|
||||
let currentTheme = 'deck'; // 'deck' | 'ops' | 'minimal'
|
||||
let currentStep = 1; // 1 | 2 | 3 | 4
|
||||
|
||||
// 页面步骤元数据定义
|
||||
const stepMetadata = {
|
||||
1: { num: '01', title: '超级管理员与基础配置', sub: '初始化向导 • 第 1 步 / 共 4 步 (账户与持久化存储)' },
|
||||
2: { num: '02', title: '服务与通知配置', sub: '初始化向导 • 第 2 步 / 共 4 步 (出站 SMTP 告警通道)' },
|
||||
3: { num: '03', title: 'DNS 授权与验证', sub: '初始化向导 • 第 3 步 / 共 4 步 (DNS-01 自动化凭据)' },
|
||||
4: { num: '04', title: '管理页面证书与部署生效', sub: '初始化向导 • 第 4 步 / 共 4 步 (证书目录与核心服务)' }
|
||||
};
|
||||
|
||||
// 步骤切换处理
|
||||
function goStep(step) {
|
||||
if (step < 1 || step > 4) return;
|
||||
currentStep = step;
|
||||
render();
|
||||
}
|
||||
|
||||
function nextStep() {
|
||||
if (currentStep < 4) {
|
||||
currentStep++;
|
||||
render();
|
||||
} else {
|
||||
alert('恭喜!初始化向导全部 4 个步骤已演练完成,点击确认后可向后端发起完整生效请求。');
|
||||
}
|
||||
}
|
||||
|
||||
function prevStep() {
|
||||
if (currentStep > 1) {
|
||||
currentStep--;
|
||||
render();
|
||||
}
|
||||
}
|
||||
|
||||
// 方案切换处理
|
||||
function switchTheme(theme) {
|
||||
currentTheme = theme;
|
||||
document.querySelectorAll('.nav-btn').forEach(btn => {
|
||||
if (btn.getAttribute('data-theme') === theme) {
|
||||
btn.classList.add('active');
|
||||
} else {
|
||||
btn.classList.remove('active');
|
||||
}
|
||||
});
|
||||
render();
|
||||
}
|
||||
|
||||
// 渲染通用步骤进度条
|
||||
function renderStepper() {
|
||||
const steps = [
|
||||
{ num: 1, name: '超级管理员', desc: '账号 / 网络 / 存储' },
|
||||
{ num: 2, name: '服务与通知', desc: 'SMTP 告警出站通道' },
|
||||
{ num: 3, name: 'DNS 验证', desc: 'DNS-01 API 授权' },
|
||||
{ num: 4, name: '证书与生效', desc: '证书目录 / 签发环境' }
|
||||
];
|
||||
|
||||
return `
|
||||
<nav class="step-stepper" aria-label="初始化步骤">
|
||||
${steps.map(s => {
|
||||
let cls = '';
|
||||
let icon = `0${s.num}`;
|
||||
if (s.num === currentStep) {
|
||||
cls = 'current';
|
||||
} else if (s.num < currentStep) {
|
||||
cls = 'complete';
|
||||
icon = '✓';
|
||||
}
|
||||
return `
|
||||
<div class="step-item ${cls}" onclick="goStep(${s.num})" title="点击切换至步骤 ${s.num}">
|
||||
<div class="step-circle">${icon}</div>
|
||||
<div class="step-info">
|
||||
<strong>${s.name}</strong>
|
||||
<small>${s.desc}</small>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}).join('')}
|
||||
</nav>
|
||||
`;
|
||||
}
|
||||
// =========================================================================
|
||||
// 方案 A:卡片式分体与状态联运流 (Card-Deck Flow) 全 4 步表单
|
||||
// =========================================================================
|
||||
|
||||
function renderDeckStep(step) {
|
||||
if (step === 1) {
|
||||
return `
|
||||
<!-- 步骤 1:超级管理员 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">01</div>
|
||||
<h3>超级管理员凭据录入</h3>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">账号用于登录 Scert Web 与受保护运维 CLI</span>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group">
|
||||
<label>超级管理员用户名 <span class="help-tip">如 scert-admin</span></label>
|
||||
<input type="text" value="xuans" placeholder="请输入管理员用户名">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>绑定安全电子邮箱 <span class="help-tip">用于证书到期前置推送</span></label>
|
||||
<div class="email-input-wrap">
|
||||
<input type="text" value="likb_blue" placeholder="邮箱前缀">
|
||||
<select>
|
||||
<option value="@163.com" selected>@163.com</option>
|
||||
<option value="@qq.com">@qq.com</option>
|
||||
<option value="@solit.cn">@solit.cn</option>
|
||||
<option value="@gmail.com">@gmail.com</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>管理员登录密码 <span class="help-tip">8-12 个字符</span></label>
|
||||
<input type="password" value="Scert@2026.Pass">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>确认管理员登录密码</label>
|
||||
<input type="password" value="Scert@2026.Pass">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 步骤 1:网络拓扑 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">02</div>
|
||||
<h3>网络与管理访问定位</h3>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">支持通过公网 IP 或独立域名接入</span>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group">
|
||||
<label>访问定位模式</label>
|
||||
<select>
|
||||
<option value="ip" selected>公网 IP 模式 (127.0.0.1)</option>
|
||||
<option value="hostname">域名定位模式 (如 scert.solit.cn)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Scert 主服务运行端口</label>
|
||||
<input type="number" value="5200" placeholder="例如 5200 或 80">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 步骤 1:数据库配置 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">03</div>
|
||||
<h3>持久化存储引擎 (Database)</h3>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">建议轻量环境使用 SQLite 本地免运维引擎</span>
|
||||
</div>
|
||||
<div class="db-verify-box">
|
||||
<div style="flex: 1; display: flex; align-items: center; gap: 14px;">
|
||||
<div class="form-group" style="width: 320px;">
|
||||
<label>存储驱动选择</label>
|
||||
<select>
|
||||
<option value="sqlite" selected>SQLite (本机文件嵌入,免运维内置锁)</option>
|
||||
<option value="mysql">MySQL 8.0+ (需支持 TLS 连接)</option>
|
||||
<option value="postgres">PostgreSQL 14+ (需 SSL/TLS 连接)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="db-badge-verified">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
<span>SQLite 读写权限已在线校验通过</span>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-verify" onclick="alert('触发 POST /api/v1/bootstrap/database/test 校验:\n数据库读写锁验证正常,事务一致性通过。')">重新验证数据库</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 步骤 1:安全收口提示 -->
|
||||
<div class="info-callout">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
|
||||
<div>
|
||||
<strong>高安全受保护体系说明:</strong>
|
||||
生产环境已彻底移除公网 /reset HTTP 入口。若遗忘超级管理员密码,请在物理宿主机通过系统管理员终端运行 <code>scert.exe admin localreset</code>,在受保护的本地 IPC 域内安全重置。
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 2) {
|
||||
return `
|
||||
<!-- 步骤 2:服务与通知 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">01</div>
|
||||
<h3>SMTP 出站告警通知服务</h3>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">仅作为出站邮件客户端向管理员分发证书通知</span>
|
||||
</div>
|
||||
<label class="checkbox-card" style="margin-bottom: 16px;">
|
||||
<input type="checkbox" checked id="smtp-switch">
|
||||
<span class="checkbox-label">启用 SMTP 告警通知</span>
|
||||
<span class="checkbox-desc">(证书申请成功、到期预警、部署失败时分发出站邮件)</span>
|
||||
</label>
|
||||
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group">
|
||||
<label>SMTP 服务器主机 <span class="help-tip">如 smtp.solit.cn</span></label>
|
||||
<input type="text" value="smtp.solit.cn" placeholder="smtp.example.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>SMTP 服务端口 <span class="help-tip">STARTTLS 默认 587,隐式 TLS 默认 465</span></label>
|
||||
<input type="number" value="587">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>发信用户名 <span class="help-tip">完整邮箱或系统账号</span></label>
|
||||
<input type="text" value="scert-notify@solit.cn">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>发信授权密码 / Token</label>
|
||||
<input type="password" value="Notify#Pass2026!">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>传输加密模式</label>
|
||||
<select>
|
||||
<option value="starttls" selected>STARTTLS (推荐安全模式)</option>
|
||||
<option value="implicit_tls">Implicit TLS (465端口直连加密)</option>
|
||||
<option value="plain">明文连接 (不推荐)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>默认接收通知人列表 <span class="help-tip">多个邮箱请使用逗号隔开</span></label>
|
||||
<input type="text" value="ops@solit.cn, likb_blue@163.com">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 步骤 2:高级通知偏好 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">02</div>
|
||||
<h3>高级通知策略与重试控制</h3>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">保障高可用投递与敏感信息收敛</span>
|
||||
</div>
|
||||
<div class="form-grid-3">
|
||||
<div class="form-group">
|
||||
<label>通知详情模式</label>
|
||||
<select>
|
||||
<option value="detailed" selected>详细模式 (附带部署明细)</option>
|
||||
<option value="compact">精简模式 (仅发送状态概览)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>网络超时时间 (秒)</label>
|
||||
<input type="number" value="10">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>失败重试次数</label>
|
||||
<input type="number" value="3">
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; gap: 20px; margin-top: 14px;">
|
||||
<label style="font-size: 12px; display: flex; align-items: center; gap: 6px; cursor: pointer;">
|
||||
<input type="checkbox" checked accent-color="#1d4ed8"> 邮件包含证书序列号
|
||||
</label>
|
||||
<label style="font-size: 12px; display: flex; align-items: center; gap: 6px; cursor: pointer;">
|
||||
<input type="checkbox" checked accent-color="#1d4ed8"> 邮件包含管理控制台直达链接
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 3) {
|
||||
return `
|
||||
<!-- 步骤 3:DNS 服务商凭据 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">01</div>
|
||||
<h3>DNS 服务商授权配置</h3>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">支持通过 API 自动化注入 _acme-challenge TXT 记录</span>
|
||||
</div>
|
||||
<div class="form-grid-3">
|
||||
<div class="form-group">
|
||||
<label>DNS 服务商类型</label>
|
||||
<select>
|
||||
<option value="aliyun" selected>阿里云 DNS (Alibaba Cloud DNS)</option>
|
||||
<option value="tencent" disabled>腾讯云 DNSPod (适配器待开放)</option>
|
||||
<option value="cloudflare" disabled>Cloudflare (适配器待开放)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>权限测试验证主域名 <span class="help-tip">由该 DNS 账号托管</span></label>
|
||||
<input type="text" value="solit.cn" placeholder="例如 solit.cn">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>DNS 传播最大等待 (秒)</label>
|
||||
<input type="number" value="300">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-grid-2" style="margin-top: 14px;">
|
||||
<div class="form-group">
|
||||
<label>AccessKey ID <span class="help-tip">具有 AliyunDNSFullAccess 权限</span></label>
|
||||
<input type="text" value="LTAI5t7********98XQv">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>AccessKey Secret</label>
|
||||
<input type="password" value="pQ83n7Yd*********Kxm2">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 步骤 3:DNS 联调在线探针 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">02</div>
|
||||
<h3>DNS API 联调探针 (Live Verification)</h3>
|
||||
</div>
|
||||
<button class="btn-verify" onclick="alert('触发 POST /api/v1/bootstrap/dns/test:\n[阶段 1] 写入测试 TXT 记录成功 (耗时 420ms)\n[阶段 2] DNS 权威服务器查询命中 (耗时 580ms)\n[阶段 3] 测试 TXT 记录自动清理完成 (耗时 310ms)\n验证结果:DNS API 完整读写清理测试通过!')">
|
||||
执行在线 DNS 联调验证
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
||||
<span style="font-size: 13px; font-weight: 600; color: #0f172a;">API 权限三阶段检验状态:</span>
|
||||
<span class="db-badge-verified">探针通过 • 有效期 15 分钟</span>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: 12px;">
|
||||
<div style="background: #fff; padding: 10px; border-radius: 6px; border: 1px solid #cbd5e1;">
|
||||
<span style="color: #64748b;">① TXT 临时记录创建</span>
|
||||
<div style="color: #10b981; font-weight: 600; margin-top: 4px;">✔ 注入成功 (Status 200)</div>
|
||||
</div>
|
||||
<div style="background: #fff; padding: 10px; border-radius: 6px; border: 1px solid #cbd5e1;">
|
||||
<span style="color: #64748b;">② 权威 DNS 节点解析</span>
|
||||
<div style="color: #10b981; font-weight: 600; margin-top: 4px;">✔ 权威节点秒级生效</div>
|
||||
</div>
|
||||
<div style="background: #fff; padding: 10px; border-radius: 6px; border: 1px solid #cbd5e1;">
|
||||
<span style="color: #64748b;">③ 残留记录原子清理</span>
|
||||
<div style="color: #10b981; font-weight: 600; margin-top: 4px;">✔ 临时记录清理完成</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 4) {
|
||||
return `
|
||||
<!-- 步骤 4:管理页面证书与部署生效 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">01</div>
|
||||
<h3>证书部署根目录与环境</h3>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">填写服务器宿主机绝对路径,系统将自动创建受保护目录</span>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group">
|
||||
<label>证书部署根目录 (绝对路径) <span class="help-tip">必须具备最小安全读写权限</span></label>
|
||||
<input type="text" value="D:/Desktop/Scert/.runtime/dev/ssl">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>ACME 证书签发环境</label>
|
||||
<select>
|
||||
<option value="staging">测试环境 (Let's Encrypt Staging,供调试)</option>
|
||||
<option value="production" selected>正式环境 (Let's Encrypt Production,受公共浏览器信任)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 步骤 4:HTTPS 代理模式与管理入口 -->
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">02</div>
|
||||
<h3>HTTPS 模式与服务入口设定</h3>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">支持直接核心接管或前置反向代理</span>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group">
|
||||
<label>HTTPS 架构模式</label>
|
||||
<select>
|
||||
<option value="direct" selected>默认模式:核心服务直接终止 HTTPS (推荐)</option>
|
||||
<option value="proxy">反向代理:Nginx / Caddy 终止公网 HTTPS</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>管理控制台开启选项</label>
|
||||
<div style="padding-top: 8px;">
|
||||
<label class="checkbox-card" style="padding: 8px 12px;">
|
||||
<input type="checkbox" checked accent-color="#1d4ed8">
|
||||
<span class="checkbox-label">初始化完成后立即启用 Web 管理页面</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 步骤 4:就绪总结 -->
|
||||
<div class="info-callout" style="background: #eff6ff; border-color: #bfdbfe; color: #1e40af;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
|
||||
<div>
|
||||
<strong>初始化已就绪:</strong>
|
||||
点击下方“完成初始化并启动服务”后,Scert 将在后台安全签发管理证书、固化数据库配置并直接进入主控制台。
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
// =========================================================================
|
||||
// 方案 B:沉浸式专业运维仪表板 (Ops-Console Split) 全 4 步表单与实时链路拓扑
|
||||
// =========================================================================
|
||||
|
||||
function renderOpsStep(step) {
|
||||
let formContent = '';
|
||||
let topoContent = '';
|
||||
|
||||
if (step === 1) {
|
||||
formContent = `
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 12px;">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">SEC</div>
|
||||
<h3>管理员安全凭据</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>管理员用户名</label><input type="text" value="xuans"></div>
|
||||
<div class="form-group"><label>绑定通知邮箱</label><input type="text" value="likb_blue@163.com"></div>
|
||||
<div class="form-group"><label>登录密码</label><input type="password" value="Scert@2026.Pass"></div>
|
||||
<div class="form-group"><label>确认密码</label><input type="password" value="Scert@2026.Pass"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 12px;">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">NET</div>
|
||||
<h3>网络拓扑与存储核心</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>网络接入模式</label><select><option>公网 IP (127.0.0.1)</option><option>域名定位 (FQDN)</option></select></div>
|
||||
<div class="form-group"><label>服务主端口</label><input type="number" value="5200"></div>
|
||||
<div class="form-group" style="grid-column: span 2;">
|
||||
<label>存储持久化驱动</label>
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<select style="flex: 1;"><option>SQLite (本地独立锁文件 • 推荐免运维)</option><option>MySQL 8.0+</option><option>PostgreSQL 14+</option></select>
|
||||
<button class="btn-verify" style="height: 38px;" onclick="alert('存储引擎在线写入测试通过')">校验驱动</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
topoContent = `
|
||||
<div class="topo-title">
|
||||
<span>实时系统链路 (TOPOLOGY)</span>
|
||||
<span style="color: #34d399;">● READY</span>
|
||||
</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">INBOUND TRAFFIC</div>
|
||||
<div class="topo-node-val">HTTP/HTTPS :5200 (127.0.0.1)</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ 协议隔离与拦截</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">SCERT CORE ENGINE</div>
|
||||
<div class="topo-node-val">Strict-Same-Origin Check</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ 本地事务锁</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">STORAGE BACKEND</div>
|
||||
<div class="topo-node-val">scert.db (WAL 模式)</div>
|
||||
</div>
|
||||
<div style="margin-top: auto;">
|
||||
<div class="topo-check-item"><span>Same-Origin Header</span><span class="status-ok">PASS</span></div>
|
||||
<div class="topo-check-item"><span>Database Token</span><span class="status-ok">VERIFIED</span></div>
|
||||
<div class="topo-check-item"><span>DNS API Probe</span><span class="status-wait">STEP 3 PENDING</span></div>
|
||||
<div class="topo-check-item"><span>Admin Reset Mode</span><span class="status-ok">LOCAL IPC ONLY</span></div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 2) {
|
||||
formContent = `
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 12px;">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">MAIL</div>
|
||||
<h3>SMTP 出站路由通道</h3>
|
||||
</div>
|
||||
</div>
|
||||
<label class="checkbox-card" style="margin-bottom: 14px;">
|
||||
<input type="checkbox" checked>
|
||||
<span class="checkbox-label">启用 SMTP 告警分发机制</span>
|
||||
</label>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>SMTP 主机</label><input type="text" value="smtp.solit.cn"></div>
|
||||
<div class="form-group"><label>端口</label><input type="number" value="587"></div>
|
||||
<div class="form-group"><label>发信用户名</label><input type="text" value="scert-notify@solit.cn"></div>
|
||||
<div class="form-group"><label>发信授权码</label><input type="password" value="******"></div>
|
||||
<div class="form-group"><label>加密模式</label><select><option>STARTTLS (推荐)</option><option>Implicit TLS</option></select></div>
|
||||
<div class="form-group"><label>通知接收人</label><input type="text" value="ops@solit.cn, xuans@solit.cn"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 12px;">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">OPT</div>
|
||||
<h3>高级通知策略</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>通知内容粒度</label><select><option>详细模式 (含执行节点与证书链)</option><option>精炼模式</option></select></div>
|
||||
<div class="form-group"><label>超时控制 (秒)</label><input type="number" value="10"></div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
topoContent = `
|
||||
<div class="topo-title">
|
||||
<span>出站通知拓扑 (OUTBOUND MAIL)</span>
|
||||
<span style="color: #38bdf8;">● CONFIGURED</span>
|
||||
</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">ALERT TRIGGER SOURCE</div>
|
||||
<div class="topo-node-val">Certificate Expiry / Renew Hook</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ STARTTLS 587</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">GATEWAY HOST</div>
|
||||
<div class="topo-node-val">smtp.solit.cn</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ 直达运维邮箱</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">RECIPIENTS</div>
|
||||
<div class="topo-node-val">ops@solit.cn (2 targets)</div>
|
||||
</div>
|
||||
<div style="margin-top: auto;">
|
||||
<div class="topo-check-item"><span>SMTP Host DNS</span><span class="status-ok">RESOLVED</span></div>
|
||||
<div class="topo-check-item"><span>STARTTLS Handshake</span><span class="status-ok">STANDBY</span></div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 3) {
|
||||
formContent = `
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 12px;">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">DNS</div>
|
||||
<h3>DNS-01 验证适配器凭据</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>DNS 服务商</label><select><option>阿里云 DNS (Aliyun DNS)</option></select></div>
|
||||
<div class="form-group"><label>验证主域名</label><input type="text" value="solit.cn"></div>
|
||||
<div class="form-group"><label>AccessKey ID</label><input type="text" value="LTAI5t7********98XQv"></div>
|
||||
<div class="form-group"><label>AccessKey Secret</label><input type="password" value="pQ83n7Yd*********Kxm2"></div>
|
||||
</div>
|
||||
<div style="margin-top: 14px;">
|
||||
<button class="btn-verify" style="width: 100%; height: 38px;" onclick="alert('DNS API 自动化全链路读写探针验证通过!')">
|
||||
立即触发 DNS API 三阶段在线探针 (写入 / 权威验证 / 清理)
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
topoContent = `
|
||||
<div class="topo-title">
|
||||
<span>DNS-01 挑战拓扑 (CHALLENGE)</span>
|
||||
<span style="color: #34d399;">● READY</span>
|
||||
</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">ACME SERVER REQUEST</div>
|
||||
<div class="topo-node-val">_acme-challenge.solit.cn</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ API 注入 TXT 记录</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">ALIYUN DNS CLOUD</div>
|
||||
<div class="topo-node-val">AliyunDNSFullAccess API</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ 全球 DNS 权威解析节点</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">PROPAGATION STATUS</div>
|
||||
<div class="topo-node-val">300s SLA Max (Avg: 2.1s)</div>
|
||||
</div>
|
||||
<div style="margin-top: auto;">
|
||||
<div class="topo-check-item"><span>API Credentials</span><span class="status-ok">VALID</span></div>
|
||||
<div class="topo-check-item"><span>Live Probe</span><span class="status-ok">PASSED (1.3s)</span></div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 4) {
|
||||
formContent = `
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 12px;">
|
||||
<div class="deck-header-left">
|
||||
<div class="tag">SSL</div>
|
||||
<h3>证书根目录与签发引擎环境</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>证书部署根目录</label><input type="text" value="D:/Desktop/Scert/.runtime/dev/ssl"></div>
|
||||
<div class="form-group"><label>ACME 环境</label><select><option>Let's Encrypt 生产环境 (Production)</option><option>Let's Encrypt 测试环境 (Staging)</option></select></div>
|
||||
<div class="form-group"><label>HTTPS 架构模式</label><select><option>直接模式 (核心直接监听 HTTPS)</option><option>反向代理模式</option></select></div>
|
||||
<div class="form-group"><label>Web 管理后台</label><select><option>初始化完成后立即开启 (Web Enabled)</option></select></div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
topoContent = `
|
||||
<div class="topo-title">
|
||||
<span>生产证书生效链路 (CERT OPS)</span>
|
||||
<span style="color: #34d399;">● READY TO ISSUE</span>
|
||||
</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">MANAGED ROOT DIR</div>
|
||||
<div class="topo-node-val">D:/Desktop/Scert/.../ssl</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ 自动下发受信任证书</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">PRODUCTION CA</div>
|
||||
<div class="topo-node-val">Let's Encrypt Production</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ 绑定核心端口并启动</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">HTTPS LISTENER</div>
|
||||
<div class="topo-node-val">Direct TLS :5200 (Active)</div>
|
||||
</div>
|
||||
<div style="margin-top: auto;">
|
||||
<div class="topo-check-item"><span>Directory Access</span><span class="status-ok">WRITABLE</span></div>
|
||||
<div class="topo-check-item"><span>Bootstrap Lock</span><span class="status-ok">FINAL READY</span></div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
return `
|
||||
<div class="ops-split">
|
||||
<div class="ops-main">
|
||||
${formContent}
|
||||
</div>
|
||||
<div class="topo-panel">
|
||||
${topoContent}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
// =========================================================================
|
||||
// 方案 C:极简轻奢分步引导台 (Minimalist Focus) 全 4 步表单
|
||||
// =========================================================================
|
||||
|
||||
function renderMinimalStep(step) {
|
||||
if (step === 1) {
|
||||
return `
|
||||
<div class="minimal-container">
|
||||
<div class="minimal-section-title">01 / ADMIN IDENTITY (超级管理员账户)</div>
|
||||
<div class="minimal-card">
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>管理员用户名</label><input type="text" value="xuans"></div>
|
||||
<div class="form-group"><label>绑定电子邮箱</label><input type="text" value="likb_blue@163.com"></div>
|
||||
<div class="form-group"><label>登录密码</label><input type="password" value="Scert@2026.Pass"></div>
|
||||
<div class="form-group"><label>重复密码验证</label><input type="password" value="Scert@2026.Pass"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="minimal-section-title" style="margin-top: 10px;">02 / ACCESS & PERSISTENCE (访问入口与存储)</div>
|
||||
<div class="minimal-card">
|
||||
<div class="form-grid-3">
|
||||
<div class="form-group"><label>访问方式</label><input type="text" value="公网 IP (127.0.0.1)" readonly></div>
|
||||
<div class="form-group"><label>主端口</label><input type="number" value="5200"></div>
|
||||
<div class="form-group"><label>存储后端</label><select><option>SQLite 本机存储 (推荐)</option><option>MySQL</option><option>PostgreSQL</option></select></div>
|
||||
</div>
|
||||
<div style="margin-top: 14px; padding-top: 12px; border-top: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center;">
|
||||
<span style="font-size: 12px; color: #10b981; font-weight: 600;">✔ SQLite 存储文件读写状态验证正常</span>
|
||||
<button class="btn-verify" style="height: 32px;" onclick="alert('存储在线验证通过')">重新校验存储</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 2) {
|
||||
return `
|
||||
<div class="minimal-container">
|
||||
<div class="minimal-section-title">01 / NOTIFICATION ROUTE (告警通知路由)</div>
|
||||
<div class="minimal-card">
|
||||
<label class="checkbox-card" style="margin-bottom: 14px; border: none; background: transparent; padding: 0;">
|
||||
<input type="checkbox" checked>
|
||||
<span class="checkbox-label">启用 SMTP 出站通知通道</span>
|
||||
</label>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>SMTP 主机地址</label><input type="text" value="smtp.solit.cn"></div>
|
||||
<div class="form-group"><label>端口</label><input type="number" value="587"></div>
|
||||
<div class="form-group"><label>发信用户名</label><input type="text" value="scert-notify@solit.cn"></div>
|
||||
<div class="form-group"><label>发信授权密码</label><input type="password" value="******"></div>
|
||||
<div class="form-group"><label>传输加密</label><select><option>STARTTLS (推荐)</option><option>Implicit TLS</option></select></div>
|
||||
<div class="form-group"><label>接收人邮箱 (逗号分隔)</label><input type="text" value="ops@solit.cn, xuans@solit.cn"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 3) {
|
||||
return `
|
||||
<div class="minimal-container">
|
||||
<div class="minimal-section-title">01 / DNS-01 API INTEGRATION (DNS-01 自动化接口)</div>
|
||||
<div class="minimal-card">
|
||||
<div class="form-grid-3">
|
||||
<div class="form-group"><label>DNS 服务提供商</label><select><option>阿里云 DNS (Aliyun DNS)</option></select></div>
|
||||
<div class="form-group"><label>验证测试域名</label><input type="text" value="solit.cn"></div>
|
||||
<div class="form-group"><label>传播最长等待 (秒)</label><input type="number" value="300"></div>
|
||||
</div>
|
||||
<div class="form-grid-2" style="margin-top: 14px;">
|
||||
<div class="form-group"><label>AccessKey ID</label><input type="text" value="LTAI5t7********98XQv"></div>
|
||||
<div class="form-group"><label>AccessKey Secret</label><input type="password" value="pQ83n7Yd*********Kxm2"></div>
|
||||
</div>
|
||||
<div style="margin-top: 14px; display: flex; justify-content: flex-end;">
|
||||
<button class="btn-verify" style="height: 36px; padding: 0 20px;" onclick="alert('DNS API 在线读写探针验证通过!')">
|
||||
执行 DNS 权限在线探针
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
} else if (step === 4) {
|
||||
return `
|
||||
<div class="minimal-container">
|
||||
<div class="minimal-section-title">01 / CERTIFICATE & ENGINE FINALIZE (证书与最终部署)</div>
|
||||
<div class="minimal-card">
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>证书部署根目录 (绝对路径)</label><input type="text" value="D:/Desktop/Scert/.runtime/dev/ssl"></div>
|
||||
<div class="form-group"><label>ACME 签发环境</label><select><option>正式生产环境 (Let's Encrypt Production)</option><option>测试环境 (Staging)</option></select></div>
|
||||
<div class="form-group"><label>HTTPS 服务模式</label><select><option>直接模式 (Direct TLS)</option><option>反向代理模式</option></select></div>
|
||||
<div class="form-group"><label>管理页面开关</label><select><option>初始化完成后立即启用 Web 控制台</option></select></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// 统一渲染调度主函数 render()
|
||||
// =========================================================================
|
||||
|
||||
function render() {
|
||||
const frame = document.getElementById('preview-frame');
|
||||
if (!frame) return;
|
||||
|
||||
const meta = stepMetadata[currentStep];
|
||||
|
||||
// 1. 侧边栏
|
||||
const brandSidebar = `
|
||||
<aside class="access-brand">
|
||||
<div class="brand-top">
|
||||
<img class="logo" src="/Scert.png" alt="Scert">
|
||||
<div class="tag">SCERT 首次运行</div>
|
||||
<h1>配置证书管理服务</h1>
|
||||
<p>Scert 与 Scert-admin 共享本次配置。完成初始化后,即可通过管理页面统一管理全生命周期自动化证书。</p>
|
||||
</div>
|
||||
<div class="brand-notice">
|
||||
<strong>初始化安全屏障</strong>
|
||||
请先完成 DNS API 在线验证。提交初始化时将自动申请并校验管理页面证书。Linux 外部访问请提前放行端口。
|
||||
</div>
|
||||
</aside>
|
||||
`;
|
||||
|
||||
// 2. 右侧主体
|
||||
let stepBody = '';
|
||||
if (currentTheme === 'deck') {
|
||||
stepBody = renderDeckStep(currentStep);
|
||||
} else if (currentTheme === 'ops') {
|
||||
stepBody = renderOpsStep(currentStep);
|
||||
} else if (currentTheme === 'minimal') {
|
||||
stepBody = renderMinimalStep(currentStep);
|
||||
}
|
||||
|
||||
// 3. 底部操作栏
|
||||
const isLast = currentStep === 4;
|
||||
const isFirst = currentStep === 1;
|
||||
const footer = `
|
||||
<footer class="wizard-footer">
|
||||
<div class="hint">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="12" x2="12" y2="16"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>
|
||||
<span>当前步骤 ${currentStep}/4:请确认必填项均已填写或已通过预检</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
${!isFirst ? `<button class="btn-prev" onclick="prevStep()">上一步</button>` : ''}
|
||||
<button class="btn-next ${isLast ? 'btn-submit' : ''}" onclick="nextStep()">
|
||||
${isLast ? '完成初始化并启动服务' : '下一步'}
|
||||
</button>
|
||||
</div>
|
||||
</footer>
|
||||
`;
|
||||
|
||||
// 4. 组装整个容器
|
||||
frame.innerHTML = `
|
||||
${brandSidebar}
|
||||
<section class="content-area">
|
||||
<header class="wizard-header">
|
||||
<div class="title-group">
|
||||
<span>${meta.sub}</span>
|
||||
<h2>${meta.title}</h2>
|
||||
</div>
|
||||
<div class="badge-secure">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
|
||||
受保护的 HTTPS 初始化 (Strict-Same-Origin)
|
||||
</div>
|
||||
</header>
|
||||
|
||||
${renderStepper()}
|
||||
|
||||
<div class="wizard-body">
|
||||
${stepBody}
|
||||
</div>
|
||||
|
||||
${footer}
|
||||
</section>
|
||||
`;
|
||||
}
|
||||
|
||||
// 页面加载完成后自动触发初始渲染
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
render();
|
||||
});
|
||||
render();
|
||||
@ -1,393 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Scert 首次初始化向导 - UI 设计方案选型</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Scert 首次初始化向导 - 全 4 步骤 UI 设计方案选型</title>
|
||||
<link rel="icon" type="image/png" href="/Scert.png" />
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
|
||||
body { background: #0b1120; color: #f1f5f9; min-height: 100vh; display: flex; flex-direction: column; }
|
||||
header.top-nav { height: 60px; background: #0f172a; border-bottom: 1px solid #1e293b; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 100; }
|
||||
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; color: #38bdf8; }
|
||||
.brand img { width: 32px; height: 32px; object-fit: contain; }
|
||||
.nav-tabs { display: flex; gap: 8px; background: #1e293b; padding: 4px; border-radius: 8px; }
|
||||
.nav-tab { padding: 6px 16px; border-radius: 6px; border: none; background: transparent; color: #94a3b8; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; }
|
||||
.nav-tab.active { background: #0284c7; color: #fff; box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4); }
|
||||
.meta-badge { font-size: 12px; color: #64748b; background: #1e293b; padding: 4px 10px; border-radius: 20px; border: 1px solid #334155; }
|
||||
|
||||
main.viewport { flex: 1; padding: 24px; display: flex; justify-content: center; align-items: center; }
|
||||
.preview-frame { width: 100%; max-width: 1480px; height: 860px; background: #fff; border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); overflow: hidden; display: flex; color: #0f172a; }
|
||||
|
||||
/* 共享侧边栏 */
|
||||
.access-brand { width: 280px; background: linear-gradient(175deg, #1e3a8a 0%, #1e40af 40%, #0f172a 100%); color: #fff; padding: 28px 24px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
|
||||
.brand-top .logo { width: 72px; height: 72px; margin-bottom: 20px; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25)); }
|
||||
.brand-top .tag { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #93c5fd; font-weight: 700; margin-bottom: 6px; }
|
||||
.brand-top h1 { font-size: 22px; font-weight: 700; line-height: 1.35; margin-bottom: 12px; }
|
||||
.brand-top p { font-size: 13px; color: #bfdbfe; line-height: 1.55; }
|
||||
.brand-notice { background: rgba(255,255,255,0.08); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 14px; font-size: 12px; line-height: 1.5; color: #dbeafe; }
|
||||
.brand-notice strong { display: block; color: #fff; margin-bottom: 4px; font-size: 12px; }
|
||||
|
||||
.content-area { flex: 1; display: flex; flex-direction: column; background: #f8fafc; }
|
||||
.wizard-header { padding: 18px 28px 14px; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
|
||||
.wizard-header .title-group h2 { font-size: 20px; font-weight: 700; color: #0f172a; }
|
||||
.wizard-header .title-group span { font-size: 12px; color: #64748b; }
|
||||
.badge-secure { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 6px; display: flex; align-items: center; gap: 6px; }
|
||||
|
||||
/* 顶部进度条通用 */
|
||||
.step-stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px 28px; background: #fff; border-bottom: 1px solid #f1f5f9; }
|
||||
.step-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; transition: all .2s; }
|
||||
.step-item.active { background: #f0fdf4; border-color: #86efac; }
|
||||
.step-item.current { background: #f0f9ff; border-color: #7dd3fc; }
|
||||
.step-circle { width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; color: #64748b; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
|
||||
.step-item.current .step-circle { background: #0284c7; color: #fff; }
|
||||
.step-info { display: flex; flex-direction: column; }
|
||||
.step-info strong { font-size: 12px; color: #1e293b; }
|
||||
.step-info small { font-size: 11px; color: #64748b; }
|
||||
|
||||
.wizard-body { flex: 1; padding: 20px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
|
||||
|
||||
/* 方案 A: 卡片式三段层级 */
|
||||
.deck-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
|
||||
.deck-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed #f1f5f9; }
|
||||
.deck-header .tag { width: 22px; height: 22px; border-radius: 6px; background: #e0f2fe; color: #0369a1; font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; }
|
||||
.deck-header h3 { font-size: 14px; font-weight: 600; color: #1e293b; }
|
||||
|
||||
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
|
||||
.form-grid-3 { display: grid; grid-template-columns: 1.2fr 1.2fr 0.8fr; gap: 12px 18px; }
|
||||
.form-group { display: flex; flex-direction: column; gap: 6px; }
|
||||
.form-group label { font-size: 12px; font-weight: 600; color: #334155; display: flex; align-items: center; gap: 4px; }
|
||||
.form-group input, .form-group select { height: 36px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; color: #0f172a; outline: none; transition: border-color .2s; background: #fff; }
|
||||
.form-group input:focus, .form-group select:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12); }
|
||||
|
||||
.email-combine { display: flex; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; background: #fff; }
|
||||
.email-combine input { border: none; border-radius: 0; flex: 1; }
|
||||
.email-combine select { border: none; border-left: 1px solid #e2e8f0; border-radius: 0; background: #f8fafc; color: #475569; width: 120px; font-size: 12px; }
|
||||
|
||||
.switch-pills { display: flex; background: #f1f5f9; border-radius: 8px; padding: 2px; }
|
||||
.switch-pill { flex: 1; height: 32px; border: none; background: transparent; font-size: 12px; font-weight: 600; color: #64748b; border-radius: 6px; cursor: pointer; }
|
||||
.switch-pill.active { background: #fff; color: #0284c7; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
|
||||
|
||||
.db-verify-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
|
||||
.db-verify-left { display: flex; align-items: center; gap: 12px; flex: 1; }
|
||||
.db-badge-verified { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; display: flex; align-items: center; gap: 6px; }
|
||||
.btn-verify { height: 34px; padding: 0 16px; background: #0284c7; color: #fff; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s; }
|
||||
.btn-verify:hover { background: #0369a1; }
|
||||
|
||||
.reset-banner { background: #f8fafc; border-left: 3px solid #64748b; padding: 8px 12px; border-radius: 4px; font-size: 11px; color: #475569; display: flex; align-items: center; gap: 8px; }
|
||||
.reset-banner code { font-family: monospace; background: #e2e8f0; padding: 2px 6px; border-radius: 4px; color: #0f172a; font-weight: 600; }
|
||||
|
||||
.wizard-footer { padding: 14px 28px; background: #fff; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
|
||||
.wizard-footer .hint { font-size: 12px; color: #64748b; }
|
||||
.btn-next { height: 38px; padding: 0 28px; background: #1d4ed8; color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3); }
|
||||
|
||||
/* 方案 B: 拓扑态 */
|
||||
.ops-split { display: grid; grid-template-columns: 1fr 340px; gap: 18px; flex: 1; }
|
||||
.topo-panel { background: #0f172a; border-radius: 12px; padding: 18px; color: #e2e8f0; display: flex; flex-direction: column; gap: 16px; }
|
||||
.topo-title { font-size: 13px; font-weight: 700; color: #38bdf8; letter-spacing: 0.5px; border-bottom: 1px solid #1e293b; padding-bottom: 8px; display: flex; justify-content: space-between; }
|
||||
.topo-node { background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 10px 12px; }
|
||||
.topo-node-name { font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
|
||||
.topo-node-val { font-size: 13px; font-family: monospace; color: #f8fafc; font-weight: 600; }
|
||||
.topo-arrow { text-align: center; color: #0284c7; font-size: 14px; line-height: 1; }
|
||||
.topo-check-item { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #94a3b8; padding: 6px 0; border-bottom: 1px dashed #334155; }
|
||||
.topo-check-item .status-ok { color: #34d399; font-weight: 600; }
|
||||
.topo-check-item .status-wait { color: #f59e0b; font-weight: 600; }
|
||||
|
||||
/* 方案 C: 极简纯白单焦点 */
|
||||
.minimal-container { max-width: 780px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 20px; }
|
||||
.minimal-section-title { font-size: 13px; font-weight: 700; color: #0284c7; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: -6px; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="./style.css">
|
||||
</head>
|
||||
<body>
|
||||
<!-- 顶栏导航与方案切换 -->
|
||||
<header class="top-nav">
|
||||
<div class="brand">
|
||||
<img src="/Scert.png" alt="Logo">
|
||||
<span>Scert 首次初始化向导 - 交互与布局方案评审</span>
|
||||
<img src="/Scert.png" alt="Scert Logo" />
|
||||
<span>Scert 初始化向导 • 4步骤设计方案选型</span>
|
||||
</div>
|
||||
<div class="nav-tabs">
|
||||
<button class="nav-tab active" onclick="switchTheme('deck')">方案 A:卡片分体与状态联运流 (Card-Deck Flow)</button>
|
||||
<button class="nav-tab" onclick="switchTheme('ops')">方案 B:沉浸式专业运维仪表板 (Ops-Console Split)</button>
|
||||
<button class="nav-tab" onclick="switchTheme('minimal')">方案 C:极简轻奢分步引导台 (Minimalist Focus)</button>
|
||||
|
||||
<!-- 方案选择器 -->
|
||||
<div class="nav-center">
|
||||
<div class="nav-group">
|
||||
<button class="nav-btn active" data-theme="deck" onclick="switchTheme('deck')">
|
||||
<span class="badge-tag">方案 A</span>
|
||||
<span class="btn-label">卡片分体与状态联运流 (Card-Deck)</span>
|
||||
</button>
|
||||
<button class="nav-btn" data-theme="ops" onclick="switchTheme('ops')">
|
||||
<span class="badge-tag">方案 B</span>
|
||||
<span class="btn-label">沉浸式专业运维仪表板 (Ops-Console)</span>
|
||||
</button>
|
||||
<button class="nav-btn" data-theme="minimal" onclick="switchTheme('minimal')">
|
||||
<span class="badge-tag">方案 C</span>
|
||||
<span class="btn-label">极简轻奢分步引导台 (Minimalist Focus)</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="meta-badge">
|
||||
<span class="meta-dot"></span>
|
||||
<span>受保护的本地 IPC 重置体系</span>
|
||||
</div>
|
||||
<div class="meta-badge">真实数据契约对齐:SQLite / 5200 / Aliyun DNS</div>
|
||||
</header>
|
||||
|
||||
<!-- 页面主体容器 -->
|
||||
<main class="viewport">
|
||||
<div class="preview-frame">
|
||||
<!-- 品牌侧边栏 -->
|
||||
<aside class="access-brand">
|
||||
<div class="brand-top">
|
||||
<img class="logo" src="/Scert.png" alt="Scert">
|
||||
<div class="tag">SCERT 首次运行</div>
|
||||
<h1>配置证书管理服务</h1>
|
||||
<p>Scert 与 Scert-admin 共享本次配置。完成初始化后,即可通过管理页面统一管理全生命周期自动化证书。</p>
|
||||
</div>
|
||||
<div class="brand-notice">
|
||||
<strong>初始化安全屏障</strong>
|
||||
请先完成 DNS API 在线验证。提交初始化时将自动申请并校验管理页面证书。Linux 外部访问请提前放行端口。
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- 右侧主体内容容器 -->
|
||||
<section class="content-area">
|
||||
<header class="wizard-header">
|
||||
<div class="title-group">
|
||||
<span id="wizard-sub">初始化向导 • 第 1 步 / 共 4 步</span>
|
||||
<h2 id="wizard-main">超级管理员与基础配置</h2>
|
||||
</div>
|
||||
<div class="badge-secure">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
|
||||
受保护的 HTTPS 初始化 (Strict-Same-Origin)
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 步骤导航 -->
|
||||
<nav class="step-stepper">
|
||||
<div class="step-item current">
|
||||
<div class="step-circle">1</div>
|
||||
<div class="step-info">
|
||||
<strong>超级管理员</strong>
|
||||
<small>账号与数据库</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-item">
|
||||
<div class="step-circle">2</div>
|
||||
<div class="step-info">
|
||||
<strong>服务与通知</strong>
|
||||
<small>SMTP 邮件告警</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-item">
|
||||
<div class="step-circle">3</div>
|
||||
<div class="step-info">
|
||||
<strong>DNS 验证</strong>
|
||||
<small>阿里云 API 权限</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-item">
|
||||
<div class="step-circle">4</div>
|
||||
<div class="step-info">
|
||||
<strong>管理页证书</strong>
|
||||
<small>HTTPS 访问方式</small>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- 方案展示容器 -->
|
||||
<div class="wizard-body" id="theme-content">
|
||||
<!-- 默认注入方案 A -->
|
||||
</div>
|
||||
|
||||
<footer class="wizard-footer">
|
||||
<span class="hint">请放行初始化及正式服务端口。验证凭据加密保存;完成后关闭临时入口并切换正式管理地址。</span>
|
||||
<button class="btn-next">下一步</button>
|
||||
</footer>
|
||||
</section>
|
||||
<div class="preview-frame" id="preview-frame">
|
||||
<!-- 由 app.js 动态渲染 -->
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
const schemeA = `
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="tag">01</div>
|
||||
<h3>超级管理员信息(用于首次登入后台管理系统)</h3>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group">
|
||||
<label>管理员用户名</label>
|
||||
<input type="text" value="xuans" placeholder="例如 scert-admin">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>绑定通知邮箱</label>
|
||||
<div class="email-combine">
|
||||
<input type="text" value="likb_blue" placeholder="邮箱名称">
|
||||
<select>
|
||||
<option selected>@163.com</option>
|
||||
<option>@qq.com</option>
|
||||
<option>@gmail.com</option>
|
||||
<option>自定义后缀</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>超级管理员密码 (8-12位字符)</label>
|
||||
<input type="password" value="12345678" placeholder="8-12 位字符">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>确认管理员密码</label>
|
||||
<input type="password" value="12345678" placeholder="再次输入密码">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="tag">02</div>
|
||||
<h3>管理端网络访问端点</h3>
|
||||
</div>
|
||||
<div class="form-grid-3">
|
||||
<div class="form-group">
|
||||
<label>访问定位方式</label>
|
||||
<div class="switch-pills">
|
||||
<button class="switch-pill">使用域名</button>
|
||||
<button class="switch-pill active">使用公网 IP</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>公网 IP 地址 / 域名</label>
|
||||
<input type="text" value="127.0.0.1" placeholder="例如 127.0.0.1 或 scert.domain.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Scert 主服务端口</label>
|
||||
<input type="number" value="80" placeholder="1-65535">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="deck-card">
|
||||
<div class="deck-header">
|
||||
<div class="tag">03</div>
|
||||
<h3>数据库存储持久化配置</h3>
|
||||
</div>
|
||||
<div class="db-verify-box">
|
||||
<div class="db-verify-left">
|
||||
<div class="form-group" style="width: 280px;">
|
||||
<label>数据库引擎类型</label>
|
||||
<select id="db-select" onchange="handleDBChange(this.value)">
|
||||
<option value="sqlite" selected>SQLite(本机文件嵌入,免运维推荐)</option>
|
||||
<option value="mysql">MySQL 8.0+ (需 TLS 验证)</option>
|
||||
<option value="postgres">PostgreSQL 14+ (需 SSL/TLS)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="db-badge-verified">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
<span>SQLite 读写权限已在线校验通过</span>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-verify" onclick="alert('触发 POST /api/v1/bootstrap/database/test 校验通过')">重新验证数据库</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="reset-banner">
|
||||
<span>应急运维:</span>
|
||||
<span>密码重置安全地址预览</span>
|
||||
<code>https://127.0.0.1:80/reset</code>
|
||||
<span>(仅在物理宿主机通过 CLI 临时启动 Scert-admin 时局部开启)</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
const schemeB = `
|
||||
<div class="ops-split">
|
||||
<div style="display: flex; flex-direction: column; gap: 16px;">
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 10px;">
|
||||
<div class="tag">SEC</div>
|
||||
<h3>管理员凭据录入</h3>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>管理员用户名</label><input type="text" value="xuans"></div>
|
||||
<div class="form-group"><label>绑定邮箱</label><input type="text" value="likb_blue@163.com"></div>
|
||||
<div class="form-group"><label>密码</label><input type="password" value="12345678"></div>
|
||||
<div class="form-group"><label>确认密码</label><input type="password" value="12345678"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 10px;">
|
||||
<div class="tag">NET</div>
|
||||
<h3>服务网络拓扑配置</h3>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>定位方式</label><select><option>公网 IP (127.0.0.1)</option><option>域名解析</option></select></div>
|
||||
<div class="form-group"><label>监听端口</label><input type="number" value="80"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="deck-card" style="padding: 16px;">
|
||||
<div class="deck-header" style="margin-bottom: 10px;">
|
||||
<div class="tag">DB</div>
|
||||
<h3>存储引擎</h3>
|
||||
</div>
|
||||
<div style="display: flex; gap: 12px; align-items: flex-end;">
|
||||
<div class="form-group" style="flex: 1;"><label>引擎</label><select><option>SQLite (本地独立锁文件)</option><option>MySQL</option><option>PostgreSQL</option></select></div>
|
||||
<button class="btn-verify" style="height: 36px;">执行读写打标</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 拓扑实时仪表区 -->
|
||||
<div class="topo-panel">
|
||||
<div class="topo-title">
|
||||
<span>实时链路状态 (拓扑演算)</span>
|
||||
<span style="color: #34d399;">● READY</span>
|
||||
</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">INBOUND TRAFFIC</div>
|
||||
<div class="topo-node-val">HTTP/HTTPS :80 (127.0.0.1)</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ 协议隔离与拦截</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">SCERT CORE ENGINE</div>
|
||||
<div class="topo-node-val">Direct TLS Termination</div>
|
||||
</div>
|
||||
<div class="topo-arrow">▼ 本地事务锁</div>
|
||||
<div class="topo-node">
|
||||
<div class="topo-node-name">STORAGE BACKEND</div>
|
||||
<div class="topo-node-val">scert.db (WAL 模式)</div>
|
||||
</div>
|
||||
<div style="margin-top: auto;">
|
||||
<div class="topo-check-item"><span>Same-Origin Header</span><span class="status-ok">PASS</span></div>
|
||||
<div class="topo-check-item"><span>Database Token</span><span class="status-ok">VERIFIED</span></div>
|
||||
<div class="topo-check-item"><span>DNS API Probe</span><span class="status-wait">STEP 3 PENDING</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
const schemeC = `
|
||||
<div class="minimal-container">
|
||||
<div class="minimal-section-title">01 / ADMIN IDENTITY</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-group"><label>用户名</label><input type="text" value="xuans"></div>
|
||||
<div class="form-group"><label>绑定电子邮箱</label><input type="text" value="likb_blue@163.com"></div>
|
||||
<div class="form-group"><label>设置密码</label><input type="password" value="12345678"></div>
|
||||
<div class="form-group"><label>重复密码</label><input type="password" value="12345678"></div>
|
||||
</div>
|
||||
|
||||
<div class="minimal-section-title" style="margin-top: 10px;">02 / ACCESS ENDPOINT & DATABASE</div>
|
||||
<div class="form-grid-3">
|
||||
<div class="form-group"><label>访问方式</label><input type="text" value="公网 IP (127.0.0.1)" readonly style="background: #f1f5f9;"></div>
|
||||
<div class="form-group"><label>服务端口</label><input type="number" value="80"></div>
|
||||
<div class="form-group"><label>数据库</label><select><option>SQLite 本机存储</option></select></div>
|
||||
</div>
|
||||
|
||||
<div style="padding: 16px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; display: flex; justify-content: space-between; align-items: center;">
|
||||
<div>
|
||||
<div style="font-weight: 600; font-size: 13px; color: #0f172a;">数据库就绪状态:已验证</div>
|
||||
<div style="font-size: 12px; color: #64748b; margin-top: 2px;">SQLite 读写测试通过,生成的初始化事务签名保持有效</div>
|
||||
</div>
|
||||
<button class="btn-verify" style="background: #f1f5f9; color: #0f172a; border: 1px solid #cbd5e1;">重新校验</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
function switchTheme(theme) {
|
||||
document.querySelectorAll('.nav-tab').forEach(b => b.classList.remove('active'));
|
||||
const container = document.getElementById('theme-content');
|
||||
if (theme === 'deck') {
|
||||
event.target.classList.add('active');
|
||||
container.innerHTML = schemeA;
|
||||
} else if (theme === 'ops') {
|
||||
event.target.classList.add('active');
|
||||
container.innerHTML = schemeB;
|
||||
} else if (theme === 'minimal') {
|
||||
event.target.classList.add('active');
|
||||
container.innerHTML = schemeC;
|
||||
}
|
||||
}
|
||||
|
||||
// 默认展示方案 A
|
||||
document.getElementById('theme-content').innerHTML = schemeA;
|
||||
</script>
|
||||
<script src="./app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
112
frontend/design-proposals/style.css
Normal file
112
frontend/design-proposals/style.css
Normal file
@ -0,0 +1,112 @@
|
||||
/* Scert ????? 4????????????? */
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
|
||||
body { background: #0b1120; color: #f1f5f9; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
|
||||
|
||||
/* ????? */
|
||||
header.top-nav { height: 60px; background: #0f172a; border-bottom: 1px solid #1e293b; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 100; }
|
||||
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 15px; color: #38bdf8; }
|
||||
.brand img { width: 30px; height: 30px; object-fit: contain; }
|
||||
.nav-center { display: flex; align-items: center; }
|
||||
.nav-group { display: flex; gap: 6px; background: #1e293b; padding: 4px; border-radius: 10px; border: 1px solid #334155; }
|
||||
.nav-btn { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 6px; border: none; background: transparent; color: #94a3b8; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; }
|
||||
.nav-btn:hover { color: #f8fafc; }
|
||||
.nav-btn.active { background: #0284c7; color: #fff; box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4); font-weight: 600; }
|
||||
.badge-tag { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.15); }
|
||||
.meta-badge { font-size: 12px; color: #94a3b8; background: #1e293b; padding: 5px 12px; border-radius: 20px; border: 1px solid #334155; display: flex; align-items: center; gap: 8px; }
|
||||
.meta-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; }
|
||||
|
||||
/* ????????? */
|
||||
main.viewport { flex: 1; padding: 20px 24px; display: flex; justify-content: center; align-items: center; }
|
||||
.preview-frame { width: 100%; max-width: 1480px; height: 870px; background: #fff; border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); overflow: hidden; display: flex; color: #0f172a; position: relative; }
|
||||
|
||||
/* ??????? */
|
||||
.access-brand { width: 280px; background: linear-gradient(175deg, #1e3a8a 0%, #1e40af 40%, #0f172a 100%); color: #fff; padding: 28px 24px; display: flex; flex-direction: column; justify-content: space-between; position: relative; flex-shrink: 0; }
|
||||
.brand-top .logo { width: 68px; height: 68px; margin-bottom: 16px; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25)); }
|
||||
.brand-top .tag { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #93c5fd; font-weight: 700; margin-bottom: 6px; }
|
||||
.brand-top h1 { font-size: 22px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
|
||||
.brand-top p { font-size: 13px; color: #bfdbfe; line-height: 1.55; }
|
||||
.brand-notice { background: rgba(255,255,255,0.08); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 14px; font-size: 12px; line-height: 1.5; color: #dbeafe; }
|
||||
.brand-notice strong { display: block; color: #fff; margin-bottom: 4px; font-size: 12px; }
|
||||
|
||||
/* ????? */
|
||||
.content-area { flex: 1; display: flex; flex-direction: column; background: #f8fafc; overflow: hidden; }
|
||||
.wizard-header { padding: 16px 28px; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
|
||||
.wizard-header .title-group h2 { font-size: 20px; font-weight: 700; color: #0f172a; }
|
||||
.wizard-header .title-group span { font-size: 12px; color: #64748b; }
|
||||
.badge-secure { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 6px; display: flex; align-items: center; gap: 6px; }
|
||||
|
||||
/* ????? Stepper */
|
||||
.step-stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px 28px; background: #fff; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; }
|
||||
.step-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; cursor: pointer; transition: all .2s; }
|
||||
.step-item:hover { border-color: #cbd5e1; background: #f1f5f9; }
|
||||
.step-item.current { background: #eff6ff; border-color: #3b82f6; box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15); }
|
||||
.step-item.complete { background: #f0fdf4; border-color: #86efac; }
|
||||
.step-circle { width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; color: #64748b; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
||||
.step-item.current .step-circle { background: #1d4ed8; color: #fff; }
|
||||
.step-item.complete .step-circle { background: #10b981; color: #fff; }
|
||||
.step-info { display: flex; flex-direction: column; overflow: hidden; }
|
||||
.step-info strong { font-size: 12px; color: #1e293b; white-space: nowrap; }
|
||||
.step-info small { font-size: 11px; color: #64748b; white-space: nowrap; }
|
||||
|
||||
/* ?????? */
|
||||
.wizard-body { flex: 1; padding: 20px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
|
||||
|
||||
/* ?????? */
|
||||
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
|
||||
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
|
||||
.form-group { display: flex; flex-direction: column; gap: 6px; }
|
||||
.form-group label { font-size: 12px; font-weight: 600; color: #334155; display: flex; align-items: center; justify-content: space-between; }
|
||||
.form-group label .help-tip { font-weight: normal; color: #94a3b8; font-size: 11px; }
|
||||
.form-group input, .form-group select, .form-group textarea { height: 38px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 12px; font-size: 13px; color: #0f172a; outline: none; transition: border-color .15s; background: #fff; width: 100%; }
|
||||
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #0284c7; box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15); }
|
||||
.form-group input[readonly] { background: #f8fafc; color: #64748b; cursor: not-allowed; }
|
||||
.email-input-wrap { display: flex; gap: 8px; }
|
||||
.email-input-wrap input { flex: 1; }
|
||||
.email-input-wrap select { width: 140px; }
|
||||
|
||||
/* ????? */
|
||||
.checkbox-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; }
|
||||
.checkbox-card input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #1d4ed8; }
|
||||
.checkbox-card .checkbox-label { font-size: 13px; font-weight: 600; color: #1e293b; }
|
||||
.checkbox-card .checkbox-desc { font-size: 12px; color: #64748b; margin-left: 4px; }
|
||||
|
||||
/* ??????? */
|
||||
.wizard-footer { padding: 14px 28px; background: #fff; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
|
||||
.wizard-footer .hint { font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 6px; }
|
||||
.wizard-footer .actions { display: flex; gap: 10px; }
|
||||
.btn-prev { height: 38px; padding: 0 22px; background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; }
|
||||
.btn-prev:hover { background: #e2e8f0; }
|
||||
.btn-next { height: 38px; padding: 0 26px; background: #1d4ed8; color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3); }
|
||||
.btn-next:hover { background: #1e40af; }
|
||||
.btn-submit { background: #10b981 !important; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important; }
|
||||
.btn-submit:hover { background: #059669 !important; }
|
||||
|
||||
/* ================= ?? A?????? (Card-Deck Flow) ================= */
|
||||
.deck-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
|
||||
.deck-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed #f1f5f9; }
|
||||
.deck-header-left { display: flex; align-items: center; gap: 8px; }
|
||||
.deck-header .tag { width: 22px; height: 22px; border-radius: 6px; background: #e0f2fe; color: #0369a1; font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; }
|
||||
.deck-header h3 { font-size: 14px; font-weight: 700; color: #0f172a; }
|
||||
.db-verify-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
|
||||
.db-badge-verified { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; display: flex; align-items: center; gap: 6px; }
|
||||
.btn-verify { height: 36px; padding: 0 16px; background: #0284c7; color: #fff; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s; white-space: nowrap; }
|
||||
.btn-verify:hover { background: #0369a1; }
|
||||
.info-callout { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 12px 14px; font-size: 12px; color: #166534; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
|
||||
|
||||
/* ================= ?? B??????????? (Ops Split) ================= */
|
||||
.ops-split { display: grid; grid-template-columns: 1fr 360px; gap: 18px; flex: 1; height: 100%; min-height: 0; }
|
||||
.ops-main { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding-right: 4px; }
|
||||
.topo-panel { background: #0f172a; border-radius: 12px; padding: 18px; color: #e2e8f0; display: flex; flex-direction: column; gap: 14px; border: 1px solid #1e293b; height: 100%; }
|
||||
.topo-title { font-size: 13px; font-weight: 700; color: #38bdf8; letter-spacing: 0.5px; border-bottom: 1px solid #1e293b; padding-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
|
||||
.topo-node { background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 10px 12px; }
|
||||
.topo-node-name { font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
|
||||
.topo-node-val { font-size: 13px; font-family: monospace; color: #f8fafc; font-weight: 600; }
|
||||
.topo-arrow { text-align: center; color: #0284c7; font-size: 13px; line-height: 1; }
|
||||
.topo-check-item { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #94a3b8; padding: 7px 0; border-bottom: 1px dashed #334155; }
|
||||
.topo-check-item .status-ok { color: #34d399; font-weight: 600; }
|
||||
.topo-check-item .status-wait { color: #f59e0b; font-weight: 600; }
|
||||
|
||||
/* ================= ?? C?????????? (Minimalist Focus) ================= */
|
||||
.minimal-container { max-width: 820px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 20px; }
|
||||
.minimal-section-title { font-size: 12px; font-weight: 700; color: #0284c7; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px; }
|
||||
.minimal-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px 22px; }
|
||||
Loading…
Reference in New Issue
Block a user