feat: make the Activity tab navigable and easier to read
Activity rows are now a cursor list: ↑↓ (and the scroll wheel) move the highlight, Enter jumps to that repo and opens its detail. Each row shows a precise local timestamp (MM-DD HH:MM) instead of only a relative age, colour-codes the kind, colours the repo by its project and widens that column so long workspace paths are readable, and keeps the relative age as a dim suffix on the detail. A › marks rows whose repo is still in the workspace (Enter-able).
This commit is contained in:
1 parent
abb1e92064
commit
4723d18c59
5 files changed
+107
-39
No files matched your search
@@ -187,7 +187,15 @@ pub fn tui_phase(state: &mut HubState, existing_term: Option<crate::tui::Tty>) -
|
||||
}
|
||||
|
||||
if let Some(Event::Mouse(m)) = &event {
|
||||
let on_activity = state.tab == Tab::Activity;
|
||||
match m.kind {
|
||||
MouseEventKind::ScrollDown if on_activity => {
|
||||
let n = state.activity_filtered().len();
|
||||
if n > 0 && state.activity_cursor + 1 < n { state.activity_cursor += 1; }
|
||||
}
|
||||
MouseEventKind::ScrollUp if on_activity => {
|
||||
state.activity_cursor = state.activity_cursor.saturating_sub(1);
|
||||
}
|
||||
MouseEventKind::ScrollDown => { state.scroll_down(); }
|
||||
MouseEventKind::ScrollUp => { state.scroll_up(); }
|
||||
_ => {}
|
||||
|
||||
Reference in new issue
Block a user