move min version to about tab

This commit is contained in:
woodser 2025-06-02 13:31:46 -04:00
parent 8600e2dd6d
commit a4166cbbed
No known key found for this signature in database
GPG key ID: 55A10DD48ADEE5EF
3 changed files with 11 additions and 14 deletions

View file

@ -19,6 +19,7 @@ package haveno.desktop.main.settings.about;
import com.google.inject.Inject;
import haveno.common.app.Version;
import haveno.core.filter.FilterManager;
import haveno.core.locale.Res;
import haveno.desktop.common.view.ActivatableView;
import haveno.desktop.common.view.FxmlView;
@ -35,16 +36,18 @@ import javafx.scene.layout.GridPane;
@FxmlView
public class AboutView extends ActivatableView<GridPane, Void> {
private final FilterManager filterManager;
private int gridRow = 0;
@Inject
public AboutView() {
public AboutView(FilterManager filterManager) {
super();
this.filterManager = filterManager;
}
@Override
public void initialize() {
addTitledGroupBg(root, gridRow, 4, Res.get("setting.about.aboutHaveno"));
addTitledGroupBg(root, gridRow, 5, Res.get("setting.about.aboutHaveno"));
Label label = addLabel(root, gridRow, Res.get("setting.about.about"), Layout.TWICE_FIRST_ROW_DISTANCE);
label.setWrapText(true);
@ -77,8 +80,11 @@ public class AboutView extends ActivatableView<GridPane, Void> {
if (isXmr)
addCompactTopLabelTextField(root, ++gridRow, Res.get("setting.about.feeEstimation.label"), "Monero node");
addTitledGroupBg(root, ++gridRow, 2, Res.get("setting.about.versionDetails"), Layout.GROUP_DISTANCE);
String minVersion = filterManager.getDisableTradeBelowVersion() == null ? Res.get("shared.none") : filterManager.getDisableTradeBelowVersion();
addTitledGroupBg(root, ++gridRow, 3, Res.get("setting.about.versionDetails"), Layout.GROUP_DISTANCE);
addCompactTopLabelTextField(root, gridRow, Res.get("setting.about.version"), Version.VERSION, Layout.TWICE_FIRST_ROW_AND_GROUP_DISTANCE);
addCompactTopLabelTextField(root, ++gridRow, Res.get("filterWindow.disableTradeBelowVersion"), minVersion);
addCompactTopLabelTextField(root, ++gridRow,
Res.get("setting.about.subsystems.label"),
Res.get("setting.about.subsystems.val",

View file

@ -162,10 +162,7 @@
<HavenoTextField fx:id="chainHeightTextField" GridPane.rowIndex="9" editable="false"
focusTraversable="false" labelFloat="true"/>
<HavenoTextField fx:id="minVersionForTrading" GridPane.rowIndex="10" editable="false"
focusTraversable="false" labelFloat="true"/>
<AutoTooltipButton fx:id="openTorSettingsButton" GridPane.rowIndex="11" GridPane.columnIndex="0"/>
<AutoTooltipButton fx:id="openTorSettingsButton" GridPane.rowIndex="10" GridPane.columnIndex="0"/>
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" minWidth="500"/>

View file

@ -75,7 +75,7 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
@FXML
InputTextField xmrNodesInputTextField;
@FXML
TextField onionAddress, sentDataTextField, receivedDataTextField, chainHeightTextField, minVersionForTrading;
TextField onionAddress, sentDataTextField, receivedDataTextField, chainHeightTextField;
@FXML
Label p2PPeersLabel, moneroConnectionsLabel;
@FXML
@ -156,7 +156,6 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
sentDataTextField.getStyleClass().add("label-float");
receivedDataTextField.getStyleClass().add("label-float");
chainHeightTextField.getStyleClass().add("label-float");
minVersionForTrading.getStyleClass().add("label-float");
btcHeader.setText(Res.get("settings.net.xmrHeader"));
p2pHeader.setText(Res.get("settings.net.p2pHeader"));
@ -183,7 +182,6 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
sentDataTextField.setPromptText(Res.get("settings.net.sentDataLabel"));
receivedDataTextField.setPromptText(Res.get("settings.net.receivedDataLabel"));
chainHeightTextField.setPromptText(Res.get("settings.net.chainHeightLabel"));
minVersionForTrading.setPromptText(Res.get("filterWindow.disableTradeBelowVersion"));
roundTripTimeColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.roundTripTimeColumn")));
sentBytesColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.sentBytesColumn")));
receivedBytesColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.receivedBytesColumn")));
@ -510,10 +508,6 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
selectMoneroPeersToggle();
onMoneroPeersToggleSelected(false);
}
// set min version for trading
String minVersion = filterManager.getDisableTradeBelowVersion();
minVersionForTrading.textProperty().setValue(minVersion == null ? Res.get("shared.none") : minVersion);
}
private boolean isPublicNodesDisabled() {