Feat: UI / UX
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use std::cell::RefCell;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use cagire_markdown::ParsedMarkdown;
|
||||
use cagire_ratatui::Sparkles;
|
||||
use tachyonfx::{fx, Effect, EffectManager, Interpolation};
|
||||
|
||||
@@ -49,6 +50,8 @@ pub struct UiState {
|
||||
pub help_scrolls: Vec<usize>,
|
||||
pub help_search_active: bool,
|
||||
pub help_search_query: String,
|
||||
pub help_focused_block: Option<usize>,
|
||||
pub help_parsed: RefCell<Vec<Option<ParsedMarkdown>>>,
|
||||
pub dict_focus: DictFocus,
|
||||
pub dict_category: usize,
|
||||
pub dict_scrolls: Vec<usize>,
|
||||
@@ -66,6 +69,7 @@ pub struct UiState {
|
||||
pub prev_modal_open: bool,
|
||||
pub prev_page: Page,
|
||||
pub prev_show_title: bool,
|
||||
pub onboarding_dismissed: Vec<String>,
|
||||
}
|
||||
|
||||
impl Default for UiState {
|
||||
@@ -81,6 +85,8 @@ impl Default for UiState {
|
||||
help_scrolls: vec![0; crate::model::docs::topic_count()],
|
||||
help_search_active: false,
|
||||
help_search_query: String::new(),
|
||||
help_focused_block: None,
|
||||
help_parsed: RefCell::new((0..crate::model::docs::topic_count()).map(|_| None).collect()),
|
||||
dict_focus: DictFocus::default(),
|
||||
dict_category: 0,
|
||||
dict_scrolls: vec![0; crate::model::categories::category_count()],
|
||||
@@ -98,6 +104,7 @@ impl Default for UiState {
|
||||
prev_modal_open: false,
|
||||
prev_page: Page::default(),
|
||||
prev_show_title: true,
|
||||
onboarding_dismissed: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user