openvibers/openvibe.mediahub Commits

Video: sign in with a button on signed-out pages (#236)

OP OpenVibers committed 12 days ago · 75fe96a48d · 2 files, +4 −1

Changes

ddiff --git a/public/css/video.css b/public/css/video.css
iindex 2abbb96..57343b4 100644
---- a/public/css/video.css
++++ b/public/css/video.css
@@@ -641,3 +641,6 @@ html.ov-motion .ovv-stat.is-live .ovv-dot { animation: ovv-pulse 1.6s ease-out i
.ovv-chapter-list, .ovv-chapters ol { max-height: none; overflow: visible; }
.ovv-transcript-body, .ovv-chat-body { max-height: min(60vh, 26rem); max-height: min(60svh, 26rem); }
}
++/* A sign-in prompt: the sentence, then the button under it (phone sweep, 2026-11-01). */
++.notice.signin-prompt { display: grid; gap: 12px; justify-items: start; }
++.notice.signin-prompt p { margin: 0; }
ddiff --git a/server/video/pages.js b/server/video/pages.js
iindex 3d87d4f..6a361b0 100644
---- a/server/video/pages.js
++++ b/server/video/pages.js
@@@ -606,7 +606,7 @@ function createVideoRoutes(ctx) {
const signedIn = (req) => Boolean(req.viewer && req.viewer.kind === 'user' && req.viewer.subject);
const ownerOf = (req) => `user:${req.viewer.subject}`;
-- const signInPrompt = (what, next) => html`<div class="notice">${what} <a href="/auth/login?next=${encodeURIComponent(next)}">Sign in with OpenVibe</a>.</div>`;
++ const signInPrompt = (what, next) => html`<div class="notice signin-prompt"><p>${what}</p><p><a class="ovv-btn ovv-btn--primary" href="/auth/login?next=${encodeURIComponent(next)}">Sign in with OpenVibe</a></p></div>`;
const mustSignIn = (back, why) => (req, res, next) => (signedIn(req) ? next() : page(req, res, {
title: 'Sign in',
body: html`<h1>Sign in first</h1>${signInPrompt(why, back === 'here' ? req.originalUrl : back)}`,