aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorlukeflo2025-05-30 17:04:42 +0200
committerlukeflo2025-05-30 17:04:42 +0200
commitfbcd12fb9e215852a12e0c3f5963aa52996b26aa (patch)
tree19f5ef411175cac554e004df3d05ed7cac1a7a7d /src/app.rs
parent0eae6de6df392fb3b8fa9d39dde42cecff97d240 (diff)
downloadbibiman-fbcd12fb9e215852a12e0c3f5963aa52996b26aa.tar.gz
bibiman-fbcd12fb9e215852a12e0c3f5963aa52996b26aa.zip
better UI for popups, some testings
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs31
1 files changed, 13 insertions, 18 deletions
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,
- // )
}
}
}