compiled and working sidebar in ratatui

This commit is contained in:
filipriec
2025-03-21 15:53:40 +01:00
parent c46bbc26e1
commit d067f5b515
10 changed files with 134 additions and 14 deletions

View File

@@ -2,11 +2,21 @@
use std::env;
#[derive(Default)]
pub struct UiState {
pub show_sidebar: bool,
// Add other UI-related states here
}
pub struct AppState {
// Core editor state
pub is_saved: bool,
pub current_dir: String,
pub total_count: u64,
pub current_position: u64,
// UI preferences
pub ui: UiState,
}
impl AppState {
@@ -19,9 +29,11 @@ impl AppState {
current_dir,
total_count: 0,
current_position: 0,
ui: UiState::default(),
})
}
// Existing methods remain unchanged
pub fn update_total_count(&mut self, total_count: u64) {
self.total_count = total_count;
}