Browse Source

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
Armin Schrenk 3 năm trước cách đây
mục cha
commit
303f84166f

+ 2 - 0
src/main/java/org/cryptomator/ui/traymenu/TrayMenuController.java

@@ -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);