Add version strings to files

This commit is contained in:
jude 2023-10-08 12:21:38 +01:00
parent 5524215786
commit 145711fa5d
4 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "reminder-rs"
version = "1.6.45"
version = "1.6.46"
authors = ["Jude Southworth <judesouthworth@pm.me>"]
edition = "2021"
license = "AGPL-3.0 only"

View File

@ -1,6 +1,6 @@
[package]
name = "reminder_web"
version = "0.1.0"
version = "0.1.1"
authors = ["jellywx <judesouthworth@pm.me>"]
edition = "2018"

View File

@ -661,7 +661,8 @@ async fn create_database_channel(
#[get("/")]
pub async fn dashboard_home(cookies: &CookieJar<'_>) -> Result<Template, Redirect> {
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<Template, Redirec
#[get("/<_..>")]
pub async fn dashboard(cookies: &CookieJar<'_>) -> Result<Template, Redirect> {
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"))

View File

@ -27,7 +27,7 @@
<link rel="stylesheet" href="/static/css/bulma.min.css">
<link rel="stylesheet" href="/static/css/fa.css">
<link rel="stylesheet" href="/static/css/font.css">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/style.css?v{{ version }}">
<link rel="stylesheet" href="/static/css/dtsel.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tributejs/5.1.3/tribute.css" integrity="sha512-GnwBnXd+ZGO9CdP343MUr0jCcJXCr++JVtQRnllexRW2IDq4Zvrh/McTQjooAKnSUbXZ7wamp7AQSweTnfMVoA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
@ -381,9 +381,9 @@
<script src="/static/js/iro.js"></script>
<script src="/static/js/dtsel.js"></script>
<script src="/static/js/interval.js"></script>
<script src="/static/js/timezone.js" defer></script>
<script src="/static/js/main.js" defer></script>
<script src="/static/js/interval.js?v{{ version }}"></script>
<script src="/static/js/timezone.js?v{{ version }}" defer></script>
<script src="/static/js/main.js?v{{ version }}" defer></script>
</body>
</html>