openvibers/openvibe.mediahub Commits
Video: sign in with a button on signed-out pages (#236)
Changes
@@@ -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; }@@@ -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)}`,
@@ -641,3 +641,6 @@ html.ov-motion .ovv-stat.is-live .ovv-dot { animation: ovv-pulse 1.6s ease-out i
@@ -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-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); }
.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; }
@@ -606,7 +606,7 @@ function createVideoRoutes(ctx) {
@@ -606,7 +606,7 @@ function createVideoRoutes(ctx) {
const signedIn = (req) => Boolean(req.viewer && req.viewer.kind === 'user' && req.viewer.subject);
const signedIn = (req) => Boolean(req.viewer && req.viewer.kind === 'user' && req.viewer.subject);
const ownerOf = (req) => `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, {
const mustSignIn = (back, why) => (req, res, next) => (signedIn(req) ? next() : page(req, res, {
title: 'Sign in',
title: 'Sign in',
body: html`<h1>Sign in first</h1>${signInPrompt(why, back === 'here' ? req.originalUrl : back)}`,
body: html`<h1>Sign in first</h1>${signInPrompt(why, back === 'here' ? req.originalUrl : back)}`,