diff --git a/Cargo.toml b/Cargo.toml index bedea495..94ec0903 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bitvault" -version = "1.1.2" +version = "1.1.3" edition = "2021" authors = ["Mario Stöckl , originally Daniel Szabo and contributors"] license = "GPL-3" diff --git a/src/endpoints/auth_admin.rs b/src/endpoints/auth_admin.rs index dc7dda5f..74f09c96 100644 --- a/src/endpoints/auth_admin.rs +++ b/src/endpoints/auth_admin.rs @@ -4,6 +4,7 @@ use crate::args::{Args, ARGS}; use actix_web::{get, web, HttpResponse}; use askama::Template; + #[derive(Template)] #[template(path = "auth_admin.html")] struct AuthAdmin<'a> { diff --git a/src/endpoints/auth_upload.rs b/src/endpoints/auth_upload.rs index 14ddadc1..ffaf93ea 100644 --- a/src/endpoints/auth_upload.rs +++ b/src/endpoints/auth_upload.rs @@ -9,6 +9,7 @@ use crate::AppState; use actix_web::{get, web, HttpResponse}; use askama::Template; + #[derive(Template)] #[template(path = "auth_upload.html")] struct AuthPasta<'a> { diff --git a/src/endpoints/create.rs b/src/endpoints/create.rs index aaa27754..84f2d4a4 100644 --- a/src/endpoints/create.rs +++ b/src/endpoints/create.rs @@ -10,6 +10,7 @@ use actix_multipart::Multipart; use actix_web::error::ErrorBadRequest; use actix_web::{get, web, Error, HttpResponse, Responder}; use askama::Template; + use bytesize::ByteSize; use futures::TryStreamExt; use log::warn; @@ -17,9 +18,6 @@ use rand::Rng; use std::io::Write; use std::time::{SystemTime, UNIX_EPOCH}; -fn field_name_matches(field_name: Option<&str>, expected: &str) -> bool { - field_name.map_or(false, |name| name == expected) -} #[derive(Template)] #[template(path = "index.html")] diff --git a/src/endpoints/edit.rs b/src/endpoints/edit.rs index aa75baa0..7de07a59 100644 --- a/src/endpoints/edit.rs +++ b/src/endpoints/edit.rs @@ -10,6 +10,7 @@ use crate::{AppState, Pasta, ARGS}; use actix_multipart::Multipart; use actix_web::{get, post, web, Error, HttpResponse}; use askama::Template; + use futures::TryStreamExt; #[derive(Template)] diff --git a/src/endpoints/errors.rs b/src/endpoints/errors.rs index de6e6392..d28ffd8a 100644 --- a/src/endpoints/errors.rs +++ b/src/endpoints/errors.rs @@ -3,6 +3,7 @@ use actix_web::{Error, HttpResponse}; use askama::Template; + use crate::args::{Args, ARGS}; #[derive(Template)] diff --git a/src/endpoints/guide.rs b/src/endpoints/guide.rs index e21a6f27..c0f66108 100644 --- a/src/endpoints/guide.rs +++ b/src/endpoints/guide.rs @@ -4,6 +4,7 @@ use crate::args::{Args, ARGS}; use actix_web::{get, HttpResponse}; use askama::Template; + #[derive(Template)] #[template(path = "guide.html")] struct Guide<'a> { diff --git a/src/endpoints/list.rs b/src/endpoints/list.rs index 3dee0698..0a404221 100644 --- a/src/endpoints/list.rs +++ b/src/endpoints/list.rs @@ -3,6 +3,7 @@ use actix_web::{get, web, HttpResponse}; use askama::Template; + use crate::args::{Args, ARGS}; use crate::pasta::Pasta; use crate::util::misc::remove_expired; diff --git a/src/endpoints/pasta.rs b/src/endpoints/pasta.rs index 781b373a..fdb87cf7 100644 --- a/src/endpoints/pasta.rs +++ b/src/endpoints/pasta.rs @@ -11,6 +11,7 @@ use crate::AppState; use actix_multipart::Multipart; use actix_web::{get, post, web, Error, HttpResponse}; use askama::Template; + use futures::TryStreamExt; use magic_crypt::{new_magic_crypt, MagicCryptTrait}; use std::time::{SystemTime, UNIX_EPOCH}; diff --git a/src/endpoints/qr.rs b/src/endpoints/qr.rs index 3296708c..0ea792ca 100644 --- a/src/endpoints/qr.rs +++ b/src/endpoints/qr.rs @@ -10,6 +10,7 @@ use crate::AppState; use actix_web::{get, web, HttpResponse}; use askama::Template; + #[derive(Template)] #[template(path = "qr.html")] struct QRTemplate<'a> { diff --git a/src/endpoints/remove.rs b/src/endpoints/remove.rs index f8599f76..5aecd706 100644 --- a/src/endpoints/remove.rs +++ b/src/endpoints/remove.rs @@ -13,6 +13,7 @@ use crate::util::hashids::to_u64 as hashid_to_u64; use crate::util::misc::{decrypt, remove_expired}; use crate::AppState; use askama::Template; + use std::fs; #[get("/remove/{id}")] diff --git a/src/util/version.rs b/src/util/version.rs index a1c17c82..d3ec06a5 100644 --- a/src/util/version.rs +++ b/src/util/version.rs @@ -24,10 +24,10 @@ pub static CURRENT_VERSION: Version = Version { major: 1, minor: 1, patch: 1, - title: Cow::Borrowed("1.1.2"), - long_title: Cow::Borrowed("Version 1.1.2, Build 20240621"), + title: Cow::Borrowed("1.1.3"), + long_title: Cow::Borrowed("Version 1.1.3, Build 20241024"), description: Cow::Borrowed("This version includes bug fixes and smaller design enhancements."), - date: Cow::Borrowed("2024-06-21"), + date: Cow::Borrowed("2024-10-24"), update_type: Cow::Borrowed("beta"), }; diff --git a/templates/footer.html b/templates/footer.html index 8eccb84a..8ac6733f 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -6,7 +6,7 @@

{% if args.footer_text.as_ref().is_none() %} BitVault, forked from MicroBin by Dániel Szabó and the FOSS - Community. {%- else %} {{ args.footer_text.as_ref().unwrap() | safe }} {%- + Community. {%- else %} {{ args.footer_text.as_ref().unwrap() }} {%- endif %}