mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-28 20:14:13 +00:00
remove extra referencers
This commit is contained in:
parent
4342796d1a
commit
9d806c2773
@ -232,7 +232,7 @@ impl Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
self.meta.set_status(Status::Reload).set_title(&"Loading..");
|
self.meta.set_status(Status::Reload).set_title("Loading..");
|
||||||
self.action_update.activate(Some(&id));
|
self.action_update.activate(Some(&id));
|
||||||
|
|
||||||
// Route by request
|
// Route by request
|
||||||
@ -245,7 +245,7 @@ impl Page {
|
|||||||
scheme => {
|
scheme => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
|
|
||||||
// Update widget
|
// Update widget
|
||||||
self.content
|
self.content
|
||||||
@ -496,7 +496,7 @@ impl Page {
|
|||||||
gemini::client::response::meta::Status::SensitiveInput => {
|
gemini::client::response::meta::Status::SensitiveInput => {
|
||||||
// Format response
|
// Format response
|
||||||
let status = Status::Input;
|
let status = Status::Input;
|
||||||
let title = &"Input expected";
|
let title = "Input expected";
|
||||||
let description = match response.data() {
|
let description = match response.data() {
|
||||||
Some(data) => data.value().as_str(),
|
Some(data) => data.value().as_str(),
|
||||||
None => title,
|
None => title,
|
||||||
@ -508,14 +508,14 @@ impl Page {
|
|||||||
input.set_new_sensitive(
|
input.set_new_sensitive(
|
||||||
action_page_open,
|
action_page_open,
|
||||||
uri,
|
uri,
|
||||||
Some(&description),
|
Some(description),
|
||||||
Some(1024),
|
Some(1024),
|
||||||
),
|
),
|
||||||
_ =>
|
_ =>
|
||||||
input.set_new_response(
|
input.set_new_response(
|
||||||
action_page_open,
|
action_page_open,
|
||||||
uri,
|
uri,
|
||||||
Some(&description),
|
Some(description),
|
||||||
Some(1024),
|
Some(1024),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
@ -542,7 +542,7 @@ impl Page {
|
|||||||
// Set children component
|
// Set children component
|
||||||
let text_gemini = content.to_text_gemini(
|
let text_gemini = content.to_text_gemini(
|
||||||
&uri,
|
&uri,
|
||||||
&buffer.data()
|
buffer.data()
|
||||||
);
|
);
|
||||||
|
|
||||||
let title = match text_gemini.meta_title() {
|
let title = match text_gemini.meta_title() {
|
||||||
@ -560,7 +560,7 @@ impl Page {
|
|||||||
Err((reason, message)) => {
|
Err((reason, message)) => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
let description = match reason {
|
let description = match reason {
|
||||||
gemini::client::response::data::text::Error::InputStream => match message {
|
gemini::client::response::data::text::Error::InputStream => match message {
|
||||||
Some(error) => gformat!("{error}"),
|
Some(error) => gformat!("{error}"),
|
||||||
@ -633,7 +633,7 @@ impl Page {
|
|||||||
Err(reason) => {
|
Err(reason) => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
|
|
||||||
// Update widget
|
// Update widget
|
||||||
content
|
content
|
||||||
@ -652,7 +652,7 @@ impl Page {
|
|||||||
Err((error, reason)) => {
|
Err((error, reason)) => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
let description = match reason {
|
let description = match reason {
|
||||||
Some(message) => gformat!("{message}"),
|
Some(message) => gformat!("{message}"),
|
||||||
None => match error {
|
None => match error {
|
||||||
@ -691,7 +691,7 @@ impl Page {
|
|||||||
_ => {
|
_ => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
let description = gformat!("Content type not supported");
|
let description = gformat!("Content type not supported");
|
||||||
|
|
||||||
// Update widget
|
// Update widget
|
||||||
@ -732,7 +732,7 @@ impl Page {
|
|||||||
if is_external_uri(&resolved_uri, &uri) {
|
if is_external_uri(&resolved_uri, &uri) {
|
||||||
// Update meta
|
// Update meta
|
||||||
meta.set_status(Status::Failure)
|
meta.set_status(Status::Failure)
|
||||||
.set_title(&"Oops");
|
.set_title("Oops");
|
||||||
|
|
||||||
// Show placeholder with manual confirmation to continue @TODO status page?
|
// Show placeholder with manual confirmation to continue @TODO status page?
|
||||||
content.to_text_gemini(
|
content.to_text_gemini(
|
||||||
@ -746,7 +746,7 @@ impl Page {
|
|||||||
} else if meta.redirect_count() > Some(5) {
|
} else if meta.redirect_count() > Some(5) {
|
||||||
// Update meta
|
// Update meta
|
||||||
meta.set_status(Status::Failure)
|
meta.set_status(Status::Failure)
|
||||||
.set_title(&"Oops");
|
.set_title("Oops");
|
||||||
|
|
||||||
// Show placeholder with manual confirmation to continue @TODO status page?
|
// Show placeholder with manual confirmation to continue @TODO status page?
|
||||||
content.to_text_gemini(
|
content.to_text_gemini(
|
||||||
@ -772,7 +772,7 @@ impl Page {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.set_status(Status::Redirect) // @TODO is this status really wanted?
|
.set_status(Status::Redirect) // @TODO is this status really wanted?
|
||||||
.set_title(&"Redirect");
|
.set_title("Redirect");
|
||||||
|
|
||||||
// Reload page to apply redirection
|
// Reload page to apply redirection
|
||||||
action_page_load.activate(None);
|
action_page_load.activate(None);
|
||||||
@ -780,7 +780,7 @@ impl Page {
|
|||||||
},
|
},
|
||||||
Err(reason) => {
|
Err(reason) => {
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
|
|
||||||
meta.set_status(status)
|
meta.set_status(status)
|
||||||
.set_title(title);
|
.set_title(title);
|
||||||
@ -794,7 +794,7 @@ impl Page {
|
|||||||
}
|
}
|
||||||
Err(reason) => {
|
Err(reason) => {
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
|
|
||||||
meta.set_status(status)
|
meta.set_status(status)
|
||||||
.set_title(title);
|
.set_title(title);
|
||||||
@ -808,7 +808,7 @@ impl Page {
|
|||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
|
|
||||||
meta.set_status(status)
|
meta.set_status(status)
|
||||||
.set_title(title);
|
.set_title(title);
|
||||||
@ -825,7 +825,7 @@ impl Page {
|
|||||||
_ => {
|
_ => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
|
|
||||||
// Update widget
|
// Update widget
|
||||||
content
|
content
|
||||||
@ -845,7 +845,7 @@ impl Page {
|
|||||||
Err((reason, message)) => {
|
Err((reason, message)) => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
let description = match reason {
|
let description = match reason {
|
||||||
// Common
|
// Common
|
||||||
gemini::client::response::meta::Error::InputStream => match message {
|
gemini::client::response::meta::Error::InputStream => match message {
|
||||||
@ -912,7 +912,7 @@ impl Page {
|
|||||||
Err(reason) => {
|
Err(reason) => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
|
|
||||||
// Update widget
|
// Update widget
|
||||||
content
|
content
|
||||||
@ -933,7 +933,7 @@ impl Page {
|
|||||||
Err(reason) => {
|
Err(reason) => {
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
let title = &"Oops";
|
let title = "Oops";
|
||||||
|
|
||||||
// Update widget
|
// Update widget
|
||||||
content
|
content
|
||||||
|
Loading…
x
Reference in New Issue
Block a user