From e76371518f7668b25e7f583abf82a5e161d16537 Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 16 Nov 2024 08:27:04 +0000 Subject: [PATCH] Fix NPE [release] --- .../app/comp/store/DenseStoreEntryComp.java | 19 ++++++-- .../comp/store/StandardStoreEntryComp.java | 22 +++++++++ .../xpipe/app/comp/store/StoreEntryComp.java | 22 +-------- dist/changelogs/13.0.1.md | 47 +++++++++++++++++++ dist/changelogs/13.0.1_incremental.md | 1 + version | 2 +- 6 files changed, 87 insertions(+), 26 deletions(-) create mode 100644 dist/changelogs/13.0.1.md create mode 100644 dist/changelogs/13.0.1_incremental.md 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 638434422..b2354b100 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 @@ -2,10 +2,12 @@ package io.xpipe.app.comp.store; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.augment.GrowAugment; +import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.util.PlatformThread; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleStringProperty; +import javafx.beans.value.ObservableValue; import javafx.geometry.HPos; import javafx.geometry.Insets; import javafx.geometry.Pos; @@ -31,9 +33,16 @@ public class DenseStoreEntryComp extends StoreEntryComp { : Comp.empty(); information.setGraphic(state.createRegion()); - var info = getWrapper().getEntry().getProvider() != null - ? getWrapper().getEntry().getProvider().informationString(section) - : new SimpleStringProperty(); + ObservableValue info = new SimpleStringProperty(); + if (getWrapper().getEntry().getProvider() != null) { + try { + info = getWrapper().getEntry().getProvider().informationString(section); + } catch (Exception e) { + ErrorEvent.fromThrowable(e).handle(); + } + } + ObservableValue finalInfo = info; + var summary = getWrapper().getSummary(); if (getWrapper().getEntry().getProvider() != null) { information @@ -44,10 +53,10 @@ public class DenseStoreEntryComp extends StoreEntryComp { var p = getWrapper().getEntry().getProvider(); if (val != null && grid.isHover() && p.alwaysShowSummary()) { return val; - } else if (info.getValue() == null && p.alwaysShowSummary()) { + } else if (finalInfo.getValue() == null && p.alwaysShowSummary()) { return val; } else { - return info.getValue(); + return finalInfo.getValue(); } }, grid.hoverProperty(), 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 8f07a8a6b..b1380c7a3 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 @@ -2,6 +2,8 @@ package io.xpipe.app.comp.store; import io.xpipe.app.comp.Comp; import io.xpipe.app.core.AppFont; +import io.xpipe.app.issue.ErrorEvent; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.process.OsType; import javafx.geometry.HPos; @@ -92,4 +94,24 @@ public class StandardStoreEntryComp extends StoreEntryComp { return grid; } + + private Label createInformation() { + var information = new Label(); + information.setGraphicTextGap(7); + if (getWrapper().getEntry().getProvider() != null) { + try { + information.textProperty().bind(PlatformThread.sync(getWrapper().getEntry().getProvider().informationString(section))); + } catch (Exception e) { + ErrorEvent.fromThrowable(e).handle(); + } + } + information.getStyleClass().add("information"); + + var state = getWrapper().getEntry().getProvider() != null + ? getWrapper().getEntry().getProvider().stateDisplay(getWrapper()) + : Comp.empty(); + information.setGraphic(state.createRegion()); + + return information; + } } 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 c8db1003d..5ce139db3 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 @@ -14,6 +14,7 @@ import io.xpipe.app.core.AppActionLinkDetector; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; import io.xpipe.app.ext.ActionProvider; +import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.resources.AppResources; import io.xpipe.app.storage.DataColor; @@ -25,6 +26,7 @@ import io.xpipe.app.util.*; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleStringProperty; import javafx.beans.value.ObservableDoubleValue; +import javafx.beans.value.ObservableValue; import javafx.css.PseudoClass; import javafx.geometry.Insets; import javafx.geometry.Pos; @@ -144,26 +146,6 @@ public abstract class StoreEntryComp extends SimpleComp { protected abstract Region createContent(); - protected Label createInformation() { - var information = new Label(); - information.setGraphicTextGap(7); - information - .textProperty() - .bind( - getWrapper().getEntry().getProvider() != null - ? PlatformThread.sync( - getWrapper().getEntry().getProvider().informationString(section)) - : new SimpleStringProperty()); - information.getStyleClass().add("information"); - - var state = getWrapper().getEntry().getProvider() != null - ? getWrapper().getEntry().getProvider().stateDisplay(getWrapper()) - : Comp.empty(); - information.setGraphic(state.createRegion()); - - return information; - } - protected void applyState(Node node) { PlatformThread.sync(getWrapper().getValidity()).subscribe(val -> { switch (val) { diff --git a/dist/changelogs/13.0.1.md b/dist/changelogs/13.0.1.md new file mode 100644 index 000000000..2547c6004 --- /dev/null +++ b/dist/changelogs/13.0.1.md @@ -0,0 +1,47 @@ +## VMs + +- There is now support for KVM/QEMU virtual machines that can be accessed via the libvirt CLI tools `virsh`. This includes support for other driver URLs as well aside from KVM and QEMU. This integration is available starting from the homelab plan and can be used for free for two weeks after this release using the new release preview +- You can now override a VM IP if you're using an advanced networking setup where the default IP detection is not suitable +- Fix remote VM SSH connections not being able to use the keys and identities from the local system +- There is now a new restart button for containers and VMs + +## File browser + +- There is now a new option in the context menu of a tab to pin it, allowing for having a split view with two different file systems +- There is now the option to dock terminals in the file browser (this is only available on Windows for now). You can disable this in Settings -> File browser -> Terminal docking if you don't like it +- The previous system history tab is now always shown +- You can now change the default download location for the move to downloads button + +## Shell sessions + +Many improvements have been implemented for reusability of shell sessions running in the background. Whenever you access a system or a parent system, XPipe will connect to it just as before but keep this session open in the background for some time, under the assumption that you will typically perform multiple actions shortly afterward. This will improve the speed of many actions and also results in less authentication prompts when you are using something like 2FA. + +## Terminals + +- Closing a terminal tab/window while the session is loading will now cancel the loading process in XPipe as well +- A newly opened terminal will now regain focus after any password prompt was entered in xpipe + +## Security updates + +There's now a new mechanism in place for checking for security updates separately from the normal update check. This is important going forward, to be able to act quickly when any security patch is published, so that all users have the possibility to get notified even if they don't follow announcements on the GitHub repo or on Discord. You can also disable this functionality in the settings if you want. + +## Other + +- The application style has been reworked +- The settings menu now shows a restart button when a setting has been changed that requires a restart to apply +- There is now an intro to scripts to provide some more information before using scripts +- Add ability to enable agent forwarding when using the SSH-Agent for identities +- The .rpm releases are now signed + +## Fixes + +- Fix Proxmox detection not working when not logging in as root +- Fix tunnels not closing properly when having to be closed forcefully +- Fix vmware integration failing when files other than .vmx were in the VM directories +- Fix Tabby not launching properly on Windows +- Fix SSH and docker issues with home assistant systems +- Fix git readme not showing connections in nested children categories +- Fix Windows Terminal Preview and Canary not being recognized +- Fix style issues with the mocha theme +- Fix color contrast for some themes +- Fix system dark mode changes not being applied if they were changed while XPipe was not running diff --git a/dist/changelogs/13.0.1_incremental.md b/dist/changelogs/13.0.1_incremental.md new file mode 100644 index 000000000..c3da58e9e --- /dev/null +++ b/dist/changelogs/13.0.1_incremental.md @@ -0,0 +1 @@ +- Fix startup error when old legacy SSH config connections were present diff --git a/version b/version index f0750610b..5cb7d8566 100644 --- a/version +++ b/version @@ -1 +1 @@ -13.0 +13.0.1