mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-19 19:21:27 +00:00
Renamed objects related to license exceeded user flow
This commit is contained in:
@@ -15,7 +15,7 @@ public enum FxmlFile {
|
||||
HEALTH_CHECK_LIST("/fxml/health_check_list.fxml"), //
|
||||
HUB_NO_KEYCHAIN("/fxml/hub_no_keychain.fxml"), //
|
||||
HUB_AUTH_FLOW("/fxml/hub_auth_flow.fxml"), //
|
||||
HUB_LICENSE_EXCEEDED("/fxml/hub_license_exceeded.fxml"), //
|
||||
HUB_INVALID_LICENSE("/fxml/hub_invalid_license.fxml"), //
|
||||
HUB_RECEIVE_KEY("/fxml/hub_receive_key.fxml"), //
|
||||
HUB_REGISTER_DEVICE("/fxml/hub_register_device.fxml"), //
|
||||
HUB_REGISTER_SUCCESS("/fxml/hub_register_success.fxml"), //
|
||||
|
||||
@@ -102,10 +102,10 @@ public abstract class HubKeyLoadingModule {
|
||||
}
|
||||
|
||||
@Provides
|
||||
@FxmlScene(FxmlFile.HUB_LICENSE_EXCEEDED)
|
||||
@FxmlScene(FxmlFile.HUB_INVALID_LICENSE)
|
||||
@KeyLoadingScoped
|
||||
static Scene provideLicenseExceededScene(@KeyLoading FxmlLoaderFactory fxmlLoaders) {
|
||||
return fxmlLoaders.createScene(FxmlFile.HUB_LICENSE_EXCEEDED);
|
||||
static Scene provideInvalidLicenseScene(@KeyLoading FxmlLoaderFactory fxmlLoaders) {
|
||||
return fxmlLoaders.createScene(FxmlFile.HUB_INVALID_LICENSE);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@@ -162,8 +162,8 @@ public abstract class HubKeyLoadingModule {
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FxControllerKey(LicenseExceededController.class)
|
||||
abstract FxController bindLicenseExceededController(LicenseExceededController controller);
|
||||
@FxControllerKey(InvalidLicenseController.class)
|
||||
abstract FxController bindInvalidLicenseController(InvalidLicenseController controller);
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
|
||||
@@ -7,12 +7,12 @@ import javax.inject.Inject;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class LicenseExceededController implements FxController {
|
||||
public class InvalidLicenseController implements FxController {
|
||||
|
||||
private final Stage window;
|
||||
|
||||
@Inject
|
||||
public LicenseExceededController(@KeyLoading Stage window) {
|
||||
public InvalidLicenseController(@KeyLoading Stage window) {
|
||||
this.window = window;
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@ public class ReceiveKeyController implements FxController {
|
||||
private final Lazy<Scene> registerDeviceScene;
|
||||
private final Lazy<Scene> unauthorizedScene;
|
||||
private final URI vaultBaseUri;
|
||||
private final Lazy<Scene> licenseExceededScene;
|
||||
private final Lazy<Scene> invalidLicenseScene;
|
||||
private final HttpClient httpClient;
|
||||
|
||||
@Inject
|
||||
public ReceiveKeyController(@KeyLoading Vault vault, ExecutorService executor, @KeyLoading Stage window, @Named("deviceId") String deviceId, @Named("bearerToken") AtomicReference<String> tokenRef, CompletableFuture<JWEObject> result, @FxmlScene(FxmlFile.HUB_REGISTER_DEVICE) Lazy<Scene> registerDeviceScene, @FxmlScene(FxmlFile.HUB_UNAUTHORIZED_DEVICE) Lazy<Scene> unauthorizedScene, @FxmlScene(FxmlFile.HUB_LICENSE_EXCEEDED) Lazy<Scene> licenseExceededScene) {
|
||||
public ReceiveKeyController(@KeyLoading Vault vault, ExecutorService executor, @KeyLoading Stage window, @Named("deviceId") String deviceId, @Named("bearerToken") AtomicReference<String> tokenRef, CompletableFuture<JWEObject> result, @FxmlScene(FxmlFile.HUB_REGISTER_DEVICE) Lazy<Scene> registerDeviceScene, @FxmlScene(FxmlFile.HUB_UNAUTHORIZED_DEVICE) Lazy<Scene> unauthorizedScene, @FxmlScene(FxmlFile.HUB_INVALID_LICENSE) Lazy<Scene> invalidLicenseScene) {
|
||||
this.window = window;
|
||||
this.deviceId = deviceId;
|
||||
this.bearerToken = Objects.requireNonNull(tokenRef.get());
|
||||
@@ -54,7 +54,7 @@ public class ReceiveKeyController implements FxController {
|
||||
this.registerDeviceScene = registerDeviceScene;
|
||||
this.unauthorizedScene = unauthorizedScene;
|
||||
this.vaultBaseUri = getVaultBaseUri(vault);
|
||||
this.licenseExceededScene = licenseExceededScene;
|
||||
this.invalidLicenseScene = invalidLicenseScene;
|
||||
this.window.addEventHandler(WindowEvent.WINDOW_HIDING, this::windowClosed);
|
||||
this.httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).executor(executor).build();
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class ReceiveKeyController implements FxController {
|
||||
}
|
||||
|
||||
private void licenseExceeded() {
|
||||
window.setScene(licenseExceededScene.get());
|
||||
window.setScene(invalidLicenseScene.get());
|
||||
}
|
||||
|
||||
private void needsDeviceRegistration() {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?import javafx.scene.shape.Circle?>
|
||||
<HBox xmlns:fx="http://javafx.com/fxml"
|
||||
xmlns="http://javafx.com/javafx"
|
||||
fx:controller="org.cryptomator.ui.keyloading.hub.LicenseExceededController"
|
||||
fx:controller="org.cryptomator.ui.keyloading.hub.InvalidLicenseController"
|
||||
minWidth="400"
|
||||
maxWidth="400"
|
||||
minHeight="145"
|
||||
@@ -33,12 +33,12 @@
|
||||
</StackPane>
|
||||
</Group>
|
||||
<VBox HBox.hgrow="ALWAYS">
|
||||
<Label styleClass="label-large" text="%hub.licenseExceeded.message" wrapText="true" textAlignment="LEFT">
|
||||
<Label styleClass="label-large" text="%hub.invalidLicense.message" wrapText="true" textAlignment="LEFT">
|
||||
<padding>
|
||||
<Insets bottom="6" top="6"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<Label text="%hub.licenseExceeded.description" wrapText="true"/>
|
||||
<Label text="%hub.invalidLicense.description" wrapText="true"/>
|
||||
|
||||
<Region VBox.vgrow="ALWAYS" minHeight="18"/>
|
||||
<ButtonBar buttonMinWidth="120" buttonOrder="+C">
|
||||
@@ -155,9 +155,8 @@ hub.registerFailed.description=An error was thrown in the naming process. For mo
|
||||
hub.unauthorized.message=Access denied
|
||||
hub.unauthorized.description=Your device has not yet been authorized to access this vault. Ask the vault owner to authorize it.
|
||||
### License Exceeded
|
||||
hub.licenseExceeded.message=License exceeded
|
||||
hub.licenseExceeded.description=Cryptomator Hub has given access to more users than its license permits. Please contact your Hub admin to upgrade the license or a vault admin to remove users from vaults.
|
||||
|
||||
hub.invalidLicense.message=Hub License invalid
|
||||
hub.invalidLicense.description=Your Cryptomator Hub instance has an invalid license. Please inform a Hub administrator to upgrade or renew the license.
|
||||
|
||||
# Lock
|
||||
## Force
|
||||
|
||||
Reference in New Issue
Block a user