diff --git a/src/ui.rs b/src/ui.rs new file mode 100644 index 0000000..52bf7e5 --- /dev/null +++ b/src/ui.rs @@ -0,0 +1,60 @@ +use eframe::egui; +use egui::{CentralPanel, ScrollArea, Window, Align2, Color32, ProgressBar}; +use std::sync::Arc; +use tokio::runtime::Runtime; +use crate::rclone_install::RcloneApp; +use crate::operations::{self, FileInfo, Remote, CopyOptions, FindOptions}; + +#[derive(Clone)] +pub enum AppState { + Initializing, + Ready, + Error(String), + Copying, + Syncing, + Moving, + Deleting, + Loading, +} +#[derive(Clone)] +pub struct TransferProgress { + pub current: u64, + pub total: u64, + pub speed: f64, + pub file_name: String, +} + +pub struct RcloneUI { + rclone: Option>, + state: AppState, + error_message: Option, + + current_path: String, + remote_list: Vec, + current_files: Vec, + + selected_paths: Vec, + transfer_source: String, + transfer_dest: String, + transfer_progress: Option, + + search_pattern: String, + search_results: Vec, + + show_transfer_dialog: bool, + show_new_remote_dialog: bool, + new_remote_name: String, + new_remote_type: String, + new_remote_config: std::collections::HashMap, + + settings: AppSettings, +} + +#[derive(Clone)] +pub struct AppSettings { + pub show_hidden: bool, + pub confirm_before_transfer: bool, + pub max_concurrent_transfers: u32, + pub bandwidth_limit: Option, +} +