mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2024-12-28 12:38:23 +01:00
Messages now have a title and a message
This commit is contained in:
parent
b9fc472120
commit
c4379d4c19
@ -264,7 +264,10 @@ async fn hello_world_handler(
|
|||||||
|
|
||||||
state.templating_engine.render_view(
|
state.templating_engine.render_view(
|
||||||
&settings,
|
&settings,
|
||||||
&View::Message("Hello! There, You, Awesome Creature!".to_string())
|
&View::Message{
|
||||||
|
title: "Hey There!".to_string(),
|
||||||
|
message: "You,You are an awesome Creature!".to_string()
|
||||||
|
},
|
||||||
).await
|
).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ pub enum View {
|
|||||||
Dig { query: DigQuery, result: simple_dns::DnsLookupResult },
|
Dig { query: DigQuery, result: simple_dns::DnsLookupResult },
|
||||||
Index { query: IpQuery, result: IpResult },
|
Index { query: IpQuery, result: IpResult },
|
||||||
Ip { query: IpQuery, result: IpResult },
|
Ip { query: IpQuery, result: IpResult },
|
||||||
Message(String),
|
Message{ title: String, message: String },
|
||||||
#[serde(rename="404")]
|
#[serde(rename="404")]
|
||||||
NotFound,
|
NotFound,
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ impl View {
|
|||||||
View::Dig{..} => "dig",
|
View::Dig{..} => "dig",
|
||||||
View::Index{..} => "index",
|
View::Index{..} => "index",
|
||||||
View::Ip{..} => "ip",
|
View::Ip{..} => "ip",
|
||||||
View::Message(..) => "message",
|
View::Message{..} => "message",
|
||||||
View::NotFound => "404",
|
View::NotFound => "404",
|
||||||
}.to_string()
|
}.to_string()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user