diff --git a/README.md b/README.md index fa69ea7..c89cff3 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,11 @@ A [demo](https://fileshelter-demo.poupon.dev) instance is available, with the fo - Period of validity, from one hour to many years - Optional password protection (download and/or upload) - Practically unique links, using [UUID](https://fr.wikipedia.org/wiki/Universal_Unique_Identifier) +- Create a zip file on the fly for shares containing multiple files - Private edit links, used to remove the files or to check the download counters - Terms Of Service support, fully or partially customizable - Multiple language support -- Low memory requirements: the demo instance runs on a _Raspberry Pi Zero W_ +- Low memory requirements: the demo instance runs on a _Raspberry Pi_ - Command line tools to list and create shares Once the expiry date is reached, the share is no longer available for download. The files are actually deleted roughly two hours after the share has expired. This is to make sure to not interrupt a download in progress. diff --git a/approot/templates.xml b/approot/templates.xml index 2c65bbd..dbc1041 100644 --- a/approot/templates.xml +++ b/approot/templates.xml @@ -82,24 +82,16 @@
${tr:msg-share-create-protected-by-password}
-
-
- -
- ${password} -
-
- ${password-info} -
-
-
-
- ${unlock-btn class="btn-primary"} -
+
+
+ + ${password class="form-control"} +
${password-info}
+
+ ${unlock-btn class="btn-primary"} +
@@ -119,24 +111,16 @@
${tr:msg-share-protected-by-password}
-
-
- -
- ${password} -
-
- ${password-info} -
-
-
-
- ${unlock-btn} -
+
+
+ + ${password class="form-control"} +
${password-info}
+
+ ${unlock-btn class="btn-primary"} +
diff --git a/src/fileshelter/ui/ShareCreate.cpp b/src/fileshelter/ui/ShareCreate.cpp index d2deec8..bf998d5 100644 --- a/src/fileshelter/ui/ShareCreate.cpp +++ b/src/fileshelter/ui/ShareCreate.cpp @@ -72,7 +72,7 @@ namespace UserInterface if (!wApp->internalPathMatches("/share-create")) return; - if (PasswordUtils::isUploadPassordRequired()) + if (!_isPasswordVerified && PasswordUtils::isUploadPassordRequired()) displayPassword(); else displayCreate(); @@ -84,6 +84,7 @@ namespace UserInterface ShareCreatePassword* view {addNew()}; view->success().connect([=] { + _isPasswordVerified = true; clear(); displayCreate(); }); diff --git a/src/fileshelter/ui/ShareCreate.hpp b/src/fileshelter/ui/ShareCreate.hpp index 2ceeccb..e4f3699 100644 --- a/src/fileshelter/ui/ShareCreate.hpp +++ b/src/fileshelter/ui/ShareCreate.hpp @@ -41,6 +41,7 @@ namespace UserInterface void displayPassword(); const std::filesystem::path& _workingDirectory; + bool _isPasswordVerified{}; }; } // namespace UserInterface