From 0dc9a3a83421ae8d98980800086e13b46f959fd5 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 7 Jun 2024 14:56:54 +0200 Subject: [PATCH 01/33] align local build scripts --- dist/linux/appimage/build.sh | 36 ++++++++++++++++++------------------ dist/mac/dmg/build.sh | 15 ++++++++++----- dist/win/build.ps1 | 23 ++++++++++++----------- 3 files changed, 40 insertions(+), 34 deletions(-) diff --git a/dist/linux/appimage/build.sh b/dist/linux/appimage/build.sh index 091e66c00..d939e9434 100755 --- a/dist/linux/appimage/build.sh +++ b/dist/linux/appimage/build.sh @@ -12,9 +12,9 @@ command -v unzip >/dev/null 2>&1 || { echo >&2 "unzip not found."; exit 1; } VERSION=$(mvn -f ../../../pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout) SEMVER_STR=${VERSION} -MACHINE_TYPE=$(uname -m) +CPU_ARCH=$(uname -p) -if [[ ! "${MACHINE_TYPE}" =~ x86_64|aarch64 ]]; then echo "Platform ${MACHINE_TYPE} not supported"; exit 1; fi +if [[ ! "${CPU_ARCH}" =~ x86_64|aarch64 ]]; then echo "Platform ${CPU_ARCH} not supported"; exit 1; fi mvn -f ../../../pom.xml versions:set -DnewVersion=${SEMVER_STR} @@ -23,20 +23,20 @@ mvn -B -f ../../../pom.xml clean package -Plinux -DskipTests cp ../../../LICENSE.txt ../../../target cp ../../../target/cryptomator-*.jar ../../../target/mods - -# download javaFX jmods -OPENJFX_URL='https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_linux-x64_bin-jmods.zip' -OPENJFX_SHA='7baed11ca56d5fee85995fa6612d4299f1e8b7337287228f7f12fd50407c56f8' -OPENJFX_URL_aarch64='https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_linux-aarch64_bin-jmods.zip' -OPENJFX_SHA_aarch64='871e7b9d7af16aef2e55c1b7830d0e0b2503b13dd8641374ba7e55ecb81d2ef9' - -if [[ "${MACHINE_TYPE}" = "aarch64" ]]; then - OPENJFX_URL="${OPENJFX_URL_aarch64}"; - OPENJFX_SHA="${OPENJFX_SHA_aarch64}"; +JAVAFX_VERSION=21.0.1 +JAVAFX_ARCH="x64" +JAVAFX_JMODS_SHA256='7baed11ca56d5fee85995fa6612d4299f1e8b7337287228f7f12fd50407c56f8' +if [ "${CPU_ARCH}" = "aarch64" ]; then + JAVAFX_ARCH="aarch64" + JAVAFX_JMODS_SHA256='871e7b9d7af16aef2e55c1b7830d0e0b2503b13dd8641374ba7e55ecb81d2ef9' fi -curl -L ${OPENJFX_URL} -o openjfx-jmods.zip -echo "${OPENJFX_SHA} openjfx-jmods.zip" | shasum -a256 --check +# download javaFX jmods +JAVAFX_JMODS_URL="https://download2.gluonhq.com/openjfx/${JAVAFX_VERSION}/openjfx-21.0.1_linux-${JAVAFX_ARCH}_bin-jmods.zip" + + +curl -L ${JAVAFX_JMODS_URL} -o openjfx-jmods.zip +echo "${JAVAFX_JMODS_SHA256} openjfx-jmods.zip" | shasum -a256 --check mkdir -p openjfx-jmods unzip -o -j openjfx-jmods.zip \*/javafx.base.jmod \*/javafx.controls.jmod \*/javafx.fxml.jmod \*/javafx.graphics.jmod -d openjfx-jmods JMOD_VERSION=$(jmod describe ./openjfx-jmods/javafx.base.jmod | head -1) @@ -114,17 +114,17 @@ ln -s usr/share/applications/org.cryptomator.Cryptomator.desktop Cryptomator.App ln -s bin/cryptomator.sh Cryptomator.AppDir/AppRun # load AppImageTool -curl -L https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-${MACHINE_TYPE}.AppImage -o /tmp/appimagetool.AppImage +curl -L https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-${CPU_ARCH}.AppImage -o /tmp/appimagetool.AppImage chmod +x /tmp/appimagetool.AppImage # create AppImage /tmp/appimagetool.AppImage \ Cryptomator.AppDir \ - cryptomator-${SEMVER_STR}-${MACHINE_TYPE}.AppImage \ - -u 'gh-releases-zsync|cryptomator|cryptomator|latest|cryptomator-*-${MACHINE_TYPE}.AppImage.zsync' + cryptomator-${SEMVER_STR}-${CPU_ARCH}.AppImage \ + -u 'gh-releases-zsync|cryptomator|cryptomator|latest|cryptomator-*-${CPU_ARCH}.AppImage.zsync' echo "" -echo "Done. AppImage successfully created: cryptomator-${SEMVER_STR}-${MACHINE_TYPE}.AppImage" +echo "Done. AppImage successfully created: cryptomator-${SEMVER_STR}-${CPU_ARCH}.AppImage" echo "" echo >&2 "To clean up, run: rm -rf Cryptomator.AppDir appdir runtime squashfs-root openjfx-jmods; rm /tmp/appimagetool.AppImage openjfx-jmods.zip" echo "" diff --git a/dist/mac/dmg/build.sh b/dist/mac/dmg/build.sh index ce2380289..4f4ed3069 100755 --- a/dist/mac/dmg/build.sh +++ b/dist/mac/dmg/build.sh @@ -29,13 +29,17 @@ REVISION_NO=`git rev-list --count HEAD` VERSION_NO=`mvn -f../../../pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout | sed -rn 's/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/p'` FUSE_LIB="FUSE-T" -ARCH="undefined" +JAVAFX_VERISON=21.0.1 +JAVAFX_ARCH="undefined" +JAVAFX_JMODS_SHA256="undefined" if [ "$(machine)" = "arm64e" ]; then - ARCH="aarch64" + JAVAFX_ARCH="aarch64" + JAVAFX_JMODS_SHA256="7afaa1c57a6cc3c384d636e597b9a5364693e2db4aaec0a6e63d2fa964400b58" else - ARCH="x64" + JAVAFX_ARCH="x64" + JAVAFX_JMODS_SHA256="bd6abab20da73d5a968dcf2fd915d81b5fb919340e3bb84979ee9a888a829939" fi -OPENJFX_JMODS="https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_osx-${ARCH}_bin-jmods.zip" +JAVAFX_JMODS_URL="https://download2.gluonhq.com/openjfx/${JAVAFX_VERSION}/openjfx-${JAVAFX_VERSION}_osx-${JAVAFX_ARCH}_bin-jmods.zip" # check preconditions if [ -z "${JAVA_HOME}" ]; then echo "JAVA_HOME not set. Run using JAVA_HOME=/path/to/jdk ./build.sh"; exit 1; fi @@ -47,7 +51,8 @@ if [ -n "${CODESIGN_IDENTITY}" ]; then fi # download and check jmods -curl -L ${OPENJFX_JMODS} -o openjfx-jmods.zip +curl -L ${JAVAFX_JMODS_URL} -o openjfx-jmods.zip +echo "${JAVAFX_JMODS_SHA256} openjfx-jmods.zip" | shasum -a256 --check mkdir -p openjfx-jmods/ unzip -jo openjfx-jmods.zip \*/javafx.base.jmod \*/javafx.controls.jmod \*/javafx.fxml.jmod \*/javafx.graphics.jmod -d openjfx-jmods JMOD_VERSION=$(jmod describe openjfx-jmods/javafx.base.jmod | head -1) diff --git a/dist/win/build.ps1 b/dist/win/build.ps1 index 117c0afb8..f05a87b8c 100644 --- a/dist/win/build.ps1 +++ b/dist/win/build.ps1 @@ -51,21 +51,22 @@ if ($clean -and (Test-Path -Path $runtimeImagePath)) { } ## download jfx jmods -$jmodsVersion='21.0.1' -$jmodsUrl = "https://download2.gluonhq.com/openjfx/${jmodsVersion}/openjfx-${jmodsVersion}_windows-x64_bin-jmods.zip" -$jfxJmodsChecksum = 'daf8acae631c016c24cfe23f88469400274d3441dd890615a42dfb501f3eb94a' -$jfxJmodsZip = '.\resources\jfxJmods.zip' -if( !(Test-Path -Path $jfxJmodsZip) ) { - Write-Output "Downloading ${jmodsUrl}..." - Invoke-WebRequest $jmodsUrl -OutFile $jfxJmodsZip # redirects are followed by default +$javaFxVersion='21.0.1' +$javaFxJmodsUrl = "https://download2.gluonhq.com/openjfx/${javaFxVersion}/openjfx-${javaFxVersion}_windows-x64_bin-jmods.zip" +$javaFxJmodsSHA256 = 'daf8acae631c016c24cfe23f88469400274d3441dd890615a42dfb501f3eb94a' +$javaFxJmods = '.\resources\jfxJmods.zip' +if( !(Test-Path -Path $javaFxJmods) ) { + Write-Output "Downloading ${javaFxJmodsUrl}..." + Invoke-WebRequest $javaFxJmodsUrl -OutFile $javaFxJmods # redirects are followed by default } -$jmodsChecksumActual = $(Get-FileHash -Path $jfxJmodsZip -Algorithm SHA256).Hash -if( $jmodsChecksumActual -ne $jfxJmodsChecksum ) { - Write-Error "Checksum mismatch for jfxJmods.zip. Expected: $jfxJmodsChecksum, actual: $jmodsChecksumActual" +$jmodsChecksumActual = $(Get-FileHash -Path $javaFxJmods -Algorithm SHA256).Hash +if( $jmodsChecksumActual -ne $javaFxJmodsSHA256 ) { + Write-Error "Checksum mismatch for jfxJmods.zip. Expected: $javaFxJmodsSHA256 +, actual: $jmodsChecksumActual" exit 1; } -Expand-Archive -Path $jfxJmodsZip -Force -DestinationPath ".\resources\" +Expand-Archive -Path $javaFxJmods -Force -DestinationPath ".\resources\" Remove-Item -Recurse -Force -Path ".\resources\javafx-jmods" Move-Item -Force -Path ".\resources\javafx-jmods-*" -Destination ".\resources\javafx-jmods" -ErrorAction Stop From 0bf8fb39dd88941c98c4e0604b8db84b6fa5c5a5 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 7 Jun 2024 14:58:18 +0200 Subject: [PATCH 02/33] Update to javafx 22.0.1 --- .github/workflows/appimage.yml | 8 ++++---- .github/workflows/debian.yml | 8 ++++---- .github/workflows/mac-dmg.yml | 8 ++++---- .github/workflows/win-exe.yml | 4 ++-- dist/linux/appimage/build.sh | 6 +++--- dist/mac/dmg/build.sh | 6 +++--- dist/win/build.ps1 | 4 ++-- pom.xml | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 5d0dc2d5b..ae9aff7db 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -29,12 +29,12 @@ jobs: include: - os: ubuntu-latest appimage-suffix: x86_64 - openjfx-url: 'https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_linux-x64_bin-jmods.zip' - openjfx-sha: '7baed11ca56d5fee85995fa6612d4299f1e8b7337287228f7f12fd50407c56f8' + openjfx-url: 'https://download2.gluonhq.com/openjfx/22.0.1/openjfx-22.0.1_linux-x64_bin-jmods.zip' + openjfx-sha: 'fbb22f35951c2e049cc2554dd03c2c56b4f5adc4b2ae9248872f46175ac103d8' - os: [self-hosted, Linux, ARM64] appimage-suffix: aarch64 - openjfx-url: 'https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_linux-aarch64_bin-jmods.zip' - openjfx-sha: '871e7b9d7af16aef2e55c1b7830d0e0b2503b13dd8641374ba7e55ecb81d2ef9' + openjfx-url: 'https://download2.gluonhq.com/openjfx/22.0.1/openjfx-22.0.1_linux-aarch64_bin-jmods.zip' + openjfx-sha: '1982ad168a5e8d7cf4a9458a7d088b4f0552d0ac3f24f23fb88f8bc7e8d69a13' steps: - uses: actions/checkout@v4 - name: Setup Java diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 9c220843b..3f628c121 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -20,10 +20,10 @@ env: JAVA_VERSION: '22.0.1+8' COFFEELIBS_JDK: 22 COFFEELIBS_JDK_VERSION: '22.0.1+8-0ppa1' - OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_linux-x64_bin-jmods.zip' - OPENJFX_JMODS_AMD64_HASH: '7baed11ca56d5fee85995fa6612d4299f1e8b7337287228f7f12fd50407c56f8' - OPENJFX_JMODS_AARCH64: 'https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_linux-aarch64_bin-jmods.zip' - OPENJFX_JMODS_AARCH64_HASH: '871e7b9d7af16aef2e55c1b7830d0e0b2503b13dd8641374ba7e55ecb81d2ef9' + OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/22.0.1/openjfx-22.0.1_linux-x64_bin-jmods.zip' + OPENJFX_JMODS_AMD64_HASH: 'fbb22f35951c2e049cc2554dd03c2c56b4f5adc4b2ae9248872f46175ac103d8' + OPENJFX_JMODS_AARCH64: 'https://download2.gluonhq.com/openjfx/22.0.1/openjfx-22.0.1_linux-aarch64_bin-jmods.zip' + OPENJFX_JMODS_AARCH64_HASH: '1982ad168a5e8d7cf4a9458a7d088b4f0552d0ac3f24f23fb88f8bc7e8d69a13' jobs: build: diff --git a/.github/workflows/mac-dmg.yml b/.github/workflows/mac-dmg.yml index 7e6bde81b..fbc6def3d 100644 --- a/.github/workflows/mac-dmg.yml +++ b/.github/workflows/mac-dmg.yml @@ -37,15 +37,15 @@ jobs: output-suffix: x64 xcode-path: '/Applications/Xcode_13.2.1.app' fuse-lib: macFUSE - openjfx-url: 'https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_osx-x64_bin-jmods.zip' - openjfx-sha: 'bd6abab20da73d5a968dcf2fd915d81b5fb919340e3bb84979ee9a888a829939' + openjfx-url: 'https://download2.gluonhq.com/openjfx/22.0.1/openjfx-22.0.1_osx-x64_bin-jmods.zip' + openjfx-sha: 'e07a11c112abbdebe7c058b44c151e1e475de748671d896aef3d73f32453c248' - os: [self-hosted, macOS, ARM64] architecture: aarch64 output-suffix: arm64 xcode-path: '/Applications/Xcode_13.2.1.app' fuse-lib: FUSE-T - openjfx-url: 'https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_osx-aarch64_bin-jmods.zip' - openjfx-sha: '7afaa1c57a6cc3c384d636e597b9a5364693e2db4aaec0a6e63d2fa964400b58' + openjfx-url: 'https://download2.gluonhq.com/openjfx/22.0.1/openjfx-22.0.1_osx-aarch64_bin-jmods.zip' + openjfx-sha: '572fce94b9b09d316b960a49e3c2b5d35231ed0463e3b1c4020b8de89783b51d' steps: - uses: actions/checkout@v4 - name: Setup Java diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index b6abcf0ec..e3d5d9d87 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -17,8 +17,8 @@ on: env: JAVA_DIST: 'zulu' JAVA_VERSION: '22.0.1+8' - OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_windows-x64_bin-jmods.zip' - OPENJFX_JMODS_AMD64_HASH: 'daf8acae631c016c24cfe23f88469400274d3441dd890615a42dfb501f3eb94a' + OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/22.0.1/openjfx-22.0.1_windows-x64_bin-jmods.zip' + OPENJFX_JMODS_AMD64_HASH: 'de82e53179032a49bec005deb4438e8f261d08c4b58864a5c17e1d87286b09dd' WINFSP_MSI: 'https://github.com/winfsp/winfsp/releases/download/v2.0/winfsp-2.0.23075.msi' WINFSP_UNINSTALLER: 'https://github.com/cryptomator/winfsp-uninstaller/releases/latest/download/winfsp-uninstaller.exe' diff --git a/dist/linux/appimage/build.sh b/dist/linux/appimage/build.sh index d939e9434..6266c26bd 100755 --- a/dist/linux/appimage/build.sh +++ b/dist/linux/appimage/build.sh @@ -23,12 +23,12 @@ mvn -B -f ../../../pom.xml clean package -Plinux -DskipTests cp ../../../LICENSE.txt ../../../target cp ../../../target/cryptomator-*.jar ../../../target/mods -JAVAFX_VERSION=21.0.1 +JAVAFX_VERSION=22.0.1 JAVAFX_ARCH="x64" -JAVAFX_JMODS_SHA256='7baed11ca56d5fee85995fa6612d4299f1e8b7337287228f7f12fd50407c56f8' +JAVAFX_JMODS_SHA256='fbb22f35951c2e049cc2554dd03c2c56b4f5adc4b2ae9248872f46175ac103d8' if [ "${CPU_ARCH}" = "aarch64" ]; then JAVAFX_ARCH="aarch64" - JAVAFX_JMODS_SHA256='871e7b9d7af16aef2e55c1b7830d0e0b2503b13dd8641374ba7e55ecb81d2ef9' + JAVAFX_JMODS_SHA256='1982ad168a5e8d7cf4a9458a7d088b4f0552d0ac3f24f23fb88f8bc7e8d69a13' fi # download javaFX jmods diff --git a/dist/mac/dmg/build.sh b/dist/mac/dmg/build.sh index 4f4ed3069..56fc264b2 100755 --- a/dist/mac/dmg/build.sh +++ b/dist/mac/dmg/build.sh @@ -29,15 +29,15 @@ REVISION_NO=`git rev-list --count HEAD` VERSION_NO=`mvn -f../../../pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout | sed -rn 's/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/p'` FUSE_LIB="FUSE-T" -JAVAFX_VERISON=21.0.1 +JAVAFX_VERISON=22.0.1 JAVAFX_ARCH="undefined" JAVAFX_JMODS_SHA256="undefined" if [ "$(machine)" = "arm64e" ]; then JAVAFX_ARCH="aarch64" - JAVAFX_JMODS_SHA256="7afaa1c57a6cc3c384d636e597b9a5364693e2db4aaec0a6e63d2fa964400b58" + JAVAFX_JMODS_SHA256="572fce94b9b09d316b960a49e3c2b5d35231ed0463e3b1c4020b8de89783b51d" else JAVAFX_ARCH="x64" - JAVAFX_JMODS_SHA256="bd6abab20da73d5a968dcf2fd915d81b5fb919340e3bb84979ee9a888a829939" + JAVAFX_JMODS_SHA256="e07a11c112abbdebe7c058b44c151e1e475de748671d896aef3d73f32453c248" fi JAVAFX_JMODS_URL="https://download2.gluonhq.com/openjfx/${JAVAFX_VERSION}/openjfx-${JAVAFX_VERSION}_osx-${JAVAFX_ARCH}_bin-jmods.zip" diff --git a/dist/win/build.ps1 b/dist/win/build.ps1 index f05a87b8c..e88c3c8e7 100644 --- a/dist/win/build.ps1 +++ b/dist/win/build.ps1 @@ -51,9 +51,9 @@ if ($clean -and (Test-Path -Path $runtimeImagePath)) { } ## download jfx jmods -$javaFxVersion='21.0.1' +$javaFxVersion='22.0.1' $javaFxJmodsUrl = "https://download2.gluonhq.com/openjfx/${javaFxVersion}/openjfx-${javaFxVersion}_windows-x64_bin-jmods.zip" -$javaFxJmodsSHA256 = 'daf8acae631c016c24cfe23f88469400274d3441dd890615a42dfb501f3eb94a' +$javaFxJmodsSHA256 = 'de82e53179032a49bec005deb4438e8f261d08c4b58864a5c17e1d87286b09dd' $javaFxJmods = '.\resources\jfxJmods.zip' if( !(Test-Path -Path $javaFxJmods) ) { Write-Output "Downloading ${javaFxJmodsUrl}..." diff --git a/pom.xml b/pom.xml index e9cb5cc7c..de19ab9a8 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 2.2 33.2.1-jre 2.17.1 - 21.0.1 + 22.0.1 4.4.0 9.37.3 1.5.6 From 92bf73297a53d017c9191673dccdbc95927e87c9 Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Tue, 11 Jun 2024 14:43:56 +0200 Subject: [PATCH 03/33] add dokany info dialog --- .../org/cryptomator/ui/common/FxmlFile.java | 1 + .../DokanyInfoDialogComponent.java | 34 +++++++++++ .../DokanyInfoDialogController.java | 33 +++++++++++ .../DokanyInfoDialogModule.java | 57 +++++++++++++++++++ .../DokanyInfoDialogScoped.java | 13 +++++ .../DokanyInfoDialogWindow.java | 14 +++++ .../cryptomator/ui/fxapp/FxApplication.java | 18 ++++++ .../ui/fxapp/FxApplicationModule.java | 2 + .../ui/fxapp/FxApplicationWindows.java | 11 +++- src/main/resources/fxml/dokany_info.fxml | 53 +++++++++++++++++ src/main/resources/i18n/strings.properties | 5 ++ 11 files changed, 240 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogComponent.java create mode 100644 src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogController.java create mode 100644 src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogModule.java create mode 100644 src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogScoped.java create mode 100644 src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogWindow.java create mode 100644 src/main/resources/fxml/dokany_info.fxml diff --git a/src/main/java/org/cryptomator/ui/common/FxmlFile.java b/src/main/java/org/cryptomator/ui/common/FxmlFile.java index 1a2374f85..c8529a8b6 100644 --- a/src/main/java/org/cryptomator/ui/common/FxmlFile.java +++ b/src/main/java/org/cryptomator/ui/common/FxmlFile.java @@ -12,6 +12,7 @@ public enum FxmlFile { CONVERTVAULT_HUBTOPASSWORD_START("/fxml/convertvault_hubtopassword_start.fxml"), // CONVERTVAULT_HUBTOPASSWORD_CONVERT("/fxml/convertvault_hubtopassword_convert.fxml"), // CONVERTVAULT_HUBTOPASSWORD_SUCCESS("/fxml/convertvault_hubtopassword_success.fxml"), // + DOKANY_INFO_DIALOG("/fxml/dokany_info.fxml"), // ERROR("/fxml/error.fxml"), // FORGET_PASSWORD("/fxml/forget_password.fxml"), // HEALTH_START("/fxml/health_start.fxml"), // diff --git a/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogComponent.java b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogComponent.java new file mode 100644 index 000000000..4c4f3b552 --- /dev/null +++ b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogComponent.java @@ -0,0 +1,34 @@ +package org.cryptomator.ui.dokanyinfodialog; + +import dagger.Lazy; +import dagger.Subcomponent; +import org.cryptomator.ui.common.FxmlFile; +import org.cryptomator.ui.common.FxmlScene; + +import javafx.scene.Scene; +import javafx.stage.Stage; + +@DokanyInfoDialogScoped +@Subcomponent(modules = {DokanyInfoDialogModule.class}) +public interface DokanyInfoDialogComponent { + + @DokanyInfoDialogWindow + Stage window(); + + @FxmlScene(FxmlFile.DOKANY_INFO_DIALOG) + Lazy dokanyInfoScene(); + + + default void showDokanyInfoWindow() { + Stage stage = window(); + stage.setScene(dokanyInfoScene().get()); + stage.sizeToScene(); + stage.show(); + } + + @Subcomponent.Factory + interface Factory { + + DokanyInfoDialogComponent create(); + } +} \ No newline at end of file diff --git a/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogController.java b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogController.java new file mode 100644 index 000000000..06f4f34d6 --- /dev/null +++ b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogController.java @@ -0,0 +1,33 @@ +package org.cryptomator.ui.dokanyinfodialog; + +import org.cryptomator.ui.common.FxController; +import org.cryptomator.ui.fxapp.FxApplicationWindows; +import org.cryptomator.ui.preferences.SelectedPreferencesTab; + +import javax.inject.Inject; +import javafx.fxml.FXML; +import javafx.stage.Stage; + + +@DokanyInfoDialogScoped +public class DokanyInfoDialogController implements FxController { + + private final Stage window; + private final FxApplicationWindows applicationWindows; + + @Inject + DokanyInfoDialogController(@DokanyInfoDialogWindow Stage window, FxApplicationWindows applicationWindows) { + this.window = window; + this.applicationWindows = applicationWindows; + } + + @FXML + public void close() { + window.close(); + } + + public void openVolumePreferences() { + applicationWindows.showPreferencesWindow(SelectedPreferencesTab.VOLUME); + } + +} \ No newline at end of file diff --git a/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogModule.java b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogModule.java new file mode 100644 index 000000000..ec6817a2f --- /dev/null +++ b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogModule.java @@ -0,0 +1,57 @@ +package org.cryptomator.ui.dokanyinfodialog; + +import dagger.Binds; +import dagger.Module; +import dagger.Provides; +import dagger.multibindings.IntoMap; +import org.cryptomator.ui.common.DefaultSceneFactory; +import org.cryptomator.ui.common.FxController; +import org.cryptomator.ui.common.FxControllerKey; +import org.cryptomator.ui.common.FxmlFile; +import org.cryptomator.ui.common.FxmlLoaderFactory; +import org.cryptomator.ui.common.FxmlScene; +import org.cryptomator.ui.common.StageFactory; + +import javax.inject.Provider; +import javafx.scene.Scene; +import javafx.stage.Modality; +import javafx.stage.Stage; +import java.util.Map; +import java.util.ResourceBundle; + +@Module +abstract class DokanyInfoDialogModule { + + @Provides + @DokanyInfoDialogWindow + @DokanyInfoDialogScoped + static FxmlLoaderFactory provideFxmlLoaderFactory(Map, Provider> factories, DefaultSceneFactory sceneFactory, ResourceBundle resourceBundle) { + return new FxmlLoaderFactory(factories, sceneFactory, resourceBundle); + } + + @Provides + @DokanyInfoDialogWindow + @DokanyInfoDialogScoped + static Stage provideStage(StageFactory factory, ResourceBundle resourceBundle) { + Stage stage = factory.create(); + stage.setTitle(resourceBundle.getString("dokanyInfo.title")); + stage.setMinWidth(500); + stage.setMinHeight(100); + stage.initModality(Modality.APPLICATION_MODAL); + return stage; + } + + @Provides + @FxmlScene(FxmlFile.DOKANY_INFO_DIALOG) + @DokanyInfoDialogScoped + static Scene provideDokanyInfoDialogScene(@DokanyInfoDialogWindow FxmlLoaderFactory fxmlLoaders) { + return fxmlLoaders.createScene(FxmlFile.DOKANY_INFO_DIALOG); + } + + + @Binds + @IntoMap + @FxControllerKey(DokanyInfoDialogController.class) + abstract FxController bindDokanyInfoDialogController(DokanyInfoDialogController controller); + +} diff --git a/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogScoped.java b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogScoped.java new file mode 100644 index 000000000..adb721cac --- /dev/null +++ b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogScoped.java @@ -0,0 +1,13 @@ +package org.cryptomator.ui.dokanyinfodialog; + +import javax.inject.Scope; +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Scope +@Documented +@Retention(RetentionPolicy.RUNTIME) +@interface DokanyInfoDialogScoped { + +} diff --git a/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogWindow.java b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogWindow.java new file mode 100644 index 000000000..ac3b9544e --- /dev/null +++ b/src/main/java/org/cryptomator/ui/dokanyinfodialog/DokanyInfoDialogWindow.java @@ -0,0 +1,14 @@ +package org.cryptomator.ui.dokanyinfodialog; + +import javax.inject.Qualifier; +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; + +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +@Qualifier +@Documented +@Retention(RUNTIME) +@interface DokanyInfoDialogWindow { + +} diff --git a/src/main/java/org/cryptomator/ui/fxapp/FxApplication.java b/src/main/java/org/cryptomator/ui/fxapp/FxApplication.java index 711a0fa44..605411748 100644 --- a/src/main/java/org/cryptomator/ui/fxapp/FxApplication.java +++ b/src/main/java/org/cryptomator/ui/fxapp/FxApplication.java @@ -3,6 +3,7 @@ package org.cryptomator.ui.fxapp; import dagger.Lazy; import org.cryptomator.common.Environment; import org.cryptomator.common.settings.Settings; +import org.cryptomator.common.settings.VaultSettings; import org.cryptomator.ui.traymenu.TrayMenuComponent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -75,6 +76,23 @@ public class FxApplication { appWindows.checkAndShowUpdateReminderWindow(); } + var dokany = "org.cryptomator.frontend.dokany.mount.DokanyMountProvider"; + boolean dokanyInfoWindowShown = false; + if (settings.mountService.getValueSafe().equals(dokany)) { + appWindows.showDokanyInfoWindow(); + dokanyInfoWindowShown = true; + settings.mountService.set(null); + } + for (VaultSettings vaultSettings : settings.directories) { + if (vaultSettings.mountService.getValueSafe().equals(dokany)) { + if (!dokanyInfoWindowShown) { + appWindows.showDokanyInfoWindow(); + dokanyInfoWindowShown = true; + } + vaultSettings.mountService.set(null); + } + } + launchEventHandler.startHandlingLaunchEvents(); autoUnlocker.tryUnlockForTimespan(2, TimeUnit.MINUTES); } diff --git a/src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java b/src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java index af98e284c..d6734a3a3 100644 --- a/src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java +++ b/src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java @@ -7,6 +7,7 @@ package org.cryptomator.ui.fxapp; import dagger.Module; import dagger.Provides; +import org.cryptomator.ui.dokanyinfodialog.DokanyInfoDialogComponent; import org.cryptomator.ui.error.ErrorComponent; import org.cryptomator.ui.health.HealthCheckComponent; import org.cryptomator.ui.lock.LockComponent; @@ -33,6 +34,7 @@ import java.io.InputStream; ErrorComponent.class, // HealthCheckComponent.class, // UpdateReminderComponent.class, // + DokanyInfoDialogComponent.class, // ShareVaultComponent.class}) abstract class FxApplicationModule { diff --git a/src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java b/src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java index 41a7ca785..9e0f11abf 100644 --- a/src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java +++ b/src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java @@ -5,6 +5,7 @@ import dagger.Lazy; import org.cryptomator.common.vaults.Vault; import org.cryptomator.common.vaults.VaultState; import org.cryptomator.integrations.tray.TrayIntegrationProvider; +import org.cryptomator.ui.dokanyinfodialog.DokanyInfoDialogComponent; import org.cryptomator.ui.error.ErrorComponent; import org.cryptomator.ui.lock.LockComponent; import org.cryptomator.ui.mainwindow.MainWindowComponent; @@ -48,6 +49,7 @@ public class FxApplicationWindows { private final QuitComponent.Builder quitWindowBuilder; private final UnlockComponent.Factory unlockWorkflowFactory; private final UpdateReminderComponent.Factory updateReminderWindowBuilder; + private final DokanyInfoDialogComponent.Factory dokanyInfoWindowBuilder; private final LockComponent.Factory lockWorkflowFactory; private final ErrorComponent.Factory errorWindowFactory; private final ExecutorService executor; @@ -56,13 +58,14 @@ public class FxApplicationWindows { private final FilteredList visibleWindows; @Inject - public FxApplicationWindows(@PrimaryStage Stage primaryStage, + public FxApplicationWindows(@PrimaryStage Stage primaryStage, // Optional trayIntegration, // Lazy mainWindow, // Lazy preferencesWindow, // QuitComponent.Builder quitWindowBuilder, // UnlockComponent.Factory unlockWorkflowFactory, // UpdateReminderComponent.Factory updateReminderWindowBuilder, // + DokanyInfoDialogComponent.Factory dokanyInfoWindowBuilder, // LockComponent.Factory lockWorkflowFactory, // ErrorComponent.Factory errorWindowFactory, // VaultOptionsComponent.Factory vaultOptionsWindow, // @@ -75,6 +78,7 @@ public class FxApplicationWindows { this.quitWindowBuilder = quitWindowBuilder; this.unlockWorkflowFactory = unlockWorkflowFactory; this.updateReminderWindowBuilder = updateReminderWindowBuilder; + this.dokanyInfoWindowBuilder = dokanyInfoWindowBuilder; this.lockWorkflowFactory = lockWorkflowFactory; this.errorWindowFactory = errorWindowFactory; this.executor = executor; @@ -142,6 +146,11 @@ public class FxApplicationWindows { CompletableFuture.runAsync(() -> updateReminderWindowBuilder.create().checkAndShowUpdateReminderWindow(), Platform::runLater); } + public void showDokanyInfoWindow() { + CompletableFuture.runAsync(() -> dokanyInfoWindowBuilder.create().showDokanyInfoWindow(), Platform::runLater); + } + + public CompletionStage startUnlockWorkflow(Vault vault, @Nullable Stage owner) { return CompletableFuture.supplyAsync(() -> { Preconditions.checkState(vault.stateProperty().transition(VaultState.Value.LOCKED, VaultState.Value.PROCESSING), "Vault not locked."); diff --git a/src/main/resources/fxml/dokany_info.fxml b/src/main/resources/fxml/dokany_info.fxml new file mode 100644 index 000000000..abf44a074 --- /dev/null +++ b/src/main/resources/fxml/dokany_info.fxml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file From 3e6204a657e032a37a1211d1643c3aa4e6f12eed Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Mon, 1 Jul 2024 12:32:50 +0200 Subject: [PATCH 24/33] remove showMinimizeButton setting --- src/main/java/org/cryptomator/common/settings/Settings.java | 4 ---- .../java/org/cryptomator/common/settings/SettingsJson.java | 3 --- .../ui/preferences/InterfacePreferencesController.java | 3 --- src/main/resources/fxml/preferences_interface.fxml | 3 --- 4 files changed, 13 deletions(-) diff --git a/src/main/java/org/cryptomator/common/settings/Settings.java b/src/main/java/org/cryptomator/common/settings/Settings.java index a54e71a4f..04facdcd0 100644 --- a/src/main/java/org/cryptomator/common/settings/Settings.java +++ b/src/main/java/org/cryptomator/common/settings/Settings.java @@ -59,7 +59,6 @@ public class Settings { public final StringProperty keychainProvider; public final ObjectProperty userInterfaceOrientation; public final StringProperty licenseKey; - public final BooleanProperty showMinimizeButton; public final BooleanProperty showTrayIcon; public final IntegerProperty windowXPosition; public final IntegerProperty windowYPosition; @@ -96,7 +95,6 @@ public class Settings { this.keychainProvider = new SimpleStringProperty(this, "keychainProvider", json.keychainProvider); this.userInterfaceOrientation = new SimpleObjectProperty<>(this, "userInterfaceOrientation", parseEnum(json.uiOrientation, NodeOrientation.class, NodeOrientation.LEFT_TO_RIGHT)); this.licenseKey = new SimpleStringProperty(this, "licenseKey", json.licenseKey); - this.showMinimizeButton = new SimpleBooleanProperty(this, "showMinimizeButton", json.showMinimizeButton); this.showTrayIcon = new SimpleBooleanProperty(this, "showTrayIcon", json.showTrayIcon); this.windowXPosition = new SimpleIntegerProperty(this, "windowXPosition", json.windowXPosition); this.windowYPosition = new SimpleIntegerProperty(this, "windowYPosition", json.windowYPosition); @@ -123,7 +121,6 @@ public class Settings { keychainProvider.addListener(this::somethingChanged); userInterfaceOrientation.addListener(this::somethingChanged); licenseKey.addListener(this::somethingChanged); - showMinimizeButton.addListener(this::somethingChanged); showTrayIcon.addListener(this::somethingChanged); windowXPosition.addListener(this::somethingChanged); windowYPosition.addListener(this::somethingChanged); @@ -177,7 +174,6 @@ public class Settings { json.keychainProvider = keychainProvider.get(); json.uiOrientation = userInterfaceOrientation.get().name(); json.licenseKey = licenseKey.get(); - json.showMinimizeButton = showMinimizeButton.get(); json.showTrayIcon = showTrayIcon.get(); json.windowXPosition = windowXPosition.get(); json.windowYPosition = windowYPosition.get(); diff --git a/src/main/java/org/cryptomator/common/settings/SettingsJson.java b/src/main/java/org/cryptomator/common/settings/SettingsJson.java index 2ded82885..1dd68e02a 100644 --- a/src/main/java/org/cryptomator/common/settings/SettingsJson.java +++ b/src/main/java/org/cryptomator/common/settings/SettingsJson.java @@ -51,9 +51,6 @@ class SettingsJson { @JsonProperty("port") int port = Settings.DEFAULT_PORT; - @JsonProperty("showMinimizeButton") - boolean showMinimizeButton = Settings.DEFAULT_SHOW_MINIMIZE_BUTTON; - @JsonProperty("showTrayIcon") boolean showTrayIcon; diff --git a/src/main/java/org/cryptomator/ui/preferences/InterfacePreferencesController.java b/src/main/java/org/cryptomator/ui/preferences/InterfacePreferencesController.java index 40983c3f0..937431571 100644 --- a/src/main/java/org/cryptomator/ui/preferences/InterfacePreferencesController.java +++ b/src/main/java/org/cryptomator/ui/preferences/InterfacePreferencesController.java @@ -36,7 +36,6 @@ public class InterfacePreferencesController implements FxController { private final ResourceBundle resourceBundle; private final SupportedLanguages supportedLanguages; public ChoiceBox themeChoiceBox; - public CheckBox showMinimizeButtonCheckbox; public CheckBox showTrayIconCheckbox; public ChoiceBox preferredLanguageChoiceBox; public ToggleGroup nodeOrientation; @@ -63,8 +62,6 @@ public class InterfacePreferencesController implements FxController { themeChoiceBox.valueProperty().bindBidirectional(settings.theme); themeChoiceBox.setConverter(new UiThemeConverter(resourceBundle)); - showMinimizeButtonCheckbox.selectedProperty().bindBidirectional(settings.showMinimizeButton); - showTrayIconCheckbox.selectedProperty().bindBidirectional(settings.showTrayIcon); preferredLanguageChoiceBox.getItems().addAll(supportedLanguages.getLanguageTags()); diff --git a/src/main/resources/fxml/preferences_interface.fxml b/src/main/resources/fxml/preferences_interface.fxml index 6cb9b7d73..990b66c8c 100644 --- a/src/main/resources/fxml/preferences_interface.fxml +++ b/src/main/resources/fxml/preferences_interface.fxml @@ -37,9 +37,6 @@ - - - From d58307d1d65fd9734f9dd54e22604129c76c8b1b Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Mon, 1 Jul 2024 13:09:53 +0200 Subject: [PATCH 25/33] optimize vaultList height update to avoid repeated bindings --- .../java/org/cryptomator/ui/mainwindow/VaultListController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java index 92817d321..db615061e 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java @@ -124,7 +124,7 @@ public class VaultListController implements FxController { } }); - vaults.addListener((ListChangeListener) _ -> vaultList.prefHeightProperty().bind(vaultList.fixedCellSizeProperty().multiply(vaultList.getItems().size()))); + vaultList.prefHeightProperty().bind(Bindings.size(vaultList.getItems()).multiply(vaultList.fixedCellSizeProperty())); selectedVault.bind(vaultList.getSelectionModel().selectedItemProperty()); vaults.addListener((ListChangeListener.Change c) -> { From 902c66cf1e8121578372c54503c2daed62654b67 Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Mon, 1 Jul 2024 18:19:30 +0200 Subject: [PATCH 26/33] removed vbox id and renamed style --- .../org/cryptomator/ui/mainwindow/VaultListController.java | 2 +- src/main/resources/css/dark_theme.css | 2 +- src/main/resources/css/light_theme.css | 2 +- src/main/resources/fxml/vault_list.fxml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java index db615061e..dbe81bcc8 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java @@ -118,7 +118,7 @@ public class VaultListController implements FxController { vaultList.maxHeightProperty().bind(vaultList.prefHeightProperty()); vaultList.prefWidthProperty().bind(scrollPane.widthProperty()); - vbox.heightProperty().addListener((_, oldValue, newValue) -> { + scrollPane.heightProperty().addListener((_, oldValue, newValue) -> { if(newValue.doubleValue()>oldValue.doubleValue()){ scrollPane.setVvalue(1.0); } diff --git a/src/main/resources/css/dark_theme.css b/src/main/resources/css/dark_theme.css index bba91cb11..d01230f09 100644 --- a/src/main/resources/css/dark_theme.css +++ b/src/main/resources/css/dark_theme.css @@ -341,7 +341,7 @@ -fx-background-color: CONTROL_BG_ARMED; } -.vault-list-box { +.left-side-panel { -fx-background-color: CONTROL_BG_NORMAL; } diff --git a/src/main/resources/css/light_theme.css b/src/main/resources/css/light_theme.css index d000c0464..7d7d53645 100644 --- a/src/main/resources/css/light_theme.css +++ b/src/main/resources/css/light_theme.css @@ -340,7 +340,7 @@ -fx-background-color: CONTROL_BG_ARMED; } -.vault-list-box { +.left-side-panel { -fx-background-color: CONTROL_BG_NORMAL; } diff --git a/src/main/resources/fxml/vault_list.fxml b/src/main/resources/fxml/vault_list.fxml index a1fe141db..ad80c9a2c 100644 --- a/src/main/resources/fxml/vault_list.fxml +++ b/src/main/resources/fxml/vault_list.fxml @@ -16,9 +16,9 @@ fx:id="root" fx:controller="org.cryptomator.ui.mainwindow.VaultListController" minWidth="206"> - + - + From a88e08147d826b7fd5d182b4ab26bd6489a294b0 Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Tue, 2 Jul 2024 15:08:07 +0200 Subject: [PATCH 27/33] changed background color of pref button --- src/main/resources/css/light_theme.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/css/light_theme.css b/src/main/resources/css/light_theme.css index 7d7d53645..74a0e72f8 100644 --- a/src/main/resources/css/light_theme.css +++ b/src/main/resources/css/light_theme.css @@ -356,6 +356,7 @@ } .preferences-btn { + -fx-background-color: MAIN_BG; -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; -fx-border-width: 1px 0 0 0; } From 59a2398c4c9b506ab63b9d61e283dc18267a822a Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Thu, 4 Jul 2024 11:49:37 +0200 Subject: [PATCH 28/33] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 2b0a78336..ecbd11165 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,6 @@ Cryptomator is provided free of charge as an open-source project despite the hig Mow Capital - EaseUS Hassmann IT-Forensik From 70e52b1a3186316447be755c816c6db75e32d6d1 Mon Sep 17 00:00:00 2001 From: Ralph Plawetzki Date: Sun, 7 Jul 2024 15:41:28 +0200 Subject: [PATCH 29/33] Fix typo Closes #3480 --- dist/linux/appimage/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/linux/appimage/build.sh b/dist/linux/appimage/build.sh index e0af3999a..91432ec4b 100755 --- a/dist/linux/appimage/build.sh +++ b/dist/linux/appimage/build.sh @@ -32,7 +32,7 @@ if [ "${CPU_ARCH}" = "aarch64" ]; then fi # download javaFX jmods -JAVAFX_JMODS_URL="https://download2.gluonhq.com/openjfx/${JAVAFX_VERSION}/openjfx-21.0.1_linux-${JAVAFX_ARCH}_bin-jmods.zip" +JAVAFX_JMODS_URL="https://download2.gluonhq.com/openjfx/${JAVAFX_VERSION}/openjfx-${JAVAFX_VERSION}_linux-${JAVAFX_ARCH}_bin-jmods.zip" curl -L ${JAVAFX_JMODS_URL} -o openjfx-jmods.zip From b4f9bc62cae7d75640c876b75983925195033779 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 07:52:56 +0000 Subject: [PATCH 30/33] Bump the maven-build-plugins group across 1 directory with 3 updates (#3484) --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 6fb45d9d7..96cf25861 100644 --- a/pom.xml +++ b/pom.xml @@ -62,15 +62,15 @@ 24.1.0 - 9.2.0 + 10.0.2 0.8.12 2.4.0 1.2.1 3.13.0 3.3.1 - 3.7.0 + 3.7.1 3.3.0 - 3.4.1 + 3.4.2 From cb054bb4f5c0966abb16badd87c1a553eb0f501f Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Tue, 9 Jul 2024 13:46:41 +0200 Subject: [PATCH 31/33] fix update available check in preference tab selection --- .../org/cryptomator/ui/preferences/PreferencesController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/cryptomator/ui/preferences/PreferencesController.java b/src/main/java/org/cryptomator/ui/preferences/PreferencesController.java index 0937fccd9..ad3d08491 100644 --- a/src/main/java/org/cryptomator/ui/preferences/PreferencesController.java +++ b/src/main/java/org/cryptomator/ui/preferences/PreferencesController.java @@ -37,7 +37,7 @@ public class PreferencesController implements FxController { this.env = env; this.window = window; this.selectedTabProperty = selectedTabProperty; - this.updateAvailable = updateChecker.latestVersionProperty().isNotNull(); + this.updateAvailable = updateChecker.updateAvailableProperty(); } @FXML From 5f5b5a5426be9875bc29b7eadaea6fc82f06b2ad Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Tue, 9 Jul 2024 13:48:45 +0200 Subject: [PATCH 32/33] set preferences window min width and height --- .../org/cryptomator/ui/preferences/PreferencesComponent.java | 2 ++ src/main/resources/fxml/preferences.fxml | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/preferences/PreferencesComponent.java b/src/main/java/org/cryptomator/ui/preferences/PreferencesComponent.java index 8dcb11fd8..2d569970d 100644 --- a/src/main/java/org/cryptomator/ui/preferences/PreferencesComponent.java +++ b/src/main/java/org/cryptomator/ui/preferences/PreferencesComponent.java @@ -30,6 +30,8 @@ public interface PreferencesComponent { selectedTabProperty().set(selectedTab); Stage stage = window(); stage.setScene(scene().get()); + stage.setMinWidth(420); + stage.setMinHeight(300); stage.show(); stage.requestFocus(); return stage; diff --git a/src/main/resources/fxml/preferences.fxml b/src/main/resources/fxml/preferences.fxml index c96eb5395..b516616c1 100644 --- a/src/main/resources/fxml/preferences.fxml +++ b/src/main/resources/fxml/preferences.fxml @@ -7,8 +7,6 @@ xmlns="http://javafx.com/javafx" fx:id="tabPane" fx:controller="org.cryptomator.ui.preferences.PreferencesController" - minWidth="-Infinity" - maxWidth="-Infinity" prefWidth="650" tabMinWidth="60" tabClosingPolicy="UNAVAILABLE" From 7b132adfe29ffb2208c5ddf698752de1bfdff219 Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Tue, 16 Jul 2024 14:31:11 +0200 Subject: [PATCH 33/33] adjust add vault button position for improved UI --- .../ui/mainwindow/VaultListController.java | 20 +--- src/main/resources/css/dark_theme.css | 81 ++-------------- src/main/resources/css/light_theme.css | 80 ++-------------- src/main/resources/fxml/vault_list.fxml | 95 ++++++++++--------- src/main/resources/i18n/strings.properties | 11 +-- 5 files changed, 72 insertions(+), 215 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java index dbe81bcc8..5cd4c38ef 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java @@ -25,10 +25,8 @@ import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.geometry.Side; -import javafx.scene.control.Button; import javafx.scene.control.ContextMenu; import javafx.scene.control.ListView; -import javafx.scene.control.ScrollPane; import javafx.scene.input.ContextMenuEvent; import javafx.scene.input.DragEvent; import javafx.scene.input.KeyCode; @@ -75,11 +73,9 @@ public class VaultListController implements FxController { private final FxApplicationWindows appWindows; public ListView vaultList; - public ScrollPane scrollPane; public VBox vbox; public StackPane root; - public Button addVaultBtn; - public HBox addVaultArea; + public HBox addVaultButton; @FXML private ContextMenu addVaultContextMenu; @@ -114,18 +110,6 @@ public class VaultListController implements FxController { vaultList.setItems(vaults); vaultList.setCellFactory(cellFactory); - vaultList.prefHeightProperty().bind(vaultList.fixedCellSizeProperty().multiply(vaultList.getItems().size())); - vaultList.maxHeightProperty().bind(vaultList.prefHeightProperty()); - vaultList.prefWidthProperty().bind(scrollPane.widthProperty()); - - scrollPane.heightProperty().addListener((_, oldValue, newValue) -> { - if(newValue.doubleValue()>oldValue.doubleValue()){ - scrollPane.setVvalue(1.0); - } - }); - - vaultList.prefHeightProperty().bind(Bindings.size(vaultList.getItems()).multiply(vaultList.fixedCellSizeProperty())); - selectedVault.bind(vaultList.getSelectionModel().selectedItemProperty()); vaults.addListener((ListChangeListener.Change c) -> { while (c.next()) { @@ -191,7 +175,7 @@ public class VaultListController implements FxController { if (addVaultContextMenu.isShowing()) { addVaultContextMenu.hide(); } else { - addVaultContextMenu.show(addVaultArea, Side.BOTTOM, 0.0, 0.0); + addVaultContextMenu.show(addVaultButton, Side.BOTTOM, 0.0, 0.0); } } diff --git a/src/main/resources/css/dark_theme.css b/src/main/resources/css/dark_theme.css index d01230f09..02f1ef028 100644 --- a/src/main/resources/css/dark_theme.css +++ b/src/main/resources/css/dark_theme.css @@ -181,31 +181,20 @@ -fx-border-width: 1px; } -.main-window .title { - -fx-background-color: CONTROL_BORDER_NORMAL, TITLE_BG; - -fx-background-insets: 0, 0 0 1px 0; +.main-window .button-bar { + -fx-background-color: MAIN_BG; + -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; + -fx-border-width: 1px 0 0 0; } -.main-window .title .button { - -fx-pref-height: 30px; - -fx-pref-width: 30px; - -fx-background-color: none; - -fx-padding: 0; +.main-window .button-left { + -fx-border-color: CONTROL_BORDER_NORMAL; + -fx-border-width: 0 1px 0 0; } -.main-window .title .button .glyph-icon { - -fx-fill: white; -} - -.main-window .title .button:armed .glyph-icon { - -fx-fill: GRAY_8; -} - -.main-window .update-indicator { - -fx-background-color: white, RED_5; - -fx-background-insets: 1px, 2px; - -fx-background-radius: 6px, 5px; - -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.8), 2, 0, 0, 0); +.main-window .button-right { + -fx-border-color: CONTROL_BORDER_NORMAL; + -fx-border-width: 0 0 0 1px; } /******************************************************************************* @@ -322,46 +311,6 @@ -fx-fill: transparent; } -.button.toolbar-button { - -fx-min-height: 40px; - -fx-background-color: transparent; - -fx-background-insets: 0; - -fx-background-radius: 0; - -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; - -fx-border-width: 1px 0 0 0; - -fx-padding: 0; -} - -.button.toolbar-button:focused { - -fx-background-color: CONTROL_BORDER_FOCUSED, MAIN_BG; - -fx-background-insets: 0, 2px 1px 1px 1px; -} - -.button.toolbar-button:armed { - -fx-background-color: CONTROL_BG_ARMED; -} - -.left-side-panel { - -fx-background-color: CONTROL_BG_NORMAL; -} - -.add-vault-btn { - -fx-background-color: CONTROL_BG_NORMAL; -} -.add-vault-btn .icon { - -fx-fill: TEXT_FILL_MUTED; -} -.add-vault-btn-label { - -fx-font-family: 'Open Sans SemiBold'; - -fx-font-size: 1.0em; -} - -.preferences-btn { - -fx-background-color: MAIN_BG; - -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; - -fx-border-width: 1px 0 0 0; -} - /******************************************************************************* * * * ScrollBar * @@ -415,16 +364,6 @@ -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 * diff --git a/src/main/resources/css/light_theme.css b/src/main/resources/css/light_theme.css index 74a0e72f8..3081ef2d3 100644 --- a/src/main/resources/css/light_theme.css +++ b/src/main/resources/css/light_theme.css @@ -181,30 +181,20 @@ -fx-border-width: 1px; } -.main-window .title { - -fx-background-color: TITLE_BG; +.main-window .button-bar { + -fx-background-color: MAIN_BG; + -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; + -fx-border-width: 1px 0 0 0; } -.main-window .title .button { - -fx-pref-height: 30px; - -fx-pref-width: 30px; - -fx-background-color: none; - -fx-padding: 0; +.main-window .button-bar .button-left { + -fx-border-color: CONTROL_BORDER_NORMAL; + -fx-border-width: 0 1px 0 0; } -.main-window .title .button .glyph-icon { - -fx-fill: white; -} - -.main-window .title .button:armed .glyph-icon { - -fx-fill: GRAY_8; -} - -.main-window .update-indicator { - -fx-background-color: white, RED_5; - -fx-background-insets: 1px, 2px; - -fx-background-radius: 6px, 5px; - -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.8), 2, 0, 0, 0); +.main-window .button-bar .button-right { + -fx-border-color: CONTROL_BORDER_NORMAL; + -fx-border-width: 0 0 0 1px; } /******************************************************************************* @@ -321,46 +311,6 @@ -fx-fill: transparent; } -.button.toolbar-button { - -fx-min-height: 40px; - -fx-background-color: transparent; - -fx-background-insets: 0; - -fx-background-radius: 0; - -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; - -fx-border-width: 1px 0 0 0; - -fx-padding: 0; -} - -.button.toolbar-button:focused { - -fx-background-color: CONTROL_BORDER_FOCUSED, MAIN_BG; - -fx-background-insets: 0, 2px 1px 1px 1px; -} - -.button.toolbar-button:armed { - -fx-background-color: CONTROL_BG_ARMED; -} - -.left-side-panel { - -fx-background-color: CONTROL_BG_NORMAL; -} - -.add-vault-btn { - -fx-background-color: CONTROL_BG_NORMAL; -} -.add-vault-btn .icon { - -fx-fill: GRAY_4; -} -.add-vault-btn-label { - -fx-font-family: 'Open Sans SemiBold'; - -fx-font-size: 1.0em; -} - -.preferences-btn { - -fx-background-color: MAIN_BG; - -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; - -fx-border-width: 1px 0 0 0; -} - /******************************************************************************* * * * ScrollBar * @@ -414,16 +364,6 @@ -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 * diff --git a/src/main/resources/fxml/vault_list.fxml b/src/main/resources/fxml/vault_list.fxml index ad80c9a2c..465ef199d 100644 --- a/src/main/resources/fxml/vault_list.fxml +++ b/src/main/resources/fxml/vault_list.fxml @@ -10,61 +10,62 @@ - + - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/main/resources/i18n/strings.properties b/src/main/resources/i18n/strings.properties index 64422536d..26e6f6ce2 100644 --- a/src/main/resources/i18n/strings.properties +++ b/src/main/resources/i18n/strings.properties @@ -300,7 +300,6 @@ preferences.interface.language.auto=System Default preferences.interface.interfaceOrientation=Interface Orientation preferences.interface.interfaceOrientation.ltr=Left to Right preferences.interface.interfaceOrientation.rtl=Right to Left -preferences.interface.showMinimizeButton=Show minimize button preferences.interface.showTrayIcon=Show tray icon (requires restart) ## Volume preferences.volume=Virtual Drive @@ -376,11 +375,6 @@ stats.access.total=Total accesses: %d # Main Window -main.closeBtn.tooltip=Close -main.minimizeBtn.tooltip=Minimize -main.preferencesBtn.tooltip=Preferences -main.debugModeEnabled.tooltip=Debug mode is enabled -main.supporterCertificateMissing.tooltip=Please consider donating ## Vault List main.vaultlist.emptyList.onboardingInstruction=Click here to add a vault main.vaultlist.contextMenu.remove=Remove… @@ -389,9 +383,8 @@ main.vaultlist.contextMenu.unlock=Unlock… main.vaultlist.contextMenu.unlockNow=Unlock Now main.vaultlist.contextMenu.vaultoptions=Show Vault Options main.vaultlist.contextMenu.reveal=Reveal Drive -main.vaultlist.addVaultBtn=Add Vault -main.vaultlist.addVaultBtn.menuItemNew=New Vault... -main.vaultlist.addVaultBtn.menuItemExisting=Existing Vault... +main.vaultlist.addVaultBtn.menuItemNew=Create New Vault... +main.vaultlist.addVaultBtn.menuItemExisting=Open Existing Vault... ## Vault Detail ### Welcome main.vaultDetail.welcomeOnboarding=Thanks for choosing Cryptomator to protect your files. If you need any assistance, check out our getting started guides: