Various fixes

This commit is contained in:
crschnick 2024-11-09 01:32:31 +00:00
parent e37a9a609a
commit 3b3c81428d
4 changed files with 9 additions and 10 deletions

View file

@ -228,21 +228,16 @@ public class AppPrefs {
new SshCategory(),
new LocalShellCategory(),
new LoggingCategory(),
new ConnectionsCategory(),
new FileBrowserCategory(),
new SecurityCategory(),
new HttpApiCategory(),
new WorkflowCategory(),
new WorkspacesCategory(),
new TroubleshootCategory(),
new DeveloperCategory())
.filter(appPrefsCategory -> appPrefsCategory.show())
.toList();
var selected = AppCache.getNonNull("selectedPrefsCategory", Integer.class, () -> 0);
if (selected == null) {
selected = 0;
}
this.selectedCategory = new SimpleObjectProperty<>(
categories.get(selected >= 0 && selected < categories.size() ? selected : 0));
this.selectedCategory = new SimpleObjectProperty<>(categories.getFirst());
}
public static void initLocal() {

View file

@ -3,11 +3,11 @@ package io.xpipe.app.prefs;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.util.OptionsBuilder;
public class WorkflowCategory extends AppPrefsCategory {
public class ConnectionsCategory extends AppPrefsCategory {
@Override
protected String getId() {
return "workflow";
return "connections";
}
@Override

View file

@ -13,7 +13,7 @@ public class SecurityCategory extends AppPrefsCategory {
public Comp<?> create() {
var prefs = AppPrefs.get();
var builder = new OptionsBuilder();
builder.addTitle("securityPolicy")
builder.addTitle("security")
.sub(new OptionsBuilder()
.pref(prefs.checkForSecurityUpdates)
.addToggle(prefs.checkForSecurityUpdates)

View file

@ -94,6 +94,10 @@ public class ShellStoreFormat {
}
public static String formattedOsName(String osName) {
if (osName == null) {
return null;
}
osName = osName.replaceAll("^Microsoft ", "");
osName = osName.replaceAll("Enterprise Evaluation", "Enterprise");
return osName;