-
-
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
Allow to choose database from unlock dialog for Auto-Type and Browser [$150] #2322
Comments
Very comprehensive, thank you! I could have swore this was reported before, but I cannot find it. |
The Database, DatabaseWidget, and DatabaseTabWidget classes share many responsibilities in inconsistent ways resulting in impenetrable and unmaintainable code and a diverse set of bugs and architecture restrictions. This patch reworks the architecture, responsibilities of, and dependencies between these classes. The core changes are: * Move loading and saving logic from widgets into the Database class * Get rid of the DatabaseManagerStruct and move all the information contained in it into the Database * Let database objects keep track of modifications and dirty/clean state instead of handing this to external widgets * Move GUI interactions for loading and saving from the DatabaseTabWidget into the DatabaseWidget (resolves #2494 as a side-effect) * Heavily clean up DatabaseTabWidget and degrade it to a slightly glorified QTabWidget * Use QSharedPointers for all Database objects * Remove the modifiedImmediate signal and replace it with a markAsModified() method * Implement proper tabName() method instead of reading back titles from GUI widgets (resolves #1389 and its duplicates #2146 #855) * Fix unwanted AES-KDF downgrade if database uses Argon2 and has CustomData * Improve code This patch is also the first major step towards solving issues #476 and #2322.
@droidmonkey @phoerious is it possible to put a bounty on individual issue? I would like to donate some money for this particular thing. |
I think that would be reasonable. This feature has been sitting on the back burner for far too long. |
Yup I'll throw $100 on it. This is a fair amount of work and that might entice someone. I need to seed some more bounties around here. |
I felt the Christmas spirit, $150 now on bounty! https://www.bountysource.com/issues/63849610-feature-request-improve-autotype-with-several-databases |
Added $50 to the bounty |
@droidmonkey @phoerious what might an implementation of this feature look like, especially considering the changes in 2.6.0 which use this for unlocking via browser? Personally, I like switching between tab pages because they respond to Ctrl-PageUp/PageDown shortcuts which I have bound to mouse buttons and that makes switching just a single click. Other designs could be a drop-down list or some other sort of list on the unlock dialog. Currently, it looks like a DatabaseOpenDialog is tied to each DatabaseTabWidget and thus one database, so it might require more refactoring than I first expected to be able to present multiple database options in the unlock dialog. Could DatabaseOpenDialog be made more generic and accept a list of DatabaseWidget pointers and it can create a series of tabs that switch between a DatabaseOpenWidget for each? I'd love to hack on this and come up with an implementation (if nobody else is taking on the challenge) but am having trouble knowing the best place to start. |
To me this looks like a simple drop down choice above the credential fields to choose the database you want |
When showing the database unlock dialog from browser or auto-type and there's more than one open database, replace the filename label with a drop-down box of all available files. Switching the filename here will change the active tab of the main window and unlock it. This is the first part of an implementation for keepassxreboot#2322 TODO/Limitations: * The drop-down list should show only locked databases rather than all open databases. * The drop-down should dynamically respond if the set of open database tabs is changed (e.g. if the user closes a database in the main window while the unlock dialog is open) * No handling for the case where the active database is unlocked but has no matching credentials, and there's other locked databases open ("Case 2" in the github issue)
UX design question: are there any objections to setting When the open dialog is a non-modal window, the main UI can still be open and arbitrarily interacted with, including opening/closing/locking/unlocking databases that the open dialog may be targeting. Making DatabaseOpenDialog modal blocks input to the main application, eliminating a big set of corner cases. (Actually handling those corner cases is possible, but involves setting up quite a few signals between DatabaseOpenDialog and its parent DatabaseTabWidget and the code gets a bit messy) |
The whole sequence needs refactoring and requires careful handling. |
When showing the database unlock dialog from browser or auto-type and there's more than one open database, replace the filename label with a drop-down box of all available files. Switching the filename here will change the active tab of the main window and unlock it. This implements the major feature desired by [1] and the noticeable UX regression between 2.5 and 2.6 when working with multiple databases on an auto-lock timer. Notes: * Make the DatabaseOpenDialog window ApplicationModal so that it blocks input to the main UI when open. This avoids a number of corner cases that would otherwise pop up if opening/closing or locking/unlocking extra database tabs in the background. * This does not handle auto-type/browser scenarios where the active database is unlocked but has no matching credentials, and there's other locked databases open which the user could be prompted to unlock ("Case 2" in the issue). [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] keepassxreboot#2322
Cherry-pick ed99fe6, the latest from my PR 2021-08-23. When showing the database unlock dialog from browser or auto-type and there's more than one open database, add tabs to the unlock dialog so that the user can choose which database to unlock. This implements part of [1] and improves the UX when working with multiple databases after version 2.6 switched to using the dialog for browser unlock. Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog. [1] https://github .com/keepassxreboot/issues/2322
* Closes keepassxreboot#2322 * Show locked databases in tabbed interface in unlock dialog for browser and auto-type workflows. * Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog.
* Closes #2322 * Show locked databases in tabbed interface in unlock dialog for browser and auto-type workflows. * Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog.
Thank you very much for this feature!
Otherwise, when opening the session, the password request might be positioned on one of the secondary auto-open databases (of which we do not have the password in mind)... Under keepass, I use the triggers to put the focus always on the first database whenever opening or closing any base. (FYI triggers will not be implemented: #1016 (comment)) |
Current Behavior
if you have several databases and press your global auto-type key, keepassxc tries to find the password in the currently unlocked databases or asks you to unlock the last database. Consider having several databases (like private/work, or several project-keepass-files). If you press the global autot-type key, you manually have to unlock the database where the password is stored in.
Possible Solution
All Cases occur after the global auto-key is pressed
Case 1: All databases are locked
Ask which database to unlock (or display the password-filed for opening and give the user a possibility to switch to another db)
Case 2: A database is unlocked but password is not found
Display the currently unlocked DBs If autotype is pressed, ask the user if another database should be unlocked
Case 3: A database is unlocked, some password is found
Give the user the possibility to unlock another DB.
Operating system: Linux (but I expect everywhere)
The text was updated successfully, but these errors were encountered: