- Version 0.1.0

- Automounting (OS X only atm)
- Automatic TCP ports
- Added icon
This commit is contained in:
Sebastian Stenzel
2014-11-30 00:10:06 +01:00
parent be38432e73
commit c322b0488e
18 changed files with 202 additions and 175 deletions
+1 -2
View File
@@ -12,7 +12,7 @@
<parent> <parent>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.1.0</version>
</parent> </parent>
<artifactId>core</artifactId> <artifactId>core</artifactId>
<name>Cryptomator core I/O module</name> <name>Cryptomator core I/O module</name>
@@ -28,7 +28,6 @@
<dependency> <dependency>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>crypto-api</artifactId> <artifactId>crypto-api</artifactId>
<version>${project.parent.version}</version>
</dependency> </dependency>
<!-- Logging --> <!-- Logging -->
@@ -22,6 +22,7 @@ public final class WebDAVServer {
private static final Logger LOG = LoggerFactory.getLogger(WebDAVServer.class); private static final Logger LOG = LoggerFactory.getLogger(WebDAVServer.class);
private static final WebDAVServer INSTANCE = new WebDAVServer(); private static final WebDAVServer INSTANCE = new WebDAVServer();
private static final String LOCALHOST = "127.0.0.1";
private final Server server = new Server(); private final Server server = new Server();
private WebDAVServer() { private WebDAVServer() {
@@ -32,11 +33,14 @@ public final class WebDAVServer {
return INSTANCE; return INSTANCE;
} }
public boolean start(final String workDir, final int port, final Cryptor cryptor) { /**
* @param workDir Path of encrypted folder.
* @param cryptor A fully initialized cryptor instance ready to en- or decrypt streams.
* @return port, on which the server did start
*/
public int start(final String workDir, final Cryptor cryptor) {
final ServerConnector connector = new ServerConnector(server); final ServerConnector connector = new ServerConnector(server);
connector.setHost("127.0.0.1"); connector.setHost(LOCALHOST);
connector.setPort(port);
server.setConnectors(new Connector[] {connector});
final String contextPath = "/"; final String contextPath = "/";
@@ -46,12 +50,13 @@ public final class WebDAVServer {
server.setHandler(context); server.setHandler(context);
try { try {
server.setConnectors(new Connector[] {connector});
server.start(); server.start();
} catch (Exception ex) { } catch (Exception ex) {
LOG.error("Server couldn't be started", ex); LOG.error("Server couldn't be started", ex);
} }
return server.isStarted(); return connector.getLocalPort();
} }
public boolean isRunning() { public boolean isRunning() {
@@ -68,7 +73,7 @@ public final class WebDAVServer {
} }
private ServletHolder getMiltonServletHolder(final String workDir, final String contextPath, final Cryptor cryptor) { private ServletHolder getMiltonServletHolder(final String workDir, final String contextPath, final Cryptor cryptor) {
final ServletHolder result = new ServletHolder("OCE-WebDAV-Servlet", new WebDavServlet(cryptor)); final ServletHolder result = new ServletHolder("Cryptomator-WebDAV-Servlet", new WebDavServlet(cryptor));
result.setInitParameter(WebDavServlet.CFG_FS_ROOT, workDir); result.setInitParameter(WebDavServlet.CFG_FS_ROOT, workDir);
result.setInitParameter(WebDavServlet.CFG_HTTP_ROOT, contextPath); result.setInitParameter(WebDavServlet.CFG_HTTP_ROOT, contextPath);
return result; return result;
+1 -2
View File
@@ -12,7 +12,7 @@
<parent> <parent>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.1.0</version>
</parent> </parent>
<artifactId>crypto-aes</artifactId> <artifactId>crypto-aes</artifactId>
<name>Cryptomator cryptographic module (AES)</name> <name>Cryptomator cryptographic module (AES)</name>
@@ -22,7 +22,6 @@
<dependency> <dependency>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>crypto-api</artifactId> <artifactId>crypto-api</artifactId>
<version>${project.parent.version}</version>
</dependency> </dependency>
<!-- Logging --> <!-- Logging -->
+1 -1
View File
@@ -12,7 +12,7 @@
<parent> <parent>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.1.0</version>
</parent> </parent>
<artifactId>crypto-api</artifactId> <artifactId>crypto-api</artifactId>
<name>Cryptomator cryptographic module API</name> <name>Cryptomator cryptographic module API</name>
+33 -8
View File
@@ -11,12 +11,22 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.1.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Cryptomator</name> <name>Cryptomator</name>
<organization> <organization>
<name>cryptomator.org</name> <name>cryptomator.org</name>
<url>http://cryptomator.org</url>
</organization> </organization>
<developers>
<developer>
<name>Sebastian Stenzel</name>
<email>sebastian.stenzel@gmail.com</email>
<timezone>+1</timezone>
</developer>
</developers>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -31,15 +41,30 @@
<commons-codec.version>1.9</commons-codec.version> <commons-codec.version>1.9</commons-codec.version>
</properties> </properties>
<developers>
<developer>
<name>Sebastian Stenzel</name>
<email>sebastian.stenzel@gmail.com</email>
</developer>
</developers>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<!-- modules -->
<dependency>
<groupId>org.cryptomator</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.cryptomator</groupId>
<artifactId>crypto-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.cryptomator</groupId>
<artifactId>crypto-aes</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.cryptomator</groupId>
<artifactId>ui</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Logging --> <!-- Logging -->
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
+14 -8
View File
@@ -1,16 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2014 Sebastian Stenzel This file is licensed under the terms of the MIT license. See the LICENSE.txt file for more info. Contributors: Sebastian Stenzel - initial API and implementation --> <!--
Copyright (c) 2014 Sebastian Stenzel
This file is licensed under the terms of the MIT license.
See the LICENSE.txt file for more info.
Contributors:
Sebastian Stenzel - initial API and implementation
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.1.0</version>
</parent> </parent>
<artifactId>ui</artifactId> <artifactId>ui</artifactId>
<name>Cryptomator GUI</name> <name>Cryptomator GUI</name>
<properties> <properties>
<javafx.application.name>Cryptomator</javafx.application.name>
<exec.mainClass>org.cryptomator.ui.MainApplication</exec.mainClass> <exec.mainClass>org.cryptomator.ui.MainApplication</exec.mainClass>
<javafx.tools.ant.jar>${java.home}/../lib/ant-javafx.jar</javafx.tools.ant.jar> <javafx.tools.ant.jar>${java.home}/../lib/ant-javafx.jar</javafx.tools.ant.jar>
</properties> </properties>
@@ -19,12 +27,10 @@
<dependency> <dependency>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>core</artifactId> <artifactId>core</artifactId>
<version>${project.parent.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>crypto-aes</artifactId> <artifactId>crypto-aes</artifactId>
<version>${project.parent.version}</version>
</dependency> </dependency>
<!-- JSON --> <!-- JSON -->
@@ -91,7 +97,7 @@
<configuration> <configuration>
<target xmlns:fx="javafx:com.sun.javafx.tools.ant"> <target xmlns:fx="javafx:com.sun.javafx.tools.ant">
<taskdef uri="javafx:com.sun.javafx.tools.ant" resource="com/sun/javafx/tools/ant/antlib.xml" classpath="${javafx.tools.ant.jar}" /> <taskdef uri="javafx:com.sun.javafx.tools.ant" resource="com/sun/javafx/tools/ant/antlib.xml" classpath="${javafx.tools.ant.jar}" />
<fx:application id="fxApp" version="${project.version}" name="${project.name}" mainClass="${exec.mainClass}" /> <fx:application id="fxApp" version="${project.version}" name="${javafx.application.name}" mainClass="${exec.mainClass}" />
<fx:jar destfile="${project.build.directory}/${project.build.finalName}"> <fx:jar destfile="${project.build.directory}/${project.build.finalName}">
<fx:application refid="fxApp" /> <fx:application refid="fxApp" />
@@ -102,9 +108,9 @@
</fx:jar> </fx:jar>
<fx:deploy outdir="${project.build.directory}/dist" outfile="${project.build.finalName}" nativeBundles="all"> <fx:deploy outdir="${project.build.directory}/dist" outfile="${project.build.finalName}" nativeBundles="all">
<fx:info title="Cloud Encryptor" vendor="cloudencryptor.org"> <fx:info title="Cryptomator" vendor="cryptomator.org" copyright="cryptomator.org" license="MIT">
<!-- todo provide .ico and .icns files for osx/win --> <!-- todo provide .ico files for win -->
<fx:icon href="shortcut.ico" width="32" height="32" depth="8" /> <fx:icon href="${project.build.outputDirectory}/logo.icns" width="512" height="512" />
</fx:info> </fx:info>
<fx:platform basedir="" javafx="2.2+" j2se="8.0" /> <fx:platform basedir="" javafx="2.2+" j2se="8.0" />
<fx:application refid="fxApp" /> <fx:application refid="fxApp" />
@@ -43,6 +43,8 @@ import org.cryptomator.crypto.exceptions.WrongPasswordException;
import org.cryptomator.ui.controls.SecPasswordField; import org.cryptomator.ui.controls.SecPasswordField;
import org.cryptomator.ui.settings.Settings; import org.cryptomator.ui.settings.Settings;
import org.cryptomator.ui.util.MasterKeyFilter; import org.cryptomator.ui.util.MasterKeyFilter;
import org.cryptomator.ui.util.WebDavMounter;
import org.cryptomator.ui.util.WebDavMounter.CommandFailedException;
import org.cryptomator.webdav.WebDAVServer; import org.cryptomator.webdav.WebDAVServer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -197,21 +199,29 @@ public class AccessController implements Initializable {
} }
private void tryStart() { private void tryStart() {
try { final Settings settings = Settings.load();
final Settings settings = Settings.load(); final int webdavPort = WebDAVServer.getInstance().start(settings.getWebdavWorkDir(), cryptor);
if (WebDAVServer.getInstance().start(settings.getWebdavWorkDir(), settings.getPort(), cryptor)) { if (webdavPort > 0) {
startServerButton.setText(localization.getString("access.button.stopServer")); startServerButton.setText(localization.getString("access.button.stopServer"));
passwordField.setDisable(true); passwordField.setDisable(true);
try {
WebDavMounter.mount(webdavPort);
} catch (CommandFailedException e) {
messageLabel.setText(String.format(localization.getString("access.messageLabel.mountFailed"), webdavPort));
LOG.error("Mounting WebDAV share failed.", e);
} }
} catch (NumberFormatException ex) {
LOG.error("Invalid port", ex);
} }
} }
private void tryStop() { private void tryStop() {
if (WebDAVServer.getInstance().stop()) { try {
startServerButton.setText(localization.getString("access.button.startServer")); WebDavMounter.unmount(5);
passwordField.setDisable(false); if (WebDAVServer.getInstance().stop()) {
startServerButton.setText(localization.getString("access.button.startServer"));
passwordField.setDisable(false);
}
} catch (CommandFailedException e) {
LOG.warn("Unmounting WebDAV share failed.", e);
} }
} }
@@ -1,78 +0,0 @@
/*******************************************************************************
* Copyright (c) 2014 Sebastian Stenzel
* This file is licensed under the terms of the MIT license.
* See the LICENSE.txt file for more info.
*
* Contributors:
* Sebastian Stenzel - initial API and implementation
******************************************************************************/
package org.cryptomator.ui;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.GridPane;
import org.apache.commons.lang3.CharUtils;
import org.cryptomator.ui.settings.Settings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AdvancedController implements Initializable {
private static final Logger LOG = LoggerFactory.getLogger(AdvancedController.class);
@FXML
private GridPane rootGridPane;
@FXML
private TextField portTextField;
@Override
public void initialize(URL url, ResourceBundle rb) {
portTextField.setText(String.valueOf(Settings.load().getPort()));
portTextField.addEventFilter(KeyEvent.KEY_TYPED, new NumericKeyTypeEventFilter());
portTextField.focusedProperty().addListener(new PortTextFieldFocusListener());
}
/**
* Consumes key events, if typed key is not 0-9.
*/
private static final class NumericKeyTypeEventFilter implements EventHandler<KeyEvent> {
@Override
public void handle(KeyEvent t) {
if (t.getCharacter() == null || t.getCharacter().length() == 0) {
return;
}
char c = t.getCharacter().charAt(0);
if (!CharUtils.isAsciiNumeric(c)) {
t.consume();
}
}
}
/**
* Saves port settings, when textfield loses focus.
*/
private class PortTextFieldFocusListener implements ChangeListener<Boolean> {
@Override
public void changed(ObservableValue<? extends Boolean> property, Boolean wasFocused, Boolean isFocused) {
final Settings settings = Settings.load();
try {
int port = Integer.valueOf(portTextField.getText());
settings.setPort(port);
} catch (NumberFormatException ex) {
LOG.warn("Invalid port " + portTextField.getText());
portTextField.setText(String.valueOf(settings.getPort()));
}
}
}
}
@@ -18,10 +18,16 @@ import javafx.scene.Scene;
import javafx.stage.Stage; import javafx.stage.Stage;
import org.cryptomator.ui.settings.Settings; import org.cryptomator.ui.settings.Settings;
import org.cryptomator.ui.util.WebDavMounter;
import org.cryptomator.ui.util.WebDavMounter.CommandFailedException;
import org.cryptomator.webdav.WebDAVServer; import org.cryptomator.webdav.WebDAVServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MainApplication extends Application { public class MainApplication extends Application {
private static final Logger LOG = LoggerFactory.getLogger(MainApplication.class);
public static void main(String[] args) { public static void main(String[] args) {
launch(args); launch(args);
} }
@@ -40,6 +46,11 @@ public class MainApplication extends Application {
@Override @Override
public void stop() throws Exception { public void stop() throws Exception {
try {
WebDavMounter.unmount(5);
} catch (CommandFailedException e) {
LOG.warn("Unmounting WebDAV share failed.", e);
}
WebDAVServer.getInstance().stop(); WebDAVServer.getInstance().stop();
Settings.save(); Settings.save();
super.stop(); super.stop();
@@ -10,38 +10,42 @@ package org.cryptomator.ui;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox; import javafx.scene.layout.VBox;
public class MainController { public class MainController {
@FXML
private ToggleGroup toolbarButtonGroup;
@FXML @FXML
private VBox rootVBox; private VBox rootVBox;
@FXML @FXML
private Pane initializePanel; private Pane initializePanel;
@FXML @FXML
private Pane accessPanel; private Pane accessPanel;
@FXML @FXML
private Pane advancedPanel; private Pane advancedPanel;
@FXML @FXML
protected void showInitializePane(ActionEvent event) { protected void showInitializePane(ActionEvent event) {
showPanel(initializePanel); showPanel(initializePanel);
} }
@FXML @FXML
protected void showAccessPane(ActionEvent event) { protected void showAccessPane(ActionEvent event) {
showPanel(accessPanel); showPanel(accessPanel);
} }
@FXML @FXML
protected void showAdvancedPane(ActionEvent event) { protected void showAdvancedPane(ActionEvent event) {
showPanel(advancedPanel); showPanel(advancedPanel);
} }
private void showPanel(Pane panel) { private void showPanel(Pane panel) {
rootVBox.getChildren().remove(1); rootVBox.getChildren().remove(1);
rootVBox.getChildren().add(panel); rootVBox.getChildren().add(panel);
@@ -1,3 +1,11 @@
/*******************************************************************************
* Copyright (c) 2014 Sebastian Stenzel
* This file is licensed under the terms of the MIT license.
* See the LICENSE.txt file for more info.
*
* Contributors:
* Sebastian Stenzel - initial API and implementation
******************************************************************************/
package org.cryptomator.ui.controls; package org.cryptomator.ui.controls;
import javafx.beans.value.ChangeListener; import javafx.beans.value.ChangeListener;
@@ -18,6 +18,7 @@ import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.StandardOpenOption; import java.nio.file.StandardOpenOption;
import org.apache.commons.lang3.SystemUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -35,20 +36,18 @@ public class Settings implements Serializable {
private static Settings INSTANCE = null; private static Settings INSTANCE = null;
static { static {
final String home = System.getProperty("user.home", ".");
final String appdata = System.getenv("APPDATA"); final String appdata = System.getenv("APPDATA");
final String os = System.getProperty("os.name").toLowerCase();
final FileSystem fs = FileSystems.getDefault(); final FileSystem fs = FileSystems.getDefault();
if (os.contains("win") && appdata != null) { if (SystemUtils.IS_OS_WINDOWS && appdata != null) {
SETTINGS_DIR = fs.getPath(appdata, "opencloudencryptor"); SETTINGS_DIR = fs.getPath(appdata, "opencloudencryptor");
} else if (os.contains("win") && appdata == null) { } else if (SystemUtils.IS_OS_WINDOWS && appdata == null) {
SETTINGS_DIR = fs.getPath(home, ".opencloudencryptor"); SETTINGS_DIR = fs.getPath(SystemUtils.USER_HOME, ".opencloudencryptor");
} else if (os.contains("mac")) { } else if (SystemUtils.IS_OS_MAC_OSX) {
SETTINGS_DIR = fs.getPath(home, "Library/Application Support/opencloudencryptor"); SETTINGS_DIR = fs.getPath(SystemUtils.USER_HOME, "Library/Application Support/opencloudencryptor");
} else { } else {
// (os.contains("solaris") || os.contains("sunos") || os.contains("linux") || os.contains("unix")) // (os.contains("solaris") || os.contains("sunos") || os.contains("linux") || os.contains("unix"))
SETTINGS_DIR = fs.getPath(home, ".opencloudencryptor"); SETTINGS_DIR = fs.getPath(SystemUtils.USER_HOME, ".opencloudencryptor");
} }
} }
@@ -113,10 +112,12 @@ public class Settings implements Serializable {
this.username = username; this.username = username;
} }
@Deprecated
public int getPort() { public int getPort() {
return port; return port;
} }
@Deprecated
public void setPort(int port) { public void setPort(int port) {
this.port = port; this.port = port;
} }
@@ -1,3 +1,11 @@
/*******************************************************************************
* Copyright (c) 2014 Sebastian Stenzel
* This file is licensed under the terms of the MIT license.
* See the LICENSE.txt file for more info.
*
* Contributors:
* Sebastian Stenzel - initial API and implementation
******************************************************************************/
package org.cryptomator.ui.util; package org.cryptomator.ui.util;
import java.io.IOException; import java.io.IOException;
@@ -0,0 +1,72 @@
/*******************************************************************************
* Copyright (c) 2014 Sebastian Stenzel
* This file is licensed under the terms of the MIT license.
* See the LICENSE.txt file for more info.
*
* Contributors:
* Sebastian Stenzel - initial API and implementation
******************************************************************************/
package org.cryptomator.ui.util;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.SystemUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class WebDavMounter {
private static final Logger LOG = LoggerFactory.getLogger(WebDavMounter.class);
private static final int CMD_DEFAULT_TIMEOUT = 1;
private WebDavMounter() {
throw new IllegalStateException("not instantiable.");
}
public static void mount(int localPort) throws CommandFailedException {
if (SystemUtils.IS_OS_MAC_OSX) {
exec("mkdir /Volumes/Cryptomator", CMD_DEFAULT_TIMEOUT);
exec("mount_webdav -S -v Cryptomator localhost:" + localPort + " /Volumes/Cryptomator", CMD_DEFAULT_TIMEOUT);
exec("open /Volumes/Cryptomator", CMD_DEFAULT_TIMEOUT);
}
}
public static void unmount(int timeout) throws CommandFailedException {
if (SystemUtils.IS_OS_MAC_OSX) {
exec("umount /Volumes/Cryptomator", timeout);
}
}
private static void exec(String cmd, int timoutSeconds) throws CommandFailedException {
try {
final Process proc = Runtime.getRuntime().exec(new String[] {"/bin/sh", "-c", cmd});
if (proc.waitFor(timoutSeconds, TimeUnit.SECONDS)) {
proc.destroy();
}
if (proc.exitValue() != 0) {
throw new CommandFailedException(IOUtils.toString(proc.getErrorStream()));
}
} catch (IOException | InterruptedException | IllegalThreadStateException e) {
LOG.error("Command execution failed.", e);
throw new CommandFailedException(e);
}
}
public static class CommandFailedException extends Exception {
private static final long serialVersionUID = 5784853630182321479L;
private CommandFailedException(String message) {
super(message);
}
private CommandFailedException(Throwable cause) {
super(cause);
}
}
}
-38
View File
@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Sebastian Stenzel
This file is licensed under the terms of the MIT license.
See the LICENSE.txt file for more info.
Contributors:
Sebastian Stenzel - initial API and implementation
-->
<?import java.net.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<GridPane fx:id="rootGridPane" fx:controller="org.cryptomator.ui.AdvancedController" xmlns:fx="http://javafx.com/fxml" styleClass="root" gridLinesVisible="false" vgap="5" hgap="5" prefWidth="480">
<stylesheets>
<URL value="@panels.css" />
</stylesheets>
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<columnConstraints>
<ColumnConstraints minWidth="150" maxWidth="150" hgrow="NEVER" />
<ColumnConstraints minWidth="250" hgrow="ALWAYS" />
</columnConstraints>
<children>
<!-- Row 0 -->
<Label GridPane.rowIndex="0" GridPane.columnIndex="0" text="%advanced.label.port" GridPane.halignment="RIGHT" />
<TextField fx:id="portTextField" GridPane.rowIndex="0" GridPane.columnIndex="1" />
</children>
</GridPane>
@@ -9,7 +9,6 @@
# main.fxml # main.fxml
toolbarbutton.initialize=Initialize Vault toolbarbutton.initialize=Initialize Vault
toolbarbutton.access=Access Vault toolbarbutton.access=Access Vault
toolbarbutton.advanced=Advanced Settings
# initialize.fxml # initialize.fxml
initialize.label.workDir=New vault location initialize.label.workDir=New vault location
@@ -32,6 +31,4 @@ access.messageLabel.wrongPassword=Wrong password.
access.messageLabel.invalidStorageLocation=Vault directory invalid. access.messageLabel.invalidStorageLocation=Vault directory invalid.
access.messageLabel.decryptionFailed=Decryption failed. access.messageLabel.decryptionFailed=Decryption failed.
access.messageLabel.unsupportedKeyLengthInstallJCE=Decryption failed. Please install Oracle JCE. access.messageLabel.unsupportedKeyLengthInstallJCE=Decryption failed. Please install Oracle JCE.
access.messageLabel.mountFailed=Mounting WebDAV share (Port %d) failed.
# advanced.fxml
advanced.label.port=WebDAV Port
Binary file not shown.
-2
View File
@@ -21,7 +21,6 @@
<fx:define> <fx:define>
<fx:include fx:id="initializePanel" source="initialize.fxml" /> <fx:include fx:id="initializePanel" source="initialize.fxml" />
<fx:include fx:id="accessPanel" source="access.fxml" /> <fx:include fx:id="accessPanel" source="access.fxml" />
<fx:include fx:id="advancedPanel" source="advanced.fxml" />
</fx:define> </fx:define>
<children> <children>
@@ -32,7 +31,6 @@
</fx:define> </fx:define>
<ToggleButton text="%toolbarbutton.initialize" toggleGroup="$toolbarButtonGroup" onAction="#showInitializePane" /> <ToggleButton text="%toolbarbutton.initialize" toggleGroup="$toolbarButtonGroup" onAction="#showInitializePane" />
<ToggleButton text="%toolbarbutton.access" toggleGroup="$toolbarButtonGroup" onAction="#showAccessPane" selected="true" /> <ToggleButton text="%toolbarbutton.access" toggleGroup="$toolbarButtonGroup" onAction="#showAccessPane" selected="true" />
<ToggleButton text="%toolbarbutton.advanced" toggleGroup="$toolbarButtonGroup" onAction="#showAdvancedPane" />
</items> </items>
</ToolBar> </ToolBar>
<fx:reference source="accessPanel"/> <fx:reference source="accessPanel"/>