mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-23 08:00:56 -04:00
Various fixes [stage]
This commit is contained in:
@@ -2,6 +2,7 @@ package io.xpipe.app.beacon.impl;
|
||||
|
||||
import io.xpipe.app.core.launcher.LauncherInput;
|
||||
import io.xpipe.app.core.mode.OperationMode;
|
||||
import io.xpipe.app.util.PlatformInit;
|
||||
import io.xpipe.app.util.PlatformState;
|
||||
import io.xpipe.beacon.BeaconServerException;
|
||||
import io.xpipe.beacon.api.DaemonOpenExchange;
|
||||
@@ -13,12 +14,15 @@ public class DaemonOpenExchangeImpl extends DaemonOpenExchange {
|
||||
@Override
|
||||
public Object handle(HttpExchange exchange, Request msg) throws BeaconServerException {
|
||||
if (msg.getArguments().isEmpty()) {
|
||||
if (!OperationMode.switchToSyncIfPossible(OperationMode.GUI)) {
|
||||
throw new BeaconServerException(PlatformState.getLastError());
|
||||
var err = PlatformInit.getError();
|
||||
if (err != null) {
|
||||
throw new BeaconServerException(err);
|
||||
}
|
||||
}
|
||||
|
||||
LauncherInput.handle(msg.getArguments());
|
||||
OperationMode.switchToAsync(OperationMode.GUI);
|
||||
} else {
|
||||
LauncherInput.handle(msg.getArguments());
|
||||
}
|
||||
return Response.builder().build();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import io.xpipe.app.core.AppFont;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.util.PlatformThread;
|
||||
|
||||
import io.xpipe.core.process.OsType;
|
||||
import javafx.animation.*;
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.binding.Bindings;
|
||||
@@ -44,8 +45,8 @@ public class ModalOverlayComp extends SimpleComp {
|
||||
protected Region createSimple() {
|
||||
var bgRegion = background.createRegion();
|
||||
var modal = new ModalPane();
|
||||
modal.setInTransitionFactory(node -> fadeInDelyed(node));
|
||||
modal.setOutTransitionFactory(node -> Animations.fadeOut(node, Duration.millis(200)));
|
||||
modal.setInTransitionFactory(OsType.getLocal() == OsType.LINUX ? null : node -> fadeInDelyed(node));
|
||||
modal.setOutTransitionFactory(OsType.getLocal() == OsType.LINUX ? null : node -> Animations.fadeOut(node, Duration.millis(200)));
|
||||
modal.focusedProperty().addListener((observable, oldValue, newValue) -> {
|
||||
var c = modal.getContent();
|
||||
if (newValue && c != null) {
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ErrorDetailsComp extends SimpleComp {
|
||||
AppFont.verySmall(tf);
|
||||
tf.setWrapText(false);
|
||||
tf.setEditable(false);
|
||||
tf.setPadding(new Insets(10));
|
||||
tf.setPadding(new Insets(10, 0, 10, 0));
|
||||
return tf;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,6 +171,7 @@ public class ErrorHandlerComp extends SimpleComp {
|
||||
if (event.getThrowable() != null) {
|
||||
content.getChildren().add(new Separator(Orientation.HORIZONTAL));
|
||||
var details = createDetails();
|
||||
AppFont.medium(details);
|
||||
layout.setBottom(details);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.xpipe.core.process.OsType;
|
||||
|
||||
import javafx.application.Application;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
@@ -16,6 +17,8 @@ public class PlatformInit {
|
||||
|
||||
private static final CountDownLatch latch = new CountDownLatch(2);
|
||||
private static Thread loadingThread;
|
||||
|
||||
@Getter
|
||||
private static Throwable error;
|
||||
|
||||
@SneakyThrows
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
}
|
||||
|
||||
.error-handler-comp .details {
|
||||
-fx-padding: 0 1.5em 1.0em 1.5em;
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user