mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-03 01:55:27 +00:00
hide input forms on handle begin
This commit is contained in:
parent
0023f6f299
commit
9ba99417ae
1 changed files with 318 additions and 311 deletions
|
|
@ -175,7 +175,13 @@ fn handle(
|
||||||
{
|
{
|
||||||
let subject = subject.clone();
|
let subject = subject.clone();
|
||||||
let redirects = redirects.clone();
|
let redirects = redirects.clone();
|
||||||
move |result| match result {
|
move |result| {
|
||||||
|
// Remove input forms when redirection expected has been not applied (e.g. failure status)
|
||||||
|
// @TODO implement input data recovery on error (it's also available before unset, but reference lost at this point)
|
||||||
|
subject.page.input.unset();
|
||||||
|
|
||||||
|
// Begin result handle
|
||||||
|
match result {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
match response.meta.status {
|
match response.meta.status {
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#input-expected
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#input-expected
|
||||||
|
|
@ -502,6 +508,7 @@ fn handle(
|
||||||
redirects.replace(0); // reset
|
redirects.replace(0); // reset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue