diff --git a/app/src/main/java/io/xpipe/app/prefs/ExternalPasswordManager.java b/app/src/main/java/io/xpipe/app/prefs/ExternalPasswordManager.java index e6e9d18a..7a92814d 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ExternalPasswordManager.java +++ b/app/src/main/java/io/xpipe/app/prefs/ExternalPasswordManager.java @@ -30,7 +30,7 @@ public interface ExternalPasswordManager extends PrefsChoiceValue { @Override public String getId() { - return "1Password"; + return "1password"; } }; @@ -42,7 +42,7 @@ public interface ExternalPasswordManager extends PrefsChoiceValue { @Override public String getId() { - return "Dashlane"; + return "dashlane"; } }; @@ -54,7 +54,7 @@ public interface ExternalPasswordManager extends PrefsChoiceValue { @Override public String getId() { - return "LastPass"; + return "lastpass"; } }; @@ -66,7 +66,7 @@ public interface ExternalPasswordManager extends PrefsChoiceValue { @Override public String getId() { - return "macOS keychain"; + return "macosKeychain"; } @Override diff --git a/app/src/main/java/io/xpipe/app/util/DataStoreFormatter.java b/app/src/main/java/io/xpipe/app/util/DataStoreFormatter.java index 69a3d86c..91a1fd4f 100644 --- a/app/src/main/java/io/xpipe/app/util/DataStoreFormatter.java +++ b/app/src/main/java/io/xpipe/app/util/DataStoreFormatter.java @@ -4,10 +4,10 @@ import io.xpipe.app.comp.store.StoreEntryWrapper; import io.xpipe.app.fxcomps.util.BindingsHelper; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; +import io.xpipe.core.process.ShellDialects; import io.xpipe.core.process.ShellStoreState; import io.xpipe.core.store.DataStore; import io.xpipe.core.store.ShellStore; - import javafx.beans.value.ObservableValue; import java.util.function.IntFunction; @@ -28,15 +28,20 @@ public class DataStoreFormatter { public static ObservableValue shellInformation(StoreEntryWrapper w) { return BindingsHelper.map(w.getPersistentState(), o -> { if (o instanceof ShellStoreState s) { - if (!s.isInitialized()) { + if (s.getRunning() == null) { return null; } - if (s.getShellDialect() != null - && !s.getShellDialect().getDumbMode().supportsAnyPossibleInteraction()) { - return s.getOsName() != null - ? formattedOsName(s.getOsName()) - : s.getShellDialect().getDisplayName(); + if (s.getShellDialect() != null && !s.getShellDialect().getDumbMode().supportsAnyPossibleInteraction()) { + if (s.getOsName() != null) { + return formattedOsName(s.getOsName()); + } + + if (s.getShellDialect().equals(ShellDialects.UNSUPPORTED)) { + return null; + } + + return s.getShellDialect().getDisplayName(); } return s.isRunning() ? formattedOsName(s.getOsName()) : "Connection failed"; diff --git a/core/src/main/java/io/xpipe/core/process/ShellDialect.java b/core/src/main/java/io/xpipe/core/process/ShellDialect.java index 2f1e222d..baef703a 100644 --- a/core/src/main/java/io/xpipe/core/process/ShellDialect.java +++ b/core/src/main/java/io/xpipe/core/process/ShellDialect.java @@ -6,15 +6,12 @@ import io.xpipe.core.util.NewLine; import io.xpipe.core.util.SecretValue; import io.xpipe.core.util.StreamCharset; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - import java.nio.charset.Charset; import java.util.List; import java.util.Map; import java.util.UUID; import java.util.stream.Stream; -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") public interface ShellDialect { CommandBuilder launchAsnyc(CommandBuilder cmd); diff --git a/core/src/main/java/io/xpipe/core/process/ShellStoreState.java b/core/src/main/java/io/xpipe/core/process/ShellStoreState.java index 37eb565a..faf4d688 100644 --- a/core/src/main/java/io/xpipe/core/process/ShellStoreState.java +++ b/core/src/main/java/io/xpipe/core/process/ShellStoreState.java @@ -21,10 +21,6 @@ public class ShellStoreState extends DataStoreState implements OsNameState { ShellDialect shellDialect; Boolean running; - public boolean isInitialized() { - return running != null; - } - public boolean isRunning() { return running != null ? running : false; } diff --git a/core/src/main/java/io/xpipe/core/util/CoreJacksonModule.java b/core/src/main/java/io/xpipe/core/util/CoreJacksonModule.java index 73410a56..6b1ad477 100644 --- a/core/src/main/java/io/xpipe/core/util/CoreJacksonModule.java +++ b/core/src/main/java/io/xpipe/core/util/CoreJacksonModule.java @@ -49,6 +49,9 @@ public class CoreJacksonModule extends SimpleModule { addSerializer(Charset.class, new CharsetSerializer()); addDeserializer(Charset.class, new CharsetDeserializer()); + addSerializer(ShellDialect.class, new ShellDialectSerializer()); + addDeserializer(ShellDialect.class, new ShellDialectDeserializer()); + addSerializer(StreamCharset.class, new StreamCharsetSerializer()); addDeserializer(StreamCharset.class, new StreamCharsetDeserializer()); @@ -84,6 +87,22 @@ public class CoreJacksonModule extends SimpleModule { } } + public static class ShellDialectSerializer extends JsonSerializer { + + @Override + public void serialize(ShellDialect value, JsonGenerator jgen, SerializerProvider provider) throws IOException { + jgen.writeString(value.getId()); + } + } + + public static class ShellDialectDeserializer extends JsonDeserializer { + + @Override + public ShellDialect deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ShellDialects.byNameIfPresent(p.getValueAsString()).orElse(null); + } + } + public static class NewLineSerializer extends JsonSerializer { @Override diff --git a/dist/changelogs/9.0.md b/dist/changelogs/9.0.md index 699fa19d..c8815fa1 100644 --- a/dist/changelogs/9.0.md +++ b/dist/changelogs/9.0.md @@ -22,6 +22,8 @@ This concept will be refined over the next updates. - Tunneled and X11-forwarded custom SSH connections are now properly detected and can be toggled on and off to run in the background as normal tunnels +- A host key acceptance notification is now displayed properly in case your system doesn't automatically accept new host keys + ## SSH X11 Forwarding on Windows via WSL You can now enable X11 forwarding for an SSH connection. @@ -42,7 +44,7 @@ Furthermore, the kitty terminal is now fully supported with tabs on both Linux a ## Password manager improvements - +The password manager handling has been improved and some potential sources of errors and confusion have been eliminated. There are also now a few command templates available for established password managers to quickly get started. ## Improved keyboard control @@ -54,7 +56,7 @@ The application logo has been improved with of regards to contrast and visibilit ## Other changes -- Fix macOS app failing to automatically restart after update - The window title will now reflect which edition you use +- Fix macOS app failing to automatically restart after update - Fix file names not being properly adjusted when transferred across file systems and some characters were not supported on the target system - Fix macOS desktop shortcuts not having an icon associated with them diff --git a/lang/app/strings/fixed_en.properties b/lang/app/strings/fixed_en.properties index 24ee529e..6b37db36 100644 --- a/lang/app/strings/fixed_en.properties +++ b/lang/app/strings/fixed_en.properties @@ -58,3 +58,7 @@ mstsc=Microsoft Terminal Services Client (MSTSC) remmina=Remmina microsoftRemoteDesktopApp=Microsoft Remote Desktop.app bitwarden=Bitwarden +1password=1Password +dashlane=Dashlane +lastpass=LastPass +macosKeychain=macOS keychain