compiled and working sidebar in ratatui
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user