From 503e8852c1b15adcbaf34d63af18d9b6dcf3884b Mon Sep 17 00:00:00 2001 From: valeboth <109695782+valeboth@users.noreply.github.com> Date: Wed, 26 Aug 2026 11:51:18 +0300 Subject: [PATCH] feat: clicking the Cinemate logo goes home (lobby) from anywhere - logo is clickable; leaves the current room (closes WS + clears saved room) and shows the lobby (or onboarding if not set up) - health -> v3.4 --- public/app.js | 13 +++++++++++++ public/index.html | 2 +- public/style.css | 1 + src/index.ts | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/public/app.js b/public/app.js index 4970843..b235216 100644 --- a/public/app.js +++ b/public/app.js @@ -843,6 +843,18 @@ async function showWatchlist() { } } +// Logo → home: leave any room and go to the lobby (or onboarding if not set up yet). +function goHome() { + if (state.userId && state.username) { + closeWs(); + clearRoom(); + state.room = null; + showScreen("screen-lobby"); + } else { + showScreen("screen-onboarding"); + } +} + // ── Profile / reset ──────────────────────────────────────────────────────── function showProfile() { $("profile-name").textContent = state.username ? `Signed in as ${state.username}` : ""; @@ -914,6 +926,7 @@ function init() { $("match-continue-btn").onclick = () => showScreen("screen-swipe"); $("add-overseerr-btn").onclick = addToOverseerr; $("copy-link-btn").onclick = () => copyText(inviteLink(), "Invite link"); + $("app-logo").onclick = goHome; $("user-badge").onclick = showProfile; $("edit-prefs-btn").onclick = openEditPrefs; $("reset-btn").onclick = resetData; diff --git a/public/index.html b/public/index.html index 74a77d7..f5d6621 100644 --- a/public/index.html +++ b/public/index.html @@ -9,7 +9,7 @@