Merge branch 'feature/volume-type-getter' into feature/fuse-on-win

This commit is contained in:
JaniruTEC
2020-10-07 16:59:54 +02:00
11 changed files with 86 additions and 8 deletions
+3
View File
@@ -5,6 +5,7 @@ labels: type:bug
---
<!--
⚠️⚠️⚠️ READ CAREFULLY ⚠️⚠️⚠️
Do you want to ask a QUESTION? Are you looking for SUPPORT?
We're happy to help you via our support channels! Please read: https://github.com/cryptomator/cryptomator/blob/develop/SUPPORT.md
@@ -13,7 +14,9 @@ By filing an issue, you are expected to comply with our code of conduct: https:/
Of course, we also expect you to search for existing similar issues first! ;) https://github.com/cryptomator/cryptomator/issues?q=
⚠️ IMPORTANT: If you don't stick to this template, the issue will get closed. To proof that you read this, please remove the X from the following line:
-->
<!-- oooXooo -->
### Description
+25
View File
@@ -0,0 +1,25 @@
name: Bug Report Triage
on:
issues:
types: [opened]
jobs:
closeTemplateViolation:
name: Close bug reports that violate the issue template
runs-on: ubuntu-latest
steps:
- if: |
contains(github.event.issue.labels.*.name, 'type:bug')
&& (
!contains(github.event.issue.body, '<!-- oooooo -->')
|| !contains(github.event.issue.body, '### Description')
)
name: Close Issue
uses: peter-evans/close-issue@v1
with:
comment: |
This bug report did ignore our issue template. 😞
Auto-closing this issue, since it is most likely not useful.
_This decision was made by a bot. If you think the bot is wrong, let us know and we'll reopen this issue._
@@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
java \
-cp "libs/*" \
-Dcryptomator.settingsPath="~/.config/Cryptomator/settings.json" \
@@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
java \
-cp "libs/*" \
-Dcryptomator.settingsPath="~/Library/Application Support/Cryptomator/settings.json" \
@@ -3,6 +3,7 @@ package org.cryptomator.common.vaults;
import org.cryptomator.common.mountpoint.InvalidMountPointException;
import org.cryptomator.common.mountpoint.MountPointChooser;
import org.cryptomator.common.settings.VaultSettings;
import org.cryptomator.common.settings.VolumeImpl;
import org.cryptomator.cryptofs.CryptoFileSystem;
import org.cryptomator.frontend.dokany.Mount;
import org.cryptomator.frontend.dokany.MountFactory;
@@ -33,6 +34,11 @@ public class DokanyVolume extends AbstractVolume {
this.mountFactory = new MountFactory(executorService);
}
@Override
public VolumeImpl getImplementationType() {
return VolumeImpl.DOKANY;
}
@Override
public void mount(CryptoFileSystem fs, String mountFlags) throws InvalidMountPointException, VolumeException {
this.mountPoint = determineMountPoint();
@@ -4,6 +4,7 @@ import com.google.common.base.Splitter;
import org.apache.commons.lang3.SystemUtils;
import org.cryptomator.common.mountpoint.InvalidMountPointException;
import org.cryptomator.common.mountpoint.MountPointChooser;
import org.cryptomator.common.settings.VolumeImpl;
import org.cryptomator.cryptofs.CryptoFileSystem;
import org.cryptomator.frontend.fuse.mount.CommandFailedException;
import org.cryptomator.frontend.fuse.mount.EnvironmentVariables;
@@ -95,6 +96,11 @@ public class FuseVolume extends AbstractVolume {
return FuseVolume.isSupportedStatic();
}
@Override
public VolumeImpl getImplementationType() {
return VolumeImpl.FUSE;
}
@Override
public MountPointRequirement getMountPointRequirement() {
return SystemUtils.IS_OS_WINDOWS ? MountPointRequirement.PARENT_NO_MOUNT_POINT : MountPointRequirement.EMPTY_MOUNT_POINT;
@@ -21,6 +21,12 @@ public interface Volume {
*/
boolean isSupported();
/**
* Gets the coresponding enum type of the {@link VolumeImpl volume implementation ("VolumeImpl")} that is implemented by this Volume.
* @return the type of implementation as defined by the {@link VolumeImpl VolumeImpl enum}
*/
VolumeImpl getImplementationType();
/**
* @param fs
* @throws IOException
@@ -3,6 +3,7 @@ package org.cryptomator.common.vaults;
import org.cryptomator.common.settings.Settings;
import org.cryptomator.common.settings.VaultSettings;
import org.cryptomator.common.settings.VolumeImpl;
import org.cryptomator.cryptofs.CryptoFileSystem;
import org.cryptomator.frontend.webdav.WebDavServer;
import org.cryptomator.frontend.webdav.mount.MountParams;
@@ -131,6 +132,11 @@ public class WebDavVolume implements Volume {
return WebDavVolume.isSupportedStatic();
}
@Override
public VolumeImpl getImplementationType() {
return VolumeImpl.WEBDAV;
}
@Override
public boolean supportsForcedUnmount() {
return mount != null && mount.forced().isPresent();
@@ -390,6 +390,17 @@
-fx-background-color: MUTED_BG;
}
/* Note: These values below are kinda random such that it looks ok. I'm pretty sure there is room for improvement. Additionally, fx-text-fill does not work*/
.badge-debug {
-fx-font-family: 'Open Sans Bold';
-fx-font-size: 1.0em;
-fx-background-radius: 8px;
-fx-padding: 0.3em 0.55em 0.3em 0.55em;
-fx-background-color: RED_5;
-fx-background-radius: 2em;
}
/*******************************************************************************
* *
* Password Strength Indicator *
@@ -389,6 +389,16 @@
-fx-background-color: MUTED_BG;
}
/* Note: These values below are kinda random such that it looks ok. I'm pretty sure there is room for improvement. Additionally, fx-text-fill does not work*/
.badge-debug {
-fx-font-family: 'Open Sans Bold';
-fx-font-size: 1.0em;
-fx-background-radius: 8px;
-fx-padding: 0.3em 0.55em 0.3em 0.55em;
-fx-background-color: RED_5;
-fx-background-radius: 2em;
}
/*******************************************************************************
* *
* Password Strength Indicator *
@@ -1,5 +1,6 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.HBox?>
@@ -20,7 +21,17 @@
</padding>
<children>
<Label text="CRYPTOMATOR"/>
<Region HBox.hgrow="ALWAYS"/>
<Hyperlink onAction="#showGeneralPreferences" focusTraversable="false" visible="${controller.debugModeEnabled}" styleClass="badge-debug" text="DEBUG MODE" textFill="white">
<tooltip>
<Tooltip text="%main.debugModeEnabled.tooltip"/>
</tooltip>
</Hyperlink>
<Region HBox.hgrow="ALWAYS"/>
<Button contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false" onAction="#showDonationKeyPreferences" focusTraversable="false" visible="${!controller.licenseHolder.validLicense}">
<graphic>
<StackPane>
@@ -32,14 +43,6 @@
<Tooltip text="%main.donationKeyMissing.tooltip"/>
</tooltip>
</Button>
<Button contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false" onAction="#showGeneralPreferences" focusTraversable="false" visible="${controller.debugModeEnabled}">
<graphic>
<FontAwesome5IconView glyph="BUG" glyphSize="16"/>
</graphic>
<tooltip>
<Tooltip text="%main.debugModeEnabled.tooltip"/>
</tooltip>
</Button>
<Button contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false" onAction="#showPreferences" focusTraversable="false">
<graphic>
<StackPane>