mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Small fixes
This commit is contained in:
parent
382532efb3
commit
65fbe13113
19 changed files with 62 additions and 17 deletions
|
@ -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();
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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<BrowserNavBar.Structure> {
|
||||
|
@ -127,10 +128,19 @@ public class BrowserNavBar extends Comp<BrowserNavBar.Structure> {
|
|||
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<BrowserNavBar.Structure> {
|
|||
}
|
||||
|
||||
private ContextMenu createContextMenu() {
|
||||
if (model.getCurrentDirectory() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var cm = new ContextMenu();
|
||||
|
||||
var f = model.getHistory().getForwardHistory(8).stream().toList();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -154,3 +154,5 @@ mappedService.displayName=サービス
|
|||
mappedService.displayDescription=コンテナによって公開されたサービスとやりとりする
|
||||
customService.displayName=サービス
|
||||
customService.displayDescription=トンネルとオープンにカスタムサービスを追加する
|
||||
fixedService.displayName=サービス
|
||||
fixedService.displayDescription=定義済みのサービスを使う
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -154,3 +154,5 @@ mappedService.displayName=Сервис
|
|||
mappedService.displayDescription=Взаимодействие с сервисом, открываемым контейнером
|
||||
customService.displayName=Сервис
|
||||
customService.displayDescription=Добавьте пользовательский сервис для туннелирования и открытия
|
||||
fixedService.displayName=Сервис
|
||||
fixedService.displayDescription=Использовать предопределенный сервис
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -154,3 +154,5 @@ mappedService.displayName=服务
|
|||
mappedService.displayDescription=与容器暴露的服务交互
|
||||
customService.displayName=服务
|
||||
customService.displayDescription=为隧道和开放添加自定义服务
|
||||
fixedService.displayName=服务
|
||||
fixedService.displayDescription=使用预定义服务
|
||||
|
|
Loading…
Reference in a new issue