Fix layout issues with feedback modal
The feedback modal still needs a styling update
This commit is contained in:
parent
e5ce5e8692
commit
036636ee80
1 changed files with 47 additions and 52 deletions
|
@ -447,66 +447,61 @@ impl Render for FeedbackModal {
|
||||||
.child(self.feedback_editor.clone()),
|
.child(self.feedback_editor.clone()),
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
div()
|
h_stack()
|
||||||
|
.bg(cx.theme().colors().editor_background)
|
||||||
|
.p_2()
|
||||||
|
.border()
|
||||||
|
.rounded_md()
|
||||||
|
.border_color(if self.valid_email_address() {
|
||||||
|
cx.theme().colors().border
|
||||||
|
} else {
|
||||||
|
red()
|
||||||
|
})
|
||||||
|
.child(self.email_address_editor.clone()),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
h_stack()
|
||||||
|
.justify_between()
|
||||||
|
.gap_1()
|
||||||
.child(
|
.child(
|
||||||
h_stack()
|
Button::new("community_repository", "Community Repository")
|
||||||
.bg(cx.theme().colors().editor_background)
|
.style(ButtonStyle::Transparent)
|
||||||
.p_2()
|
.icon(Icon::ExternalLink)
|
||||||
.border()
|
.icon_position(IconPosition::End)
|
||||||
.rounded_md()
|
.icon_size(IconSize::Small)
|
||||||
.border_color(if self.valid_email_address() {
|
.on_click(open_community_repo),
|
||||||
cx.theme().colors().border
|
|
||||||
} else {
|
|
||||||
red()
|
|
||||||
})
|
|
||||||
.child(self.email_address_editor.clone()),
|
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
h_stack()
|
h_stack()
|
||||||
.justify_between()
|
|
||||||
.gap_1()
|
.gap_1()
|
||||||
.child(
|
.child(
|
||||||
Button::new("community_repo", "Community Repo")
|
Button::new("cancel_feedback", "Cancel")
|
||||||
.style(ButtonStyle::Transparent)
|
.style(ButtonStyle::Subtle)
|
||||||
.icon(Icon::ExternalLink)
|
.color(Color::Muted)
|
||||||
.icon_position(IconPosition::End)
|
.on_click(cx.listener(move |_, _, cx| {
|
||||||
.icon_size(IconSize::Small)
|
cx.spawn(|this, mut cx| async move {
|
||||||
.on_click(open_community_repo),
|
this.update(&mut cx, |_, cx| cx.emit(DismissEvent))
|
||||||
|
.ok();
|
||||||
|
})
|
||||||
|
.detach();
|
||||||
|
})),
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
h_stack()
|
Button::new("submit_feedback", submit_button_text)
|
||||||
.gap_1()
|
.color(Color::Accent)
|
||||||
.child(
|
.style(ButtonStyle::Filled)
|
||||||
Button::new("cancel_feedback", "Cancel")
|
.on_click(cx.listener(|this, _, cx| {
|
||||||
.style(ButtonStyle::Subtle)
|
this.submit(cx).detach();
|
||||||
.color(Color::Muted)
|
}))
|
||||||
.on_click(cx.listener(move |_, _, cx| {
|
.tooltip(move |cx| {
|
||||||
cx.spawn(|this, mut cx| async move {
|
Tooltip::with_meta(
|
||||||
this.update(&mut cx, |_, cx| {
|
"Submit feedback to the Zed team.",
|
||||||
cx.emit(DismissEvent)
|
None,
|
||||||
})
|
provide_an_email_address,
|
||||||
.ok();
|
cx,
|
||||||
})
|
)
|
||||||
.detach();
|
})
|
||||||
})),
|
.when(!self.can_submit(), |this| this.disabled(true)),
|
||||||
)
|
|
||||||
.child(
|
|
||||||
Button::new("submit_feedback", submit_button_text)
|
|
||||||
.color(Color::Accent)
|
|
||||||
.style(ButtonStyle::Filled)
|
|
||||||
.on_click(cx.listener(|this, _, cx| {
|
|
||||||
this.submit(cx).detach();
|
|
||||||
}))
|
|
||||||
.tooltip(move |cx| {
|
|
||||||
Tooltip::with_meta(
|
|
||||||
"Submit feedback to the Zed team.",
|
|
||||||
None,
|
|
||||||
provide_an_email_address,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.when(!self.can_submit(), |this| this.disabled(true)),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue