Allow passing a handler function to context menu items
This commit is contained in:
parent
d3b976d044
commit
5521ff1b22
8 changed files with 137 additions and 78 deletions
|
@ -301,13 +301,19 @@ impl CollabTitlebarItem {
|
|||
.with_style(item_style.container)
|
||||
.into_any()
|
||||
})),
|
||||
ContextMenuItem::item("Sign out", SignOut),
|
||||
ContextMenuItem::item("Send Feedback", feedback::feedback_editor::GiveFeedback),
|
||||
ContextMenuItem::action("Sign out", SignOut),
|
||||
ContextMenuItem::action(
|
||||
"Send Feedback",
|
||||
feedback::feedback_editor::GiveFeedback,
|
||||
),
|
||||
]
|
||||
} else {
|
||||
vec![
|
||||
ContextMenuItem::item("Sign in", SignIn),
|
||||
ContextMenuItem::item("Send Feedback", feedback::feedback_editor::GiveFeedback),
|
||||
ContextMenuItem::action("Sign in", SignIn),
|
||||
ContextMenuItem::action(
|
||||
"Send Feedback",
|
||||
feedback::feedback_editor::GiveFeedback,
|
||||
),
|
||||
]
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue