Feat: documentation, UI/UX

This commit is contained in:
2026-03-01 19:09:52 +01:00
parent ecb559e556
commit db44f9b98e
57 changed files with 1531 additions and 615 deletions

View File

@@ -197,7 +197,7 @@ pub fn render(
}
if !perf {
render_footer(frame, app, footer_area);
render_footer(frame, app, snapshot, footer_area);
}
let modal_area = render_modal(frame, app, snapshot, term);
@@ -512,7 +512,7 @@ fn render_header(
);
}
fn render_footer(frame: &mut Frame, app: &App, area: Rect) {
fn render_footer(frame: &mut Frame, app: &App, snapshot: &SequencerSnapshot, area: Rect) {
let theme = theme::get();
let block = Block::default()
.borders(Borders::ALL)
@@ -539,6 +539,15 @@ fn render_footer(frame: &mut Frame, app: &App, area: Rect) {
Span::raw(" "),
Span::styled(msg.clone(), Style::new().fg(theme.modal.confirm)),
])
} else if let Some(ref text) = snapshot.print_output {
Line::from(vec![
Span::styled(
page_indicator.to_string(),
Style::new().bg(theme.view_badge.bg).fg(theme.view_badge.fg),
),
Span::raw(" "),
Span::styled(text.clone(), Style::new().fg(theme.hint.text)),
])
} else {
let bindings: Vec<(&str, &str)> = match app.page {
Page::Main => vec![
@@ -593,7 +602,6 @@ fn render_footer(frame: &mut Frame, app: &App, area: Rect) {
("Esc", "Save & Back"),
("C-e", "Eval"),
("[ ]", "Speed"),
("C-s", "Stack"),
("?", "Keys"),
],
};
@@ -1071,33 +1079,12 @@ fn render_modal_editor(
if app.editor_ctx.editor.search_active() {
let hints = hint_line(&[("Enter", "confirm"), ("Esc", "cancel")]);
frame.render_widget(Paragraph::new(hints).alignment(Alignment::Right), hint_area);
} else if app.editor_ctx.show_stack {
let stack_text = app
.editor_ctx
.stack_cache
.borrow()
.as_ref()
.map(|c| c.result.clone())
.unwrap_or_else(|| "Stack: []".to_string());
let hints = hint_line(&[("Esc", "save"), ("C-e", "eval"), ("C-s", "hide")]);
let [hint_left, stack_right] = Layout::horizontal([
Constraint::Length(hints.width() as u16),
Constraint::Fill(1),
])
.areas(hint_area);
frame.render_widget(Paragraph::new(hints), hint_left);
let dim = Style::default().fg(theme.hint.text);
frame.render_widget(
Paragraph::new(Span::styled(stack_text, dim)).alignment(Alignment::Right),
stack_right,
);
} else {
let hints = hint_line(&[
("Esc", "save"),
("C-e", "eval"),
("C-f", "find"),
("C-b", "samples"),
("C-s", "stack"),
("C-u", "/"),
("C-r", "undo/redo"),
]);