Small fixes [stage]

This commit is contained in:
crschnick 2023-10-20 10:31:27 +00:00
parent 6a6a155056
commit 118a1ababc
4 changed files with 20 additions and 2 deletions

View file

@ -304,6 +304,7 @@ public abstract class DataStorage {
var displayParent = syntheticParent.or(() -> getDisplayParent(e));
if (displayParent.isPresent()) {
displayParent.get().setExpanded(true);
e.setCategoryUuid(displayParent.get().getCategoryUuid());
}
e.setDirectory(getStoresDir().resolve(e.getUuid().toString()));

View file

@ -149,16 +149,22 @@ public class StandardStorage extends DataStorage {
ErrorEvent.fromThrowable(exception.get()).handle();
}
if (getStoreCategoryIfPresent(ALL_CONNECTIONS_CATEGORY_UUID).isEmpty()) {
var allConnections = getStoreCategoryIfPresent(ALL_CONNECTIONS_CATEGORY_UUID);
if (allConnections.isEmpty()) {
var cat = DataStoreCategory.createNew(null, ALL_CONNECTIONS_CATEGORY_UUID, "All connections");
cat.setDirectory(categoriesDir.resolve(ALL_CONNECTIONS_CATEGORY_UUID.toString()));
storeCategories.add(cat);
} else {
allConnections.get().setParentCategory(null);
}
if (getStoreCategoryIfPresent(ALL_SCRIPTS_CATEGORY_UUID).isEmpty()) {
var allScripts = getStoreCategoryIfPresent(ALL_SCRIPTS_CATEGORY_UUID);
if (allScripts.isEmpty()) {
var cat = DataStoreCategory.createNew(null, ALL_SCRIPTS_CATEGORY_UUID, "All scripts");
cat.setDirectory(categoriesDir.resolve(ALL_SCRIPTS_CATEGORY_UUID.toString()));
storeCategories.add(cat);
} else {
allScripts.get().setParentCategory(null);
}
if (getStoreCategoryIfPresent(PREDEFINED_SCRIPTS_CATEGORY_UUID).isEmpty()) {

View file

@ -11,6 +11,8 @@ import javafx.stage.Modality;
public class UpdateChangelogAlert {
private static boolean shown = false;
public static void showIfNeeded() {
var update = XPipeDistributionType.get().getUpdateHandler().getPerformedUpdate();
if (update != null && !XPipeDistributionType.get().getUpdateHandler().isUpdateSucceeded()) {
@ -22,6 +24,11 @@ public class UpdateChangelogAlert {
return;
}
if (shown) {
return;
}
shown = true;
AppWindowHelper.showAlert(
alert -> {
alert.setTitle(AppI18n.get("updateChangelogAlertTitle"));

View file

@ -19,6 +19,10 @@ public class UnlockAlert {
return;
}
if (AppPrefs.get().getLockPassword().getValue() != null) {
return;
}
while (true) {
var pw = new SimpleObjectProperty<SecretValue>();
var canceled = new SimpleBooleanProperty();