diff --git a/src/main/java/org/cryptomator/common/Constants.java b/src/main/java/org/cryptomator/common/Constants.java index b34c4ad3b..b156554d5 100644 --- a/src/main/java/org/cryptomator/common/Constants.java +++ b/src/main/java/org/cryptomator/common/Constants.java @@ -13,6 +13,7 @@ public interface Constants { String CRYPTOMATOR_FILENAME_GLOB = "*.cryptomator"; URI DEFAULT_KEY_ID = URI.create(MasterkeyFileLoadingStrategy.SCHEME + ":" + MASTERKEY_FILENAME); byte[] PEPPER = new byte[0]; + // Separator used to concatenate Hub username and device name in the filesystem owner identifier. String HUB_USER_DEVICE_SEPARATOR = "&"; } diff --git a/src/main/java/org/cryptomator/common/FilesystemOwnerSupplier.java b/src/main/java/org/cryptomator/common/FilesystemOwnerSupplier.java index 609e6a769..3e18e1981 100644 --- a/src/main/java/org/cryptomator/common/FilesystemOwnerSupplier.java +++ b/src/main/java/org/cryptomator/common/FilesystemOwnerSupplier.java @@ -1,15 +1,17 @@ package org.cryptomator.common; +import java.util.function.Supplier; + /** - * Objects which has some kind of owner. + * Interface marking a class to be used in {@link org.cryptomator.cryptofs.CryptoFileSystemProperties.Builder#withOwnerGetter(Supplier)}. */ @FunctionalInterface public interface FilesystemOwnerSupplier { /** - * Get the object owner. + * Get the filesystem owner. * - * @return the object owner + * @return the filesystem owner */ String getOwner(); diff --git a/src/main/java/org/cryptomator/ui/notification/NotificationController.java b/src/main/java/org/cryptomator/ui/notification/NotificationController.java index d5c524702..9289389b3 100644 --- a/src/main/java/org/cryptomator/ui/notification/NotificationController.java +++ b/src/main/java/org/cryptomator/ui/notification/NotificationController.java @@ -35,7 +35,7 @@ public class NotificationController implements FxController { private static final Logger LOG = LoggerFactory.getLogger(NotificationController.class); private static final DateTimeFormatter LOCAL_TIME_FORMATTER_TEMPLATE = DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT).withZone(ZoneId.systemDefault()); - private static final String BUG_MSG = "IF YOU SEE THIS MESSAGE, PLEASE CONTACT THE DEVELOPERS OF CRYPTOMATOR ABOUT A BUG IN THE NOTIFICATION DISPLAY"; + private static final String BUG_MSG = "If you see this message, please report it on the Cryptomator issue tracker."; private final Stage window; private final SimpleListProperty events; @@ -45,7 +45,7 @@ public class NotificationController implements FxController { private final ObjectProperty selectedEvent; private final ObservableValue singleEvent; private final StringProperty vaultName; - private final StringProperty eventOccurance; + private final StringProperty eventTimestamp; private final StringProperty message; private final StringProperty description; private final StringProperty actionText; @@ -64,7 +64,7 @@ public class NotificationController implements FxController { this.singleEvent = events.sizeProperty().map(size -> size.intValue() == 1); this.paging = Bindings.createStringBinding(() -> selectionIndex.get() + 1 + "/" + events.size(), selectionIndex, events); this.vaultName = new SimpleStringProperty(); - this.eventOccurance = new SimpleStringProperty(); + this.eventTimestamp = new SimpleStringProperty(); this.message = new SimpleStringProperty(); this.description = new SimpleStringProperty(); this.actionText = new SimpleStringProperty(); @@ -99,7 +99,7 @@ public class NotificationController implements FxController { var user = userAndDevice[0]; var device = userAndDevice.length == 1 ? userAndDevice[0] : userAndDevice[1]; var squashedName = convertPathStringToShortenedFileName(fiiue.cleartextPath()); - eventOccurance.set(localizedTimeFormatter.format(fiiue.lastUpdated())); + eventTimestamp.set(localizedTimeFormatter.format(fiiue.lastUpdated())); message.set("File %s is locked".formatted(squashedName)); description.set("Currently this file is opened by %s on device %s. Ask the user to close the file and trigger a sync. Otherwise, you can ignore the lock and open it anyway, but be aware of the data loss risk.".formatted(user, device)); actionText.set("Ignore Lock"); @@ -193,11 +193,11 @@ public class NotificationController implements FxController { //FXML bindings public ObservableValue eventTimeProperty() { - return eventOccurance; + return eventTimestamp; } public String getEventTime() { - return eventOccurance.get(); + return eventTimestamp.get(); } public ObservableValue vaultNameProperty() {