register scuttlebutt status routes and pass standalone var to home template

This commit is contained in:
glyph 2022-01-18 12:49:47 +02:00
parent 205dd145b4
commit 44b68a8b71
2 changed files with 4 additions and 0 deletions

View File

@ -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())
}

View File

@ -1,2 +1,3 @@
pub mod device;
pub mod network;
pub mod scuttlebutt;