Add New/Preview Entry Attachments dialog and functionality#11637
Add New/Preview Entry Attachments dialog and functionality#11637droidmonkey merged 10 commits intokeepassxreboot:developfrom
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
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
…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