diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/FsReadExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/FsReadExchangeImpl.java index 7355d51b0..7fad3055e 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/FsReadExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/FsReadExchangeImpl.java @@ -4,6 +4,7 @@ import com.sun.net.httpserver.HttpExchange; import io.xpipe.app.beacon.AppBeaconServer; import io.xpipe.app.beacon.BlobManager; import io.xpipe.app.util.FixedSizeInputStream; +import io.xpipe.beacon.BeaconClientException; import io.xpipe.beacon.api.FsReadExchange; import io.xpipe.core.store.ConnectionFileSystem; import lombok.SneakyThrows; @@ -20,6 +21,10 @@ public class FsReadExchangeImpl extends FsReadExchange { var shell = AppBeaconServer.get().getCache().getShellSession(msg.getConnection()); var fs = new ConnectionFileSystem(shell.getControl()); + if (!fs.fileExists(msg.getPath().toString())) { + throw new BeaconClientException("File does not exist"); + } + var size = fs.getFileSize(msg.getPath().toString()); if (size > 100_000_000) { var file = BlobManager.get().newBlobFile(); diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/ShellStartExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/ShellStartExchangeImpl.java index 7b626a67d..54cd08959 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/ShellStartExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/ShellStartExchangeImpl.java @@ -16,7 +16,7 @@ public class ShellStartExchangeImpl extends ShellStartExchange { public Object handle(HttpExchange exchange, Request msg) { var e = DataStorage.get() .getStoreEntryIfPresent(msg.getConnection()) - .orElseThrow(() -> new IllegalArgumentException("Unknown connection")); + .orElseThrow(() -> new BeaconClientException("Unknown connection")); if (!(e.getStore() instanceof ShellStore s)) { throw new BeaconClientException("Not a shell connection"); } diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserNavBar.java b/app/src/main/java/io/xpipe/app/browser/BrowserNavBar.java index 9dad14518..d089dd81c 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserNavBar.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserNavBar.java @@ -30,6 +30,7 @@ import javafx.scene.layout.Region; import javafx.scene.layout.StackPane; import atlantafx.base.theme.Styles; +import javafx.scene.shape.Rectangle; import org.kordamp.ikonli.javafx.FontIcon; public class BrowserNavBar extends Comp { @@ -127,10 +128,19 @@ public class BrowserNavBar extends Comp { pathRegion.focusedProperty(), model.getInOverview())); var stack = new StackPane(pathRegion, breadcrumbsRegion); + pathRegion.prefHeightProperty().bind(stack.heightProperty()); + + // Prevent overflow + var clip = new Rectangle(); + clip.widthProperty().bind(stack.widthProperty()); + clip.heightProperty().bind(stack.heightProperty()); + breadcrumbsRegion.setClip(clip); + stack.setAlignment(Pos.CENTER_LEFT); HBox.setHgrow(stack, Priority.ALWAYS); var topBox = new HBox(homeButton, stack, historyButton); + topBox.setFillHeight(true); topBox.setAlignment(Pos.CENTER); homeButton.minWidthProperty().bind(pathRegion.heightProperty()); homeButton.maxWidthProperty().bind(pathRegion.heightProperty().multiply(1.3)); @@ -161,10 +171,6 @@ public class BrowserNavBar extends Comp { } private ContextMenu createContextMenu() { - if (model.getCurrentDirectory() == null) { - return null; - } - var cm = new ContextMenu(); var f = model.getHistory().getForwardHistory(8).stream().toList(); diff --git a/app/src/main/java/io/xpipe/app/browser/fs/OpenFileSystemComp.java b/app/src/main/java/io/xpipe/app/browser/fs/OpenFileSystemComp.java index 061784e09..1005df942 100644 --- a/app/src/main/java/io/xpipe/app/browser/fs/OpenFileSystemComp.java +++ b/app/src/main/java/io/xpipe/app/browser/fs/OpenFileSystemComp.java @@ -84,6 +84,7 @@ public class OpenFileSystemComp extends SimpleComp { var filter = new BrowserFilterComp(model, model.getFilter()).createStructure(); var topBar = new HBox(); + filter.textField().prefHeightProperty().bind(topBar.heightProperty()); topBar.setAlignment(Pos.CENTER); topBar.getStyleClass().add("top-bar"); var navBar = new BrowserNavBar(model).createStructure(); diff --git a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java index 16917dc37..4c5b30f7f 100644 --- a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java +++ b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java @@ -70,7 +70,8 @@ public class ScriptHelper { content += nl + postInit.stream().flatMap(s -> s.lines()).collect(Collectors.joining(nl)) + nl; if (exit) { - content += nl + t.getPassthroughExitCommand(); + // Assign exit code 0 to prevent terminals from doing their own pause error handling for failed commands + content += nl + t.getNormalExitCommand(); } return createExecScript(t, processControl, new FilePath(t.initFileName(processControl)), content); 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 2c5643873..73a379c45 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 @@ -175,12 +175,6 @@ -fx-background-color: -color-neutral-muted; } -.browser .tab-content-area { - -fx-border-width: 0.1em 0 0 0; - -fx-border-color: -color-border-default; - -fx-padding: -0.05em 0 0 0; -} - .browser .singular { -fx-tab-max-height: 0; } @@ -193,12 +187,16 @@ -fx-min-height: 2.65em; -fx-pref-height: 2.65em; -fx-max-height: 2.65em; -} +} +.browser .tab-header-area { + -fx-border-width: 0 0 0.05em 0; + -fx-border-color: -color-border-default; +} .browser .left { -fx-border-color: -color-border-default, -color-bg-inset; - -fx-border-width: 2.75em 0 0 0, 2.7em 0 0 0; + -fx-border-width: 2.7em 0 0 0, 2.65em 0 0 0; -fx-background-color: transparent; } @@ -215,14 +213,24 @@ } .browser .browser-content { - -fx-padding: 10 0 0 0; + -fx-padding: 6 0 0 0; -fx-border-radius: 10 0 0 0; -fx-background-radius: 10 0 0 0; - -fx-background-color: -color-bg-subtle; + -fx-background-color: -color-bg-subtle, -color-bg-default; + -fx-background-insets: 0, 7 0 0 0; -fx-border-width: 1 0 0 1; -fx-border-color: -color-border-default; } +.root.cupertino .browser .browser-content { + -fx-background-color: -color-bg-default, -color-bg-default; +} + +.root.nord .browser .browser-content { + -fx-border-radius: 0; + -fx-background-radius: 0; +} + .browser .table-view { -fx-border-width: 0 0 0 0px; -fx-border-color: -color-border-default; @@ -231,7 +239,7 @@ .browser .split-pane-divider { -fx-border-color: -color-border-default, -color-bg-inset; -fx-padding: 0 3; - -fx-border-width: 2.75em 0 0 0, 2.7em 0 0 0; + -fx-border-width: 2.7em 0 0 0, 2.65em 0 0 0; -fx-opacity: 1.0; -fx-background-color: transparent; } diff --git a/gradle/gradle_scripts/atlantafx-base-2.0.2.jar b/gradle/gradle_scripts/atlantafx-base-2.0.2.jar index 1cc7ac128..58bbfd2cc 100644 Binary files a/gradle/gradle_scripts/atlantafx-base-2.0.2.jar and b/gradle/gradle_scripts/atlantafx-base-2.0.2.jar differ diff --git a/lang/base/strings/translations_da.properties b/lang/base/strings/translations_da.properties index ec5d369d7..57d850e2b 100644 --- a/lang/base/strings/translations_da.properties +++ b/lang/base/strings/translations_da.properties @@ -165,3 +165,5 @@ mappedService.displayName=Service mappedService.displayDescription=Interagere med en tjeneste, der er eksponeret af en container customService.displayName=Service customService.displayDescription=Tilføj en brugerdefineret tjeneste til tunnel og åben +fixedService.displayName=Service +fixedService.displayDescription=Brug en foruddefineret tjeneste diff --git a/lang/base/strings/translations_de.properties b/lang/base/strings/translations_de.properties index 176ead9f5..55f04ac61 100644 --- a/lang/base/strings/translations_de.properties +++ b/lang/base/strings/translations_de.properties @@ -156,3 +156,5 @@ mappedService.displayName=Dienst mappedService.displayDescription=Interaktion mit einem Dienst, der von einem Container angeboten wird customService.displayName=Dienst customService.displayDescription=Einen benutzerdefinierten Dienst zum Tunnel hinzufügen und öffnen +fixedService.displayName=Dienst +fixedService.displayDescription=Einen vordefinierten Dienst verwenden diff --git a/lang/base/strings/translations_en.properties b/lang/base/strings/translations_en.properties index 7089c151b..08f77e1d2 100644 --- a/lang/base/strings/translations_en.properties +++ b/lang/base/strings/translations_en.properties @@ -154,5 +154,7 @@ mappedService.displayName=Service mappedService.displayDescription=Interact with a service exposed by a container customService.displayName=Service customService.displayDescription=Add a custom service to tunnel and open +fixedService.displayName=Service +fixedService.displayDescription=Use a predefined service diff --git a/lang/base/strings/translations_es.properties b/lang/base/strings/translations_es.properties index e81cdf0a5..bbcd05db6 100644 --- a/lang/base/strings/translations_es.properties +++ b/lang/base/strings/translations_es.properties @@ -154,3 +154,5 @@ mappedService.displayName=Servicio mappedService.displayDescription=Interactúa con un servicio expuesto por un contenedor customService.displayName=Servicio customService.displayDescription=Añade un servicio personalizado para tunelizar y abrir +fixedService.displayName=Servicio +fixedService.displayDescription=Utilizar un servicio predefinido diff --git a/lang/base/strings/translations_fr.properties b/lang/base/strings/translations_fr.properties index 47258232c..476f18079 100644 --- a/lang/base/strings/translations_fr.properties +++ b/lang/base/strings/translations_fr.properties @@ -154,3 +154,5 @@ mappedService.displayName=Service mappedService.displayDescription=Interagir avec un service exposé par un conteneur customService.displayName=Service customService.displayDescription=Ajouter un service personnalisé au tunnel et à l'ouverture +fixedService.displayName=Service +fixedService.displayDescription=Utiliser un service prédéfini diff --git a/lang/base/strings/translations_it.properties b/lang/base/strings/translations_it.properties index 60da790b7..11cdd26e5 100644 --- a/lang/base/strings/translations_it.properties +++ b/lang/base/strings/translations_it.properties @@ -154,3 +154,5 @@ mappedService.displayName=Servizio mappedService.displayDescription=Interagire con un servizio esposto da un contenitore customService.displayName=Servizio customService.displayDescription=Aggiungi un servizio personalizzato per il tunnel e l'apertura +fixedService.displayName=Servizio +fixedService.displayDescription=Utilizzare un servizio predefinito diff --git a/lang/base/strings/translations_ja.properties b/lang/base/strings/translations_ja.properties index ff2bc25dd..0dfaae5d6 100644 --- a/lang/base/strings/translations_ja.properties +++ b/lang/base/strings/translations_ja.properties @@ -154,3 +154,5 @@ mappedService.displayName=サービス mappedService.displayDescription=コンテナによって公開されたサービスとやりとりする customService.displayName=サービス customService.displayDescription=トンネルとオープンにカスタムサービスを追加する +fixedService.displayName=サービス +fixedService.displayDescription=定義済みのサービスを使う diff --git a/lang/base/strings/translations_nl.properties b/lang/base/strings/translations_nl.properties index b598f75ad..ea34666bc 100644 --- a/lang/base/strings/translations_nl.properties +++ b/lang/base/strings/translations_nl.properties @@ -154,3 +154,5 @@ mappedService.displayName=Service mappedService.displayDescription=Interactie met een service die wordt aangeboden door een container customService.displayName=Service customService.displayDescription=Een aangepaste service toevoegen aan tunnel en openen +fixedService.displayName=Service +fixedService.displayDescription=Een vooraf gedefinieerde service gebruiken diff --git a/lang/base/strings/translations_pt.properties b/lang/base/strings/translations_pt.properties index a12c1bec2..58740c2d5 100644 --- a/lang/base/strings/translations_pt.properties +++ b/lang/base/strings/translations_pt.properties @@ -154,3 +154,5 @@ mappedService.displayName=Serviço mappedService.displayDescription=Interage com um serviço exposto por um contentor customService.displayName=Serviço customService.displayDescription=Adiciona um serviço personalizado ao túnel e abre +fixedService.displayName=Serviço +fixedService.displayDescription=Utiliza um serviço predefinido diff --git a/lang/base/strings/translations_ru.properties b/lang/base/strings/translations_ru.properties index 1be17c6cc..a9ecfcb5a 100644 --- a/lang/base/strings/translations_ru.properties +++ b/lang/base/strings/translations_ru.properties @@ -154,3 +154,5 @@ mappedService.displayName=Сервис mappedService.displayDescription=Взаимодействие с сервисом, открываемым контейнером customService.displayName=Сервис customService.displayDescription=Добавьте пользовательский сервис для туннелирования и открытия +fixedService.displayName=Сервис +fixedService.displayDescription=Использовать предопределенный сервис diff --git a/lang/base/strings/translations_tr.properties b/lang/base/strings/translations_tr.properties index 3569e68d3..6a665bff3 100644 --- a/lang/base/strings/translations_tr.properties +++ b/lang/base/strings/translations_tr.properties @@ -154,3 +154,5 @@ mappedService.displayName=Hizmet mappedService.displayDescription=Bir konteyner tarafından sunulan bir hizmetle etkileşim customService.displayName=Hizmet customService.displayDescription=Tünele özel bir hizmet ekleyin ve açın +fixedService.displayName=Hizmet +fixedService.displayDescription=Önceden tanımlanmış bir hizmet kullanın diff --git a/lang/base/strings/translations_zh.properties b/lang/base/strings/translations_zh.properties index 6e8d1ab34..e9973d8ba 100644 --- a/lang/base/strings/translations_zh.properties +++ b/lang/base/strings/translations_zh.properties @@ -154,3 +154,5 @@ mappedService.displayName=服务 mappedService.displayDescription=与容器暴露的服务交互 customService.displayName=服务 customService.displayDescription=为隧道和开放添加自定义服务 +fixedService.displayName=服务 +fixedService.displayDescription=使用预定义服务