From a7c046520c912c8a834e25831c839302c41f0fb2 Mon Sep 17 00:00:00 2001 From: crschnick Date: Mon, 4 Mar 2024 17:23:30 +0000 Subject: [PATCH] Merge branch transfer-performance into master --- .../app/browser/BrowserBookmarkComp.java | 2 +- .../app/browser/BrowserFileListComp.java | 2 +- .../app/browser/BrowserStatusBarComp.java | 9 +- .../xpipe/app/browser/FileSystemHelper.java | 2 +- .../app/comp/store/StoreCreationComp.java | 6 +- .../app/comp/store/StoreSectionMiniComp.java | 35 ++++--- .../xpipe/app/core/check/AppShellCheck.java | 3 +- .../app/fxcomps/impl/DataStoreChoiceComp.java | 2 +- .../java/io/xpipe/app/prefs/AppPrefs.java | 16 +++- .../io/xpipe/app/test/LocalExtensionTest.java | 4 +- .../xpipe/app/util/HumanReadableFormat.java | 5 +- .../java/io/xpipe/app/util/ScanAlert.java | 2 +- .../io/xpipe/app/resources/style/bookmark.css | 6 +- .../io/xpipe/app/resources/style/browser.css | 2 + .../xpipe/app/resources/style/choice-comp.css | 2 + .../xpipe/app/resources/style/scrollbar.css | 1 + .../resources/style/store-mini-section.css | 95 +++++++++++-------- .../test/BeaconDaemonExtensionTest.java | 3 +- .../xpipe/core/process/ShellOpenFunction.java | 14 +++ dist/changelogs/{8.0.2.md => 8.1.md} | 15 +-- ....0.2_incremental.md => 8.1_incremental.md} | 19 +++- .../ext/base/resources/lang/elevation_en.md | 5 +- .../gradle_scripts/local_junit_suite.gradle | 1 - version | 2 +- 24 files changed, 159 insertions(+), 94 deletions(-) rename dist/changelogs/{8.0.2.md => 8.1.md} (88%) rename dist/changelogs/{8.0.2_incremental.md => 8.1_incremental.md} (50%) diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkComp.java index 97203d41..1bbd795c 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkComp.java @@ -94,7 +94,7 @@ final class BrowserBookmarkComp extends SimpleComp { event.consume(); }); }); - }); + }, true); var category = new DataStoreCategoryChoiceComp( StoreViewState.get().getAllConnectionsCategory(), StoreViewState.get().getActiveCategory(), diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserFileListComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserFileListComp.java index 7a25ede4..5d0f0552 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserFileListComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserFileListComp.java @@ -445,7 +445,7 @@ final class BrowserFileListComp extends SimpleComp { if (path.getRawFileEntry().resolved().getKind() == FileKind.DIRECTORY) { setText(""); } else { - setText(byteCount(fileSize.longValue())); + setText(byteCount(fileSize.longValue(), true)); } } } diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java index 4cdbfab2..3734c7de 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java @@ -7,6 +7,7 @@ import io.xpipe.app.fxcomps.SimpleComp; import io.xpipe.app.fxcomps.SimpleCompStructure; import io.xpipe.app.fxcomps.augment.ContextMenuAugment; import io.xpipe.app.fxcomps.impl.LabelComp; +import io.xpipe.app.fxcomps.util.BindingsHelper; import io.xpipe.app.fxcomps.util.PlatformThread; import io.xpipe.app.util.HumanReadableFormat; import javafx.beans.binding.Bindings; @@ -46,16 +47,16 @@ public class BrowserStatusBarComp extends SimpleComp { var transferredCount = PlatformThread.sync(Bindings.createStringBinding( () -> { return HumanReadableFormat.byteCount( - model.getProgress().getValue().getTransferred()); + model.getProgress().getValue().getTransferred(), false); }, model.getProgress())); var allCount = PlatformThread.sync(Bindings.createStringBinding( () -> { return HumanReadableFormat.byteCount( - model.getProgress().getValue().getTotal()); + model.getProgress().getValue().getTotal(), true); }, model.getProgress())); - var progressComp = new LabelComp(Bindings.createStringBinding( + var progressComp = new LabelComp(BindingsHelper.persist(Bindings.createStringBinding( () -> { if (model.getProgress().getValue() == null || model.getProgress().getValue().done()) { @@ -69,7 +70,7 @@ public class BrowserStatusBarComp extends SimpleComp { }, transferredCount, allCount, - model.getProgress())); + model.getProgress()))); return progressComp; } diff --git a/app/src/main/java/io/xpipe/app/browser/FileSystemHelper.java b/app/src/main/java/io/xpipe/app/browser/FileSystemHelper.java index c39b262a..7983eddb 100644 --- a/app/src/main/java/io/xpipe/app/browser/FileSystemHelper.java +++ b/app/src/main/java/io/xpipe/app/browser/FileSystemHelper.java @@ -20,7 +20,7 @@ import java.util.function.Consumer; public class FileSystemHelper { - private static final int DEFAULT_BUFFER_SIZE = 16384; + private static final int DEFAULT_BUFFER_SIZE = 1024; private static FileSystem localFileSystem; public static String adjustPath(OpenFileSystemModel model, String path) { diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java index 4a448051..ccc333d1 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java @@ -35,6 +35,7 @@ import javafx.scene.layout.VBox; import javafx.stage.Stage; import lombok.AccessLevel; import lombok.experimental.FieldDefaults; +import net.synedra.validatorfx.GraphicDecorationStackPane; import java.util.List; import java.util.Objects; @@ -397,6 +398,9 @@ public class StoreCreationComp extends DialogComp { var top = new VBox(providerChoice.createRegion(), new Spacer(7, Orientation.VERTICAL), sep); top.getStyleClass().add("top"); layout.setTop(top); - return layout; + + var valSp = new GraphicDecorationStackPane(); + valSp.getChildren().add(layout); + return valSp; } } diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java index 61eb95f4..79e2f277 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java @@ -18,26 +18,34 @@ import javafx.css.PseudoClass; import javafx.geometry.Pos; import javafx.scene.control.Button; import javafx.scene.layout.VBox; -import lombok.Builder; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.BiConsumer; -@Builder public class StoreSectionMiniComp extends Comp> { public static final PseudoClass EXPANDED = PseudoClass.getPseudoClass("expanded"); private static final PseudoClass ODD = PseudoClass.getPseudoClass("odd-depth"); private static final PseudoClass EVEN = PseudoClass.getPseudoClass("even-depth"); + private static final PseudoClass ROOT = PseudoClass.getPseudoClass("root"); + private static final PseudoClass TOP = PseudoClass.getPseudoClass("top"); + private static final PseudoClass SUB = PseudoClass.getPseudoClass("sub"); + + private final StoreSection section; + private final BiConsumer>> augment; + private final boolean condensedStyle; - @Builder.Default - private final BiConsumer>> augment = (section1, buttonComp) -> {}; + public StoreSectionMiniComp(StoreSection section, BiConsumer>> augment, boolean condensedStyle) { + this.section = section; + this.augment = augment; + this.condensedStyle = condensedStyle; + } - public static Comp createList(StoreSection top, BiConsumer>> augment) { - return new StoreSectionMiniComp(top, augment); + public static Comp createList(StoreSection top, BiConsumer>> augment, boolean condensedStyle) { + return new StoreSectionMiniComp(top, augment, condensedStyle); } @Override @@ -104,10 +112,7 @@ public class StoreSectionMiniComp extends Comp> { section.getAllChildren()) : section.getShownChildren(); var content = new ListBoxViewComp<>(listSections, section.getAllChildren(), (StoreSection e) -> { - return StoreSectionMiniComp.builder() - .section(e) - .augment(this.augment) - .build(); + return new StoreSectionMiniComp(e, this.augment, this.condensedStyle); }) .minHeight(0) .hgrow(); @@ -119,9 +124,12 @@ public class StoreSectionMiniComp extends Comp> { Bindings.not(expanded), Bindings.size(section.getAllChildren()).isEqualTo(0))))); - return new VerticalComp(list) + var vert = new VerticalComp(list); + if (condensedStyle) { + vert.styleClass("condensed"); + } + return vert .styleClass("store-section-mini-comp") - .styleClass(section.getWrapper() != null ? "sub" : "top") .apply(struc -> { struc.get().setFillWidth(true); SimpleChangeListener.apply(expanded, val -> { @@ -129,6 +137,9 @@ public class StoreSectionMiniComp extends Comp> { }); struc.get().pseudoClassStateChanged(EVEN, section.getDepth() % 2 == 0); struc.get().pseudoClassStateChanged(ODD, section.getDepth() % 2 != 0); + struc.get().pseudoClassStateChanged(ROOT, section.getDepth() == 0); + struc.get().pseudoClassStateChanged(TOP, section.getDepth() == 1); + struc.get().pseudoClassStateChanged(SUB, section.getDepth() > 1); }) .apply(struc -> { if (section.getWrapper() != null) { diff --git a/app/src/main/java/io/xpipe/app/core/check/AppShellCheck.java b/app/src/main/java/io/xpipe/app/core/check/AppShellCheck.java index 2ae0086a..25631a88 100644 --- a/app/src/main/java/io/xpipe/app/core/check/AppShellCheck.java +++ b/app/src/main/java/io/xpipe/app/core/check/AppShellCheck.java @@ -22,9 +22,8 @@ public class AppShellCheck { The most likely causes are: - On Windows, an AntiVirus program might block required programs and commands - The system shell is restricted or blocked - - The operating system is not supported - You can reach out to us if you want to properly diagnose the cause individually and hopefully fix it. + You can try to switch to the fallback shell by going to Settings -> Local Shell -> Enable Fallback Shell and restart. """ .formatted( ProcessControlProvider.get() diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreChoiceComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreChoiceComp.java index 76a8c648..6c8b80ab 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreChoiceComp.java @@ -100,7 +100,7 @@ public class DataStoreChoiceComp extends SimpleComp { if (!applicable.test(s.getWrapper())) { comp.disable(new SimpleBooleanProperty(true)); } - }); + }, false); var category = new DataStoreCategoryChoiceComp( initialCategory != null ? initialCategory.getRoot() : null, StoreViewState.get().getActiveCategory(), diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index 83702a8c..d67b0c8c 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -8,6 +8,7 @@ import io.xpipe.app.ext.PrefsHandler; import io.xpipe.app.ext.PrefsProvider; import io.xpipe.app.fxcomps.Comp; import io.xpipe.app.fxcomps.util.PlatformThread; +import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.util.ApplicationHelper; import io.xpipe.app.util.PasswordLockSecretValue; @@ -22,6 +23,7 @@ import javafx.beans.value.ObservableValue; import lombok.Getter; import lombok.Value; +import java.nio.file.Files; import java.nio.file.Path; import java.util.*; @@ -156,6 +158,8 @@ public class AppPrefs { INSTANCE = new AppPrefs(); PrefsProvider.getAll().forEach(prov -> prov.addPrefs(INSTANCE.extensionHandler)); INSTANCE.loadLocal(); + INSTANCE.fixInvalidLocalValues(); + INSTANCE.vaultStorageHandler = new AppPrefsStorageHandler(INSTANCE.storageDirectory().getValue().resolve("preferences.json")); } public static void initSharedRemote() { @@ -427,14 +431,20 @@ public class AppPrefs { loadValue(globalStorageHandler, value); } + } - // How can this happen? - // Set to default if corrupted + private void fixInvalidLocalValues() { + // You can set the directory to empty in the settings if (storageDirectory.get() == null) { storageDirectory.setValue(DEFAULT_STORAGE_DIR); } - vaultStorageHandler = new AppPrefsStorageHandler(storageDirectory().getValue().resolve("preferences.json")); + try { + Files.createDirectories(storageDirectory.get()); + } catch (Exception e) { + ErrorEvent.fromThrowable(e).build().handle(); + storageDirectory.setValue(DEFAULT_STORAGE_DIR); + } } private void loadSharedRemote() { diff --git a/app/src/main/java/io/xpipe/app/test/LocalExtensionTest.java b/app/src/main/java/io/xpipe/app/test/LocalExtensionTest.java index 52227d7d..b066f2e2 100644 --- a/app/src/main/java/io/xpipe/app/test/LocalExtensionTest.java +++ b/app/src/main/java/io/xpipe/app/test/LocalExtensionTest.java @@ -1,6 +1,7 @@ package io.xpipe.app.test; import io.xpipe.app.core.mode.OperationMode; +import io.xpipe.core.process.OsType; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeAll; @@ -13,6 +14,7 @@ public class LocalExtensionTest extends ExtensionTest { return; } - OperationMode.init(new String[0]); + var mode = OsType.getLocal().equals(OsType.WINDOWS) ? "tray" : "background"; + OperationMode.init(new String[] {"--mode", mode}); } } diff --git a/app/src/main/java/io/xpipe/app/util/HumanReadableFormat.java b/app/src/main/java/io/xpipe/app/util/HumanReadableFormat.java index c1544446..1d3c915a 100644 --- a/app/src/main/java/io/xpipe/app/util/HumanReadableFormat.java +++ b/app/src/main/java/io/xpipe/app/util/HumanReadableFormat.java @@ -16,7 +16,7 @@ public final class HumanReadableFormat { public static final DateTimeFormatter DAY_OF_WEEK = DateTimeFormatter.ofPattern("EEE"); public static final DateTimeFormatter HOUR_MINUTE = DateTimeFormatter.ofPattern("HH:mm"); - public static String byteCount(long bytes) { + public static String byteCount(long bytes, boolean precise) { if (-1024 < bytes && bytes < 1024) { return bytes + " B"; } @@ -25,7 +25,8 @@ public final class HumanReadableFormat { bytes /= 1024; ci.next(); } - return String.format("%.1f %cB", bytes / 1024.0, ci.current()); + var f = precise ? "%.1f" : "%.0f"; + return String.format(f + " %cB", bytes / 1024.0, ci.current()); } public static String date(LocalDateTime x) { diff --git a/app/src/main/java/io/xpipe/app/util/ScanAlert.java b/app/src/main/java/io/xpipe/app/util/ScanAlert.java index c1747e17..0adfd2a7 100644 --- a/app/src/main/java/io/xpipe/app/util/ScanAlert.java +++ b/app/src/main/java/io/xpipe/app/util/ScanAlert.java @@ -158,7 +158,7 @@ public class ScanAlert { .addComp(Comp.of(() -> stackPane).vgrow()) .buildComp() .prefWidth(500) - .prefHeight(650) + .prefHeight(680) .apply(struc -> { VBox.setVgrow(struc.get().getChildren().get(1), ALWAYS); }) diff --git a/app/src/main/resources/io/xpipe/app/resources/style/bookmark.css b/app/src/main/resources/io/xpipe/app/resources/style/bookmark.css index e67897b1..8485d9bf 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/bookmark.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/bookmark.css @@ -1,11 +1,13 @@ .bookmark-list > .categories { -fx-padding: 0.7em 1em 0.7em 1em; --fx-background-color: -color-neutral-subtle; +-fx-background-color: -color-bg-subtle; + -fx-border-color: -color-border-default; + -fx-border-width: 0 0 1 0; } .bookmark-list .filter-comp { - -fx-border-width: 0.05em; + -fx-border-width: 1; -fx-border-radius: 0 4px 4px 0; -fx-background-radius: 0 4px 4px 0; -fx-background-color: -color-bg-default; diff --git a/app/src/main/resources/io/xpipe/app/resources/style/browser.css b/app/src/main/resources/io/xpipe/app/resources/style/browser.css index b7ebe2e9..d3dd22bf 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/browser.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/browser.css @@ -2,6 +2,7 @@ -fx-border-color: -color-border-default; -fx-border-width: 1px 0 0 0; -fx-padding: 1em; + -fx-background-color: -color-bg-subtle; } .transfer .button { @@ -146,6 +147,7 @@ .browser .status-bar { -fx-border-width: 1 0 0 0; -fx-border-color: -color-border-default; + -fx-font-family: Roboto; } .browser .breadcrumbs >.divider { diff --git a/app/src/main/resources/io/xpipe/app/resources/style/choice-comp.css b/app/src/main/resources/io/xpipe/app/resources/style/choice-comp.css index 6a0dcad3..215c4eb1 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/choice-comp.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/choice-comp.css @@ -5,6 +5,8 @@ .choice-comp-content > .top { -fx-padding: 0.5em 1em 0.5em 1em; -fx-background-color: -color-neutral-subtle; + -fx-border-width: 1 0 1 0; + -fx-border-color: -color-border-default; } .choice-comp .filter-comp { diff --git a/app/src/main/resources/io/xpipe/app/resources/style/scrollbar.css b/app/src/main/resources/io/xpipe/app/resources/style/scrollbar.css index a8b9913d..3603aafa 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/scrollbar.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/scrollbar.css @@ -1,6 +1,7 @@ .scroll-bar:vertical { -fx-pref-width: 0.3em; -fx-padding: 0.3em 0 0.3em 0; + -fx-background-color: transparent; } .scroll-bar:horizontal { diff --git a/app/src/main/resources/io/xpipe/app/resources/style/store-mini-section.css b/app/src/main/resources/io/xpipe/app/resources/style/store-mini-section.css index b643fc05..1c03dd92 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/store-mini-section.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/store-mini-section.css @@ -1,92 +1,107 @@ .popover { --fx-background-radius: 0; + -fx-background-radius: 0; } .popover > .content { --fx-padding: 10px 0 0 0; --fx-background-radius: 4px; + -fx-padding: 10px 0 0 0; + -fx-background-radius: 4px; } .store-mini-list-comp > * > * > .content { --fx-spacing: 0.5em; + -fx-spacing: 0.5em; } -.store-mini-list-comp .top { --fx-border-color: transparent; --fx-background-color: transparent; +.store-mini-list-comp:root { + -fx-border-color: transparent; + -fx-background-color: transparent; } .store-section-mini-comp .item { --fx-padding: 0.25em 0.4em 0.25em 0.4em; --fx-border-color: transparent; --fx-background-color: transparent; + -fx-padding: 0.25em 0.4em 0.25em 0.4em; + -fx-border-color: transparent; + -fx-background-color: transparent; } .store-section-mini-comp .item:hover, .store-section-mini-comp .item:focused { --fx-background-color: -color-accent-subtle; + -fx-background-color: -color-accent-subtle; } -.root:light .store-section-mini-comp.sub:expanded:even-depth { --fx-background-color: #9991; --fx-border-color: -color-border-subtle; +.root:light .store-section-mini-comp:sub:expanded:even-depth { + -fx-background-color: #9991; + -fx-border-color: -color-border-subtle; } -.root:dark .store-section-mini-comp.sub:expanded:even-depth { --fx-background-color: #0002; --fx-border-color: -color-border-subtle; +.root:dark .store-section-mini-comp:sub:expanded:even-depth { + -fx-background-color: #0002; + -fx-border-color: -color-border-subtle; } .store-section-mini-comp .expand-button:hover, .store-section-mini-comp .expand-button:focused { --fx-background-color: -color-neutral-muted; + -fx-background-color: -color-neutral-muted; } .store-section-mini-comp .expand-button:disabled { --fx-opacity: 0.2; + -fx-opacity: 0.2; } .store-section-mini-comp .separator { --fx-padding: 0 0.75em 0 0.75em; --fx-border-insets: 0px; + -fx-padding: 0 0.75em 0 0.75em; + -fx-border-insets: 0px; } .store-section-mini-comp > .content { --fx-padding: 5px 0 5px 15px; + -fx-padding: 5px 0 5px 15px; } -.store-section-mini-comp.top > .content { +.store-section-mini-comp:root > .content { + -fx-padding: 0.5em 1em 0.5em 1em; +} + +.store-section-mini-comp.condensed:root > .content { -fx-padding: 0; } .store-section-mini-comp .separator .line { --fx-padding: 0; --fx-border-insets: 0px; --fx-background-color: -color-border-subtle; --fx-opacity: 0.5; --fx-pref-height: 1; + -fx-padding: 0; + -fx-border-insets: 0px; + -fx-background-color: -color-border-subtle; + -fx-opacity: 0.5; + -fx-pref-height: 1; } -.root:light .top > .store-section-mini-comp { --fx-background-color: #9991; +.root:light .store-section-mini-comp:top { + -fx-background-color: #9991; } -.root:dark .top > .store-section-mini-comp { --fx-background-color: #0001; +.root:dark .store-section-mini-comp:top { + -fx-background-color: #0001; } -.store-section-mini-comp.sub:expanded { --fx-border-radius: 2px; --fx-border-width: 1px 0 1px 1px; --fx-border-color: -color-border-default; +.store-section-mini-comp:sub:expanded { + -fx-border-radius: 4 0 0 4; + -fx-border-width: 1px 0 1px 1px; + -fx-border-color: -color-border-default; } -.top > .store-section-mini-comp { --fx-border-width: 1px 0 1px 0px; --fx-border-color: -color-border-default; +.store-section-mini-comp:root { + -fx-border-width: 0; +} + +.store-section-mini-comp.condensed:top { + -fx-border-radius: 0; + -fx-border-width: 1px 1 1px 0px; + -fx-border-color: -color-border-default; +} + +.store-section-mini-comp:top { + -fx-border-radius: 4 0 0 4; + -fx-border-width: 1 1 1 1; + -fx-border-color: -color-border-default; } .store-section-mini-comp .list-box-view-comp .content { --fx-spacing: 0.4em; + -fx-spacing: 0.4em; } diff --git a/beacon/src/main/java/io/xpipe/beacon/test/BeaconDaemonExtensionTest.java b/beacon/src/main/java/io/xpipe/beacon/test/BeaconDaemonExtensionTest.java index 9fae1ee7..ca06e6bf 100644 --- a/beacon/src/main/java/io/xpipe/beacon/test/BeaconDaemonExtensionTest.java +++ b/beacon/src/main/java/io/xpipe/beacon/test/BeaconDaemonExtensionTest.java @@ -1,5 +1,6 @@ package io.xpipe.beacon.test; +import io.xpipe.core.process.OsType; import io.xpipe.core.util.JacksonMapper; import io.xpipe.core.util.XPipeDaemonMode; import org.junit.jupiter.api.AfterAll; @@ -10,7 +11,7 @@ public class BeaconDaemonExtensionTest { @BeforeAll public static void setup() throws Exception { JacksonMapper.initModularized(ModuleLayer.boot()); - BeaconDaemonController.start(XPipeDaemonMode.TRAY); + BeaconDaemonController.start(OsType.getLocal().equals(OsType.WINDOWS) ? XPipeDaemonMode.TRAY : XPipeDaemonMode.BACKGROUND); } @AfterAll diff --git a/core/src/main/java/io/xpipe/core/process/ShellOpenFunction.java b/core/src/main/java/io/xpipe/core/process/ShellOpenFunction.java index 8f323640..ee620918 100644 --- a/core/src/main/java/io/xpipe/core/process/ShellOpenFunction.java +++ b/core/src/main/java/io/xpipe/core/process/ShellOpenFunction.java @@ -4,6 +4,20 @@ import lombok.NonNull; public interface ShellOpenFunction { + static ShellOpenFunction unsupported() { + return new ShellOpenFunction() { + @Override + public CommandBuilder prepareWithoutInitCommand() { + throw new UnsupportedOperationException(); + } + + @Override + public CommandBuilder prepareWithInitCommand(@NonNull String command) { + throw new UnsupportedOperationException(); + } + }; + } + static ShellOpenFunction of(String b) { return new ShellOpenFunction() { @Override diff --git a/dist/changelogs/8.0.2.md b/dist/changelogs/8.1.md similarity index 88% rename from dist/changelogs/8.0.2.md rename to dist/changelogs/8.1.md index 69701f89..a1361a80 100644 --- a/dist/changelogs/8.0.2.md +++ b/dist/changelogs/8.1.md @@ -4,11 +4,9 @@ The versioning scheme has also been changed to simplify version numbers. So we a ## Note on updating -The last few versions of XPipe from 1.7.16 to 8.0.1 all had a self-updater on Windows that was not working properly. This was caused by a newly introduced JDK bug. This is now fixed from 8.0.2 onwards. +The last few versions of XPipe from 1.7.16 to 8.0.1 all had a self-updater on Windows that was not working properly. This was caused by a newly introduced JDK bug. This is now fixed from 8.1 onwards. To upgrade to 8.1+ on Windows, you have to do it manually by downloading and installing it from https://github.com/xpipe-io/xpipe/releases. There shouldn't be any more problems with 8.1+ after that. -To upgrade to 8.0.2+ on Windows, you have to do it manually by downloading and installing it from https://github.com/xpipe-io/xpipe/releases. There shouldn't be any more problems with 8.0.2+ after that. - -This also fixes opened terminal windows closing down when XPipe is closed. They will now stay open. +Not that versions <8.1 do not contain version information in the git vault. If you're on multiple systems that are synced with git, the git vault format can be updated on one system and being pulled on another a system that is running an older version. This can lead to data corruption. If this happens to you, you should be able to reset the git repository to a previous ref. ## New terminal launcher @@ -36,11 +34,6 @@ The file browser has been reworked in terms of performance and reliability. File In terms of the interface, there is also now a progress indicator for files being transferred. For any file conflicts, there is now a new dialog to choose how to resolve any conflict when copying or moving files. -There are also a couple more changes included: -- Fix files in file browser not reloading content when trying to edit them multiple times in the session -- Add Open with ... action to open files with an arbitrary program -- The transfer pane now also allows file drops from outside the window to make it more intuitive - ## Kubernetes configs and namespaces This update adds support to also add connections from other kubeconfig files. @@ -91,10 +84,6 @@ Some Windows admins disable cmd on their systems for security reasons. Previousl One common problem in the past has been to fact that Microsoft ships relatively outdated OpenSSH versions on Windows, which do not support newer features like FIDO2 keys. Due to the permissive license of OpenSSH and its Windows fork, XPipe can bundle the latest OpenSSH versions on Windows. There is now an option the settings menu to use the latest bundled OpenSSH version. -## Dependency upgrades - -All dependencies have been upgraded to the latest version, coming with a few fixes and some new features. In particular, the JavaFX version has been bumped, which now allows for native system theme observation and the usage of accent colors. Around 10 dependency libraries have been removed as they are no longer necessary. - ## Timeout handling The timeout model has been reworked. It is now set to a fixed amount of 30s while any active password prompts do no longer count towards it, meaning you can take your time when typing your passwords. An increased timeout value also allows for better handling of third party authentication schemes that XPipe has no control over, e.g. ones that will open a website in your browser for authentication. diff --git a/dist/changelogs/8.0.2_incremental.md b/dist/changelogs/8.1_incremental.md similarity index 50% rename from dist/changelogs/8.0.2_incremental.md rename to dist/changelogs/8.1_incremental.md index 7059181d..c626bc79 100644 --- a/dist/changelogs/8.0.2_incremental.md +++ b/dist/changelogs/8.1_incremental.md @@ -1,8 +1,8 @@ ## Windows updater issues -The last few versions of XPipe from 1.7.16 to 8.0.1 all had a self-updater on Windows that was not working properly. This was caused by a newly introduced JDK bug. This is now fixed from 8.0.2 onwards. +The last few versions of XPipe from 1.7.16 to 8.0.1 all had a self-updater on Windows that was not working properly. This was caused by a newly introduced JDK bug. This is now fixed from 8.1 onwards. -To upgrade to 8.0.2+, you have to do it manually by downloading and installing it from https://github.com/xpipe-io/xpipe/releases. There shouldn't be any more problems with 8.0.2+ after that. +To upgrade to 8.1+, you have to do it manually by downloading and installing it from https://github.com/xpipe-io/xpipe/releases. There shouldn't be any more problems with 8.1+ after that. This also fixes opened terminal windows closing down when XPipe is closed on Windows. They will now stay open. @@ -10,15 +10,28 @@ This also fixes opened terminal windows closing down when XPipe is closed on Win When upgrading XPipe versions across many systems, one problem could have been the git vault format being updated on one system and being pulled on another a system that is running an older version. This could have led to data corruption. From now on, there will be a warning shown when the versions do not match up. From there you can choose to temporarily disable the git vault during a session until you upgrade to the matching version on that system as well. -If this problem already happened to you, you should be able to reset the git repository to an older ref. +If this happens to you, you should be able to reset the git repository to a previous ref. ## Filtering for hosts You can now search for IPs and hostnames in addition to the connection names to filter your connection list. The connection a display when a filter is active has also been improved. +## File browser transfer fixes + +There was a regression in transfer speed in 8.0 causing transfers of large files being very slow. This is now fixed. + +## Open directories in WSL + +There is now a new action available in the file browser for directories on Windows systems that allows you to open that directory in a WSL session. This makes it easier to quickly use Linux tools in a certain directory you're currently in when on Windows. + ## Other changes - Fix fallback shell action throwing some errors initially - Properly set TERM variable for powershell environments +- Improve styling in some areas +- Better validate invalid settings values on startup - Fix concurrency issues when querying multiple secrets at the same time +- Fix red validation markers appearing in front of other UI elements +- Fix msys2, cygwin, and gitforwindows shell environments being shown for the wrong parent connection when located on remote systems +- Fix transferred files with BOM sometimes getting corrupted on Windows systems - Fix some null pointers \ No newline at end of file diff --git a/ext/base/src/main/resources/io/xpipe/ext/base/resources/lang/elevation_en.md b/ext/base/src/main/resources/io/xpipe/ext/base/resources/lang/elevation_en.md index a90dd448..797248d2 100644 --- a/ext/base/src/main/resources/io/xpipe/ext/base/resources/lang/elevation_en.md +++ b/ext/base/src/main/resources/io/xpipe/ext/base/resources/lang/elevation_en.md @@ -4,9 +4,8 @@ The process of elevation is operating system specific. ### Linux & macOS -Any elevated command is executed with `sudo`. -If this is done on your local system, the optional `sudo` password is queried via XPipe itself. -For remote systems, the `sudo` password is determined from the connection information, i.e. the used login password. +Any elevated command is executed with `sudo`. The optional `sudo` password is queried via XPipe when needed. +You have the ability to adjust the elevation behavior in the settings to control whether you want to enter your password every time it is needed or if you want to cache it for the current session. ### Windows diff --git a/gradle/gradle_scripts/local_junit_suite.gradle b/gradle/gradle_scripts/local_junit_suite.gradle index 25dba422..9b73f2b8 100644 --- a/gradle/gradle_scripts/local_junit_suite.gradle +++ b/gradle/gradle_scripts/local_junit_suite.gradle @@ -28,7 +28,6 @@ testing { systemProperty "io.xpipe.app.dataDir", "$projectDir/local/" systemProperty "io.xpipe.app.logLevel", "trace" systemProperty "io.xpipe.app.writeSysOut", "true" - systemProperty "io.xpipe.app.mode", "tray" } } } diff --git a/version b/version index cd1d2e94..b8eb0263 100644 --- a/version +++ b/version @@ -1 +1 @@ -8.0.1 +8.1