From 063f748ae1ad8f5abc66dd2eb38e7fd4b3ea27fe Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 21 Jun 2020 23:51:09 +0100 Subject: [PATCH] wip loading --- src/bin/server.rs | 8 ++++++-- templates/loading.tera | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 templates/loading.tera diff --git a/src/bin/server.rs b/src/bin/server.rs index c6694c19..c9589c39 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -35,10 +35,14 @@ impl<'r> FromParam<'r> for CheckedResourceLeaf { } } +#[derive(Serialize,Debug)] +struct LoadingRenderContext<'r> { + token : &'r str, +} + #[get("/")] fn loading(token : InstanceAccess) -> Result { - let _ = token; - let c = TestRenderContext { }; + let c = LoadingRenderContext { token : token.raw_token }; Ok(Template::render("loading",&c)) } diff --git a/templates/loading.tera b/templates/loading.tera new file mode 100644 index 00000000..869ce576 --- /dev/null +++ b/templates/loading.tera @@ -0,0 +1,3 @@ + +

Loading!

+ -- 2.30.2