diff options
Diffstat (limited to 'src/tui/popup.rs')
| -rw-r--r-- | src/tui/popup.rs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/tui/popup.rs b/src/tui/popup.rs index 93b01c3..da44744 100644 --- a/src/tui/popup.rs +++ b/src/tui/popup.rs @@ -40,13 +40,23 @@ pub enum PopupKind { YankItem, } +#[derive(Debug)] +pub enum PopupItem { + Bibfile, + Entryfile, + Notefile, + Link, + Default, + None, +} + #[derive(Debug, Default)] pub struct PopupArea { pub is_popup: bool, pub popup_kind: Option<PopupKind>, pub popup_message: String, pub popup_scroll_pos: u16, - pub popup_list: Vec<(String, String)>, + pub popup_list: Vec<(String, String, PopupItem)>, pub popup_state: ListState, pub popup_sel_item: String, // pub add_entry_input: String, @@ -116,8 +126,8 @@ impl PopupArea { /// Opens a popup with a selectable list /// - /// The list items are passed as argument of the kind `Vec<(String, String)>`. - pub fn popup_selection(&mut self, items: Vec<(String, String)>) { + /// The list items are passed as argument of the kind `Vec<(String, String, PopupItem)>`. + pub fn popup_selection(&mut self, items: Vec<(String, String, PopupItem)>) { self.popup_list = items; // self.popup_kind = Some(PopupKind::SelectRes); self.is_popup = true; |
