From b9461c5741d0cd8e0116f5728c9bd45c35baaccd Mon Sep 17 00:00:00 2001 From: hehh Date: Thu, 4 Dec 2025 21:50:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(me):=20=E5=8A=A8=E6=80=81=E5=8C=96?= =?UTF-8?q?=E5=80=92=E8=AE=A1=E6=97=B6=E6=8F=90=E7=A4=BA=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将倒计时提示文本中的固定时间替换为动态占位符 - 使用 `{second}` 占位符实现多语言时间显示 - 更新中文和英文场景下的倒计时文本格式 - 优化倒计时逻辑以支持动态文本更新 - 确保语言切换时提示文本正确渲染 --- me.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/me.html b/me.html index 6798bca..c83222a 100644 --- a/me.html +++ b/me.html @@ -589,7 +589,7 @@ main: "双手合十 · 解锁档案", sub: "单手·引力牵引|双手·力场排斥", unlocking: "正在识别...", - countdownHint: "5秒后自动进入", + countdownHint: "{second}秒后自动进入", enterBtn: "立即进入", interactionModeBtn: "交互模式", cameraAccessInfo: "点击启用交互模式" @@ -611,7 +611,7 @@ main: "Click or Namaste", sub: "One Hand Drag · Two Hands Repel", unlocking: "Identifying...", - countdownHint: "Auto enter in 5 seconds", + countdownHint: "Auto enter in {second} seconds", enterBtn: "Enter Now", interactionModeBtn: "Interaction Mode", cameraAccessInfo: "Click to enable camera interaction" @@ -936,6 +936,7 @@ showInteractionModeButton(); } }, 1500); // 延迟显示,确保页面已完成过渡 + explode(100) } } @@ -1242,14 +1243,16 @@ // 开始5秒倒计时 let countdown = 5; - safeUpdateText(DOM_CACHE.countdownHint, `${countdown}${ENV.lang === 'zh' ? '秒后自动进入' : ' seconds to auto-enter'}`); + + safeUpdateText(DOM_CACHE.countdownHint, CONTENT.hints.countdownHint.replace('{second}', countdown + '')); CAMERA_STATE.countdownInterval = setInterval(() => { countdown--; if (countdown > 0) { - safeUpdateText(DOM_CACHE.countdownHint, `${countdown}${ENV.lang === 'zh' ? '秒后自动进入' : ' seconds to auto-enter'}`); + safeUpdateText(DOM_CACHE.countdownHint, CONTENT.hints.countdownHint.replace('{second}', countdown + '')); } else { clearInterval(CAMERA_STATE.countdownInterval); enterAnimationMode(); // 确保调用进入动画模式 + } }, 1000);