Add to sidebar in breadcrumb context menu, fixes #526, fixes #395

This commit is contained in:
Jeremy Soller 2024-10-14 10:09:57 -06:00
parent a6f7a70f3d
commit a9daddb1b0
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 41 additions and 13 deletions

View file

@ -603,6 +603,7 @@ pub fn menu_bar<'a>(
}
pub fn location_context_menu<'a>(ancestor_index: usize) -> Element<'a, tab::Message> {
//TODO: only add some of these when in App mode
let children = vec![
menu_button!(text::body(fl!("open-in-new-tab")))
.on_press(tab::Message::LocationMenuAction(
@ -620,6 +621,12 @@ pub fn location_context_menu<'a>(ancestor_index: usize) -> Element<'a, tab::Mess
LocationMenuAction::Preview(ancestor_index),
))
.into(),
divider::horizontal::light().into(),
menu_button!(text::body(fl!("add-to-sidebar")))
.on_press(tab::Message::LocationMenuAction(
LocationMenuAction::AddToSidebar(ancestor_index),
))
.into(),
];
container(column::with_children(children))