diff options
| author | lukeflo | 2024-12-16 13:46:24 +0100 |
|---|---|---|
| committer | lukeflo | 2024-12-23 21:03:19 +0100 |
| commit | bf93bbee1b59c9804a01a7476e12264bbbcf5f40 (patch) | |
| tree | e8b1454a9c85e6932b443a34a4a18a02b71bfccc /src/tui/popup.rs | |
| parent | a6fca1fcf164142d84d09242b9d95a1da0b2d2d9 (diff) | |
| download | bibiman-bf93bbee1b59c9804a01a7476e12264bbbcf5f40.tar.gz bibiman-bf93bbee1b59c9804a01a7476e12264bbbcf5f40.zip | |
rewrite add-entry via DOI workflow
+ split some functions to fit with different popups
+ select if append to file (and to which) or create new file
+ error handling if resolving doi ist not possible
+ error handling for wront doi patterns
Diffstat (limited to 'src/tui/popup.rs')
| -rw-r--r-- | src/tui/popup.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tui/popup.rs b/src/tui/popup.rs index afe0cfc..352b328 100644 --- a/src/tui/popup.rs +++ b/src/tui/popup.rs @@ -28,7 +28,8 @@ pub enum PopupKind { Help, MessageConfirm, MessageError, - Selection, + SelectRes, + SelectFile, AddEntry, } @@ -40,6 +41,7 @@ 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, } @@ -51,7 +53,6 @@ impl PopupArea { ("TAB: ", "Toggle areas (Entries, Keywords)"), ("/|Ctrl+f: ", "Enter search mode"), ("q|Ctrl+c: ", "Quit bibiman"), - ("a: ", "Add new entry"), ("?: ", "Show help"), ("Entry Table", "sub"), ("j,k|↓,↑: ", "Select next/previous entry"), @@ -64,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"), @@ -123,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; } |
