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);