mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-03 19:30:31 +00:00
Various small fixes [stage]
This commit is contained in:
@@ -25,9 +25,6 @@ public class HostAddressChoice {
|
||||
var existing = value.getValue();
|
||||
var val = new SimpleObjectProperty<>(existing != null ? existing.get() : null);
|
||||
var list = FXCollections.observableArrayList(existing != null ? existing.getAvailable() : new ArrayList<>());
|
||||
if (existing != null) {
|
||||
list.remove(existing.get());
|
||||
}
|
||||
// For updating the options builder binding on list change, it doesn't support observable lists
|
||||
var listHashProp = new SimpleIntegerProperty(0);
|
||||
list.addListener((ListChangeListener<? super String>) c -> {
|
||||
|
||||
@@ -89,8 +89,6 @@ public class HostAddressChoiceComp extends Comp<CompStructure<HBox>> {
|
||||
if (newValue != null) {
|
||||
if (!allAddresses.contains(newValue)) {
|
||||
allAddresses.set(index, newValue);
|
||||
} else {
|
||||
allAddresses.remove(index);
|
||||
}
|
||||
} else {
|
||||
allAddresses.remove(index);
|
||||
@@ -139,9 +137,16 @@ public class HostAddressChoiceComp extends Comp<CompStructure<HBox>> {
|
||||
var skin = new ComboBoxListViewSkin<>(struc.get());
|
||||
struc.get().setSkin(skin);
|
||||
skin.setHideOnClick(false);
|
||||
struc.get().setVisibleRowCount(10);
|
||||
|
||||
// The focus seems to break on selection from the popup
|
||||
struc.get().selectionModelProperty().get().selectedIndexProperty().addListener((observable, oldValue, newValue) -> {
|
||||
Platform.runLater(() -> {
|
||||
struc.get().getParent().requestFocus();
|
||||
});
|
||||
});
|
||||
|
||||
allAddresses.addListener((ListChangeListener<? super String>) change -> {
|
||||
struc.get().setVisibleRowCount(10);
|
||||
if (!change.next()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package io.xpipe.app.ext;
|
||||
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.storage.DataStorage;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public interface NetworkTunnelStore extends DataStore, SelfReferentialStore {
|
||||
|
||||
static void checkTunneable(DataStoreEntryRef<?> ref) throws ValidationException {
|
||||
static void checkTunnelable(DataStoreEntryRef<?> ref) throws ValidationException {
|
||||
if (!(ref.getStore() instanceof NetworkTunnelStore t)) {
|
||||
throw new ValidationException(AppI18n.get("parentHostDoesNotSupportTunneling", ref.get().getName()));
|
||||
}
|
||||
|
||||
@@ -2,11 +2,13 @@ package io.xpipe.app.process;
|
||||
|
||||
import io.xpipe.core.FilePath;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public interface SudoCache {
|
||||
|
||||
void setRequiresPassword();
|
||||
|
||||
boolean requiresPassword() throws Exception;
|
||||
|
||||
FilePath getSudoExecutable() throws Exception;
|
||||
Optional<FilePath> getSudoExecutable() throws Exception;
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
- Fix sudo elevation requiring a different approach on the newly released Ubuntu 25.10 due to sudo being replaced by a rust sudo variant
|
||||
- Fix hostname text field sometimes entering invalid state and not applying hostname changes
|
||||
- Fix host address text field sometimes entering invalid state and not applying hostname changes
|
||||
- Fix exception when changing synced key scope to per-user
|
||||
- Fix macOS Tahoe display name containing version twice
|
||||
- Fix inaccurate error message when a parent of a service did not support tunneling
|
||||
- Fix exception when changing synced key scope to per-user
|
||||
- Add setting to customize markdown notes template for connections
|
||||
|
||||
@@ -20,7 +20,7 @@ public class SshIdentityStateManager {
|
||||
|
||||
private static RunningAgent runningAgent;
|
||||
|
||||
public static boolean checkNamedPipeExists(Path path) {
|
||||
private static boolean checkNamedPipeExists(Path path) {
|
||||
Memory p = new Memory(WinBase.WIN32_FIND_DATA.sizeOf());
|
||||
// This will not break the named pipe compared to using a normal exists check
|
||||
var r = Kernel32.INSTANCE.FindFirstFile(path.toString(), p);
|
||||
|
||||
@@ -34,7 +34,7 @@ public abstract class AbstractServiceStore implements SingletonSessionStore<Netw
|
||||
@Override
|
||||
public void checkComplete() throws Throwable {
|
||||
Validators.nonNull(getHost());
|
||||
NetworkTunnelStore.checkTunneable(getHost());
|
||||
NetworkTunnelStore.checkTunnelable(getHost());
|
||||
Validators.nonNull(remotePort);
|
||||
Validators.nonNull(serviceProtocolType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user