Add direct diagram connections, movable ports, and contextual authoring

This commit is contained in:
2026-09-06 02:13:49 +03:00
parent 35133de650
commit fef2e0dbce
39 changed files with 7076 additions and 499 deletions
+27 -21
View File
@@ -136,7 +136,10 @@ pub fn sidebar(app: &App) -> View<'_, Message> {
.style(style::card),
tooltip::Position::Right,
));
content = content.push(outline);
let id = entry.id;
content = content.push(crate::context_menu::Area::new(outline, move |anchor| {
crate::model_menu::open(id, anchor)
}));
}
}
if !found {
@@ -202,27 +205,30 @@ fn item<'a>(app: &'a App, id: Id, context: bool) -> View<'a, Message> {
info = info.push(label(path));
}
}
button(
row![
info.width(Fill),
label(if count == 0 {
"Details".into()
} else {
format!("{count} children")
}),
text("›").size(20)
]
.spacing(8)
.align_y(iced::Center),
crate::context_menu::Area::new(
button(
row![
info.width(Fill),
label(if count == 0 {
"Details".into()
} else {
format!("{count} children")
}),
text("›").size(20)
]
.spacing(8)
.align_y(iced::Center),
)
.width(Fill)
.padding(12)
.on_press(Message::Explore(Some(id)))
.style(if app.selected == id {
style::selected
} else {
style::nav
}),
move |anchor| crate::model_menu::open(id, anchor),
)
.width(Fill)
.padding(12)
.on_press(Message::Explore(Some(id)))
.style(if app.selected == id {
style::selected
} else {
style::nav
})
.into()
}