Skip to content

Feature: Show modal when extracting password protected archives #10413

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

Merged
merged 12 commits into from
Nov 14, 2022

Conversation

ferrariofilippo
Copy link
Contributor

@ferrariofilippo ferrariofilippo commented Nov 6, 2022

Resolved / Related Issues
Items resolved / related issues by this PR.

Change List

  • User is prompted for password when extracting an encrypted archive
  • I created a method that tells if an archive is encrypted
  • I moved the creation of destinatioFolder to prevent the folder from being created even when the user presses Cancel
  • I added translations for the Extract button

Others

  • There is a bug with 7z archives, but it also exists in the release version (I'm opening a different issue to track that)

Comments
Note that with the SevenZip library we can pass the password only in the constructor

Validation
How did you test these changes?

  • Built and ran the app

Dialog2
Dialog1
Dialog3

@yaira2
Copy link
Member

yaira2 commented Nov 6, 2022

Do you think we can reuse the existing "extract to" dialog and add the logic for this?

@ferrariofilippo
Copy link
Contributor Author

Do you think we can reuse the existing "extract to" dialog and add the logic for this?

I think I can add the password field to the dialog and make it visible only when the archive is encrypted. Is that ok?

@yaira2
Copy link
Member

yaira2 commented Nov 6, 2022

I think that's acceptable, we'll probably add additional options in the future so having it one dialog will be helpful.

@ferrariofilippo
Copy link
Contributor Author

ferrariofilippo commented Nov 6, 2022

Now when the archive is encrypted it looks like this
Edit. I'm not sure if we should leave Insert archive password

@yaira2
Copy link
Member

yaira2 commented Nov 6, 2022

I'd expect the other options to only show if you click "Extract To"

@ferrariofilippo
Copy link
Contributor Author

ferrariofilippo commented Nov 6, 2022

I'd expect the other options to only show if you click "Extract To"

It already works like that

@yaira2
Copy link
Member

yaira2 commented Nov 6, 2022

I think we'll need to make a couple of changes to the dialog to make it more generic

  1. Change the title to "Extract Archive"
  2. Move the check box to the last row

@yaira2 yaira2 requested a review from gave92 November 7, 2022 16:03
yaira2
yaira2 previously approved these changes Nov 7, 2022
Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good UI wise.

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Nov 14, 2022
@yaira2 yaira2 merged commit 320c163 into files-community:main Nov 14, 2022
@ferrariofilippo ferrariofilippo deleted the ArchivePassword branch November 14, 2022 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Show modal when extracting password protected archives
4 participants