-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add New/Preview Entry Attachments dialog and functionality #11637
Add New/Preview Entry Attachments dialog and functionality #11637
Conversation
eae01f6
to
df95ad6
Compare
Can we pair this with an attachment preview option? Same dialog just in reverse. Can also add an image control on there in case contents are not text. |
47d1bb0
to
abf2159
Compare
@droidmonkey Added text and image preview button. |
Love it! |
Supported types: - text - image Fixes keepassxreboot#11506
abf2159
to
e00aec9
Compare
Maybe we should remove the "Preview" button and open supported formats by default in the preview window? And for unsupported formats, add a warning that the file will be decrypted and opened in other software. For an example you can see how it is implemented in classic keepass2. There is also a bug with the preview window style, you can even see it on the screenshots above. If you open it from the entry, everything is fine, if you open it from the "preview panel", it doesn't follow the style. |
I will fix this issue with the style. It's strange, because the same window is shown |
If we replace the "Open" button, then we should be able to edit the file, but I don't understand how to edit non-text files (PDF, images, ...). I want to support preview PDF, because some services save recovery codes in this format. |
@xboxones1 I fixed styles. I'll check the keepass2 to understand its behavior. @droidmonkey What do you think about this? |
Refactor EntryAttachmentsWidget and PreviewEntryAttachmentsDialog to remove unnecessary parent references Fixes keepassxreboot#11506
1c1483a
to
3f91ffe
Compare
It works great, although for some reason wouldn't let me preview keeagent.settings which is XML (I think, maybe its Base64). I think we can make a couple more enhancements. See above for button adds. We can likely get rid of "Rename" by allowing for direct rename within the list widget. We should create a little grouping in the button list as well: |
Added support for xml, json, yaml, soap, protobuf. Next time I'll start refactoring the UI |
@droidmonkey I discovered strange behavior: |
66e0e43
to
c941cda
Compare
Well, that will need to be fixed 🫣 |
@w15eacre I am moving a couple things around, MimeTypes should be in core/Tools.h/cpp for example. Also trying to avoid use of std::arrays since we are singled up on Qt |
Done, also made several improvements to the code. Only one annoying issue remains, if you save an attachment and it does not prompt to overwrite the file, the selection will deselect. I can't see any reason for this in the code, it appears to be a qt bug. |
* Reduce multi-selection to single selection when previewing to avoid opening and saving more than the previewed attachment * Don't share EntryAttachments with the preview widget, just pass name/data pair * Reduce number of single-use function calls
d4edff5
to
23c567e
Compare
I can't reproduce this problem. |
…uttons on the widget
207a15f
to
6feea6a
Compare
* Fix sizing of attachment columns * Parent new/preview attachment dialog to widget so it closes properly on database auto-lock * Fix targeting of preview widget styling to not impact unintended children * Add padding to attachment table items
I love everything about this, really enhances the attachment experience! |
Closes #11506 Closes #3383 * This change adds a new opportunity to add attachments that don’t require a real file in the file system. * Add a new dialog window to add and preview attachments and integrate it into the EntryAttachmentsWidget. * Attachment preview support for images and plain text files. Additional enhancements: * Fix sizing of attachment columns * Add padding to attachment table items * Fix targeting of preview widget styling to not impact unintended children
…eboot#11637) Closes keepassxreboot#11506 Closes keepassxreboot#3383 * This change adds a new opportunity to add attachments that don’t require a real file in the file system. * Add a new dialog window to add and preview attachments and integrate it into the EntryAttachmentsWidget. * Attachment preview support for images and plain text files. Additional enhancements: * Fix sizing of attachment columns * Add padding to attachment table items * Fix targeting of preview widget styling to not impact unintended children
Screenshots
Testing strategy
Type of change
Closes #3383
Closes #11506