diff options
| author | lukeflo | 2024-12-23 21:03:48 +0100 |
|---|---|---|
| committer | lukeflo | 2024-12-23 21:03:48 +0100 |
| commit | 57126d7f42b871aa1835b056fbe74179c13e53b0 (patch) | |
| tree | bf81db50446aa7a8e06553f4e8aff97ea0cfb816 /src/tui/popup.rs | |
| parent | ad5c2cb586616eca99fc1db0efaaa0ff5aa97144 (diff) | |
| parent | 9a33a794167d60ce35030f007674f6e9424b1ff3 (diff) | |
| download | bibiman-57126d7f42b871aa1835b056fbe74179c13e53b0.tar.gz bibiman-57126d7f42b871aa1835b056fbe74179c13e53b0.zip | |
Merge branch 'add-entry-via-doi'
+ implement the functionality to add an entry via DOI
+ responsive error messages if resolving of DOI don't work
+ keep changes to choosen file to minimum
Diffstat (limited to 'src/tui/popup.rs')
| -rw-r--r-- | src/tui/popup.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tui/popup.rs b/src/tui/popup.rs index 890e5c8..78a0719 100644 --- a/src/tui/popup.rs +++ b/src/tui/popup.rs @@ -28,7 +28,9 @@ pub enum PopupKind { Help, MessageConfirm, MessageError, - Selection, + OpenRes, + AppendToFile, + AddEntry, } #[derive(Debug, Default)] @@ -39,6 +41,9 @@ pub struct PopupArea { pub popup_scroll_pos: u16, pub popup_list: Vec<String>, pub popup_state: ListState, + pub popup_sel_item: String, + // pub add_entry_input: String, + // pub add_entry_cursor_position: usize, } impl PopupArea { @@ -60,6 +65,7 @@ impl PopupArea { ("e: ", "Open editor at selected entry"), ("o: ", "Open with selected entry associated PDF"), ("u: ", "Open DOI/URL of selected entry"), + ("a: ", "Add new entry"), ("ESC: ", "Reset all lists"), ("Keyword List", "sub"), ("j,k|↓,↑: ", "Select next/previous item"), @@ -119,7 +125,7 @@ impl PopupArea { pub fn popup_selection(&mut self, items: Vec<String>) { self.popup_list = items; - self.popup_kind = Some(PopupKind::Selection); + // self.popup_kind = Some(PopupKind::SelectRes); self.is_popup = true; } |
