fix(tv): modals

This commit is contained in:
Fredrik Burmester
2026-01-18 15:22:44 +01:00
parent 773701d0c1
commit d545ca3584
10 changed files with 1323 additions and 149 deletions

View File

@@ -0,0 +1,18 @@
import { atom } from "jotai";
export type TVOptionItem<T = any> = {
label: string;
sublabel?: string;
value: T;
selected: boolean;
};
export type TVOptionModalState = {
title: string;
options: TVOptionItem[];
onSelect: (value: any) => void;
cardWidth?: number;
cardHeight?: number;
} | null;
export const tvOptionModalAtom = atom<TVOptionModalState>(null);

View File

@@ -0,0 +1,17 @@
import type {
BaseItemDto,
MediaStream,
} from "@jellyfin/sdk/lib/generated-client";
import { atom } from "jotai";
export type TVSubtitleModalState = {
item: BaseItemDto;
mediaSourceId?: string | null;
subtitleTracks: MediaStream[];
currentSubtitleIndex: number;
onSubtitleIndexChange: (index: number) => void;
onServerSubtitleDownloaded?: () => void;
onLocalSubtitleDownloaded?: (path: string) => void;
} | null;
export const tvSubtitleModalAtom = atom<TVSubtitleModalState>(null);