mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
add unsupported status code placeholder
This commit is contained in:
parent
309ef9f758
commit
aa44325dea
@ -359,7 +359,7 @@ impl Page {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private helpers @TODO
|
// Private helpers @TODO move outside
|
||||||
fn load_gemini(&self, uri: Uri) {
|
fn load_gemini(&self, uri: Uri) {
|
||||||
// Use local namespaces @TODO
|
// Use local namespaces @TODO
|
||||||
// use gemini::client::response::
|
// use gemini::client::response::
|
||||||
@ -694,6 +694,26 @@ impl Page {
|
|||||||
|
|
||||||
action_update.activate(Some(&id));
|
action_update.activate(Some(&id));
|
||||||
},
|
},
|
||||||
|
_ => {
|
||||||
|
// Define common data
|
||||||
|
let status = Status::Failure;
|
||||||
|
let title = gformat!("Oops");
|
||||||
|
|
||||||
|
// Update widget
|
||||||
|
content
|
||||||
|
.to_status_failure()
|
||||||
|
.set_title(title.as_str())
|
||||||
|
.set_description(Some("Status code yet not supported"));
|
||||||
|
|
||||||
|
// Update meta
|
||||||
|
meta.replace(Meta {
|
||||||
|
status: Some(status),
|
||||||
|
title: Some(title),
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update window
|
||||||
|
action_update.activate(Some(&id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Err((reason, message)) => {
|
Err((reason, message)) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user