Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}` : "";
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<main id="app">
<header class="topbar">
<h1>Cinemate</h1>
<h1 id="app-logo" title="Home">Cinemate</h1>
<span id="user-badge" class="user-badge hidden"></span>
</header>

Expand Down
1 change: 1 addition & 0 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ body {
}
.topbar h1 {
margin: 0;
cursor: pointer;
font-size: 1.5rem;
font-weight: 800;
letter-spacing: 0.02em;
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading