Prefs fixes

This commit is contained in:
crschnick 2024-07-07 02:27:20 +00:00
parent 8090c09e0c
commit 9cf9340aca
2 changed files with 4 additions and 3 deletions

View file

@ -32,6 +32,7 @@ public class AppLayoutComp extends Comp<CompStructure<Pane>> {
@Override @Override
public CompStructure<Pane> createBase() { public CompStructure<Pane> createBase() {
Map<Comp<?>, ObservableValue<Boolean>> map = model.getEntries().stream() Map<Comp<?>, ObservableValue<Boolean>> map = model.getEntries().stream()
.filter(entry -> entry.comp() != null)
.collect(Collectors.toMap( .collect(Collectors.toMap(
entry -> entry.comp(), entry -> entry.comp(),
entry -> Bindings.createBooleanBinding( entry -> Bindings.createBooleanBinding(

View file

@ -100,19 +100,19 @@ public class AppLayoutModel {
new Entry( new Entry(
AppI18n.observable("visitGithubRepository"), AppI18n.observable("visitGithubRepository"),
"mdi2g-github", "mdi2g-github",
new AppPrefsComp(), null,
() -> Hyperlinks.open(Hyperlinks.GITHUB), () -> Hyperlinks.open(Hyperlinks.GITHUB),
new KeyCodeCombination(KeyCode.DIGIT3, KeyCombination.CONTROL_DOWN)), new KeyCodeCombination(KeyCode.DIGIT3, KeyCombination.CONTROL_DOWN)),
new Entry( new Entry(
AppI18n.observable("discord"), AppI18n.observable("discord"),
"mdi2d-discord", "mdi2d-discord",
new AppPrefsComp(), null,
() -> Hyperlinks.open(Hyperlinks.DISCORD), () -> Hyperlinks.open(Hyperlinks.DISCORD),
new KeyCodeCombination(KeyCode.DIGIT3, KeyCombination.CONTROL_DOWN)), new KeyCodeCombination(KeyCode.DIGIT3, KeyCombination.CONTROL_DOWN)),
new Entry( new Entry(
AppI18n.observable("api"), AppI18n.observable("api"),
"mdi2c-code-json", "mdi2c-code-json",
new AppPrefsComp(), null,
() -> Hyperlinks.open( () -> Hyperlinks.open(
"http://localhost:" + AppBeaconServer.get().getPort()), "http://localhost:" + AppBeaconServer.get().getPort()),
new KeyCodeCombination(KeyCode.DIGIT3, KeyCombination.CONTROL_DOWN)))); new KeyCodeCombination(KeyCode.DIGIT3, KeyCombination.CONTROL_DOWN))));