mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Various fixes
This commit is contained in:
parent
e37a9a609a
commit
3b3c81428d
4 changed files with 9 additions and 10 deletions
|
@ -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() {
|
||||
|
|
|
@ -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
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue