Feat: UI / UX fixes

This commit is contained in:
2026-02-26 21:17:53 +01:00
parent f618f47811
commit 6b56655661
20 changed files with 268 additions and 169 deletions

View File

@@ -383,19 +383,19 @@ pub(super) fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> Input
KeyCode::Char('c') if ctrl => {
ctx.app.editor_ctx.editor.copy();
let text = ctx.app.editor_ctx.editor.yank_text();
if let Some(clip) = &mut ctx.app.clipboard {
if let Ok(mut clip) = arboard::Clipboard::new() {
let _ = clip.set_text(text);
}
}
KeyCode::Char('x') if ctrl => {
ctx.app.editor_ctx.editor.cut();
let text = ctx.app.editor_ctx.editor.yank_text();
if let Some(clip) = &mut ctx.app.clipboard {
if let Ok(mut clip) = arboard::Clipboard::new() {
let _ = clip.set_text(text);
}
}
KeyCode::Char('v') if ctrl => {
if let Some(clip) = &mut ctx.app.clipboard {
if let Ok(mut clip) = arboard::Clipboard::new() {
if let Ok(text) = clip.get_text() {
ctx.app.editor_ctx.editor.set_yank_text(text);
}
@@ -417,14 +417,6 @@ pub(super) fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> Input
crate::services::stack_preview::update_cache(&ctx.app.editor_ctx);
}
}
Modal::Preview => match key.code {
KeyCode::Esc | KeyCode::Char('p') => ctx.dispatch(AppCommand::CloseModal),
KeyCode::Left => ctx.dispatch(AppCommand::PrevStep),
KeyCode::Right => ctx.dispatch(AppCommand::NextStep),
KeyCode::Up => ctx.dispatch(AppCommand::StepUp),
KeyCode::Down => ctx.dispatch(AppCommand::StepDown),
_ => {}
},
Modal::PatternProps {
bank,
pattern,