hardcoded adresar to general form

This commit is contained in:
filipriec
2025-06-02 10:32:39 +02:00
parent 6e2fc5349b
commit 3488ab4f6b
12 changed files with 636 additions and 375 deletions

View File

@@ -33,11 +33,12 @@ pub struct UiState {
pub struct AppState {
// Core editor state
pub current_dir: String,
pub total_count: u64,
pub current_position: u64,
pub profile_tree: ProfileTreeResponse,
pub selected_profile: Option<String>,
pub current_mode: AppMode,
pub current_view_profile_name: Option<String>,
pub current_view_table_name: Option<String>,
pub focused_button_index: usize,
pub pending_table_structure_fetch: Option<(String, String)>,
@@ -52,10 +53,10 @@ impl AppState {
.to_string();
Ok(AppState {
current_dir,
total_count: 0,
current_position: 0,
profile_tree: ProfileTreeResponse::default(),
selected_profile: None,
current_view_profile_name: None,
current_view_table_name: None,
current_mode: AppMode::General,
focused_button_index: 0,
pending_table_structure_fetch: None,
@@ -63,18 +64,14 @@ impl AppState {
})
}
// Existing methods remain unchanged
pub fn update_total_count(&mut self, total_count: u64) {
self.total_count = total_count;
}
pub fn update_current_position(&mut self, current_position: u64) {
self.current_position = current_position;
}
pub fn update_mode(&mut self, mode: AppMode) {
self.current_mode = mode;
}
pub fn set_current_view_table(&mut self, profile_name: String, table_name: String) {
self.current_view_profile_name = Some(profile_name);
self.current_view_table_name = Some(table_name);
}
// Add dialog helper methods
/// Shows a dialog with the given title, message, and buttons.