Handle close modal button
This commit is contained in:
parent
900a539da2
commit
9980b75ab5
@ -95,6 +95,7 @@ pub fn view(_model: &Model, issue: &Issue, modal: &EditIssueModal) -> Node<Msg>
|
|||||||
Msg::NoOp
|
Msg::NoOp
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let close_handler = mouse_ev(Ev::Click, |_| Msg::PopModal);
|
||||||
let copy_button = StyledButton::build()
|
let copy_button = StyledButton::build()
|
||||||
.empty()
|
.empty()
|
||||||
.icon(Icon::Link)
|
.icon(Icon::Link)
|
||||||
@ -106,7 +107,6 @@ pub fn view(_model: &Model, issue: &Issue, modal: &EditIssueModal) -> Node<Msg>
|
|||||||
}]])
|
}]])
|
||||||
.build()
|
.build()
|
||||||
.into_node();
|
.into_node();
|
||||||
|
|
||||||
let delete_button = StyledButton::build()
|
let delete_button = StyledButton::build()
|
||||||
.empty()
|
.empty()
|
||||||
.icon(Icon::Trash.into_styled_builder().size(19).build())
|
.icon(Icon::Trash.into_styled_builder().size(19).build())
|
||||||
@ -115,6 +115,7 @@ pub fn view(_model: &Model, issue: &Issue, modal: &EditIssueModal) -> Node<Msg>
|
|||||||
let close_button = StyledButton::build()
|
let close_button = StyledButton::build()
|
||||||
.empty()
|
.empty()
|
||||||
.icon(Icon::Close.into_styled_builder().size(24).build())
|
.icon(Icon::Close.into_styled_builder().size(24).build())
|
||||||
|
.on_click(close_handler)
|
||||||
.build()
|
.build()
|
||||||
.into_node();
|
.into_node();
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ pub fn update(msg: &Msg, model: &mut model::Model, orders: &mut impl Orders<Msg>
|
|||||||
Msg::PopModal => match model.modals.pop() {
|
Msg::PopModal => match model.modals.pop() {
|
||||||
_ => (),
|
_ => (),
|
||||||
},
|
},
|
||||||
|
|
||||||
Msg::ChangePage(Page::EditIssue(issue_id)) => {
|
Msg::ChangePage(Page::EditIssue(issue_id)) => {
|
||||||
let value = find_issue(model, *issue_id)
|
let value = find_issue(model, *issue_id)
|
||||||
.map(|issue| issue.issue_type.clone())
|
.map(|issue| issue.issue_type.clone())
|
||||||
@ -87,6 +88,7 @@ pub fn update(msg: &Msg, model: &mut model::Model, orders: &mut impl Orders<Msg>
|
|||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user