feat: "add to album" shortcut and generic menu option shortcuts #15056
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a shortcut for "add to album" in the photo grid view by adding a
shortcut
prop to<MenuOption>
, which both registers the shortcut for as long as the menu option exists and shows a label for the key chord in the menu.As a user, I'd like to be able to perform more actions in the Immich web UI with the keyboard. This change should allow more shortcuts to be added to existing actions with little extra code. For now I just added the one shortcut, while hoping that eventually most other menu items will get a shortcut as well.
I'm not particular about the shortcut chosen (L) or the key chord label format, so I'm open to suggestions.