Address the first beta's bugs and requested changes
Startup now uses the Android iris animation, and playback can continue in a corner miniplayer while browsing (the video is drawn into a corner rectangle beneath a matching hole in the page). The player keeps the window controls, hides its chrome when the pointer leaves, and gains audio/subtitle tracks, audio sync, source bitrate and playback details in its options. Subtitles can be styled in Settings with a live preview. Categories replace Collections, the A–Z rail magnifies, descriptions expand in place, downloads can be removed in bulk, and search keeps its results while typing. Fixes scroll jank from per-card and scrolling backdrop blurs, the hidden colour wash, the cubic volume curve, loud theme music, the search focus ring, a stray nav indicator, Continue Watching previews and the TV Shows header overlap. Removes the star rating, the duplicate Settings menu entry and the server settings' Show advanced switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
be865fa992
commit
43c168da95
35 changed files with 1771 additions and 327 deletions
|
|
@ -33,7 +33,7 @@ function Screen({ route }: { route: Route }) {
|
|||
case 'home':
|
||||
return <Home />;
|
||||
case 'section':
|
||||
return <SectionScreen kind={route.kind} tab={route.tab} />;
|
||||
return <SectionScreen kind={route.kind} tab={route.tab} genre={route.genre} genreTitle={route.genreTitle} />;
|
||||
case 'item':
|
||||
return <ItemScreen id={route.id} />;
|
||||
case 'person':
|
||||
|
|
@ -94,8 +94,9 @@ function Page({ onScrolled }: { onScrolled: (top: number) => void }) {
|
|||
function useGlobalShortcuts() {
|
||||
useEffect(() => {
|
||||
const isTyping = (t: EventTarget | null) => t instanceof HTMLElement && (t.isContentEditable || ['INPUT', 'TEXTAREA', 'SELECT'].includes(t.tagName));
|
||||
const playerFull = () => usePlayer.getState().open && !usePlayer.getState().mini;
|
||||
const onKey = (e: KeyboardEvent) => {
|
||||
if (usePlayer.getState().open) return;
|
||||
if (playerFull()) return;
|
||||
if ((e.ctrlKey || e.metaKey) && (e.key === 'k' || e.key === 'f')) {
|
||||
e.preventDefault();
|
||||
navigate({ name: 'search' });
|
||||
|
|
@ -118,7 +119,7 @@ function useGlobalShortcuts() {
|
|||
};
|
||||
// Mouse back/forward buttons.
|
||||
const onMouse = (e: MouseEvent) => {
|
||||
if (usePlayer.getState().open) return;
|
||||
if (playerFull()) return;
|
||||
if (e.button === 3) {
|
||||
e.preventDefault();
|
||||
useRouter.getState().back();
|
||||
|
|
@ -144,7 +145,7 @@ function useLibrarySync() {
|
|||
let last = '';
|
||||
let stopped = false;
|
||||
const tick = async () => {
|
||||
if (stopped || document.hidden || usePlayer.getState().open) return;
|
||||
if (stopped || document.hidden || (usePlayer.getState().open && !usePlayer.getState().mini)) return;
|
||||
try {
|
||||
const rev = await libraryRevision(server);
|
||||
if (last && rev !== last) invalidateLibrary();
|
||||
|
|
@ -167,7 +168,7 @@ function useLibrarySync() {
|
|||
|
||||
function Shell() {
|
||||
const [scrolled, setScrolled] = useState(false);
|
||||
const playerOpen = usePlayer((s) => s.open);
|
||||
const playerOpen = usePlayer((s) => s.open && !s.mini);
|
||||
const startPage = useSettings.getState().startPage;
|
||||
useGlobalShortcuts();
|
||||
useLibrarySync();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const NAV = [
|
|||
{ id: 'downloads', label: 'Downloads', route: { name: 'downloads' } as const },
|
||||
];
|
||||
|
||||
function WindowControls() {
|
||||
export function WindowControls() {
|
||||
const [maximized, setMaximized] = useState(false);
|
||||
useEffect(() => {
|
||||
if (!isNative) return;
|
||||
|
|
@ -67,11 +67,8 @@ function Avatar() {
|
|||
submenu: home.users.map((u) => ({ label: u.title, checked: u.uuid === user?.uuid, onSelect: () => home.switchTo(u) })),
|
||||
});
|
||||
}
|
||||
items.push(
|
||||
{ divider: true },
|
||||
{ label: 'Settings', icon: 'settings', onSelect: () => navigate({ name: 'settings', mode: 'app', tab: 'general' }) },
|
||||
);
|
||||
if (server?.owned) items.push({ label: 'Server dashboard', icon: 'activity', onSelect: () => navigate({ name: 'settings', mode: 'server', tab: 'dashboard' }) });
|
||||
// Settings has its own button in the bar; the menu keeps account actions.
|
||||
if (server?.owned) items.push({ divider: true }, { label: 'Server dashboard', icon: 'activity', onSelect: () => navigate({ name: 'settings', mode: 'server', tab: 'dashboard' }) });
|
||||
items.push({ divider: true }, { label: 'Sign out', icon: 'logout', onSelect: signOut });
|
||||
openMenu(items, el, { align: 'end', minWidth: 250 });
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { create } from 'zustand';
|
||||
|
||||
export type SectionKind = 'movie' | 'show';
|
||||
export type SectionTab = 'discover' | 'library' | 'collections';
|
||||
export type SectionTab = 'discover' | 'library' | 'categories';
|
||||
|
||||
export type Route =
|
||||
| { name: 'home' }
|
||||
| { name: 'section'; kind: SectionKind; tab: SectionTab }
|
||||
| { name: 'section'; kind: SectionKind; tab: SectionTab; genre?: string; genreTitle?: string }
|
||||
| { name: 'item'; id: string; title?: string }
|
||||
| { name: 'person'; id: string; title: string; thumb?: string }
|
||||
| { name: 'hub'; key: string; title: string }
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ import { persist } from 'zustand/middleware';
|
|||
export type Quality = 'original' | '2160' | '1080' | '720' | '480';
|
||||
export type SkipMode = 'off' | 'button' | 'auto';
|
||||
export type SubtitleMode = 'auto' | 'always' | 'forced' | 'off';
|
||||
export type SubtitleEdge = 'outline' | 'shadow' | 'raised' | 'none';
|
||||
export type SubtitleBox = 'none' | 'translucent' | 'solid';
|
||||
export type SubtitlePosition = 'low' | 'normal' | 'high';
|
||||
|
||||
export interface Preferences {
|
||||
// Playback
|
||||
|
|
@ -20,7 +23,11 @@ export interface Preferences {
|
|||
subtitleMode: SubtitleMode;
|
||||
subtitleLanguage: string;
|
||||
subtitleScale: number;
|
||||
subtitleBackground: boolean;
|
||||
subtitleColor: string;
|
||||
subtitleEdge: SubtitleEdge;
|
||||
subtitleBox: SubtitleBox;
|
||||
subtitleBold: boolean;
|
||||
subtitlePosition: SubtitlePosition;
|
||||
volume: number;
|
||||
seekStep: number;
|
||||
// Interface
|
||||
|
|
@ -54,7 +61,11 @@ export const defaults: Preferences = {
|
|||
subtitleMode: 'auto',
|
||||
subtitleLanguage: '',
|
||||
subtitleScale: 1,
|
||||
subtitleBackground: false,
|
||||
subtitleColor: '#FFFFFF',
|
||||
subtitleEdge: 'outline',
|
||||
subtitleBox: 'none',
|
||||
subtitleBold: false,
|
||||
subtitlePosition: 'normal',
|
||||
volume: 100,
|
||||
seekStep: 10,
|
||||
startPage: 'home',
|
||||
|
|
@ -82,7 +93,19 @@ export const useSettings = create<SettingsState>()(
|
|||
set: (key, value) => set({ [key]: value } as Partial<SettingsState>),
|
||||
reset: () => set({ ...defaults }),
|
||||
}),
|
||||
{ name: 'kaleido.settings', version: 1 },
|
||||
{
|
||||
name: 'kaleido.settings',
|
||||
version: 2,
|
||||
migrate: (persisted, version) => {
|
||||
const p = (persisted ?? {}) as Record<string, unknown>;
|
||||
// 1 → 2: the subtitle background switch became a box style.
|
||||
if (version < 2 && 'subtitleBackground' in p) {
|
||||
p.subtitleBox = p.subtitleBackground ? 'translucent' : 'none';
|
||||
delete p.subtitleBackground;
|
||||
}
|
||||
return p as unknown as SettingsState;
|
||||
},
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -100,3 +123,15 @@ export const QUALITY_PROFILE: Record<Exclude<Quality, 'original'>, { kbps: numbe
|
|||
'720': { kbps: 4000, width: 1280, height: 720 },
|
||||
'480': { kbps: 1500, width: 854, height: 480 },
|
||||
};
|
||||
|
||||
export const SUBTITLE_COLORS: { value: string; label: string }[] = [
|
||||
{ value: '#FFFFFF', label: 'White' },
|
||||
{ value: '#FFE14D', label: 'Yellow' },
|
||||
{ value: '#7FE3F0', label: 'Cyan' },
|
||||
{ value: '#9BE58A', label: 'Green' },
|
||||
{ value: '#F4A6D7', label: 'Pink' },
|
||||
{ value: '#BFC5CA', label: 'Grey' },
|
||||
];
|
||||
|
||||
/** Bottom margin in mpv's scaled pixels (720 = window height). */
|
||||
export const SUBTITLE_MARGIN: Record<SubtitlePosition, number> = { low: 14, normal: 34, high: 80 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue