Small fixes

This commit is contained in:
crschnick 2024-07-22 03:48:03 +00:00
parent 227559a7df
commit eef991c031
3 changed files with 9 additions and 5 deletions

View file

@ -16,9 +16,7 @@ import io.xpipe.app.util.XPipeSession;
import io.xpipe.core.util.FailableRunnable;
import io.xpipe.core.util.XPipeDaemonMode;
import io.xpipe.core.util.XPipeInstallation;
import javafx.application.Platform;
import lombok.Getter;
import java.util.ArrayList;
@ -85,6 +83,9 @@ public abstract class OperationMode {
}
private static void setup(String[] args) {
// Register stage theming early to make it apply for any potential early popups
ModifiedStage.init();
try {
// Only for handling SIGTERM
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
@ -117,8 +118,6 @@ public abstract class OperationMode {
AppExtensionManager.init(true);
AppI18n.init();
AppPrefs.initLocal();
// Register stage theming early to make it apply for any potential early popups
ModifiedStage.init();
AppBeaconServer.setupPort();
TrackEvent.info("Finished initial setup");
} catch (Throwable ex) {

View file

@ -1,6 +1,7 @@
package io.xpipe.app.core.window;
import com.sun.jna.NativeLong;
import io.xpipe.app.core.AppProperties;
import io.xpipe.app.util.NativeBridge;
import io.xpipe.core.util.ModuleHelper;
import javafx.stage.Window;
@ -29,7 +30,7 @@ public class NativeMacOsWindowControl {
}
public boolean setAppearance(boolean seamlessFrame, boolean darkMode) {
if (!ModuleHelper.isImage()) {
if (!ModuleHelper.isImage() || !AppProperties.get().isFullVersion()) {
return false;
}

View file

@ -180,6 +180,10 @@ public interface SecretRetrievalStrategy {
return new SecretQuery() {
@Override
public SecretQueryResult query(String prompt) {
if (command == null || command.isBlank()) {
throw ErrorEvent.expected(new IllegalStateException("No custom command specified"));
}
try (var cc = new LocalStore().control().command(command).start()) {
return new SecretQueryResult(
InPlaceSecretValue.of(cc.readStdoutOrThrow()), SecretQueryState.NORMAL);