Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release candidate v6.1.0 #87

Merged
merged 3 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
48 changes: 16 additions & 32 deletions approot/templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,16 @@
<div class="alert alert-info">
${tr:msg-share-create-protected-by-password}
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2" for="${id:password}">
${tr:msg-password}
</label>
<div class="col-sm-5">
${password}
</div>
<div class="help-block col-sm-5">
${password-info}
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-5">
${unlock-btn class="btn-primary"}
</div>
<div class="row mb-3">
<div class="col-12">
<label class="form-label" for="${id:password}">${tr:msg-password}</label>
${password class="form-control"}
<div class="form-text">${password-info}</div>
</div>
</div>
<div class="mb-3">
${unlock-btn class="btn-primary"}
</div>
</message>

<message id="template-share-created">
Expand All @@ -119,24 +111,16 @@
<div class="alert alert-info">
${tr:msg-share-protected-by-password}
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2" for="${id:password}">
${tr:msg-password}
</label>
<div class="col-sm-5">
${password}
</div>
<div class="help-block col-sm-5">
${password-info}
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-5">
${unlock-btn}
</div>
<div class="row mb-3">
<div class="col-12">
<label class="form-label" for="${id:password}">${tr:msg-password}</label>
${password class="form-control"}
<div class="form-text">${password-info}</div>
</div>
</div>
<div class="mb-3">
${unlock-btn class="btn-primary"}
</div>
</message>

<message id="template-share-download">
Expand Down
3 changes: 2 additions & 1 deletion src/fileshelter/ui/ShareCreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace UserInterface
if (!wApp->internalPathMatches("/share-create"))
return;

if (PasswordUtils::isUploadPassordRequired())
if (!_isPasswordVerified && PasswordUtils::isUploadPassordRequired())
displayPassword();
else
displayCreate();
Expand All @@ -84,6 +84,7 @@ namespace UserInterface
ShareCreatePassword* view {addNew<ShareCreatePassword>()};
view->success().connect([=]
{
_isPasswordVerified = true;
clear();
displayCreate();
});
Expand Down
1 change: 1 addition & 0 deletions src/fileshelter/ui/ShareCreate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace UserInterface
void displayPassword();

const std::filesystem::path& _workingDirectory;
bool _isPasswordVerified{};
};

} // namespace UserInterface
Expand Down
Loading