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 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="/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="/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> <button class="tab" id="moreTab" type="button"><span class="ti"></span><span class="tl">More</span></button>
</nav> </nav>
</div> </div>
@@ -1251,17 +1252,12 @@
<script src="/recorder.js"></script> <script src="/recorder.js"></script>
<script> <script>
(function () { (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 overlay = document.getElementById("recorderOverlay");
var recordTab = document.getElementById("recordTab");
function close() { overlay.classList.remove("open"); overlay.innerHTML = ""; } function close() { overlay.classList.remove("open"); overlay.innerHTML = ""; }
btn.addEventListener("click", function () { if (recordTab) recordTab.addEventListener("click", function () {
overlay.innerHTML = ""; overlay.innerHTML = "";
overlay.classList.add("open"); overlay.classList.add("open");
var sid = window.currentSession;
window.Recorder.mount(overlay, { window.Recorder.mount(overlay, {
onClose: close, onClose: close,
onSave: function (id) { close(); window.open("/hand/" + id, "_blank"); } onSave: function (id) { close(); window.open("/hand/" + id, "_blank"); }
+6 -9
View File
@@ -123,12 +123,9 @@
.rec-pk-foot { display: flex; justify-content: space-between; margin-top: 12px; } .rec-pk-foot { display: flex; justify-content: space-between; margin-top: 12px; }
.rec-pk-foot button { background: var(--bg-dark, #070707); color: var(--text-fade, #8a8a8a); border: 1px solid var(--border, #2a1d12); border-radius: 8px; padding: 9px 14px; font-size: .85rem; } .rec-pk-foot button { background: var(--bg-dark, #070707); color: var(--text-fade, #8a8a8a); border: 1px solid var(--border, #2a1d12); border-radius: 8px; padding: 9px 14px; font-size: .85rem; }
/* floating launcher (V1) */ /* The Record tab swaps in for Mind in the bottom bar, but only in poker (cash) mode.
#recLaunch { body.cash-mode is toggled on mode change in index.html. */
position: fixed; right: 16px; bottom: 84px; z-index: 900; #tabbar .tab-rec { display: none; }
background: var(--accent, #ff7a00); color: #111; border: none; body.cash-mode #tabbar .tab-rec { display: flex; }
border-radius: 22px; padding: 11px 16px; font-weight: 700; font-size: .9rem; body.cash-mode #tabbar .tab-mind { display: none; }
font-family: var(--font-console, ui-monospace, monospace); #tabbar .tab-rec .ti { color: var(--accent, #ff7a00); filter: none; }
box-shadow: 0 3px 12px rgba(0,0,0,.4);
}
body.kb #recLaunch { display: none; } /* hide when the keyboard is up */