mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2026-10-05 12:30:47 -04:00
- 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.
32 lines
938 B
TypeScript
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;
|
|
}
|