diff --git a/filed/src/web/pages.rs b/filed/src/web/pages.rs
index 6bf88ad..19339ad 100644
--- a/filed/src/web/pages.rs
+++ b/filed/src/web/pages.rs
@@ -31,6 +31,13 @@ pub struct Uploaded {
pub env: Env
}
+#[derive(Template)]
+#[template( path = "passworded-files.html" )]
+#[allow(dead_code)]
+pub struct PasswordedFilesHelpPage {
+ pub env: Env
+}
+
pub async fn uploaded(query: HashMap, state: SharedState) -> Result, Rejection> {
@@ -67,7 +74,22 @@ pub fn index_f(state: SharedState) -> impl Filter Result, Rejection> {
+ let rendered = PasswordedFilesHelpPage {
+ env: state.env.clone()
+ };
+ Ok(warp::reply::html(rendered.render().map_err(|err| warp::reject::custom(HttpReject::AskamaError(err)))?))
+}
+
+pub fn passworded_f(state: SharedState) -> impl Filter + Clone {
+ warp::path!("password-files")
+ .and(warp::path::end())
+ .map(move || state.clone())
+ .and_then(passworded)
+}
+
pub fn get_routes(state: SharedState) -> impl Filter + Clone {
index_f(state.clone())
.or(uploaded_f(state.clone()))
+ .or(passworded_f(state))
}
\ No newline at end of file
diff --git a/filed/templates/index.html b/filed/templates/index.html
index b147042..a6777b9 100644
--- a/filed/templates/index.html
+++ b/filed/templates/index.html
@@ -42,15 +42,30 @@
-
-
-
-
+