Skip to content

Commit

Permalink
Fix NPE [release]
Browse files Browse the repository at this point in the history
  • Loading branch information
crschnick committed Nov 16, 2024
1 parent 57ebe19 commit e763715
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 26 deletions.
19 changes: 14 additions & 5 deletions app/src/main/java/io/xpipe/app/comp/store/DenseStoreEntryComp.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

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;
Expand All @@ -31,9 +33,16 @@ private Label createInformation(GridPane grid) {
: Comp.empty();
information.setGraphic(state.createRegion());

var info = getWrapper().getEntry().getProvider() != null
? getWrapper().getEntry().getProvider().informationString(section)
: new SimpleStringProperty();
ObservableValue<String> info = new SimpleStringProperty();
if (getWrapper().getEntry().getProvider() != null) {
try {
info = getWrapper().getEntry().getProvider().informationString(section);
} catch (Exception e) {
ErrorEvent.fromThrowable(e).handle();
}
}
ObservableValue<String> finalInfo = info;

var summary = getWrapper().getSummary();
if (getWrapper().getEntry().getProvider() != null) {
information
Expand All @@ -44,10 +53,10 @@ private Label createInformation(GridPane grid) {
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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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;
Expand Down Expand Up @@ -92,4 +94,24 @@ protected Region createContent() {

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;
}
}
22 changes: 2 additions & 20 deletions app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
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;
Expand All @@ -25,6 +26,7 @@
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;
Expand Down Expand Up @@ -144,26 +146,6 @@ protected final Region createSimple() {

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) {
Expand Down
47 changes: 47 additions & 0 deletions dist/changelogs/13.0.1.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions dist/changelogs/13.0.1_incremental.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix startup error when old legacy SSH config connections were present
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13.0
13.0.1

0 comments on commit e763715

Please sign in to comment.