Skip to content

Commit

Permalink
Merge branch 'develop' for release v6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
epoupon committed Jul 20, 2023
2 parents a4a3b23 + 6a2fb27 commit 4b8d1a2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 34 deletions.
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

0 comments on commit 4b8d1a2

Please sign in to comment.