mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-13 06:01:21 +00:00
make status optional
This commit is contained in:
parent
ef64e7e032
commit
35e0e2d47d
@ -264,7 +264,7 @@ impl Page {
|
|||||||
|
|
||||||
match response.header().status() {
|
match response.header().status() {
|
||||||
// 10 | 11
|
// 10 | 11
|
||||||
ResponseStatus::Input | ResponseStatus::SensitiveInput => {
|
Some(ResponseStatus::Input) | Some(ResponseStatus::SensitiveInput) => {
|
||||||
// Format response
|
// Format response
|
||||||
let status = Status::Input;
|
let status = Status::Input;
|
||||||
let title = gformat!("Input expected");
|
let title = gformat!("Input expected");
|
||||||
@ -278,7 +278,7 @@ impl Page {
|
|||||||
|
|
||||||
// Make input form
|
// Make input form
|
||||||
match response.header().status() {
|
match response.header().status() {
|
||||||
ResponseStatus::SensitiveInput =>
|
Some(ResponseStatus::SensitiveInput) =>
|
||||||
input.set_new_sensitive(
|
input.set_new_sensitive(
|
||||||
action_page_open, uri,
|
action_page_open, uri,
|
||||||
Some(&description),
|
Some(&description),
|
||||||
@ -301,7 +301,7 @@ impl Page {
|
|||||||
action_update.activate(Some(&id));
|
action_update.activate(Some(&id));
|
||||||
},
|
},
|
||||||
// 20
|
// 20
|
||||||
ResponseStatus::Success =>
|
Some(ResponseStatus::Success) =>
|
||||||
match response.header().mime() {
|
match response.header().mime() {
|
||||||
Some(ResponseMime::TextGemini) => {
|
Some(ResponseMime::TextGemini) => {
|
||||||
// Update data
|
// Update data
|
||||||
@ -378,7 +378,7 @@ impl Page {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
// 32
|
// 32
|
||||||
ResponseStatus::Redirect => {
|
Some(ResponseStatus::Redirect) => {
|
||||||
// Update meta
|
// Update meta
|
||||||
meta.borrow_mut().status = Some(Status::Redirect);
|
meta.borrow_mut().status = Some(Status::Redirect);
|
||||||
meta.borrow_mut().title = Some(gformat!("Redirect"));
|
meta.borrow_mut().title = Some(gformat!("Redirect"));
|
||||||
@ -404,7 +404,7 @@ impl Page {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// @TODO
|
// @TODO
|
||||||
_ => {
|
None => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = gformat!("Oops");
|
let title = gformat!("Oops");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user