update migration dialogue

This commit is contained in:
Armin Schrenk
2020-04-27 13:17:31 +02:00
parent fcdbc7a6cc
commit 4d5f6cbb52
3 changed files with 35 additions and 10 deletions

View File

@@ -10,6 +10,8 @@ import javax.inject.Inject;
public class MigrationImpossibleController implements FxController {
private static final String HELP_URI = "https://community.cryptomator.org/TODO";
private final FxApplication fxApplication;
private final Stage window;
private final Vault vault;
@@ -26,10 +28,19 @@ public class MigrationImpossibleController implements FxController {
window.close();
}
@FXML
public void getMigrationHelp() {
fxApplication.getHostServices().showDocument(HELP_URI);
}
/* Getter/Setters */
public Vault getVault() {
return vault;
}
public String getHelpUri() {
return HELP_URI;
}
}

View File

@@ -1,29 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Circle?>
<?import javafx.scene.text.Text?>
<?import javafx.scene.text.TextFlow?>
<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="org.cryptomator.ui.migration.MigrationImpossibleController"
prefHeight="400.0" prefWidth="600.0">
<?import javafx.scene.control.Hyperlink?>
<VBox xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="org.cryptomator.ui.migration.MigrationImpossibleController"
minWidth="400"
maxWidth="400"
minHeight="145"
spacing="12">
<padding>
<Insets topRightBottomLeft="12"/>
</padding>
<HBox spacing="12" alignment="CENTER_LEFT" VBox.vgrow="ALWAYS">
<StackPane alignment="CENTER" HBox.hgrow="NEVER">
<Circle styleClass="glyph-icon-primary" radius="24"/>
<FontAwesome5IconView styleClass="glyph-icon-white" glyph="TIMES" glyphSize="24"/>
</StackPane>
<Label text="%migration.impossible.nextStepsInstructions" wrapText="true" HBox.hgrow="ALWAYS"/>
<!-- TODO: maybe add error why it is not possible -->
<TextFlow>
<Label text="%migration.impossible.reason" wrapText="true" HBox.hgrow="ALWAYS"/>
<Text text="%migration.impossible.nextStepsInstructions" wrappingWidth="382" HBox.hgrow="ALWAYS"/>
<Text text="%migration.impossible.moreInfo"/>
<Hyperlink text="${controller.helpUri}" onAction="#getMigrationHelp"/>
</TextFlow>
</HBox>
<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
@@ -34,4 +46,4 @@
</buttons>
</ButtonBar>
</VBox>
</AnchorPane>
</VBox>

View File

@@ -119,7 +119,9 @@ migration.error.missingFileSystemCapabilities.reason.LONG_PATHS=The file system
migration.error.missingFileSystemCapabilities.reason.READ_ACCESS=The file system does not allow to be read.
migration.error.missingFileSystemCapabilities.reason.WRITE_ACCESS=The file system does not allow to be written to.
## Impossible
migration.impossible.nextStepsInstructions=Cryptomator cannot migrate the vault automatically due to TODO. You need to migrate manually. FOr more information, please read TODO.
migration.impossible.reason=Cryptomator cannot automatically migrate this vault because the storage location or its access point are not fully-compatible with the newer vault version.
migration.impossible.nextStepsInstructions=To use this vault with the current version, you either need to move the vault to a different, fully supported location or need to manually create a new vault and copy all files to it.
migration.impossible.moreInfo=For more information, please visit:
# Preferences
preferences.title=Preferences