mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-20 01:26:52 -04:00
Replaced mockup image
This commit is contained in:
@@ -4,8 +4,10 @@ import dagger.Lazy;
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.stage.FileChooser;
|
||||
import javafx.stage.Stage;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
import org.cryptomator.common.vaults.Vault;
|
||||
import org.cryptomator.common.vaults.VaultListManager;
|
||||
import org.cryptomator.ui.common.ErrorComponent;
|
||||
@@ -18,6 +20,9 @@ import org.slf4j.LoggerFactory;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ResourceBundle;
|
||||
@@ -36,6 +41,8 @@ public class ChooseExistingVaultController implements FxController {
|
||||
private final VaultListManager vaultListManager;
|
||||
private final ResourceBundle resourceBundle;
|
||||
|
||||
private Image screenshot;
|
||||
|
||||
@Inject
|
||||
ChooseExistingVaultController(@AddVaultWizardWindow Stage window, @FxmlScene(FxmlFile.ADDVAULT_WELCOME) Lazy<Scene> welcomeScene, @FxmlScene(FxmlFile.ADDVAULT_SUCCESS) Lazy<Scene> successScene, ErrorComponent.Builder errorComponent, ObjectProperty<Path> vaultPath, @AddVaultWizardWindow ObjectProperty<Vault> vault, VaultListManager vaultListManager, ResourceBundle resourceBundle) {
|
||||
this.window = window;
|
||||
@@ -48,6 +55,16 @@ public class ChooseExistingVaultController implements FxController {
|
||||
this.resourceBundle = resourceBundle;
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
final String resource = SystemUtils.IS_OS_MAC ? "/select-masterkey-mac.png" : "/select-masterkey-win.png";
|
||||
try (InputStream in = getClass().getResourceAsStream(resource)) {
|
||||
this.screenshot = new Image(in);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void back() {
|
||||
window.setScene(welcomeScene.get());
|
||||
@@ -72,4 +89,10 @@ public class ChooseExistingVaultController implements FxController {
|
||||
}
|
||||
}
|
||||
|
||||
/* Getter */
|
||||
|
||||
public Image getScreenshot() {
|
||||
return screenshot;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,12 +20,25 @@ public class WrongFileAlertController implements FxController {
|
||||
private final Application app;
|
||||
private final Stage window;
|
||||
|
||||
private Image screenshot;
|
||||
|
||||
@Inject
|
||||
public WrongFileAlertController(@WrongFileAlertWindow Stage window, Application app) {
|
||||
this.window = window;
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
final String resource = SystemUtils.IS_OS_MAC ? "/vault-volume-mac.png" : "/vault-volume-win.png";
|
||||
try (InputStream in = getClass().getResourceAsStream(resource)) {
|
||||
this.screenshot = new Image(in);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void close() {
|
||||
window.close();
|
||||
}
|
||||
@@ -38,11 +51,6 @@ public class WrongFileAlertController implements FxController {
|
||||
/* Getter */
|
||||
|
||||
public Image getScreenshot() {
|
||||
final String resource = SystemUtils.IS_OS_MAC ? "/vault-volume-mac.png" : "/vault-volume-win.png";
|
||||
try (InputStream in = getClass().getResourceAsStream(resource)) {
|
||||
return new Image(in);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
return screenshot;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@@ -4,7 +4,6 @@
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.ButtonBar?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.Region?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
@@ -19,11 +18,10 @@
|
||||
<Insets topRightBottomLeft="24"/>
|
||||
</padding>
|
||||
<children>
|
||||
<ImageView VBox.vgrow="ALWAYS" fitHeight="200" preserveRatio="true" smooth="true" cache="true">
|
||||
<ImageView VBox.vgrow="ALWAYS" fitWidth="400" preserveRatio="true" smooth="true" image="${controller.screenshot}">
|
||||
<VBox.margin>
|
||||
<Insets top="24"/>
|
||||
</VBox.margin>
|
||||
<Image url="/choose_existing_vault.png"/> <!-- TODO replace mockup -->
|
||||
</ImageView>
|
||||
|
||||
<Label text="%addvaultwizard.existing.instruction" wrapText="true" labelFor="$finishButton"/>
|
||||
|
||||
BIN
main/ui/src/main/resources/select-masterkey-mac.png
Normal file
BIN
main/ui/src/main/resources/select-masterkey-mac.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
BIN
main/ui/src/main/resources/select-masterkey-win.png
Executable file
BIN
main/ui/src/main/resources/select-masterkey-win.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Reference in New Issue
Block a user