openvibers/openvibe.live Commits
VOD and clip pages: the after-show report reads as one wrapping line on phones (its label wrapped onto three), and 1 view is '1 view' (#165)
Changes
@@@ -32,8 +32,12 @@.cc-stat i { color: var(--accent); font-size: 0.72rem; align-self: center; }.cc-stat b { font-weight: 800; color: var(--text-primary); }.cc-stat small { color: var(--text-muted); font-size: 0.72rem; }--.cc-recap { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text-secondary); text-decoration: none; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, #fbbf24 8%, var(--bg-tertiary)); border: 1px solid color-mix(in srgb, #fbbf24 30%, var(--border)); }++/* One line of text that wraps (the grade badge sits at its start): as a flex row the badge, the bold label and the++ headline were three columns, and on a phone "After-show report:" wrapped onto three lines. */++.cc-recap { display: inline-block; line-height: 1.5; font-size: 0.84rem; color: var(--text-secondary); text-decoration: none; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, #fbbf24 8%, var(--bg-tertiary)); border: 1px solid color-mix(in srgb, #fbbf24 30%, var(--border)); }.cc-recap b { color: var(--text-primary); }++.cc-recap .cc-grade { width: 24px; height: 24px; margin-right: 6px; vertical-align: middle; }++.cc-recap > i { margin-right: 4px; }.cc-recap:hover { border-color: #fbbf24; }.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }.cc-more { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }@@@ -318,7 +318,7 @@ async function loadVodPlayer(vodId, seekTo) {{ const _a = document.getElementById('vp-avatar'); if (_a) _a.innerHTML = _avatarInner(v.avatar_url, v.username); }document.getElementById('vp-date').textContent = formatDateTime(v.created_at);document.getElementById('vp-duration').textContent = formatDuration(v.duration_seconds || v.duration);-- document.getElementById('vp-views').textContent = `${v.view_count || 0} views${v.unique_views != null ? ` · ${v.unique_views} unique` : ''}`;++ document.getElementById('vp-views').textContent = `${v.view_count || 0} view${(v.view_count || 0) === 1 ? '' : 's'}${v.unique_views != null ? ` · ${v.unique_views} unique` : ''}`;_showVideoLink('vp-video-link', 'vod', v);document.getElementById('vp-description').textContent = v.description || '';_renderMediaAiOverview('vp-description', v.ai_overview);@@@ -1068,7 +1068,7 @@ async function loadClipPlayer(clipId) {// View countconst clpViews = document.getElementById('clp-views');-- if (clpViews) clpViews.textContent = `${cl.view_count || 0} views${cl.unique_views != null ? ` · ${cl.unique_views} unique` : ''}`;++ if (clpViews) clpViews.textContent = `${cl.view_count || 0} view${(cl.view_count || 0) === 1 ? '' : 's'}${cl.unique_views != null ? ` · ${cl.unique_views} unique` : ''}`;_showVideoLink('clp-video-link', 'clip', cl);// Protocol badge
@@ -32,8 +32,12 @@
@@ -32,8 +32,12 @@
.cc-stat i { color: var(--accent); font-size: 0.72rem; align-self: center; }
.cc-stat i { color: var(--accent); font-size: 0.72rem; align-self: center; }
.cc-stat b { font-weight: 800; color: var(--text-primary); }
.cc-stat b { font-weight: 800; color: var(--text-primary); }
.cc-stat small { color: var(--text-muted); font-size: 0.72rem; }
.cc-stat small { color: var(--text-muted); font-size: 0.72rem; }
-.cc-recap { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text-secondary); text-decoration: none; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, #fbbf24 8%, var(--bg-tertiary)); border: 1px solid color-mix(in srgb, #fbbf24 30%, var(--border)); }
+/* One line of text that wraps (the grade badge sits at its start): as a flex row the badge, the bold label and the
+ headline were three columns, and on a phone "After-show report:" wrapped onto three lines. */
+.cc-recap { display: inline-block; line-height: 1.5; font-size: 0.84rem; color: var(--text-secondary); text-decoration: none; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, #fbbf24 8%, var(--bg-tertiary)); border: 1px solid color-mix(in srgb, #fbbf24 30%, var(--border)); }
.cc-recap b { color: var(--text-primary); }
.cc-recap b { color: var(--text-primary); }
+.cc-recap .cc-grade { width: 24px; height: 24px; margin-right: 6px; vertical-align: middle; }
+.cc-recap > i { margin-right: 4px; }
.cc-recap:hover { border-color: #fbbf24; }
.cc-recap:hover { border-color: #fbbf24; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.cc-more { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.cc-more { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
@@ -318,7 +318,7 @@ async function loadVodPlayer(vodId, seekTo) {
@@ -318,7 +318,7 @@ async function loadVodPlayer(vodId, seekTo) {
{ const _a = document.getElementById('vp-avatar'); if (_a) _a.innerHTML = _avatarInner(v.avatar_url, v.username); }
{ const _a = document.getElementById('vp-avatar'); if (_a) _a.innerHTML = _avatarInner(v.avatar_url, v.username); }
document.getElementById('vp-date').textContent = formatDateTime(v.created_at);
document.getElementById('vp-date').textContent = formatDateTime(v.created_at);
document.getElementById('vp-duration').textContent = formatDuration(v.duration_seconds || v.duration);
document.getElementById('vp-duration').textContent = formatDuration(v.duration_seconds || v.duration);
- document.getElementById('vp-views').textContent = `${v.view_count || 0} views${v.unique_views != null ? ` · ${v.unique_views} unique` : ''}`;
+ document.getElementById('vp-views').textContent = `${v.view_count || 0} view${(v.view_count || 0) === 1 ? '' : 's'}${v.unique_views != null ? ` · ${v.unique_views} unique` : ''}`;
_showVideoLink('vp-video-link', 'vod', v);
_showVideoLink('vp-video-link', 'vod', v);
document.getElementById('vp-description').textContent = v.description || '';
document.getElementById('vp-description').textContent = v.description || '';
_renderMediaAiOverview('vp-description', v.ai_overview);
_renderMediaAiOverview('vp-description', v.ai_overview);
@@ -1068,7 +1068,7 @@ async function loadClipPlayer(clipId) {
@@ -1068,7 +1068,7 @@ async function loadClipPlayer(clipId) {
// View count
// View count
const clpViews = document.getElementById('clp-views');
const clpViews = document.getElementById('clp-views');
- if (clpViews) clpViews.textContent = `${cl.view_count || 0} views${cl.unique_views != null ? ` · ${cl.unique_views} unique` : ''}`;
+ if (clpViews) clpViews.textContent = `${cl.view_count || 0} view${(cl.view_count || 0) === 1 ? '' : 's'}${cl.unique_views != null ? ` · ${cl.unique_views} unique` : ''}`;
_showVideoLink('clp-video-link', 'clip', cl);
_showVideoLink('clp-video-link', 'clip', cl);
// Protocol badge
// Protocol badge