fix: move recorder launch into bottom bar (Mind->Record in poker mode)

The floating +Hand button overlapped the chat send button. Replace it with a
Record tab that swaps in for Mind only in poker (cash) mode, via body.cash-mode
CSS toggle. Other modes keep Mind; Record stays hidden.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-27 04:23:28 +00:00
parent 50bcb5533f
commit 2bd5b7fd26
2 changed files with 10 additions and 17 deletions
+4 -8
View File
@@ -130,7 +130,8 @@
<a class="tab active" href="/" aria-current="page"><span class="ti">💬</span><span class="tl">Chat</span></a>
<a class="tab" href="/session"><span class="ti">🎬</span><span class="tl">Session</span></a>
<a class="tab" href="/hands"><span class="ti">🃏</span><span class="tl">Hands</span></a>
<a class="tab" href="/self"><span class="ti">🧠</span><span class="tl">Mind</span></a>
<a class="tab tab-mind" href="/self"><span class="ti">🧠</span><span class="tl">Mind</span></a>
<button class="tab tab-rec" id="recordTab" type="button"><span class="ti"></span><span class="tl">Record</span></button>
<button class="tab" id="moreTab" type="button"><span class="ti"></span><span class="tl">More</span></button>
</nav>
</div>
@@ -1251,17 +1252,12 @@
<script src="/recorder.js"></script>
<script>
(function () {
var btn = document.createElement("button");
btn.id = "recLaunch";
btn.textContent = " Hand";
btn.title = "Record a hand";
document.body.appendChild(btn);
var overlay = document.getElementById("recorderOverlay");
var recordTab = document.getElementById("recordTab");
function close() { overlay.classList.remove("open"); overlay.innerHTML = ""; }
btn.addEventListener("click", function () {
if (recordTab) recordTab.addEventListener("click", function () {
overlay.innerHTML = "";
overlay.classList.add("open");
var sid = window.currentSession;
window.Recorder.mount(overlay, {
onClose: close,
onSave: function (id) { close(); window.open("/hand/" + id, "_blank"); }