From fbcd12fb9e215852a12e0c3f5963aa52996b26aa Mon Sep 17 00:00:00 2001 From: lukeflo Date: Fri, 30 May 2025 17:04:42 +0200 Subject: better UI for popups, some testings --- src/app.rs | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'src/app.rs') diff --git a/src/app.rs b/src/app.rs index 92d89ba..f751716 100644 --- a/src/app.rs +++ b/src/app.rs @@ -306,10 +306,13 @@ impl App { items.push(("Weblink: ".into(), entry.doi_url.unwrap().clone())) } if entry.filepath.is_some() { - items.push(( - "Filepath: ".into(), - entry.filepath.unwrap()[0].clone().into_string().unwrap(), - )) + entry.filepath.unwrap().iter().for_each(|p| { + items.push(("Filepath: ".into(), p.clone().into_string().unwrap())) + }); + // items.push(( + // "Filepath: ".into(), + // entry.filepath.unwrap()[0].clone().into_string().unwrap(), + // )) } // self.bibiman.popup_area.popup_kind = Some(PopupKind::YankItem); @@ -344,16 +347,13 @@ impl App { )) } if entry.filepath.is_some() { - items.push(( - "File (PDF/EPUB): ".into(), - entry.filepath.unwrap()[0].clone().into_string().unwrap(), - )) + entry.filepath.unwrap().iter().for_each(|p| { + items.push(( + "File (PDF/EPUB): ".into(), + p.clone().into_string().unwrap(), + )) + }); } - // self.bibiman.popup_area.popup_kind = Some(PopupKind::OpenRes); - // self.bibiman.popup_area.popup_selection(items); - // self.bibiman.former_area = Some(FormerArea::EntryArea); - // self.bibiman.current_area = CurrentArea::PopupArea; - // self.bibiman.popup_area.popup_state.select(Some(0)) self.bibiman .open_popup(PopupKind::OpenRes, None, None, Some(items))?; @@ -364,11 +364,6 @@ impl App { Some(&entry.citekey), None, )?; - // self.bibiman.popup_area.popup_message( - // "Selected entry has no connected ressources: ", - // &entry.citekey, - // false, - // ) } } } -- cgit v1.2.3