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 @@
-

Cinemate

+

Cinemate

diff --git a/public/style.css b/public/style.css index 48958e2..bb0801f 100644 --- a/public/style.css +++ b/public/style.css @@ -41,6 +41,7 @@ body { } .topbar h1 { margin: 0; + cursor: pointer; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.02em; diff --git a/src/index.ts b/src/index.ts index b7e5c38..df18a3e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,7 +10,7 @@ export { Room } from "./durable-objects/room"; const app = new Hono<{ Bindings: Env }>(); -app.get("/api/health", (c) => c.json({ ok: true, service: "cinemate", version: "v3.3" })); +app.get("/api/health", (c) => c.json({ ok: true, service: "cinemate", version: "v3.4" })); app.route("/api/users", users); app.route("/api/profile", profile);