Skip to content

Commit f464c2c

Browse files
committed
Small fixes [release]
1 parent 447ec12 commit f464c2c

File tree

19 files changed

+62
-42
lines changed

19 files changed

+62
-42
lines changed

app/src/main/java/io/xpipe/app/comp/base/LoadingOverlayComp.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public CompStructure<StackPane> createBase() {
3131

3232
var loadingBg = new StackPane(loading);
3333
loadingBg.getStyleClass().add("loading-comp");
34+
loadingBg.getStyleClass().add("modal-pane");
3435

3536
loadingBg.setVisible(showLoading.getValue());
3637

app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryListComp.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import io.xpipe.app.comp.base.ListBoxViewComp;
44
import io.xpipe.app.comp.base.MultiContentComp;
5-
import io.xpipe.app.core.AppState;
65
import io.xpipe.app.fxcomps.Comp;
76
import io.xpipe.app.fxcomps.SimpleComp;
87
import io.xpipe.app.fxcomps.impl.HorizontalComp;
@@ -33,11 +32,10 @@ private Comp<?> createList() {
3332

3433
@Override
3534
protected Region createSimple() {
36-
var initialCount = StoreViewState.get().getAllEntries().size();
35+
var initialCount = 1;
3736
var showIntro = Bindings.createBooleanBinding(
3837
() -> {
39-
return initialCount == StoreViewState.get().getAllEntries().size()
40-
&& AppState.get().isInitialLaunch();
38+
return initialCount == StoreViewState.get().getAllEntries().size();
4139
},
4240
StoreViewState.get().getAllEntries());
4341
var map = new LinkedHashMap<Comp<?>, ObservableBooleanValue>();

app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public void toggleExpanded() {
206206

207207
@Override
208208
public boolean shouldShow(String filter) {
209-
return getName().toLowerCase().contains(filter.toLowerCase())
209+
return filter == null || getName().toLowerCase().contains(filter.toLowerCase())
210210
|| (summary.get() != null && summary.get().toLowerCase().contains(filter.toLowerCase()))
211211
|| (information.get() != null && information.get().toLowerCase().contains(filter.toLowerCase()));
212212
}

app/src/main/java/io/xpipe/app/comp/storage/store/StoreIntroComp.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import io.xpipe.app.util.Hyperlinks;
88
import io.xpipe.app.util.ScanAlert;
99
import io.xpipe.core.impl.LocalStore;
10-
import javafx.geometry.Insets;
1110
import javafx.geometry.Orientation;
1211
import javafx.geometry.Pos;
1312
import javafx.scene.control.Button;
@@ -29,7 +28,7 @@ public Region createSimple() {
2928

3029
var introDesc = new Label(AppI18n.get("storeIntroDescription"));
3130

32-
var mfi = new FontIcon("mdi2m-magnify");
31+
var mfi = new FontIcon("mdi2p-playlist-plus");
3332
var machine = new Label(AppI18n.get("storeMachineDescription"), mfi);
3433
machine.heightProperty().addListener((c, o, n) -> {
3534
mfi.iconSizeProperty().set(n.intValue());
@@ -67,9 +66,8 @@ title, introDesc, new Separator(Orientation.HORIZONTAL), machine, scanPane
6766
v.getStyleClass().add("intro");
6867

6968
var sp = new StackPane(v);
70-
sp.setAlignment(Pos.BOTTOM_CENTER);
69+
sp.setAlignment(Pos.CENTER);
7170
sp.setPickOnBounds(false);
72-
sp.setPadding(new Insets(0, 0, 40, 0));
7371
return sp;
7472
}
7573
}

app/src/main/java/io/xpipe/app/comp/store/GuiDsStoreCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static void showCreation(Predicate<DataStoreProvider> filter) {
123123
e -> {
124124
try {
125125
DataStorage.get().addStoreEntry(e);
126-
if (e.getProvider().shouldHaveSubShells()) {
126+
if (e.getProvider().shouldHaveChildren()) {
127127
ScanAlert.showAsync(e);
128128
}
129129
} catch (Exception ex) {

app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private static String getClipboardAction() {
2020
return content != null ? content.toString() : null;
2121
}
2222

23-
private static void handle(String content, boolean showAlert) {
23+
public static void handle(String content, boolean showAlert) {
2424
var detected = LauncherInput.of(content);
2525
if (detected.size() == 0) {
2626
return;

app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ default boolean canHaveSubShells() {
4646
return true;
4747
}
4848

49-
default boolean shouldHaveSubShells() {
49+
default boolean shouldHaveChildren() {
5050
return canHaveSubShells();
5151
}
5252

app/src/main/java/io/xpipe/app/fxcomps/impl/FilterComp.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package io.xpipe.app.fxcomps.impl;
22

3+
import io.xpipe.app.core.AppActionLinkDetector;
34
import io.xpipe.app.fxcomps.Comp;
45
import io.xpipe.app.fxcomps.CompStructure;
5-
import io.xpipe.app.fxcomps.util.PlatformThread;
66
import io.xpipe.app.fxcomps.util.SimpleChangeListener;
7+
import javafx.application.Platform;
78
import javafx.beans.binding.Bindings;
89
import javafx.beans.property.Property;
910
import javafx.scene.Node;
@@ -14,6 +15,8 @@
1415
import lombok.Value;
1516
import org.kordamp.ikonli.javafx.FontIcon;
1617

18+
import java.util.Objects;
19+
1720
public class FilterComp extends Comp<FilterComp.Structure> {
1821

1922
private final Property<String> filterText;
@@ -31,9 +34,20 @@ public Structure createBase() {
3134
filter.setAccessibleText("Filter");
3235

3336
SimpleChangeListener.apply(filterText, val -> {
34-
PlatformThread.runLaterIfNeeded(() -> filter.setText(val));
37+
Platform.runLater(() -> {
38+
if (!Objects.equals(filter.getText(), val)) {
39+
filter.setText(val);
40+
}
41+
});
3542
});
3643
filter.textProperty().addListener((observable, oldValue, newValue) -> {
44+
// Handle pasted xpipe URLs
45+
if (newValue != null && newValue.startsWith("xpipe://")) {
46+
AppActionLinkDetector.handle(newValue, false);
47+
filter.setText(null);
48+
return;
49+
}
50+
3751
filterText.setValue(newValue);
3852
});
3953

app/src/main/java/io/xpipe/app/fxcomps/util/BindingsHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public static <V> ObservableList<V> filteredContentBinding(
139139
ObservableList<V> l2, ObservableValue<Predicate<V>> predicate) {
140140
ObservableList<V> l1 = FXCollections.observableList(new ArrayList<>());
141141
Runnable runnable = () -> {
142-
setContent(l1, l2.stream().filter(predicate.getValue()).toList());
142+
setContent(l1, predicate.getValue() != null ? l2.stream().filter(predicate.getValue()).toList() : l2);
143143
};
144144
runnable.run();
145145
l2.addListener((ListChangeListener<? super V>) c -> {

app/src/main/java/io/xpipe/app/prefs/AppPrefs.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import io.xpipe.app.issue.ErrorEvent;
2020
import io.xpipe.app.util.LockChangeAlert;
2121
import io.xpipe.app.util.LockedSecretValue;
22+
import io.xpipe.core.util.ModuleHelper;
2223
import io.xpipe.core.util.SecretValue;
2324
import javafx.beans.binding.Bindings;
2425
import javafx.beans.property.*;
@@ -35,6 +36,10 @@
3536

3637
public class AppPrefs {
3738

39+
public boolean isDevelopmentEnvironment() {
40+
return developerMode().getValue() && !ModuleHelper.isImage();
41+
}
42+
3843
private static ObservableBooleanValue bindDeveloperTrue(ObservableBooleanValue o) {
3944
return Bindings.createBooleanBinding(
4045
() -> {
@@ -588,7 +593,7 @@ private AppPreferencesFx createPreferences() {
588593
developerShowHiddenProviders)),
589594
Category.of("troubleshoot", Group.of(troubleshoot))));
590595

591-
categories.get(categories.size() - 1).setVisibilityProperty(VisibilityProperty.of(developerMode()));
596+
categories.get(categories.size() - 2).setVisibilityProperty(VisibilityProperty.of(developerMode()));
592597

593598
var handler = new PrefsHandlerImpl(categories);
594599
PrefsProvider.getAll().forEach(prov -> prov.addPrefs(handler));

0 commit comments

Comments
 (0)