mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-19 19:21:27 +00:00
redesign auth processing dialog:
* adjust to new design * add translation keys
This commit is contained in:
@@ -38,7 +38,6 @@ public class AuthFlowController implements FxController {
|
||||
private final CompletableFuture<JWEObject> result;
|
||||
private final Lazy<Scene> receiveKeyScene;
|
||||
private final ObjectProperty<URI> authUri;
|
||||
private final StringBinding authHost;
|
||||
private AuthFlowTask task;
|
||||
|
||||
@Inject
|
||||
@@ -52,7 +51,6 @@ public class AuthFlowController implements FxController {
|
||||
this.result = result;
|
||||
this.receiveKeyScene = receiveKeyScene;
|
||||
this.authUri = new SimpleObjectProperty<>();
|
||||
this.authHost = Bindings.createStringBinding(this::getAuthHost, authUri);
|
||||
this.window.addEventHandler(WindowEvent.WINDOW_HIDING, this::windowClosed);
|
||||
}
|
||||
|
||||
@@ -100,19 +98,4 @@ public class AuthFlowController implements FxController {
|
||||
result.completeExceptionally(exception);
|
||||
}
|
||||
|
||||
/* Getter/Setter */
|
||||
|
||||
public StringBinding authHostProperty() {
|
||||
return authHost;
|
||||
}
|
||||
|
||||
public String getAuthHost() {
|
||||
var uri = authUri.get();
|
||||
if (uri == null) {
|
||||
return "";
|
||||
} else {
|
||||
return uri.getAuthority().toString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,37 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import org.cryptomator.ui.controls.FontAwesome5Spinner?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.ButtonBar?>
|
||||
<?import javafx.scene.control.Hyperlink?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.Group?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Region?>
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
<?import javafx.scene.shape.Circle?>
|
||||
<?import javafx.scene.text.TextFlow?>
|
||||
<VBox xmlns:fx="http://javafx.com/fxml"
|
||||
<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
|
||||
<HBox xmlns:fx="http://javafx.com/fxml"
|
||||
xmlns="http://javafx.com/javafx"
|
||||
fx:controller="org.cryptomator.ui.keyloading.hub.AuthFlowController"
|
||||
minWidth="400"
|
||||
maxWidth="400"
|
||||
minHeight="145"
|
||||
spacing="12">
|
||||
spacing="12"
|
||||
alignment="TOP_LEFT">
|
||||
<padding>
|
||||
<Insets topRightBottomLeft="12"/>
|
||||
</padding>
|
||||
<children>
|
||||
<HBox spacing="12" VBox.vgrow="ALWAYS">
|
||||
<ImageView VBox.vgrow="ALWAYS" fitWidth="64" preserveRatio="true" cache="true">
|
||||
<Image url="@../img/bot/bot.png"/>
|
||||
</ImageView>
|
||||
<TextFlow visible="${!controller.authHost.empty}" managed="${!controller.authHost.empty}">
|
||||
<Text text="TODO: please login via " />
|
||||
<Hyperlink styleClass="hyperlink-underline" text="${controller.authHost}" onAction="#browse"/>
|
||||
</TextFlow>
|
||||
</HBox>
|
||||
<Group>
|
||||
<StackPane>
|
||||
<padding>
|
||||
<Insets topRightBottomLeft="6"/>
|
||||
</padding>
|
||||
<Circle styleClass="glyph-icon-primary" radius="24"/>
|
||||
<FontAwesome5Spinner styleClass="glyph-icon-white" glyphSize="24"/>
|
||||
</StackPane>
|
||||
</Group>
|
||||
|
||||
<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
|
||||
<VBox HBox.hgrow="ALWAYS">
|
||||
<Label styleClass="label-large" text="%hub.auth.message" wrapText="true" textAlignment="LEFT">
|
||||
<padding>
|
||||
<Insets bottom="6" top="6"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<Label text="%hub.auth.description" wrapText="true"/>
|
||||
<Hyperlink styleClass="hyperlink-underline" text="%hub.auth.loginLink" onAction="#browse">
|
||||
<graphic>
|
||||
<FontAwesome5IconView glyph="LINK" glyphSize="12"/>
|
||||
</graphic>
|
||||
<padding>
|
||||
<Insets top="12"/>
|
||||
</padding>
|
||||
</Hyperlink>
|
||||
|
||||
<Region VBox.vgrow="ALWAYS" minHeight="18"/>
|
||||
<ButtonBar buttonMinWidth="120" buttonOrder="+C">
|
||||
<buttons>
|
||||
<Button text="%generic.button.cancel" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#cancel"/>
|
||||
@@ -39,4 +60,4 @@
|
||||
</ButtonBar>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</HBox>
|
||||
|
||||
@@ -124,6 +124,11 @@ unlock.error.message=Unable to unlock vault
|
||||
unlock.error.invalidMountPoint.notExisting=Mount point "%s" is not a directory, not empty or does not exist.
|
||||
unlock.error.invalidMountPoint.existing=Mount point "%s" already exists or parent folder is missing.
|
||||
unlock.error.invalidMountPoint.driveLetterOccupied=Drive Letter "%s" is already in use.
|
||||
## Hub
|
||||
### Waiting
|
||||
hub.auth.message=Waiting for authentication…
|
||||
hub.auth.description=You should automatically be redirected to the login page.
|
||||
hub.auth.loginLink=Not redirected? Click here to open it.
|
||||
|
||||
# Lock
|
||||
## Force
|
||||
|
||||
Reference in New Issue
Block a user