From e7b755ceeff4c8662c78d0ba0289e8007c297820 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Fri, 4 Oct 2024 12:55:21 +0200 Subject: impl opening editor for editing file and update lists afterwards --- src/frontend/ui.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/frontend/ui.rs') diff --git a/src/frontend/ui.rs b/src/frontend/ui.rs index 0e7c219..cd39bda 100644 --- a/src/frontend/ui.rs +++ b/src/frontend/ui.rs @@ -15,6 +15,7 @@ // along with this program. If not, see . ///// +use color_eyre::owo_colors::OwoColorize; use ratatui::{ buffer::Buffer, layout::{Constraint, Layout, Rect}, @@ -125,11 +126,23 @@ impl App { .render(area, buf); } _ => { + let style_emph = Style::new().bold(); let block = Block::bordered() .title(Line::raw(" Basic Commands ").centered()) .border_set(symbols::border::ROUNDED); Paragraph::new( - "Use j/k to move, g/G to go top/bottom, y to yank the current citekey", + Line::from(vec![ + Span::styled("j/k: ", style_emph), + Span::raw("to move | "), + Span::styled("g/G: ", style_emph), + Span::raw("go top/bottom | "), + Span::styled("TAB: ", style_emph), + Span::raw("switch fields | "), + Span::styled("y: ", style_emph), + Span::raw("yank citekey | "), + Span::styled("e: ", style_emph), + Span::raw("edit entry"), + ]), // "Use j/k to move, g/G to go top/bottom, y to yank the current citekey, e to edit the current entry", ) .block(block) .centered() -- cgit v1.2.3