Allow prompts to have detail, and use for good
Make channel panel errors louder
This commit is contained in:
parent
df420c3767
commit
01424a62ea
17 changed files with 162 additions and 65 deletions
|
@ -31,7 +31,8 @@ pub fn init(cx: &mut AppContext) {
|
|||
|
||||
let prompt = cx.prompt(
|
||||
PromptLevel::Info,
|
||||
&format!("Copied into clipboard:\n\n{specs}"),
|
||||
"Copied into clipboard",
|
||||
Some(&specs),
|
||||
&["OK"],
|
||||
);
|
||||
cx.spawn(|_, _cx| async move {
|
||||
|
|
|
@ -97,7 +97,7 @@ impl ModalView for FeedbackModal {
|
|||
return true;
|
||||
}
|
||||
|
||||
let answer = cx.prompt(PromptLevel::Info, "Discard feedback?", &["Yes", "No"]);
|
||||
let answer = cx.prompt(PromptLevel::Info, "Discard feedback?", None, &["Yes", "No"]);
|
||||
|
||||
cx.spawn(move |this, mut cx| async move {
|
||||
if answer.await.ok() == Some(0) {
|
||||
|
@ -222,6 +222,7 @@ impl FeedbackModal {
|
|||
let answer = cx.prompt(
|
||||
PromptLevel::Info,
|
||||
"Ready to submit your feedback?",
|
||||
None,
|
||||
&["Yes, Submit!", "No"],
|
||||
);
|
||||
let client = cx.global::<Arc<Client>>().clone();
|
||||
|
@ -255,6 +256,7 @@ impl FeedbackModal {
|
|||
let prompt = cx.prompt(
|
||||
PromptLevel::Critical,
|
||||
FEEDBACK_SUBMISSION_ERROR_TEXT,
|
||||
None,
|
||||
&["OK"],
|
||||
);
|
||||
cx.spawn(|_, _cx| async move {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue