refactor: 重构禅音工具路径与配置,新增私人剪贴板技能
这是一次大型重构和功能新增: 1. 将原 zen_box 工具重命名为 web_zen_box,调整所有相关路径与配置 2. 新增 web_order_box 原生Web应用的完整资源与部署脚本 3. 新增私人剪贴板后端技能与配套测试脚本 4. 修复订单盒子APP的API地址配置,避免路径重复拼接 5. 新增本地开发跨域白名单支持localhost 6. 清理旧版zen_box的冗余文件
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"_comment": "框子工具的前端鉴权配置",
|
||||
"enable_auth_comment": "true:启用鉴权(需要从导航登录);false:完全放开访问",
|
||||
"enable_auth": false,
|
||||
"max_age_days_comment": "鉴权 cookie 的最大有效天数(1~365)",
|
||||
"max_age_days": 30
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="theme-color" content="#080b12">
|
||||
<title>框子 - 运动提醒宝</title>
|
||||
<link rel="icon" href="/tools/web_order_box/favicon.ico">
|
||||
<link rel="stylesheet" href="/tools/web_order_box/order_box.css">
|
||||
</head>
|
||||
<body>
|
||||
<!-- ===== Hub 首页 ===== -->
|
||||
<div id="viewHub" class="view">
|
||||
<div class="hub-header">
|
||||
<h1 class="hub-title">框子</h1>
|
||||
<p class="hub-subtitle">kit 聚合壳。当前阶段先落地第一个工具:运动提醒宝。</p>
|
||||
</div>
|
||||
<div class="hub-kit-list">
|
||||
<button class="kit-card" id="btnEnterMotion" disabled>
|
||||
<div class="kit-icon-wrap">
|
||||
<svg class="kit-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 6.5h11M6.5 17.5h11M3 10v4M21 10v4M6.5 6.5v11M17.5 6.5v11"/></svg>
|
||||
</div>
|
||||
<div class="kit-info">
|
||||
<span class="kit-name">运动提醒宝</span>
|
||||
<span class="kit-desc">流程卡片、自动切步、语音播报、大字倒计时、下一个动作常驻显示。</span>
|
||||
</div>
|
||||
<svg class="kit-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== 运动提醒宝 主容器 ===== -->
|
||||
<div id="viewMotion" class="view" style="display:none">
|
||||
<!-- 顶部栏 -->
|
||||
<div class="motion-header">
|
||||
<button class="btn-back" id="btnBackHub">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>
|
||||
<span>返回框子</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 页面内容区 -->
|
||||
<div class="motion-body">
|
||||
<!-- 卡片页 -->
|
||||
<div id="pageCards" class="page">
|
||||
<!-- 残留 session 警告 -->
|
||||
<div id="staleWarning" class="stale-warning" style="display:none">
|
||||
<div class="stale-title">检测到服务端仍保留一个运行中的 session</div>
|
||||
<div class="stale-desc">如果这是上次异常退出遗留,可以先清理占用再重新启动。</div>
|
||||
<button class="btn-stale-clean" id="btnCleanStale">清理占用</button>
|
||||
</div>
|
||||
<!-- 新建按钮 -->
|
||||
<div class="cards-toolbar">
|
||||
<button class="btn-primary" id="btnNewCard">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
||||
<span>新建卡片</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- 卡片列表 -->
|
||||
<div id="cardsList" class="cards-list"></div>
|
||||
<!-- 空状态 -->
|
||||
<div id="cardsEmpty" class="empty-state" style="display:none">
|
||||
<div class="empty-title">还没有流程卡片</div>
|
||||
<div class="empty-desc">先建一个训练流程,再从卡片直接启动执行界面。</div>
|
||||
</div>
|
||||
<!-- 加载 -->
|
||||
<div id="cardsLoading" class="loading-wrap"><div class="spinner"></div></div>
|
||||
</div>
|
||||
|
||||
<!-- 历史页 -->
|
||||
<div id="pageHistory" class="page" style="display:none">
|
||||
<div id="historyList" class="history-list"></div>
|
||||
<div id="historyEmpty" class="empty-state" style="display:none">
|
||||
<div class="empty-title">还没有执行记录</div>
|
||||
<div class="empty-desc">从卡片页启动一次流程后,这里会出现历史记录。</div>
|
||||
</div>
|
||||
<div id="historyLoading" class="loading-wrap"><div class="spinner"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部 Tab -->
|
||||
<div class="tab-bar">
|
||||
<button class="tab-item active" data-tab="cards">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
||||
<span>卡片</span>
|
||||
</button>
|
||||
<button class="tab-item" data-tab="history">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg>
|
||||
<span>历史</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== 卡片编辑器 Modal ===== -->
|
||||
<div id="editorModal" class="modal-overlay" style="display:none">
|
||||
<div class="modal-sheet">
|
||||
<div class="sheet-header">
|
||||
<span class="sheet-title" id="editorTitle">新建流程卡片</span>
|
||||
<button class="btn-icon" id="btnEditorClose">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="sheet-body" id="editorBody">
|
||||
<!-- 动态渲染 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== 执行器 Modal ===== -->
|
||||
<div id="runnerModal" class="modal-overlay modal-fullscreen" style="display:none">
|
||||
<div class="runner-container" id="runnerContainer">
|
||||
<!-- 动态渲染 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== 通用弹窗 ===== -->
|
||||
<div id="dialogOverlay" class="dialog-overlay" style="display:none">
|
||||
<div class="dialog-box" id="dialogBox">
|
||||
<div class="dialog-title" id="dialogTitle"></div>
|
||||
<div class="dialog-body" id="dialogBody"></div>
|
||||
<div class="dialog-actions" id="dialogActions"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== 交互详情弹窗 ===== -->
|
||||
<div id="interactionOverlay" class="dialog-overlay" style="display:none">
|
||||
<div class="dialog-box dialog-interaction" id="interactionBox">
|
||||
<div class="dialog-header-row">
|
||||
<span class="dialog-title" id="interactionTitle">交互详情</span>
|
||||
<button class="btn-icon btn-copy" id="btnInteractionCopy" title="复制">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<pre class="interaction-content" id="interactionContent"></pre>
|
||||
<div class="dialog-actions" id="interactionActions"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== Toast ===== -->
|
||||
<div id="toast" class="toast"></div>
|
||||
|
||||
<script src="/tools/web_order_box/order_box.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
{"version":1,"type":"native_web","description":"框子 - 运动提醒宝 Web 版(原生 HTML/CSS/JS)"}
|
||||
@@ -0,0 +1,439 @@
|
||||
/* ============================================================
|
||||
框子 · 运动提醒宝 — order_box.css
|
||||
深色主题 / 移动端优先 / 所有色值统一走 CSS 变量
|
||||
============================================================ */
|
||||
|
||||
/* ---------- 主题变量 ---------- */
|
||||
:root {
|
||||
--bg: #080b12;
|
||||
--surface: #121826;
|
||||
--surface-soft: #1a2234;
|
||||
--surface-strong: #202b42;
|
||||
--primary: #f0b35f;
|
||||
--primary-soft: rgba(240, 179, 95, 0.16);
|
||||
--text: #f6f7fb;
|
||||
--text-secondary: #9ba7bc;
|
||||
--text-disabled: #5a6578;
|
||||
--border: #2a3449;
|
||||
--border-hover: #3b4866;
|
||||
--success: #4ade80;
|
||||
--warning: #fbbf24;
|
||||
--error: #ef4444;
|
||||
--radius-sm: 8px;
|
||||
--radius-md: 12px;
|
||||
--radius-lg: 18px;
|
||||
--radius-xl: 24px;
|
||||
}
|
||||
|
||||
/* ---------- Reset ---------- */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { -webkit-text-size-adjust: 100%; }
|
||||
body {
|
||||
background-color: var(--bg);
|
||||
background-image:
|
||||
radial-gradient(1100px 560px at 88% -12%, rgba(240,179,95,0.07), transparent 60%),
|
||||
radial-gradient(900px 520px at -12% 32%, rgba(72,104,180,0.10), transparent 55%);
|
||||
background-attachment: fixed;
|
||||
color: var(--text);
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
-webkit-user-select: none; user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
input, textarea { -webkit-user-select: text; user-select: text; font-family: inherit; }
|
||||
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
|
||||
button:disabled { cursor: not-allowed; }
|
||||
svg { display: block; flex-shrink: 0; }
|
||||
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
|
||||
input[type='number']::-webkit-outer-spin-button,
|
||||
input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
||||
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
|
||||
|
||||
/* ---------- 滚动条 ---------- */
|
||||
::-webkit-scrollbar { width: 4px; height: 4px; }
|
||||
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
|
||||
/* ---------- 动画 ---------- */
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
||||
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
|
||||
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
|
||||
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
|
||||
@keyframes pausedBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
|
||||
|
||||
/* ============================================================
|
||||
视图骨架
|
||||
============================================================ */
|
||||
.view { min-height: 100dvh; display: flex; flex-direction: column; }
|
||||
.page { animation: fadeUp 0.25s ease both; }
|
||||
|
||||
/* ============================================================
|
||||
Hub 首页
|
||||
============================================================ */
|
||||
#viewHub { justify-content: center; padding: 24px; }
|
||||
.hub-header { margin-bottom: 28px; animation: fadeUp 0.35s ease both; }
|
||||
.hub-title { font-size: 28px; font-weight: 700; letter-spacing: 1px; line-height: 1.2; }
|
||||
.hub-subtitle { font-size: 16px; color: var(--text-secondary); line-height: 1.5; margin-top: 8px; }
|
||||
.hub-kit-list { display: flex; flex-direction: column; gap: 12px; }
|
||||
.kit-card {
|
||||
display: flex; flex-direction: row; align-items: center; gap: 16px; width: 100%;
|
||||
padding: 16px; background: var(--surface); border-radius: var(--radius-md);
|
||||
border: 1px solid var(--border); text-align: left;
|
||||
transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
|
||||
animation: fadeUp 0.4s 0.08s ease both;
|
||||
}
|
||||
.kit-card:not(:disabled):hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
|
||||
.kit-card:not(:disabled):active { transform: translateY(0) scale(0.98); }
|
||||
.kit-card:disabled { opacity: 0.5; }
|
||||
.kit-icon-wrap { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; }
|
||||
.kit-icon { width: 28px; height: 28px; color: var(--primary); }
|
||||
.kit-info { display: flex; flex-direction: column; flex: 1; gap: 2px; }
|
||||
.kit-name { font-size: 20px; font-weight: 600; }
|
||||
.kit-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.45; }
|
||||
.kit-arrow { width: 24px; height: 24px; color: var(--text-secondary); transition: transform 0.2s; }
|
||||
.kit-card:not(:disabled):hover .kit-arrow { transform: translateX(3px); color: var(--primary); }
|
||||
|
||||
/* ============================================================
|
||||
运动提醒宝 · 顶部栏 / 主体 / Tab
|
||||
============================================================ */
|
||||
.motion-header { padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
|
||||
.btn-back { display: flex; flex-direction: row; align-items: center; gap: 4px; color: var(--text-secondary); font-size: 14px; transition: color 0.2s, transform 0.15s; }
|
||||
.btn-back svg { width: 18px; height: 18px; }
|
||||
.btn-back:hover { color: var(--text); }
|
||||
.btn-back:active { transform: scale(0.96); }
|
||||
.motion-body { flex: 1; overflow-y: auto; padding: 0 16px 80px; }
|
||||
.tab-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); display: flex; flex-direction: row; padding-bottom: env(safe-area-inset-bottom); z-index: 50; }
|
||||
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; color: var(--text-secondary); font-size: 12px; transition: color 0.2s; }
|
||||
.tab-item svg { width: 22px; height: 22px; transition: transform 0.2s; }
|
||||
.tab-item:hover { color: var(--text); }
|
||||
.tab-item.active { color: var(--primary); }
|
||||
.tab-item.active svg { transform: translateY(-1px); }
|
||||
|
||||
/* ============================================================
|
||||
残留 session 警告
|
||||
============================================================ */
|
||||
.stale-warning { padding: 16px; border: 1px solid var(--warning); border-radius: var(--radius-md); margin-bottom: 16px; background: rgba(251,191,36,0.07); animation: fadeUp 0.3s ease both; }
|
||||
.stale-title { font-size: 14px; font-weight: 600; color: var(--warning); }
|
||||
.stale-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
|
||||
.btn-stale-clean { margin-top: 12px; padding: 8px 16px; background: var(--warning); color: #000; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; transition: transform 0.15s, filter 0.2s; }
|
||||
.btn-stale-clean:hover { filter: brightness(1.08); }
|
||||
.btn-stale-clean:active { transform: scale(0.96); }
|
||||
|
||||
/* ============================================================
|
||||
卡片页
|
||||
============================================================ */
|
||||
.cards-toolbar { padding: 8px 0; display: flex; justify-content: flex-end; }
|
||||
.btn-primary {
|
||||
display: flex; flex-direction: row; align-items: center; gap: 6px;
|
||||
padding: 10px 20px; background: var(--primary); color: #081018;
|
||||
border-radius: var(--radius-md); font-weight: 700; font-size: 14px;
|
||||
box-shadow: 0 4px 16px rgba(240,179,95,0.25);
|
||||
transition: transform 0.15s, filter 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.btn-primary svg { width: 18px; height: 18px; }
|
||||
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 6px 20px rgba(240,179,95,0.35); }
|
||||
.btn-primary:active:not(:disabled) { transform: scale(0.96); }
|
||||
.btn-primary:disabled { opacity: 0.5; box-shadow: none; }
|
||||
|
||||
.cards-list { display: flex; flex-direction: column; }
|
||||
.card-item {
|
||||
background: var(--surface); border-radius: var(--radius-md); padding: 16px;
|
||||
margin-bottom: 12px; border: 1px solid var(--border);
|
||||
transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
|
||||
animation: fadeUp 0.3s ease both;
|
||||
}
|
||||
.card-item:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
|
||||
.card-item-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; }
|
||||
.card-title { font-size: 20px; font-weight: 600; }
|
||||
.card-meta { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
|
||||
.card-sub { font-size: 13px; color: var(--text-disabled); margin-top: 2px; }
|
||||
|
||||
/* 步骤预览 — JS 用 .step-preview */
|
||||
.step-preview { margin-top: 8px; }
|
||||
.step-preview-line { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
|
||||
.step-preview-more { font-size: 13px; color: var(--text-disabled); font-style: italic; line-height: 1.6; }
|
||||
|
||||
.card-actions { display: flex; flex-direction: row; gap: 8px; margin-top: 12px; }
|
||||
|
||||
/* 卡片按钮 — JS 用 .btn-card-primary / .btn-card-ghost */
|
||||
.btn-card-primary {
|
||||
display: flex; flex-direction: row; align-items: center; gap: 4px;
|
||||
padding: 8px 16px; background: var(--primary); color: #081018;
|
||||
border-radius: var(--radius-sm); font-weight: 700; font-size: 13px;
|
||||
transition: transform 0.15s, filter 0.2s;
|
||||
}
|
||||
.btn-card-primary svg { width: 16px; height: 16px; }
|
||||
.btn-card-primary:hover { filter: brightness(1.08); }
|
||||
.btn-card-primary:active { transform: scale(0.95); }
|
||||
.btn-card-ghost {
|
||||
padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
|
||||
color: var(--text-secondary); font-size: 13px;
|
||||
transition: border-color 0.2s, color 0.2s, transform 0.15s;
|
||||
}
|
||||
.btn-card-ghost:hover { border-color: var(--border-hover); color: var(--text); }
|
||||
.btn-card-ghost:active { transform: scale(0.95); }
|
||||
.btn-text-danger { color: var(--error); }
|
||||
|
||||
/* 通用 btn-text span */
|
||||
.btn-text { display: inline; }
|
||||
|
||||
/* 对话框里用的实心危险按钮 */
|
||||
.btn-danger { padding: 8px 16px; background: var(--error); color: #fff; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; transition: transform 0.15s, filter 0.2s; }
|
||||
.btn-danger:hover { filter: brightness(1.1); }
|
||||
.btn-danger:active { transform: scale(0.95); }
|
||||
|
||||
/* ============================================================
|
||||
空状态 / 加载
|
||||
============================================================ */
|
||||
.empty-state { text-align: center; padding: 48px 24px; animation: fadeIn 0.3s ease both; }
|
||||
.empty-title { font-size: 18px; font-weight: 600; color: var(--text-secondary); }
|
||||
.empty-desc { font-size: 14px; color: var(--text-disabled); margin-top: 8px; line-height: 1.5; }
|
||||
.loading-wrap { display: flex; align-items: center; justify-content: center; padding: 48px; }
|
||||
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
|
||||
|
||||
/* ============================================================
|
||||
历史页 — JS 用 .history-line / .history-badge
|
||||
============================================================ */
|
||||
.history-list { display: flex; flex-direction: column; padding-top: 8px; }
|
||||
.history-item {
|
||||
background: var(--surface); border-radius: var(--radius-md); padding: 16px;
|
||||
margin-bottom: 12px; border: 1px solid var(--border);
|
||||
transition: border-color 0.2s; animation: fadeUp 0.3s ease both;
|
||||
}
|
||||
.history-item:hover { border-color: var(--border-hover); }
|
||||
.history-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
|
||||
.history-line { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
|
||||
.history-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
|
||||
.history-badge.badge-warning { background: rgba(251,191,36,0.15); color: var(--warning); }
|
||||
.history-badge.badge-success { background: rgba(74,222,128,0.15); color: var(--success); }
|
||||
.history-badge.badge-muted { background: var(--surface-strong); color: var(--text-disabled); }
|
||||
|
||||
/* ============================================================
|
||||
Modal(底部抽屉 / 全屏)
|
||||
============================================================ */
|
||||
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.58); z-index: 100; display: flex; flex-direction: column; justify-content: flex-end; animation: fadeIn 0.2s ease both; }
|
||||
.modal-fullscreen { justify-content: stretch; align-items: stretch; }
|
||||
.modal-sheet { width: 100%; background: var(--bg); border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92dvh; display: flex; flex-direction: column; animation: slideUp 0.3s ease-out both; border-top: 1px solid var(--border); }
|
||||
.sheet-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
|
||||
.sheet-title { font-size: 18px; font-weight: 600; }
|
||||
.sheet-body { flex: 1; overflow-y: auto; padding: 20px; }
|
||||
.btn-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text); border-radius: var(--radius-sm); transition: color 0.2s, background 0.2s, transform 0.15s; }
|
||||
.btn-icon svg { width: 24px; height: 24px; }
|
||||
.btn-icon:hover { background: var(--surface-soft); }
|
||||
.btn-icon:active { transform: scale(0.9); }
|
||||
|
||||
/* ============================================================
|
||||
通用弹窗 / 交互详情弹窗
|
||||
============================================================ */
|
||||
.dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.15s ease both; }
|
||||
.dialog-box { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; max-width: 340px; width: calc(100% - 48px); animation: scaleIn 0.2s ease both; border: 1px solid var(--border); box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
|
||||
.dialog-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
|
||||
.dialog-body { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; white-space: pre-wrap; word-break: break-word; }
|
||||
.dialog-actions { display: flex; flex-direction: row; gap: 8px; justify-content: flex-end; }
|
||||
.dialog-header-row { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 12px; }
|
||||
.dialog-header-row .dialog-title { margin-bottom: 0; }
|
||||
.dialog-interaction { max-width: 420px; max-height: 80dvh; display: flex; flex-direction: column; }
|
||||
.interaction-content { flex: 1; overflow-y: auto; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border); padding: 12px; font-size: 12px; line-height: 1.5; color: var(--text-secondary); white-space: pre-wrap; word-break: break-all; margin-bottom: 16px; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
|
||||
.btn-copy { color: var(--text-secondary); }
|
||||
.btn-copy:hover { color: var(--primary); }
|
||||
|
||||
/* ============================================================
|
||||
Toast
|
||||
============================================================ */
|
||||
.toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%) translateY(-8px); padding: 10px 24px; border-radius: 999px; font-size: 14px; color: #fff; z-index: 300; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,0.4); max-width: calc(100vw - 48px); text-align: center; }
|
||||
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
||||
.toast-info { background: #3b82f6; }
|
||||
.toast-success { background: #16a34a; }
|
||||
.toast-error { background: #ef4444; }
|
||||
|
||||
/* ============================================================
|
||||
编辑器 — 匹配 JS 实际 class 名
|
||||
============================================================ */
|
||||
.editor-field { margin-bottom: 16px; }
|
||||
.editor-label { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
|
||||
.editor-input {
|
||||
width: 100%; padding: 12px 16px; background: var(--surface);
|
||||
border: 1px solid var(--border); border-radius: var(--radius-sm);
|
||||
color: var(--text); font-size: 16px; outline: none;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.editor-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(240,179,95,0.12); }
|
||||
.editor-input::placeholder { color: var(--text-disabled); }
|
||||
|
||||
/* 循环方式分段按钮 — JS 用 .segment-row / .segment-btn */
|
||||
.segment-row { display: flex; flex-direction: row; gap: 8px; }
|
||||
.segment-btn {
|
||||
flex: 1; padding: 10px; text-align: center; background: var(--surface-strong);
|
||||
border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 14px;
|
||||
transition: background 0.2s, color 0.2s, transform 0.15s;
|
||||
}
|
||||
.segment-btn:hover { color: var(--text); }
|
||||
.segment-btn:active { transform: scale(0.96); }
|
||||
.segment-btn.active { background: var(--primary); color: #081018; font-weight: 600; }
|
||||
|
||||
/* 编辑器步骤区头部 — JS 用 .editor-steps-header */
|
||||
.editor-steps-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin: 20px 0 12px; }
|
||||
.editor-section-title { font-size: 20px; font-weight: 600; margin: 0; }
|
||||
.editor-steps-buttons { display: flex; flex-direction: row; gap: 8px; }
|
||||
.btn-small { padding: 8px 14px; background: var(--surface-strong); border-radius: var(--radius-sm); color: var(--text); font-size: 13px; transition: filter 0.2s, transform 0.15s; }
|
||||
.btn-small:hover { filter: brightness(1.2); }
|
||||
.btn-small:active { transform: scale(0.95); }
|
||||
|
||||
/* 总时长预览 — JS 用 .editor-total-duration */
|
||||
.editor-total-duration {
|
||||
display: flex; flex-direction: row; align-items: center; gap: 8px;
|
||||
padding: 12px 16px; background: var(--surface-soft); border-radius: var(--radius-sm);
|
||||
margin-bottom: 16px; font-size: 14px; color: var(--text-secondary);
|
||||
}
|
||||
.editor-total-duration svg { width: 18px; height: 18px; color: var(--primary); }
|
||||
|
||||
/* 步骤列表容器 — JS 用 .editor-steps-list */
|
||||
.editor-steps-list { display: flex; flex-direction: column; }
|
||||
|
||||
/* --- 步骤卡片 — JS 用 .step-editor --- */
|
||||
.step-editor {
|
||||
background: var(--surface); border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
|
||||
position: relative;
|
||||
transition: border-color 0.2s, opacity 0.2s, transform 0.2s;
|
||||
animation: fadeUp 0.25s ease both;
|
||||
}
|
||||
.step-editor.step-action { border-color: var(--primary-soft); border-left: 3px solid var(--primary); }
|
||||
.step-editor.step-rest { border-color: rgba(74,222,128,0.16); border-left: 3px solid var(--success); }
|
||||
|
||||
/* 步骤头部 — JS 用 .step-editor-header */
|
||||
.step-editor-header { display: flex; flex-direction: row; align-items: center; justify-content: space-between; margin-bottom: 10px; }
|
||||
.step-title-row { display: flex; flex-direction: row; align-items: center; gap: 8px; }
|
||||
.step-badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
|
||||
.step-editor.step-action .step-badge { background: var(--primary); color: #081018; }
|
||||
.step-editor.step-rest .step-badge { background: var(--success); color: #081018; }
|
||||
.step-index { font-size: 14px; color: var(--text-secondary); }
|
||||
|
||||
/* 步骤操作按钮 — JS 用 .step-actions / .btn-step-icon */
|
||||
.step-actions { display: flex; flex-direction: row; align-items: center; gap: 4px; }
|
||||
.btn-step-icon {
|
||||
width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
|
||||
color: var(--text-secondary); border-radius: var(--radius-sm);
|
||||
transition: color 0.2s, background 0.2s, transform 0.15s;
|
||||
}
|
||||
.btn-step-icon svg { width: 18px; height: 18px; }
|
||||
.btn-step-icon:hover:not(:disabled) { background: var(--surface-soft); }
|
||||
.btn-step-icon:active:not(:disabled) { transform: scale(0.9); }
|
||||
.btn-step-icon:disabled, .btn-step-icon.disabled { color: var(--text-disabled); pointer-events: none; }
|
||||
.btn-step-remove:not(:disabled):not(.disabled) { color: var(--error); }
|
||||
|
||||
/* 拖拽手柄 — JS 用 .step-drag-handle */
|
||||
.step-drag-handle {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
color: var(--text-disabled); cursor: grab; padding: 4px;
|
||||
-webkit-user-select: none; user-select: none; transition: color 0.2s;
|
||||
}
|
||||
.step-drag-handle svg { width: 18px; height: 18px; }
|
||||
.step-drag-handle:hover { color: var(--text-secondary); }
|
||||
.step-drag-handle:active { cursor: grabbing; }
|
||||
.step-editor.dragging { opacity: 0.4; }
|
||||
.step-editor.drag-over { border-top: 2px solid var(--primary); }
|
||||
|
||||
/* 步骤内输入框 — JS 用 .editor-input.step-name-input / .step-duration-input */
|
||||
.step-name-input { margin-bottom: 8px; font-size: 14px; padding: 10px 12px; background: var(--bg); }
|
||||
.step-duration-input { width: 100px; font-size: 14px; padding: 10px 12px; background: var(--bg); margin-bottom: 4px; }
|
||||
.step-duration-hint { font-size: 13px; color: var(--text-secondary); white-space: nowrap; margin-top: 4px; }
|
||||
|
||||
/* 编辑器底部统计 — JS 用 .editor-duration-info / .duration-info-row */
|
||||
.editor-duration-info { margin-top: 16px; padding: 14px 16px; background: var(--surface-soft); border-radius: var(--radius-sm); }
|
||||
.duration-info-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-secondary); line-height: 2; }
|
||||
.duration-info-label { color: var(--text-secondary); }
|
||||
.duration-info-value { color: var(--text); font-weight: 600; }
|
||||
.duration-info-highlight { color: var(--primary); }
|
||||
|
||||
/* 编辑器保存栏 — JS 用 .editor-footer */
|
||||
.editor-footer { padding: 16px 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
|
||||
.editor-footer .btn-primary { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
|
||||
|
||||
/* ============================================================
|
||||
执行器(全屏)— 匹配 JS 实际 class 名
|
||||
============================================================ */
|
||||
.runner-container {
|
||||
width: 100%; height: 100dvh; background: var(--bg);
|
||||
display: flex; flex-direction: column; padding: 20px;
|
||||
padding-top: calc(20px + env(safe-area-inset-top));
|
||||
overflow-y: auto; animation: fadeIn 0.25s ease both;
|
||||
}
|
||||
|
||||
/* 执行器头部 — JS 用 .runner-header */
|
||||
.runner-header { text-align: center; margin-bottom: 16px; }
|
||||
.runner-badge {
|
||||
display: inline-block; padding: 4px 16px; border-radius: 999px;
|
||||
font-size: 13px; font-weight: 600; margin-bottom: 8px;
|
||||
background: transparent; transition: color 0.3s, border-color 0.3s;
|
||||
}
|
||||
.runner-badge.badge-action { border: 1px solid var(--primary); color: var(--primary); background: var(--primary-soft); }
|
||||
.runner-badge.badge-rest { border: 1px solid var(--success); color: var(--success); background: rgba(74,222,128,0.12); }
|
||||
|
||||
/* 卡片标题 — JS 用 .runner-title */
|
||||
.runner-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
|
||||
|
||||
/* 轮次信息 — JS 用 .runner-loop-text */
|
||||
.runner-loop-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
|
||||
|
||||
/* 步骤进度条 — JS 用 .runner-progress / .runner-progress-bar */
|
||||
.runner-progress { height: 10px; background: var(--surface); border-radius: 5px; overflow: hidden; margin-bottom: 20px; }
|
||||
.runner-progress-bar { height: 100%; background: var(--primary); border-radius: 5px; transition: width 0.3s; box-shadow: 0 0 12px rgba(240,179,95,0.4); }
|
||||
|
||||
/* 主体区 — JS 用 .runner-main */
|
||||
.runner-main { flex: 1; display: flex; flex-direction: column; }
|
||||
.runner-label { font-size: 16px; color: var(--text-secondary); margin-bottom: 4px; }
|
||||
|
||||
/* 当前动作名 — JS 用 .runner-current */
|
||||
.runner-current { font-size: 34px; font-weight: 700; margin-bottom: 8px; line-height: 1.2; word-break: break-word; }
|
||||
.runner-current.current-action { color: var(--primary); }
|
||||
.runner-current.current-rest { color: var(--success); }
|
||||
|
||||
/* 倒计时 — JS 用 .runner-timer */
|
||||
.runner-timer {
|
||||
font-size: 90px; font-weight: 700; color: var(--primary);
|
||||
text-align: center; margin: 16px 0;
|
||||
font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: 2px;
|
||||
text-shadow: 0 0 36px rgba(240,179,95,0.35);
|
||||
}
|
||||
.runner-container.is-paused .runner-timer { animation: pausedBlink 1.2s ease-in-out infinite; }
|
||||
|
||||
/* 下一个动作卡片 */
|
||||
.runner-next-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); margin-bottom: 16px; transition: border-color 0.3s; }
|
||||
/* 下一个动作名 — JS 用 .runner-next */
|
||||
.runner-next { font-size: 26px; font-weight: 700; word-break: break-word; }
|
||||
|
||||
/* 底部区 — JS 用 .runner-footer */
|
||||
.runner-footer { margin-top: auto; }
|
||||
|
||||
/* 执行信息卡片 */
|
||||
.runner-info-card { padding: 14px 16px; background: var(--surface-soft); border-radius: var(--radius-sm); margin-bottom: 16px; }
|
||||
.runner-info-row { display: flex; flex-direction: row; justify-content: space-between; font-size: 14px; color: var(--text-secondary); line-height: 2; font-variant-numeric: tabular-nums; }
|
||||
.runner-info-label { color: var(--text-secondary); }
|
||||
.runner-info-value { color: var(--text); }
|
||||
.runner-info-highlight { color: var(--primary); font-weight: 600; }
|
||||
|
||||
/* 控制按钮 — JS 用 .runner-buttons / .runner-btn */
|
||||
.runner-buttons { display: flex; flex-direction: row; gap: 10px; margin-bottom: 16px; }
|
||||
.runner-btn {
|
||||
flex: 1; padding: 14px; background: var(--surface-strong);
|
||||
border-radius: var(--radius-md); color: var(--text);
|
||||
font-size: 15px; font-weight: 600;
|
||||
transition: filter 0.2s, transform 0.15s;
|
||||
}
|
||||
.runner-btn:hover { filter: brightness(1.25); }
|
||||
.runner-btn:active { transform: scale(0.96); }
|
||||
.runner-btn.runner-btn-danger { background: var(--error); color: #fff; }
|
||||
.runner-btn.runner-btn-danger:hover { filter: brightness(1.1); }
|
||||
|
||||
/* 全局进度 — JS 用 .runner-global */
|
||||
.runner-global { margin-top: 16px; }
|
||||
.runner-global-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 18px; }
|
||||
.runner-global-label { color: var(--text); }
|
||||
.runner-global-percent { font-size: 22px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
|
||||
.runner-global-bar-wrap { height: 24px; background: var(--surface-soft); border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
|
||||
.runner-global-bar { height: 100%; background: var(--primary); border-radius: 12px; transition: width 0.3s; box-shadow: 0 0 14px rgba(240,179,95,0.35); }
|
||||
.runner-global-stats { font-size: 13px; color: var(--text-secondary); text-align: center; font-variant-numeric: tabular-nums; display: flex; flex-direction: row; justify-content: center; gap: 4px; flex-wrap: wrap; }
|
||||
.runner-global-divider { color: var(--text-disabled); }
|
||||
.runner-global-remaining { color: var(--text-secondary); }
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user