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:
@@ -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"); }
|
||||
|
||||
@@ -123,12 +123,9 @@
|
||||
.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; }
|
||||
|
||||
/* floating launcher (V1) */
|
||||
#recLaunch {
|
||||
position: fixed; right: 16px; bottom: 84px; z-index: 900;
|
||||
background: var(--accent, #ff7a00); color: #111; border: none;
|
||||
border-radius: 22px; padding: 11px 16px; font-weight: 700; font-size: .9rem;
|
||||
font-family: var(--font-console, ui-monospace, monospace);
|
||||
box-shadow: 0 3px 12px rgba(0,0,0,.4);
|
||||
}
|
||||
body.kb #recLaunch { display: none; } /* hide when the keyboard is up */
|
||||
/* The Record tab swaps in for Mind in the bottom bar, but only in poker (cash) mode.
|
||||
body.cash-mode is toggled on mode change in index.html. */
|
||||
#tabbar .tab-rec { display: none; }
|
||||
body.cash-mode #tabbar .tab-rec { display: flex; }
|
||||
body.cash-mode #tabbar .tab-mind { display: none; }
|
||||
#tabbar .tab-rec .ti { color: var(--accent, #ff7a00); filter: none; }
|
||||
|
||||
Reference in New Issue
Block a user