mirror of
https://github.com/overcuriousity/trace.git
synced 2025-12-20 13:02:21 +00:00
Add dual note navigation options in evidence_detail view
Now provides two ways to access notes in evidence_detail view: - Enter: Opens note_detail view (single note focus) - 'v': Opens notes modal with selected note highlighted (all notes) The 'v' key now intelligently jumps to the selected note when opening the modal, providing context while still showing all notes. This gives users flexibility in how they want to view their notes.
This commit is contained in:
14
trace/tui.py
14
trace/tui.py
@@ -1454,7 +1454,19 @@ class TUI:
|
|||||||
if self.current_view == "case_detail":
|
if self.current_view == "case_detail":
|
||||||
self.view_case_notes()
|
self.view_case_notes()
|
||||||
elif self.current_view == "evidence_detail":
|
elif self.current_view == "evidence_detail":
|
||||||
self.view_evidence_notes()
|
# Open notes modal with selected note highlighted
|
||||||
|
if self.active_evidence:
|
||||||
|
notes = self.active_evidence.notes
|
||||||
|
list_h = self.content_h - 5
|
||||||
|
display_notes = notes[-list_h:] if len(notes) > list_h else notes
|
||||||
|
|
||||||
|
if display_notes and self.selected_index < len(display_notes):
|
||||||
|
# Calculate the actual note index in the full list
|
||||||
|
note_offset = len(notes) - len(display_notes)
|
||||||
|
actual_note_index = note_offset + self.selected_index
|
||||||
|
self.view_evidence_notes(highlight_note_index=actual_note_index)
|
||||||
|
else:
|
||||||
|
self.view_evidence_notes()
|
||||||
|
|
||||||
# Delete
|
# Delete
|
||||||
elif key == ord('d'):
|
elif key == ord('d'):
|
||||||
|
|||||||
Reference in New Issue
Block a user