From 06e639f0df9a9a529f796af5e49bd39fde889575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E9=9B=A8=E9=B9=8F?= <846149189@qq.com> Date: Sat, 13 Jun 2026 21:41:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(timeline):=20=E7=BB=93=E5=B1=80=E9=87=91?= =?UTF-8?q?=E8=89=B2=E6=B5=AE=E5=B1=82(=E9=87=8D=E6=96=B0=E8=A7=82?= =?UTF-8?q?=E7=9C=8B=20+=20=E5=9B=9E=E5=88=B0=E4=B8=8A=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=80=89=E6=8B=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 播到结局时在镜头下方弹金色星标浮层:显示结局文案/成败/奖励 + 两个按钮—— 「⟲ 重新观看」从头再播、「↶ 回到上一个选择」跳回最近分支点(位置重放正确)直接试另一条。 记录最近 choice/random/fight 节点供回跳;纯线性到结局则只显示重新观看。 --- web/static/style.css | 4 ++++ web/static/timeline.js | 27 ++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/web/static/style.css b/web/static/style.css index 0c8b2b0..0212b51 100644 --- a/web/static/style.css +++ b/web/static/style.css @@ -283,6 +283,10 @@ body.perform-mode .mode-switch { border-color:#2f7a60; } border:1px solid #8a7038; border-radius:6px; padding:8px 14px; font-size:13px; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.55); } .tl-choice-btn:hover { background:#5a4a26; border-color:#e6c878; } +/* 结局浮层:金色星标,区别于普通选项 */ +.tl-ending-q { color:#f2c463 !important; background:rgba(42,30,14,.9) !important; border:1px solid #8a6a30; font-size:13px; max-width:92%; } +.tl-ending-btn { border-color:#b8893a; } +.tl-ending-btn:hover { background:#5a4426; border-color:#f2c463; } /* 时间轴面板:固定/可拖高度、自己横向滚动 */ .tl-timelinepanel { flex:none; height:200px; min-height:80px; display:flex; } .tl-tracks { position:relative; flex:1; min-width:0; overflow-x:auto; overflow-y:auto; cursor:grab; diff --git a/web/static/timeline.js b/web/static/timeline.js index 56c4812..7fdff7a 100644 --- a/web/static/timeline.js +++ b/web/static/timeline.js @@ -219,7 +219,7 @@ } // ===================== 状态 & 挂载 ===================== - let S, model, playT = 0, playing = false, rafId = 0, lastTs = 0, stageCv, stageCtx, els = {}, pending = null, selNode = null, PX = 80, fitMode = false; + let S, model, playT = 0, playing = false, rafId = 0, lastTs = 0, stageCv, stageCtx, els = {}, pending = null, selNode = null, PX = 80, fitMode = false, lastDecisionId = null; const TEMPLATE = '