Merge pull request #2101 from kevinstsauveur/1583-vault-state-in-title-tray

Show vault locked/unlocked state in the vault title in the tray menu

Closes #1583
This commit is contained in:
Armin Schrenk 2022-03-22 12:45:21 +01:00 committed by GitHub
commit 303f84166f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,6 +91,8 @@ class TrayMenuController {
unlockItem.addActionListener(createActionListenerForVault(vault, this::unlockVault));
submenu.add(unlockItem);
} else if (vault.isUnlocked()) {
submenu.setLabel("* ".concat(submenu.getLabel()));
MenuItem lockItem = new MenuItem(resourceBundle.getString("traymenu.vault.lock"));
lockItem.addActionListener(createActionListenerForVault(vault, this::lockVault));
submenu.add(lockItem);