register scuttlebutt status routes and pass standalone var to home template
This commit is contained in:
parent
205dd145b4
commit
44b68a8b71
|
@ -2,6 +2,7 @@ use rocket::{get, request::FlashMessage};
|
|||
use rocket_dyn_templates::{tera::Context, Template};
|
||||
|
||||
use crate::routes::authentication::Authenticated;
|
||||
use crate::STANDALONE_MODE;
|
||||
|
||||
// HELPERS AND ROUTES FOR / (HOME PAGE)
|
||||
|
||||
|
@ -11,6 +12,8 @@ pub fn home(_auth: Authenticated) -> Template {
|
|||
context.insert("flash_name", &None::<()>);
|
||||
context.insert("flash_msg", &None::<()>);
|
||||
context.insert("title", &None::<()>);
|
||||
// pass in mode so we can define appropriate urls in template
|
||||
context.insert("standalone_mode", &*STANDALONE_MODE);
|
||||
|
||||
Template::render("home", &context.into_json())
|
||||
}
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
pub mod device;
|
||||
pub mod network;
|
||||
pub mod scuttlebutt;
|
||||
|
|
Loading…
Reference in New Issue