refactor: more component separation, persisted sidebar state and other improvements

This commit is contained in:
2025-12-08 13:46:30 +05:30
parent 2ef85b2a8b
commit 43cdb28213
18 changed files with 3621 additions and 2924 deletions

View File

@@ -50,7 +50,6 @@ export interface Settings {
filename_template: string;
debug_mode: boolean;
log_verbose: boolean;
log_warning: boolean;
log_progress: boolean;
enable_notifications: boolean;
update_notification: boolean;

View File

@@ -48,6 +48,8 @@ export interface DownloaderPageStatesStore {
isErrored: boolean;
isErrorExpected: boolean;
erroredDownloadId: string | null;
videoPanelSizes: number[];
playlistPanelSizes: number[];
setActiveDownloadModeTab: (tab: string) => void;
setActiveDownloadConfigurationTab: (tab: string) => void;
setIsStartingDownload: (isStarting: boolean) => void;
@@ -62,6 +64,8 @@ export interface DownloaderPageStatesStore {
setIsErrored: (isErrored: boolean) => void;
setIsErrorExpected: (isErrorExpected: boolean) => void;
setErroredDownloadId: (downloadId: string | null) => void;
setVideoPanelSizes: (sizes: number[]) => void;
setPlaylistPanelSizes: (sizes: number[]) => void;
}
export interface LibraryPageStatesStore {
@@ -101,6 +105,8 @@ export interface SettingsPageStatesStore {
appUpdate: Update | null;
isUpdatingApp: boolean;
appUpdateDownloadProgress: number;
formResetTrigger: number;
resetAcknowledgements: number;
setActiveTab: (tab: string) => void;
setActiveSubAppTab: (tab: string) => void;
setActiveSubExtTab: (tab: string) => void;
@@ -119,6 +125,8 @@ export interface SettingsPageStatesStore {
setAppUpdate: (update: Update | null) => void;
setIsUpdatingApp: (isUpdating: boolean) => void;
setAppUpdateDownloadProgress: (progress: number) => void;
triggerFormReset: () => void;
acknowledgeFormReset: () => void;
}
export interface KvPairsStatesStore {
@@ -132,4 +140,4 @@ export interface LogsStore {
setLogs: (logs: Log[]) => void;
addLog: (log: Log) => void;
clearLogs: () => void;
}
}

View File

@@ -7,6 +7,7 @@ export interface RawVideoInfo {
thumbnail: string;
channel: string;
uploader: string;
creator: string;
duration_string: string;
release_date: string;
upload_date: string;
@@ -39,6 +40,7 @@ export interface RawVideoInfo {
playlist_title: string;
playlist_channel: string;
playlist_uploader: string;
playlist_creator: string;
playlist_webpage_url: string;
entries: RawVideoInfo[];
n_entries: number;
@@ -79,4 +81,4 @@ export interface VideoSubtitle {
ext: string;
url: string;
name: string;
}
}