From 145711fa5d53b11298eaa172da898ebdff5b9fd2 Mon Sep 17 00:00:00 2001 From: jude Date: Sun, 8 Oct 2023 12:21:38 +0100 Subject: [PATCH] Add version strings to files --- Cargo.toml | 2 +- web/Cargo.toml | 2 +- web/src/routes/dashboard/mod.rs | 6 ++++-- web/templates/dashboard.html.tera | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 92d5067..0c083ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder-rs" -version = "1.6.45" +version = "1.6.46" authors = ["Jude Southworth "] edition = "2021" license = "AGPL-3.0 only" diff --git a/web/Cargo.toml b/web/Cargo.toml index 652e492..c963e62 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder_web" -version = "0.1.0" +version = "0.1.1" authors = ["jellywx "] edition = "2018" diff --git a/web/src/routes/dashboard/mod.rs b/web/src/routes/dashboard/mod.rs index f0add8a..56a19d5 100644 --- a/web/src/routes/dashboard/mod.rs +++ b/web/src/routes/dashboard/mod.rs @@ -661,7 +661,8 @@ async fn create_database_channel( #[get("/")] pub async fn dashboard_home(cookies: &CookieJar<'_>) -> Result { if cookies.get_private("userid").is_some() { - let map: HashMap<&str, String> = HashMap::new(); + let mut map = HashMap::new(); + map.insert("version", env!("CARGO_PKG_VERSION")); Ok(Template::render("dashboard", &map)) } else { Err(Redirect::to("/login/discord")) @@ -671,7 +672,8 @@ pub async fn dashboard_home(cookies: &CookieJar<'_>) -> Result")] pub async fn dashboard(cookies: &CookieJar<'_>) -> Result { if cookies.get_private("userid").is_some() { - let map: HashMap<&str, String> = HashMap::new(); + let mut map = HashMap::new(); + map.insert("version", env!("CARGO_PKG_VERSION")); Ok(Template::render("dashboard", &map)) } else { Err(Redirect::to("/login/discord")) diff --git a/web/templates/dashboard.html.tera b/web/templates/dashboard.html.tera index 6d078cb..980f318 100644 --- a/web/templates/dashboard.html.tera +++ b/web/templates/dashboard.html.tera @@ -27,7 +27,7 @@ - + @@ -381,9 +381,9 @@ - - - + + +