Files
koodo-reader/src/containers/settings/backgroundSetting/interface.tsx
T
troyeguo da9ce03a10 feat: add featured backgrounds section with download functionality
- Added new translations for featured backgrounds in English and Chinese.
- Implemented CSS styles for the featured backgrounds section.
- Enhanced BackgroundSetting component to include featured backgrounds with lazy loading and download capabilities.
- Introduced methods in BackgroundUtil for fetching and saving featured backgrounds from a public storage server.
- Updated interface to manage state related to featured backgrounds, including download progress and visibility.
2026-09-06 09:24:37 +08:00

32 lines
938 B
TypeScript

import { RouteComponentProps } from "react-router-dom";
export interface SettingInfoProps extends RouteComponentProps<any> {
t: (title: string) => string;
handleReaderBackgroundImage?: (readerBackgroundImage: string) => void;
}
export interface BackgroundImage {
id: string;
name: string;
extension: string;
textColor?: string;
backgroundColor?: string;
}
export interface SettingInfoState {
images: BackgroundImage[];
/** loaded dataUrls keyed by image id */
loadedUrls: Record<string, string>;
previewImage: BackgroundImage | null;
/** featured background index currently in preview */
previewFeatured: number | null;
appBackgroundId: string;
readerBackgroundId: string;
isLoading: boolean;
/** featured indexes whose thumbnail has entered the viewport */
visibleFeatured: Set<number>;
/** id of the featured background being downloaded */
downloadingId: string;
downloadProgress: number;
}