diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkComp.java index 6b9c3d16b..74e4376d2 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkComp.java @@ -6,6 +6,8 @@ import io.xpipe.app.comp.store.StoreSection; import io.xpipe.app.comp.store.StoreSectionMiniComp; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.core.AppFont; +import io.xpipe.app.fxcomps.Comp; +import io.xpipe.app.fxcomps.CompStructure; import io.xpipe.app.fxcomps.SimpleComp; import io.xpipe.app.fxcomps.impl.FilterComp; import io.xpipe.app.fxcomps.impl.HorizontalComp; @@ -23,6 +25,7 @@ import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleStringProperty; import javafx.css.PseudoClass; import javafx.geometry.Point2D; +import javafx.scene.control.Button; import javafx.scene.input.DragEvent; import javafx.scene.layout.Region; import javafx.scene.layout.VBox; @@ -30,6 +33,8 @@ import javafx.scene.layout.VBox; import java.util.List; import java.util.Timer; import java.util.TimerTask; +import java.util.function.BiConsumer; +import java.util.function.Consumer; import java.util.function.Predicate; final class BrowserBookmarkComp extends SimpleComp { @@ -55,46 +60,40 @@ final class BrowserBookmarkComp extends SimpleComp { }; var selectedCategory = new SimpleObjectProperty<>( StoreViewState.get().getActiveCategory().getValue()); - var section = StoreSectionMiniComp.createList( + + BooleanProperty busy = new SimpleBooleanProperty(false); + Consumer action = w -> { + ThreadHelper.runFailableAsync(() -> { + var entry = w.getEntry(); + if (!entry.getValidity().isUsable()) { + return; + } + + if (entry.getStore() instanceof ShellStore fileSystem) { + model.openFileSystemAsync(entry.ref(), null, busy); + } else if (entry.getStore() instanceof FixedHierarchyStore) { + BooleanScope.execute(busy, () -> { + w.refreshChildren(); + }); + } + }); + }; + BiConsumer>> augment = (s, comp) -> { + comp.disable(Bindings.createBooleanBinding(() -> { + return busy.get() || !applicable.test(s.getWrapper()); + }, busy)); + comp.apply(struc -> { + open.addListener((observable, oldValue, newValue) -> { + struc.get().pseudoClassStateChanged(SELECTED, newValue != null && newValue.getEntry().get().equals(s.getWrapper().getEntry())); + }); + }); + }; + + var section = new StoreSectionMiniComp( StoreSection.createTopLevel( StoreViewState.get().getAllEntries(), storeEntryWrapper -> true, filterText, selectedCategory), - (s, comp) -> { - BooleanProperty busy = new SimpleBooleanProperty(false); - comp.disable(Bindings.createBooleanBinding( - () -> { - return busy.get() || !applicable.test(s.getWrapper()); - }, - busy)); - comp.apply(struc -> { - open.addListener((observable, oldValue, newValue) -> { - struc.get() - .pseudoClassStateChanged( - SELECTED, - newValue != null - && newValue.getEntry() - .get() - .equals(s.getWrapper() - .getEntry())); - }); - struc.get().setOnAction(event -> { - ThreadHelper.runFailableAsync(() -> { - var entry = s.getWrapper().getEntry(); - if (!entry.getValidity().isUsable()) { - return; - } - - if (entry.getStore() instanceof ShellStore fileSystem) { - model.openFileSystemAsync(entry.ref(), null, busy); - } else if (entry.getStore() instanceof FixedHierarchyStore) { - BooleanScope.execute(busy, () -> { - s.getWrapper().refreshChildren(); - }); - } - }); - event.consume(); - }); - }); - }, + augment, + action, true); var category = new DataStoreCategoryChoiceComp( StoreViewState.get().getAllConnectionsCategory(), diff --git a/app/src/main/java/io/xpipe/app/comp/store/DenseStoreEntryComp.java b/app/src/main/java/io/xpipe/app/comp/store/DenseStoreEntryComp.java index 61271b613..e4e5bc287 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/DenseStoreEntryComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/DenseStoreEntryComp.java @@ -55,6 +55,11 @@ public class DenseStoreEntryComp extends StoreEntryComp { return information; } + @Override + public boolean isFullSize() { + return false; + } + protected Region createContent() { var grid = new GridPane(); grid.setHgap(8); diff --git a/app/src/main/java/io/xpipe/app/comp/store/StandardStoreEntryComp.java b/app/src/main/java/io/xpipe/app/comp/store/StandardStoreEntryComp.java index e6b4e72ca..4f8c65922 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StandardStoreEntryComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StandardStoreEntryComp.java @@ -12,6 +12,11 @@ public class StandardStoreEntryComp extends StoreEntryComp { super(entry, content); } + @Override + public boolean isFullSize() { + return true; + } + protected Region createContent() { var name = createName().createRegion(); diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java index 386ef456a..4d10aa356 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java @@ -54,6 +54,8 @@ public abstract class StoreEntryComp extends SimpleComp { this.content = content; } + public abstract boolean isFullSize(); + public static StoreEntryComp create(StoreEntryWrapper entry, Comp content, boolean preferLarge) { var forceCondensed = AppPrefs.get() != null && AppPrefs.get().condenseConnectionDisplay().get(); @@ -64,7 +66,7 @@ public abstract class StoreEntryComp extends SimpleComp { } } - public static Comp customSection(StoreSection e, boolean topLevel) { + public static StoreEntryComp customSection(StoreSection e, boolean topLevel) { var prov = e.getWrapper().getEntry().getProvider(); if (prov != null) { return prov.customEntryComp(e, topLevel); diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreQuickAccessButtonComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreQuickAccessButtonComp.java new file mode 100644 index 000000000..df523b731 --- /dev/null +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreQuickAccessButtonComp.java @@ -0,0 +1,101 @@ +package io.xpipe.app.comp.store; + +import io.xpipe.app.fxcomps.SimpleComp; +import io.xpipe.app.fxcomps.impl.IconButtonComp; +import io.xpipe.app.fxcomps.impl.PrettyImageHelper; +import javafx.geometry.Side; +import javafx.scene.Node; +import javafx.scene.control.ContextMenu; +import javafx.scene.control.Menu; +import javafx.scene.control.MenuItem; +import javafx.scene.layout.Region; + +import java.util.ArrayList; +import java.util.function.Consumer; + +public class StoreQuickAccessButtonComp extends SimpleComp { + + private final StoreSection section; + private final Consumer action; + + public StoreQuickAccessButtonComp(StoreSection section, Consumer action) {this.section = section; + this.action = action; + } + + @Override + protected Region createSimple() { + var button = new IconButtonComp("mdi2p-play-speed"); + button.apply(struc -> { + struc.get().setOnAction(event -> { + showMenu(struc.get()); + }); + }); + return button.createRegion(); + } + + private void showMenu(Node anchor) { + var cm = createMenu(); + if (cm == null) { + return; + } + + cm.show(anchor, Side.RIGHT, 0, 0); + +// App.getApp().getStage().getScene().addEventFilter(MouseEvent.MOUSE_MOVED, event -> { +// var stages = Stage.getWindows().stream().filter(window -> window instanceof ContextMenu).toList(); +// var hovered = stages.stream().anyMatch(window -> window.getScene().getRoot().hoverProperty().get()); +// if (!hovered) { +// stages.forEach(window -> window.hide()); +// } +// }); + } + + private ContextMenu createMenu() { + if (section.getShownChildren().isEmpty()) { + return null; + } + + var cm = new ContextMenu(); + cm.setAutoHide(true); + cm.getStyleClass().add("condensed"); + Menu menu = (Menu) recurse(cm, section); + cm.getItems().addAll(menu.getItems()); + return cm; + } + + private MenuItem recurse(ContextMenu contextMenu, StoreSection section) { + var c = section.getShownChildren(); + var w = section.getWrapper(); + var graphic = w.getEntry() + .getProvider() + .getDisplayIconFileName(w.getEntry().getStore()); + if (c.isEmpty()) { + var item = new MenuItem(w.getName().getValue(), PrettyImageHelper.ofFixedSquare(graphic, 16).createRegion()); + item.setOnAction(event -> { + action.accept(w); + contextMenu.hide(); + event.consume(); + }); + return item; + } + + var items = new ArrayList(); + for (StoreSection sub : c) { + if (!sub.getWrapper().getValidity().getValue().isUsable()) { + continue; + } + + items.add(recurse(contextMenu, sub)); + } + var m = new Menu(w.getName().getValue(), PrettyImageHelper.ofFixedSquare(graphic, 16).createRegion()); + m.getItems().setAll(items); + m.setOnAction(event -> { + if (event.getTarget() == m) { + action.accept(w); + contextMenu.hide(); + event.consume(); + } + }); + return m; + } +} diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java index ca7bb98cc..daacc01ef 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java @@ -10,15 +10,15 @@ import io.xpipe.app.fxcomps.impl.VerticalComp; import io.xpipe.app.fxcomps.util.BindingsHelper; import io.xpipe.app.fxcomps.util.SimpleChangeListener; import io.xpipe.app.storage.DataStoreColor; +import io.xpipe.app.util.ThreadHelper; import javafx.beans.binding.Bindings; import javafx.css.PseudoClass; -import javafx.scene.layout.HBox; -import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.function.Consumer; public class StoreSectionComp extends Comp> { @@ -37,9 +37,32 @@ public class StoreSectionComp extends Comp> { @Override public CompStructure createBase() { - var root = StoreEntryComp.customSection(section, topLevel) - .apply(struc -> HBox.setHgrow(struc.get(), Priority.ALWAYS)); - var button = new IconButtonComp( + var expanded = BindingsHelper.persist(Bindings.createBooleanBinding( + () -> { + return section.getWrapper().getExpanded().get() + && section.getShownChildren().size() > 0; + }, + section.getWrapper().getExpanded(), + section.getShownChildren())); + var root = StoreEntryComp.customSection(section, topLevel); + + var quickAccessDisabled = BindingsHelper.persist(Bindings.createBooleanBinding( + () -> { + return section.getShownChildren().isEmpty(); + }, + section.getShownChildren())); + Consumer quickAccessAction = w -> { + ThreadHelper.runFailableAsync(() -> { + w.executeDefaultAction(); + }); + }; + var quickAccessButton = new StoreQuickAccessButtonComp(section, quickAccessAction).vgrow() + .styleClass("quick-access-button") + .apply(struc -> struc.get().setMinWidth(30)) + .apply(struc -> struc.get().setPrefWidth(30)) + .maxHeight(100) + .disable(quickAccessDisabled); + var expandButton = new IconButtonComp( Bindings.createStringBinding( () -> section.getWrapper().getExpanded().get() && section.getShownChildren().size() > 0 @@ -60,9 +83,16 @@ public class StoreSectionComp extends Comp> { section.getWrapper().getName())) .disable(BindingsHelper.persist( Bindings.size(section.getShownChildren()).isEqualTo(0))) - .grow(false, true) - .styleClass("expand-button"); - List> topEntryList = List.of(button, root); + .styleClass("expand-button") + .maxHeight(100) + .vgrow(); + var buttonList = new ArrayList>(); + if (root.isFullSize()) { + buttonList.add(quickAccessButton); + } + buttonList.add(expandButton); + var buttons = new VerticalComp(buttonList); + List> topEntryList = List.of(buttons, root.hgrow()); // Optimization for large sections. If there are more than 20 children, only add the nodes to the scene if the // section is actually expanded @@ -78,14 +108,6 @@ public class StoreSectionComp extends Comp> { .minHeight(0) .hgrow(); - var expanded = Bindings.createBooleanBinding( - () -> { - return section.getWrapper().getExpanded().get() - && section.getShownChildren().size() > 0; - }, - section.getWrapper().getExpanded(), - section.getShownChildren()); - return new VerticalComp(List.of( new HorizontalComp(topEntryList) .apply(struc -> struc.get().setFillHeight(true)), diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java index 3b482a337..9daac10f8 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.BiConsumer; +import java.util.function.Consumer; public class StoreSectionMiniComp extends Comp> { @@ -35,22 +36,19 @@ public class StoreSectionMiniComp extends Comp> { private final StoreSection section; private final BiConsumer>> augment; + private final Consumer action; private final boolean condensedStyle; public StoreSectionMiniComp( StoreSection section, - BiConsumer>> augment, + BiConsumer>> augment, Consumer action, boolean condensedStyle) { this.section = section; this.augment = augment; + this.action = action; this.condensedStyle = condensedStyle; } - public static Comp createList( - StoreSection top, BiConsumer>> augment, boolean condensedStyle) { - return new StoreSectionMiniComp(top, augment, condensedStyle); - } - @Override public CompStructure createBase() { var list = new ArrayList>(); @@ -71,6 +69,12 @@ public class StoreSectionMiniComp extends Comp> { .apply(struc -> { struc.get().setAlignment(Pos.CENTER_LEFT); }) + .apply(struc -> { + struc.get().setOnAction(event -> { + action.accept(section.getWrapper()); + event.consume(); + }); + }) .grow(true, false) .apply(struc -> struc.get().setMnemonicParsing(false)) .styleClass("item"); @@ -99,8 +103,27 @@ public class StoreSectionMiniComp extends Comp> { Bindings.size(section.getAllChildren()).isEqualTo(0))) .grow(false, true) .styleClass("expand-button"); - List> topEntryList = List.of(button, root); - list.add(new HorizontalComp(topEntryList).apply(struc -> struc.get().setFillHeight(true))); + + var quickAccessDisabled = BindingsHelper.persist(Bindings.createBooleanBinding( + () -> { + return section.getShownChildren().isEmpty(); + }, + section.getShownChildren())); + Consumer quickAccessAction = w -> { + action.accept(w); + }; + var quickAccessButton = new StoreQuickAccessButtonComp(section, quickAccessAction).vgrow() + .styleClass("quick-access-button") + .maxHeight(100) + .disable(quickAccessDisabled); + + var buttonList = new ArrayList>(); + buttonList.add(button); + buttonList.add(root); + if (section.getDepth() == 1) { + buttonList.add(quickAccessButton); + } + list.add(new HorizontalComp(buttonList).apply(struc -> struc.get().setFillHeight(true))); } else { expanded = new SimpleBooleanProperty(true); } @@ -115,7 +138,7 @@ public class StoreSectionMiniComp extends Comp> { section.getAllChildren()) : section.getShownChildren(); var content = new ListBoxViewComp<>(listSections, section.getAllChildren(), (StoreSection e) -> { - return new StoreSectionMiniComp(e, this.augment, this.condensedStyle); + return new StoreSectionMiniComp(e, this.augment, this.action, this.condensedStyle); }) .minHeight(0) .hgrow(); diff --git a/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java b/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java index 54f96ee06..23d94a170 100644 --- a/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java +++ b/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java @@ -57,11 +57,11 @@ public interface DataStoreProvider { return false; } - default Comp customEntryComp(StoreSection s, boolean preferLarge) { + default StoreEntryComp customEntryComp(StoreSection s, boolean preferLarge) { return StoreEntryComp.create(s.getWrapper(), null, preferLarge); } - default Comp customSectionComp(StoreSection section, boolean topLevel) { + default StoreSectionComp customSectionComp(StoreSection section, boolean topLevel) { return new StoreSectionComp(section, topLevel); } diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreChoiceComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreChoiceComp.java index ed612c97a..b2dec4354 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreChoiceComp.java @@ -87,20 +87,18 @@ public class DataStoreChoiceComp extends SimpleComp { && e.getValidity().isUsable() && (applicableCheck == null || applicableCheck.test(e.ref())); }; - var section = StoreSectionMiniComp.createList( + var section = new StoreSectionMiniComp( StoreSection.createTopLevel( StoreViewState.get().getAllEntries(), applicable, filterText, selectedCategory), (s, comp) -> { - comp.apply(struc -> struc.get().setOnAction(event -> { - selected.setValue(s.getWrapper().getEntry().ref()); - popover.hide(); - event.consume(); - })); - if (!applicable.test(s.getWrapper())) { comp.disable(new SimpleBooleanProperty(true)); } }, + storeEntryWrapper -> { + selected.setValue(storeEntryWrapper.getEntry().ref()); + popover.hide(); + }, false); var category = new DataStoreCategoryChoiceComp( initialCategory != null ? initialCategory.getRoot() : null, diff --git a/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java b/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java index e15e22094..e5a5de762 100644 --- a/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java +++ b/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java @@ -54,10 +54,11 @@ public class ErrorHandlerComp extends SimpleComp { } // Unhandled platform exceptions usually means that we will have trouble displaying another window - if (event.isUnhandled() && Platform.isFxApplicationThread()) { - ErrorAction.ignore().handle(event); - return; - } + // Let's just hope that this is not the case +// if (event.isUnhandled() && Platform.isFxApplicationThread()) { +// ErrorAction.ignore().handle(event); +// return; +// } if (Platform.isFxApplicationThread()) { showAndWaitWithPlatformThread(event, forceWait); diff --git a/app/src/main/resources/io/xpipe/app/resources/style/popup-menu.css b/app/src/main/resources/io/xpipe/app/resources/style/popup-menu.css index 8b223fbb6..ef54a3b99 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/popup-menu.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/popup-menu.css @@ -52,7 +52,7 @@ -fx-border-color: -color-border-default; } -.context-menu * .context-menu { +.context-menu * .context-menu, .context-menu.condensed { -fx-padding: 0; -fx-background-radius: 0; -fx-border-radius: 0; diff --git a/app/src/main/resources/io/xpipe/app/resources/style/store-entry-comp.css b/app/src/main/resources/io/xpipe/app/resources/style/store-entry-comp.css index c0850be58..2a06a2d73 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/store-entry-comp.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/store-entry-comp.css @@ -76,11 +76,11 @@ -fx-opacity: 1.0; } -.expand-button:hover, .expand-button:focused { +.expand-button:hover, .expand-button:focused, .quick-access-button:hover, .quick-access-button:focused { -fx-background-color: -color-neutral-muted; } -.expand-button:disabled { +.expand-button:disabled, .quick-access-button:disabled { -fx-opacity: 0.2; } diff --git a/app/src/main/resources/io/xpipe/app/resources/style/store-mini-section.css b/app/src/main/resources/io/xpipe/app/resources/style/store-mini-section.css index c470676c7..04b0d695e 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/store-mini-section.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/store-mini-section.css @@ -20,6 +20,7 @@ -fx-padding: 0.25em 0.4em 0.25em 0.4em; -fx-border-color: transparent; -fx-background-color: transparent; + -fx-background-radius: 0; } .store-section-mini-comp .item:hover, .store-section-mini-comp .item:focused { @@ -44,6 +45,25 @@ -fx-opacity: 0.2; } +.store-section-mini-comp.condensed .expand-button { + -fx-background-radius: 0; +} + +.store-section-mini-comp .expand-button { + -fx-background-radius: 4 0 0 4; +} + +.store-section-mini-comp .quick-access-button:hover, .store-section-mini-comp .quick-access-button:focused { + -fx-background-color: -color-neutral-muted; +} + +.store-section-mini-comp .quick-access-button:disabled { + -fx-opacity: 0.2; +} + +.store-section-mini-comp .quick-access-button { + -fx-background-radius: 0; +} .store-section-mini-comp .separator { -fx-padding: 0 0.75em 0 0.75em; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java index ec2977562..a9ea35f9a 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java @@ -3,10 +3,7 @@ package io.xpipe.ext.base.script; import io.xpipe.app.comp.base.DropdownComp; import io.xpipe.app.comp.base.StoreToggleComp; import io.xpipe.app.comp.base.SystemStateComp; -import io.xpipe.app.comp.store.DenseStoreEntryComp; -import io.xpipe.app.comp.store.StoreEntryWrapper; -import io.xpipe.app.comp.store.StoreSection; -import io.xpipe.app.comp.store.StoreViewState; +import io.xpipe.app.comp.store.*; import io.xpipe.app.ext.DataStoreProvider; import io.xpipe.app.ext.GuiDialog; import io.xpipe.app.fxcomps.Comp; @@ -25,7 +22,7 @@ import java.util.List; public class ScriptGroupStoreProvider implements DataStoreProvider { @Override - public Comp customEntryComp(StoreSection sec, boolean preferLarge) { + public StoreEntryComp customEntryComp(StoreSection sec, boolean preferLarge) { ScriptGroupStore s = sec.getWrapper().getEntry().getStore().asNeeded(); if (sec.getWrapper().getValidity().getValue() != DataStoreEntry.Validity.COMPLETE) { return new DenseStoreEntryComp(sec.getWrapper(), true, null); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStoreProvider.java index aae2856b4..31f812fbb 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStoreProvider.java @@ -4,10 +4,7 @@ import io.xpipe.app.comp.base.DropdownComp; import io.xpipe.app.comp.base.IntegratedTextAreaComp; import io.xpipe.app.comp.base.StoreToggleComp; import io.xpipe.app.comp.base.SystemStateComp; -import io.xpipe.app.comp.store.DenseStoreEntryComp; -import io.xpipe.app.comp.store.StoreEntryWrapper; -import io.xpipe.app.comp.store.StoreSection; -import io.xpipe.app.comp.store.StoreViewState; +import io.xpipe.app.comp.store.*; import io.xpipe.app.core.AppExtensionManager; import io.xpipe.app.ext.DataStoreProvider; import io.xpipe.app.ext.GuiDialog; @@ -55,7 +52,7 @@ public class SimpleScriptStoreProvider implements DataStoreProvider { } @Override - public Comp customEntryComp(StoreSection sec, boolean preferLarge) { + public StoreEntryComp customEntryComp(StoreSection sec, boolean preferLarge) { SimpleScriptStore s = sec.getWrapper().getEntry().getStore().asNeeded(); if (sec.getWrapper().getValidity().getValue() != DataStoreEntry.Validity.COMPLETE) { return new DenseStoreEntryComp(sec.getWrapper(), true, null);