mirror of
https://github.com/zaphar/sheetsui.git
synced 2025-07-23 05:19:48 -04:00
chore: refactor some stuff for editability
This commit is contained in:
parent
a361b7a87b
commit
6c67975be9
@ -131,8 +131,17 @@ impl<'ws> Workspace<'ws> {
|
|||||||
fn render_help_text(&self) -> impl Widget {
|
fn render_help_text(&self) -> impl Widget {
|
||||||
let info_block = Block::bordered().title("Help");
|
let info_block = Block::bordered().title("Help");
|
||||||
Paragraph::new(match self.state.modality {
|
Paragraph::new(match self.state.modality {
|
||||||
Modality::Navigate => "Navigate Mode:\n* e: Enter edit mode for current cell\n* h,j,k,l: vim style navigation\n* q exit\n* Ctrl-S Save sheet",
|
Modality::Navigate => Text::from(vec![
|
||||||
Modality::CellEdit => "Edit Mode:\n ESC: Exit edit mode\nOtherwise edit as normal",
|
"Navigate Mode:".into(),
|
||||||
|
"* e: Enter edit mode for current cell".into(),
|
||||||
|
"* h,j,k,l: vim style navigation".into(),
|
||||||
|
"* q exit\n* Ctrl-S Save sheet".into(),
|
||||||
|
]),
|
||||||
|
Modality::CellEdit => Text::from(vec![
|
||||||
|
"Edit Mode:".into(),
|
||||||
|
"* ESC: Exit edit mode".into(),
|
||||||
|
"Otherwise edit as normal".into(),
|
||||||
|
]),
|
||||||
}).block(info_block)
|
}).block(info_block)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user