mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
remove extra lines
This commit is contained in:
parent
37efb30729
commit
898c6d407f
1 changed files with 19 additions and 34 deletions
|
|
@ -216,43 +216,28 @@ fn handle(
|
||||||
page.snap_history();
|
page.snap_history();
|
||||||
}
|
}
|
||||||
redirects.replace(0); // reset
|
redirects.replace(0); // reset
|
||||||
|
let mut i = page.navigation.request.info.borrow_mut();
|
||||||
|
i
|
||||||
|
.add_event(EVENT_COMPLETED.to_string())
|
||||||
|
.set_size(Some(input.as_bytes().len()), None)
|
||||||
|
.unset_mime()
|
||||||
|
.commit();
|
||||||
|
page.navigation.request.update_secondary_icon(&i);
|
||||||
match input {
|
match input {
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-10
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-10
|
||||||
Input::Default(default) => {
|
Input::Default(d) => page.input.set_new_response(
|
||||||
{
|
page.item_action.clone(),
|
||||||
let mut i = page.navigation.request.info.borrow_mut();
|
uri,
|
||||||
i
|
Some(d.message_or_default()),
|
||||||
.add_event(EVENT_COMPLETED.to_string())
|
Some(1024),
|
||||||
.set_size(Some(default.as_bytes().len()), None)
|
),
|
||||||
.unset_mime()
|
|
||||||
.commit();
|
|
||||||
page.navigation.request.update_secondary_icon(&i)
|
|
||||||
}
|
|
||||||
page.input.set_new_response(
|
|
||||||
page.item_action.clone(),
|
|
||||||
uri,
|
|
||||||
Some(default.message().unwrap_or("Input expected")),
|
|
||||||
Some(1024),
|
|
||||||
)
|
|
||||||
},
|
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-11-sensitive-input
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-11-sensitive-input
|
||||||
Input::Sensitive(sensitive) => {
|
Input::Sensitive(s) => page.input.set_new_sensitive(
|
||||||
{
|
page.item_action.clone(),
|
||||||
let mut i = page.navigation.request.info.borrow_mut();
|
uri,
|
||||||
i
|
Some(s.message_or_default()),
|
||||||
.add_event(EVENT_COMPLETED.to_string())
|
Some(1024),
|
||||||
.set_size(Some(sensitive.as_bytes().len()), None)
|
)
|
||||||
.unset_mime()
|
|
||||||
.commit();
|
|
||||||
page.navigation.request.update_secondary_icon(&i)
|
|
||||||
}
|
|
||||||
page.input.set_new_sensitive(
|
|
||||||
page.item_action.clone(),
|
|
||||||
uri,
|
|
||||||
Some(sensitive.message().unwrap_or("Sensitive input expected")),
|
|
||||||
Some(1024),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-20
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-20
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue