Release Kaleido Desktop 0.1.0-beta.10
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m22s
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m22s
- Player controls centred under the timeline: previous episode, back 10 s, play/pause, forward 10 s, next episode; volume and time on the left. - Previous episode button and Shift+P. - Draggable miniplayer, kept inside the window and remembered. - Fix the next-episode card's buttons and the skip button being covered by the player's title row, and skip buttons also pausing playback. - Drop the "Highly rated"/"Recommended" label from the hero and restore the gap between its logo and the details line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
10103d0e77
commit
a38db53161
15 changed files with 220 additions and 61 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';
|
||||
import { useCallback, useEffect, useRef, useState, type PointerEvent as ReactPointerEvent, type ReactNode } from 'react';
|
||||
import { usePlayer } from './store';
|
||||
import { useSession } from '../app/session';
|
||||
import { useSettings, QUALITY_LABEL, UPSCALING, type Quality, type SubtitleBox, type Upscaling } from '../app/settings';
|
||||
|
|
@ -512,7 +512,14 @@ function SkipButton() {
|
|||
if (!marker || mode === 'off' || countdown !== null) return null;
|
||||
if (marker.type === 'credits' && nextUp) return null;
|
||||
return (
|
||||
<button className="skip-button" onClick={() => seek(marker.end / 1000)}>
|
||||
<button
|
||||
className="skip-button"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
seek(marker.end / 1000);
|
||||
}}
|
||||
onDoubleClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{marker.type === 'intro' ? 'Skip intro' : 'Skip credits'}
|
||||
<Icon name="skipNext" size={16} />
|
||||
</button>
|
||||
|
|
@ -583,18 +590,62 @@ function TitleBlock({ item }: { item: Item }) {
|
|||
);
|
||||
}
|
||||
|
||||
/** Where the miniplayer was dragged to: its distance from the window's right and bottom edges. */
|
||||
type MiniPos = { x: number; y: number };
|
||||
const MINI_POS_KEY = 'kaleido.miniPosition';
|
||||
const MINI_MARGIN = 8;
|
||||
let miniPos: MiniPos | null | undefined;
|
||||
|
||||
function savedMiniPos(): MiniPos | null {
|
||||
if (miniPos === undefined) {
|
||||
try {
|
||||
const p = JSON.parse(localStorage.getItem(MINI_POS_KEY) ?? 'null');
|
||||
miniPos = p && Number.isFinite(p.x) && Number.isFinite(p.y) ? p : null;
|
||||
} catch {
|
||||
miniPos = null;
|
||||
}
|
||||
}
|
||||
return miniPos ?? null;
|
||||
}
|
||||
|
||||
/** Keeps the whole box inside the window. */
|
||||
function clampMini(el: HTMLElement, pos: MiniPos): MiniPos {
|
||||
const cs = getComputedStyle(el);
|
||||
const maxX = window.innerWidth - parseFloat(cs.width) - MINI_MARGIN;
|
||||
const maxY = window.innerHeight - parseFloat(cs.height) - MINI_MARGIN;
|
||||
return { x: Math.round(Math.max(MINI_MARGIN, Math.min(maxX, pos.x))), y: Math.round(Math.max(MINI_MARGIN, Math.min(maxY, pos.y))) };
|
||||
}
|
||||
|
||||
/** The box and the page's hole for the video (base.css) both follow these. */
|
||||
function applyMiniPos(pos: MiniPos | null) {
|
||||
const root = document.documentElement.style;
|
||||
if (!pos) {
|
||||
root.removeProperty('--mini-x');
|
||||
root.removeProperty('--mini-y');
|
||||
return;
|
||||
}
|
||||
root.setProperty('--mini-x', `${pos.x}px`);
|
||||
root.setProperty('--mini-y', `${pos.y}px`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Playing in the corner while browsing. The native video is drawn into this
|
||||
* box's rectangle and the page has a matching hole (see `html.player-mini`).
|
||||
* Playing in the corner while browsing, and draggable anywhere in the window.
|
||||
* The native video is drawn into this box's rectangle and the page has a
|
||||
* matching hole (see `html.player-mini`).
|
||||
*/
|
||||
function MiniPlayer() {
|
||||
const st = usePlayer();
|
||||
const box = useRef<HTMLDivElement>(null);
|
||||
const placeVideo = useRef(() => {});
|
||||
|
||||
useEffect(() => {
|
||||
const el = box.current;
|
||||
if (!el) return;
|
||||
let frame = 0;
|
||||
const fit = () => {
|
||||
const saved = savedMiniPos();
|
||||
applyMiniPos(saved && clampMini(el, saved));
|
||||
};
|
||||
const place = () => {
|
||||
cancelAnimationFrame(frame);
|
||||
frame = requestAnimationFrame(() => {
|
||||
|
|
@ -610,23 +661,64 @@ function MiniPlayer() {
|
|||
if (isNative) mpv.rect({ x: x * dpr - 1, y: y * dpr - 1, width: width * dpr + 2, height: height * dpr + 2 }).catch(() => {});
|
||||
});
|
||||
};
|
||||
place();
|
||||
placeVideo.current = place;
|
||||
const onResize = () => {
|
||||
fit();
|
||||
place();
|
||||
};
|
||||
onResize();
|
||||
const ro = new ResizeObserver(place);
|
||||
ro.observe(el);
|
||||
window.addEventListener('resize', place);
|
||||
window.addEventListener('resize', onResize);
|
||||
return () => {
|
||||
cancelAnimationFrame(frame);
|
||||
ro.disconnect();
|
||||
window.removeEventListener('resize', place);
|
||||
window.removeEventListener('resize', onResize);
|
||||
};
|
||||
}, []);
|
||||
|
||||
const startDrag = (e: ReactPointerEvent) => {
|
||||
const el = box.current;
|
||||
if (e.button !== 0 || !el) return;
|
||||
const cs = getComputedStyle(el);
|
||||
const start = { px: e.clientX, py: e.clientY, x: parseFloat(cs.right), y: parseFloat(cs.bottom) };
|
||||
let dragging = false;
|
||||
const move = (ev: PointerEvent) => {
|
||||
const dx = ev.clientX - start.px;
|
||||
const dy = ev.clientY - start.py;
|
||||
if (!dragging && Math.hypot(dx, dy) < 5) return;
|
||||
dragging = true;
|
||||
el.classList.add('dragging');
|
||||
miniPos = clampMini(el, { x: start.x - dx, y: start.y - dy });
|
||||
applyMiniPos(miniPos);
|
||||
placeVideo.current();
|
||||
};
|
||||
const up = () => {
|
||||
window.removeEventListener('pointermove', move);
|
||||
window.removeEventListener('pointerup', up);
|
||||
window.removeEventListener('pointercancel', up);
|
||||
if (!dragging) return;
|
||||
el.classList.remove('dragging');
|
||||
localStorage.setItem(MINI_POS_KEY, JSON.stringify(miniPos));
|
||||
// Letting go after a drag isn't a click on the button under the pointer.
|
||||
const swallow = (c: MouseEvent) => {
|
||||
c.stopPropagation();
|
||||
c.preventDefault();
|
||||
};
|
||||
window.addEventListener('click', swallow, { capture: true, once: true });
|
||||
setTimeout(() => window.removeEventListener('click', swallow, { capture: true }), 0);
|
||||
};
|
||||
window.addEventListener('pointermove', move);
|
||||
window.addEventListener('pointerup', up);
|
||||
window.addEventListener('pointercancel', up);
|
||||
};
|
||||
|
||||
if (!st.item) return null;
|
||||
const item = st.item;
|
||||
const loading = !st.firstFrame && !st.error;
|
||||
const pct = st.duration ? Math.min(100, (st.position / st.duration) * 100) : 0;
|
||||
return (
|
||||
<div ref={box} className={`mini-player${loading || st.error ? ' loading' : ''}`} onDoubleClick={() => st.expand()}>
|
||||
<div ref={box} className={`mini-player${loading || st.error ? ' loading' : ''}`} onPointerDown={startDrag} onDoubleClick={() => st.expand()}>
|
||||
<div className="mini-scrim" />
|
||||
<div className="mini-top">
|
||||
<button className="mini-icon" aria-label="Back to full screen player" title="Expand" onClick={() => st.expand()}>
|
||||
|
|
@ -732,6 +824,11 @@ export function PlayerOverlay() {
|
|||
if (e.shiftKey && p.nextUp) p.playNext();
|
||||
else handled = false;
|
||||
break;
|
||||
case 'p':
|
||||
case 'P':
|
||||
if (e.shiftKey && p.prevUp) p.playPrevious();
|
||||
else handled = false;
|
||||
break;
|
||||
case 'u':
|
||||
case 'U': {
|
||||
const prefs = useSettings.getState();
|
||||
|
|
@ -887,25 +984,45 @@ export function PlayerOverlay() {
|
|||
<Timeline onScrub={setScrubbing} />
|
||||
<div className="player-controls">
|
||||
<div className="player-controls-left">
|
||||
<button className="player-icon big" aria-label={st.paused ? 'Play' : 'Pause'} onClick={() => st.togglePause()}>
|
||||
<Icon name={st.paused || st.ended ? 'play' : 'pause'} size={26} />
|
||||
</button>
|
||||
<button className="player-icon" aria-label="Back 10 seconds" onClick={() => st.seekBy(-10)}>
|
||||
<Icon name="replay10" size={24} />
|
||||
</button>
|
||||
<button className="player-icon" aria-label="Forward 10 seconds" onClick={() => st.seekBy(10)}>
|
||||
<Icon name="forward10" size={24} />
|
||||
</button>
|
||||
{st.nextUp && (
|
||||
<button className="player-icon" aria-label="Next episode" title={`Next: ${episodeLabel(st.nextUp)} ${st.nextUp.title}`} onClick={() => st.playNext()}>
|
||||
<Icon name="skipNext" size={22} />
|
||||
</button>
|
||||
)}
|
||||
<Volume />
|
||||
<span className="player-time">
|
||||
{clock(st.position, st.duration >= 3600)} <span className="dim">/ {clock(st.duration, st.duration >= 3600)}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div className="player-controls-center">
|
||||
{/* Both episode buttons stay for episodes (dimmed at either end) so play/pause holds its place. */}
|
||||
{item.type === 'episode' && (
|
||||
<button
|
||||
className="player-icon"
|
||||
aria-label="Previous episode"
|
||||
title={st.prevUp ? `Previous: ${episodeLabel(st.prevUp)} ${st.prevUp.title}` : undefined}
|
||||
disabled={!st.prevUp}
|
||||
onClick={() => st.playPrevious()}
|
||||
>
|
||||
<Icon name="skipPrev" size={22} />
|
||||
</button>
|
||||
)}
|
||||
<button className="player-icon" aria-label="Back 10 seconds" onClick={() => st.seekBy(-10)}>
|
||||
<Icon name="replay10" size={24} />
|
||||
</button>
|
||||
<button className="player-icon big" aria-label={st.paused ? 'Play' : 'Pause'} onClick={() => st.togglePause()}>
|
||||
<Icon name={st.paused || st.ended ? 'play' : 'pause'} size={28} />
|
||||
</button>
|
||||
<button className="player-icon" aria-label="Forward 10 seconds" onClick={() => st.seekBy(10)}>
|
||||
<Icon name="forward10" size={24} />
|
||||
</button>
|
||||
{item.type === 'episode' && (
|
||||
<button
|
||||
className="player-icon"
|
||||
aria-label="Next episode"
|
||||
title={st.nextUp ? `Next: ${episodeLabel(st.nextUp)} ${st.nextUp.title}` : undefined}
|
||||
disabled={!st.nextUp}
|
||||
onClick={() => st.playNext()}
|
||||
>
|
||||
<Icon name="skipNext" size={22} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<div className="player-controls-right">
|
||||
<button className={`player-icon${panel === 'tracks' ? ' on' : ''}${st.subKey ? ' lit' : ''}`} aria-label="Audio and subtitles" onClick={() => setPanel(panel === 'tracks' ? '' : 'tracks')}>
|
||||
<Icon name="captions" size={23} />
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ interface PlayerState {
|
|||
video: { width: number; height: number; hwdec: string; codec: string } | null;
|
||||
ended: boolean;
|
||||
nextUp: Item | null;
|
||||
/** The episode before this one, for the previous-episode button. */
|
||||
prevUp: Item | null;
|
||||
countdown: number | null;
|
||||
postPlayDismissed: boolean;
|
||||
fullscreen: boolean;
|
||||
|
|
@ -89,6 +91,7 @@ interface PlayerState {
|
|||
setQuality(q: Quality): Promise<void>;
|
||||
selectVersion(index: number): Promise<void>;
|
||||
playNext(): Promise<void>;
|
||||
playPrevious(): Promise<void>;
|
||||
cancelCountdown(): void;
|
||||
toggleFullscreen(): Promise<void>;
|
||||
previewAt(seconds: number): string;
|
||||
|
|
@ -271,15 +274,17 @@ function checkScrobble() {
|
|||
}
|
||||
}
|
||||
|
||||
async function findNext(item: Item): Promise<Item | null> {
|
||||
/** The episodes either side of this one in the show. */
|
||||
async function findNeighbours(item: Item): Promise<{ prevUp: Item | null; nextUp: Item | null }> {
|
||||
const none = { prevUp: null, nextUp: null };
|
||||
const s = server();
|
||||
if (!s || item.type !== 'episode' || !item.grandparentId) return null;
|
||||
if (!s || item.type !== 'episode' || !item.grandparentId) return none;
|
||||
try {
|
||||
const leaves = await api.allLeaves(s, item.grandparentId);
|
||||
const i = leaves.findIndex((e) => e.id === item.id);
|
||||
return i >= 0 ? (leaves[i + 1] ?? null) : null;
|
||||
return i >= 0 ? { prevUp: leaves[i - 1] ?? null, nextUp: leaves[i + 1] ?? null } : none;
|
||||
} catch {
|
||||
return null;
|
||||
return none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -547,6 +552,7 @@ export const usePlayer = create<PlayerState>((set, get) => ({
|
|||
video: null,
|
||||
ended: false,
|
||||
nextUp: null,
|
||||
prevUp: null,
|
||||
countdown: null,
|
||||
postPlayDismissed: false,
|
||||
fullscreen: false,
|
||||
|
|
@ -587,6 +593,7 @@ export const usePlayer = create<PlayerState>((set, get) => ({
|
|||
buffering: true,
|
||||
ended: false,
|
||||
nextUp: null,
|
||||
prevUp: null,
|
||||
countdown: null,
|
||||
postPlayDismissed: false,
|
||||
chapters: [],
|
||||
|
|
@ -674,7 +681,7 @@ export const usePlayer = create<PlayerState>((set, get) => ({
|
|||
const st = get();
|
||||
if (st.open && !st.ended) report(st.paused ? 'paused' : st.buffering ? 'buffering' : 'playing');
|
||||
}, 10000);
|
||||
findNext(item).then((next) => token === loadToken && set({ nextUp: next }));
|
||||
findNeighbours(item).then((n) => token === loadToken && set(n));
|
||||
} catch (e: any) {
|
||||
if (token !== loadToken) return;
|
||||
set({ error: e?.message ?? String(e), buffering: false });
|
||||
|
|
@ -696,7 +703,7 @@ export const usePlayer = create<PlayerState>((set, get) => ({
|
|||
await mpv.command('stop').catch(() => {});
|
||||
await mpv.show(false).catch(() => {});
|
||||
}
|
||||
set({ open: false, mini: false, item: null, delivery: null, error: '', terminated: false, countdown: null, nextUp: null, firstFrame: false });
|
||||
set({ open: false, mini: false, item: null, delivery: null, error: '', terminated: false, countdown: null, nextUp: null, prevUp: null, firstFrame: false });
|
||||
const fs = await win.isFullscreen().catch(() => false);
|
||||
if (fs && !wasFullscreenBeforePlay) win.setFullscreen(false);
|
||||
if (st.item) invalidateLibrary();
|
||||
|
|
@ -815,6 +822,12 @@ export const usePlayer = create<PlayerState>((set, get) => ({
|
|||
await st.play(st.nextUp, { resume: true, quality: st.quality });
|
||||
},
|
||||
|
||||
async playPrevious() {
|
||||
const st = get();
|
||||
if (!st.prevUp) return;
|
||||
await st.play(st.prevUp, { resume: true, quality: st.quality });
|
||||
},
|
||||
|
||||
cancelCountdown() {
|
||||
stopCountdown();
|
||||
set({ countdown: null, postPlayDismissed: true });
|
||||
|
|
|
|||
|
|
@ -16,26 +16,21 @@ function shuffled<T>(list: T[], salt = 0): T[] {
|
|||
return out;
|
||||
}
|
||||
|
||||
const FEATURE_SOURCES: [RegExp, string][] = [
|
||||
[/recentlyreleased|recentlyaired/, 'Recently released'],
|
||||
[/topunwatched|toprated/, 'Highly rated'],
|
||||
[/recentlyadded/, 'Recently added'],
|
||||
[/startwatching/, 'Start watching'],
|
||||
[/curated|genre|by\.actor|moreingenre/, 'Recommended'],
|
||||
];
|
||||
/** Recently released, highly rated, recently added, start watching, recommended. */
|
||||
const FEATURE_SOURCES: RegExp[] = [/recentlyreleased|recentlyaired/, /topunwatched|toprated/, /recentlyadded/, /startwatching/, /curated|genre|by\.actor|moreingenre/];
|
||||
|
||||
/**
|
||||
* Features interleave recently released, highly rated unwatched and
|
||||
* Plex-recommended titles; they need artwork and skip in-progress titles.
|
||||
*/
|
||||
export function buildFeatures(hubs: Hub[], limit = 8, salt = 0): Feature[] {
|
||||
const pools: Feature[][] = FEATURE_SOURCES.map(([re, eyebrow]) =>
|
||||
const pools: Feature[][] = FEATURE_SOURCES.map((re) =>
|
||||
shuffled(
|
||||
hubs
|
||||
.filter((h) => re.test(h.id))
|
||||
.flatMap((h) => h.items)
|
||||
.filter((i) => (i.type === 'movie' || i.type === 'show') && i.art && !i.viewOffset && i.summary)
|
||||
.map((item) => ({ item, eyebrow })),
|
||||
.map((item) => ({ item })),
|
||||
salt,
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ const SHORTCUTS: [string, string][][] = [
|
|||
['C', 'Next subtitle track'],
|
||||
['U', 'Cycle upscaling'],
|
||||
['B', 'Compare with enhancement off'],
|
||||
['Shift + N', 'Next episode'],
|
||||
['Shift + P / N', 'Previous / next episode'],
|
||||
['0–9', 'Jump to 0–90%'],
|
||||
['Esc or Backspace', 'Exit full screen, then keep playing in the corner'],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -612,11 +612,9 @@ html.splash-arrival .auth-screen {
|
|||
transform: none;
|
||||
}
|
||||
}
|
||||
.hero-eyebrow {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.hero-title {
|
||||
margin: 0 0 18px;
|
||||
/* Scoped so the later `.title-art { margin: 0 }` can't cancel the gap above the facts. */
|
||||
.hero-content .hero-title {
|
||||
margin: 0 0 22px;
|
||||
}
|
||||
.hero-episode {
|
||||
font-size: 14px;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ html.player-mini.video-active .app-shell {
|
|||
visibility: visible;
|
||||
-webkit-mask-image: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 90'%3E%3Crect width='160' height='90' rx='3.6'/%3E%3C/svg%3E");
|
||||
-webkit-mask-size: 100% 100%, var(--mini-w) var(--mini-h);
|
||||
-webkit-mask-position: 0 0, right var(--mini-gap) bottom var(--mini-gap);
|
||||
-webkit-mask-position: 0 0, right var(--mini-x, var(--mini-gap)) bottom var(--mini-y, var(--mini-gap));
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-composite: xor;
|
||||
mask-composite: exclude;
|
||||
|
|
|
|||
|
|
@ -328,17 +328,31 @@ html.os-macos:not(.window-fullscreen) .player-top {
|
|||
}
|
||||
|
||||
/* Controls */
|
||||
/* Volume and time | playback, centred under the timeline | tracks and window. */
|
||||
.player-controls {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.player-controls-left,
|
||||
.player-controls-center,
|
||||
.player-controls-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
.player-controls-right {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.player-controls-center {
|
||||
gap: 10px;
|
||||
}
|
||||
.player-icon:disabled {
|
||||
opacity: 0.32;
|
||||
pointer-events: none;
|
||||
}
|
||||
.player-icon {
|
||||
width: 44px;
|
||||
|
|
@ -364,11 +378,12 @@ html.os-macos:not(.window-fullscreen) .player-top {
|
|||
color: var(--accent-strong);
|
||||
}
|
||||
.player-icon.big {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
}
|
||||
.player-time {
|
||||
margin-left: 12px;
|
||||
margin-left: 8px;
|
||||
white-space: nowrap;
|
||||
font-size: 13px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: #f0f2f2;
|
||||
|
|
@ -410,6 +425,8 @@ html.os-macos:not(.window-fullscreen) .player-top {
|
|||
/* Panels */
|
||||
.player-panel {
|
||||
position: absolute;
|
||||
/* Above the skip and post-play cards. */
|
||||
z-index: 2;
|
||||
right: clamp(24px, 3.5vw, 56px);
|
||||
bottom: 84px;
|
||||
min-width: 300px;
|
||||
|
|
@ -638,7 +655,11 @@ html.os-macos:not(.window-fullscreen) .player-top {
|
|||
min-width: 340px;
|
||||
}
|
||||
|
||||
/* Skip & post-play */
|
||||
/* Skip & post-play: above the bottom chrome, whose title row spans the full width behind them. */
|
||||
.skip-button,
|
||||
.post-play {
|
||||
z-index: 1;
|
||||
}
|
||||
.skip-button {
|
||||
position: absolute;
|
||||
right: clamp(24px, 3.5vw, 56px);
|
||||
|
|
@ -765,10 +786,11 @@ html.os-macos:not(.window-fullscreen) .player-top {
|
|||
--mini-h: calc(var(--mini-w) * 9 / 16);
|
||||
--mini-gap: 24px;
|
||||
}
|
||||
/* --mini-x/-y: where it was dragged to, from the right and bottom (PlayerOverlay). */
|
||||
.mini-player {
|
||||
position: fixed;
|
||||
right: var(--mini-gap);
|
||||
bottom: var(--mini-gap);
|
||||
right: var(--mini-x, var(--mini-gap));
|
||||
bottom: var(--mini-y, var(--mini-gap));
|
||||
z-index: 600;
|
||||
width: var(--mini-w);
|
||||
height: var(--mini-h);
|
||||
|
|
@ -781,6 +803,9 @@ html.os-macos:not(.window-fullscreen) .player-top {
|
|||
.mini-player.loading {
|
||||
background: #000;
|
||||
}
|
||||
.mini-player.dragging {
|
||||
cursor: grabbing;
|
||||
}
|
||||
/* Opacity only: the video beneath can't follow a transform. */
|
||||
@keyframes mini-in {
|
||||
from {
|
||||
|
|
@ -804,6 +829,8 @@ html.os-macos:not(.window-fullscreen) .player-top {
|
|||
.mini-player:hover .mini-top,
|
||||
.mini-player:hover .mini-center,
|
||||
.mini-player:hover .mini-caption,
|
||||
.mini-player.dragging .mini-scrim,
|
||||
.mini-player.dragging .mini-caption,
|
||||
.mini-player.loading .mini-center,
|
||||
.mini-player:focus-within .mini-top,
|
||||
.mini-player:focus-within .mini-center {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ const ROTATE_MS = 8000;
|
|||
|
||||
export interface Feature {
|
||||
item: Item;
|
||||
eyebrow: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -75,7 +74,6 @@ export function Hero({ features, variant = 'home' }: { features: Feature[]; vari
|
|||
<section ref={root} className={`hero ${variant}`} onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}>
|
||||
<Backdrop item={item} className="hero-backdrop" />
|
||||
<div className="hero-content" key={copyKey}>
|
||||
<div className="micro hero-eyebrow">{feature.eyebrow}</div>
|
||||
<TitleArt item={item} className="hero-title" maxWidth={variant === 'home' ? 420 : 380} maxHeight={variant === 'home' ? 128 : 108} />
|
||||
{item.type === 'episode' && (
|
||||
<div className="hero-episode">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue