feat(遊戲化): 新增大廳、附身、時間流、後日談進度等遊戲化系統功能
新增角色大廳(lobby)邀約與通話、附身(possession)、時鐘(clock)抽象、 時間流與睡眠負債、後日談進度、行為選擇與旁觀反應等模組,並補齊對應冒煙 測試(R~V)與單元測試;同步調整 web/mobile 對應頁面與元件。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { isVoiceAutoplayEnabled, setVoiceAutoplayEnabled } from "../../lib/voice-autoplay-settings";
|
||||
|
||||
// T26:多人房內角色新發言的自動語音播放開關;關閉後回到只能逐則點擊播放(見 VoicePlaybackButton)。
|
||||
export function VoiceAutoplaySection() {
|
||||
const [enabled, setEnabled] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
setEnabled(isVoiceAutoplayEnabled());
|
||||
}, []);
|
||||
|
||||
function handleToggle(next: boolean) {
|
||||
setVoiceAutoplayEnabled(next);
|
||||
setEnabled(next);
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="flex flex-col gap-3 rounded-2xl border p-4" style={{ borderColor: "var(--line)" }}>
|
||||
<h2 className="text-sm font-bold" style={{ color: "var(--ink)" }}>
|
||||
自走語音自動播放
|
||||
</h2>
|
||||
<p className="text-xs" style={{ color: "var(--ink-soft)" }}>
|
||||
開啟後,在房間畫面時角色的新發言會自動依序念出來;關閉則回到逐則點擊才播放。
|
||||
</p>
|
||||
<label className="flex items-center gap-2 text-sm" style={{ color: "var(--ink)" }}>
|
||||
<input type="checkbox" checked={enabled} onChange={(event) => handleToggle(event.target.checked)} />
|
||||
在房間時自動播放角色語音
|
||||
</label>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user