This commit is contained in:
crschnick
2025-12-13 02:51:00 +00:00
parent bca32846b5
commit bbb71d9e44
8 changed files with 16 additions and 28 deletions

View File

@@ -100,7 +100,7 @@ public class AppMainWindowContentComp extends SimpleComp {
});
var loadingTextCounter = new SimpleIntegerProperty();
GlobalTimer.scheduleUntil(Duration.ofMillis(300), false, () -> {
GlobalTimer.scheduleUntil(Duration.ofMillis(500), false, () -> {
if (loaded.getValue() != null) {
return true;
}

View File

@@ -211,12 +211,10 @@ public class ModalOverlayComp extends SimpleComp {
max.set(d);
}
});
}
node.minWidthProperty().bind(max);
buttonBar.getChildren().add(node);
if (o instanceof ModalButton) {
node.minWidthProperty().bind(max);
node.prefHeightProperty().bind(buttonBar.heightProperty());
}
buttonBar.getChildren().add(node);
}
content.getChildren().add(buttonBar);
AppFontSizes.apply(buttonBar, sizes -> {

View File

@@ -129,7 +129,7 @@ public class AppMainWindow {
}
public static void loadingText(String key) {
loadingText.setValue(key != null && AppI18n.get() != null ? AppI18n.get(key) : "...");
loadingText.setValue(key != null && AppI18n.get() != null ? AppI18n.get(key) : "?");
}
public static synchronized void initContent() {

View File

@@ -280,7 +280,7 @@ public final class AppPrefs {
final ObjectProperty<VaultAuthentication> vaultAuthentication = new GlobalObjectProperty<>();
final ObjectProperty<DataStorageGroupStrategy> groupSecretStrategy = map(Mapping.builder()
.property(new GlobalObjectProperty<>(new DataStorageGroupStrategy.None()))
.property(new GlobalObjectProperty<>())
.key("groupSecretStrategy")
.valueClass(DataStorageGroupStrategy.class)
.requiresRestart(true)

View File

@@ -74,7 +74,7 @@ public class VaultCategory extends AppPrefsCategory {
authChoice.maxWidth(600);
authChoice.disable(Bindings.createBooleanBinding(() -> {
return uh.getUserCount() > 0 && prefs.vaultAuthentication.get() == VaultAuthentication.USER ||
prefs.groupSecretStrategy.get().requiresUnlock() && prefs.vaultAuthentication.get() == VaultAuthentication.GROUP;
(prefs.groupSecretStrategy.get() != null && prefs.vaultAuthentication.get() == VaultAuthentication.GROUP);
}, prefs.vaultAuthentication, prefs.groupSecretStrategy));
builder.addTitle("vault")

View File

@@ -24,6 +24,7 @@ import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import lombok.Builder;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;
import java.io.IOException;
import java.net.URI;
@@ -41,38 +42,19 @@ public interface DataStorageGroupStrategy {
static List<Class<?>> getClasses() {
var l = new ArrayList<Class<?>>();
l.add(None.class);
l.add(File.class);
l.add(Command.class);
l.add(HttpRequest.class);
return l;
}
default boolean requiresUnlock() {
return true;
}
default void checkComplete() throws ValidationException {}
byte[] queryEncryptionSecret() throws Exception;
@JsonTypeName("none")
@Value
public class None implements DataStorageGroupStrategy {
@Override
public boolean requiresUnlock() {
return false;
}
@Override
public byte[] queryEncryptionSecret() throws Exception {
throw new UnsupportedOperationException();
}
}
@JsonTypeName("file")
@Builder
@Jacksonized
@Value
public class File implements DataStorageGroupStrategy {
@@ -122,6 +104,7 @@ public interface DataStorageGroupStrategy {
@JsonTypeName("command")
@Builder
@Jacksonized
@Value
public class Command implements DataStorageGroupStrategy {
@@ -171,6 +154,7 @@ public interface DataStorageGroupStrategy {
@JsonTypeName("httpRequest")
@Builder
@Jacksonized
@Value
public class HttpRequest implements DataStorageGroupStrategy {

View File

@@ -2,6 +2,7 @@ package io.xpipe.app.storage;
import io.xpipe.app.core.AppProperties;
import io.xpipe.app.core.mode.AppOperationMode;
import io.xpipe.app.core.window.AppMainWindow;
import io.xpipe.app.ext.DataStorageExtensionProvider;
import io.xpipe.app.ext.LocalStore;
import io.xpipe.app.issue.ErrorEventFactory;
@@ -306,6 +307,8 @@ public class StandardStorage extends DataStorage {
initVaultKey();
AppMainWindow.loadingText("unlockingVault");
try {
dataStorageUserHandler.init();
} catch (IOException e) {

View File

@@ -617,6 +617,7 @@ loadingGit=Syncing with git repo
loadingGpg=Starting GnuPG daemon for git
loadingSettings=Loading settings
loadingConnections=Loading connections
unlockingVault=Unlocking vault
loadingUserInterface=Loading user interface
ptbNotice=Notice for the public test build
userDeletionTitle=User deletion
@@ -1734,3 +1735,5 @@ commandSecretFieldDescription=The command or script that will return the secret
httpRequestSecretField=Request URI
vaultAuthentication=Vault authentication
vaultAuthenticationDescription=How to authenticate / unlock the vault data. There are multiple different ways of encrypting and unlocking vault data, depending on who you want to share the vault data with.
groupAuthFailed=Secret authentication failed
userAuthFailed=Password authentication failed