mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-11 02:44:15 +00:00
draft 31 status code implementation
This commit is contained in:
parent
4b3ea84f39
commit
492e3bb2ea
@ -242,8 +242,26 @@ impl Page {
|
|||||||
}
|
}
|
||||||
None => todo!(),
|
None => todo!(),
|
||||||
};
|
};
|
||||||
// @TODO
|
|
||||||
},
|
},
|
||||||
|
// Redirect (@TODO implement limits to auto-redirect)
|
||||||
|
"31" => {
|
||||||
|
// Update meta
|
||||||
|
meta.borrow_mut().mime = Some(Mime::TextGemini);
|
||||||
|
meta.borrow_mut().title = Some(gformat!("Redirect"));
|
||||||
|
|
||||||
|
// Select widget
|
||||||
|
match parts.get(3) {
|
||||||
|
Some(source) => {
|
||||||
|
let _ = content.reset(
|
||||||
|
content::Mime::TextGemini,
|
||||||
|
&uri,
|
||||||
|
&gformat!("# Redirect\nConfirm:\n=> {source}")
|
||||||
|
);
|
||||||
|
},
|
||||||
|
None => todo!(),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// @TODO
|
||||||
_ => {
|
_ => {
|
||||||
meta.borrow_mut().title = Some(gformat!("Oops"));
|
meta.borrow_mut().title = Some(gformat!("Oops"));
|
||||||
meta.borrow_mut().description = Some(gformat!("Status {code} not supported"));
|
meta.borrow_mut().description = Some(gformat!("Status {code} not supported"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user