mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-21 12:48:35 -04:00
move min version to about tab
This commit is contained in:
parent
8600e2dd6d
commit
a4166cbbed
3 changed files with 11 additions and 14 deletions
|
@ -19,6 +19,7 @@ package haveno.desktop.main.settings.about;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import haveno.common.app.Version;
|
import haveno.common.app.Version;
|
||||||
|
import haveno.core.filter.FilterManager;
|
||||||
import haveno.core.locale.Res;
|
import haveno.core.locale.Res;
|
||||||
import haveno.desktop.common.view.ActivatableView;
|
import haveno.desktop.common.view.ActivatableView;
|
||||||
import haveno.desktop.common.view.FxmlView;
|
import haveno.desktop.common.view.FxmlView;
|
||||||
|
@ -35,16 +36,18 @@ import javafx.scene.layout.GridPane;
|
||||||
@FxmlView
|
@FxmlView
|
||||||
public class AboutView extends ActivatableView<GridPane, Void> {
|
public class AboutView extends ActivatableView<GridPane, Void> {
|
||||||
|
|
||||||
|
private final FilterManager filterManager;
|
||||||
private int gridRow = 0;
|
private int gridRow = 0;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public AboutView() {
|
public AboutView(FilterManager filterManager) {
|
||||||
super();
|
super();
|
||||||
|
this.filterManager = filterManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
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 label = addLabel(root, gridRow, Res.get("setting.about.about"), Layout.TWICE_FIRST_ROW_DISTANCE);
|
||||||
label.setWrapText(true);
|
label.setWrapText(true);
|
||||||
|
@ -77,8 +80,11 @@ public class AboutView extends ActivatableView<GridPane, Void> {
|
||||||
if (isXmr)
|
if (isXmr)
|
||||||
addCompactTopLabelTextField(root, ++gridRow, Res.get("setting.about.feeEstimation.label"), "Monero node");
|
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("setting.about.version"), Version.VERSION, Layout.TWICE_FIRST_ROW_AND_GROUP_DISTANCE);
|
||||||
|
addCompactTopLabelTextField(root, ++gridRow, Res.get("filterWindow.disableTradeBelowVersion"), minVersion);
|
||||||
addCompactTopLabelTextField(root, ++gridRow,
|
addCompactTopLabelTextField(root, ++gridRow,
|
||||||
Res.get("setting.about.subsystems.label"),
|
Res.get("setting.about.subsystems.label"),
|
||||||
Res.get("setting.about.subsystems.val",
|
Res.get("setting.about.subsystems.val",
|
||||||
|
|
|
@ -162,10 +162,7 @@
|
||||||
<HavenoTextField fx:id="chainHeightTextField" GridPane.rowIndex="9" editable="false"
|
<HavenoTextField fx:id="chainHeightTextField" GridPane.rowIndex="9" editable="false"
|
||||||
focusTraversable="false" labelFloat="true"/>
|
focusTraversable="false" labelFloat="true"/>
|
||||||
|
|
||||||
<HavenoTextField fx:id="minVersionForTrading" GridPane.rowIndex="10" editable="false"
|
<AutoTooltipButton fx:id="openTorSettingsButton" GridPane.rowIndex="10" GridPane.columnIndex="0"/>
|
||||||
focusTraversable="false" labelFloat="true"/>
|
|
||||||
|
|
||||||
<AutoTooltipButton fx:id="openTorSettingsButton" GridPane.rowIndex="11" GridPane.columnIndex="0"/>
|
|
||||||
|
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="ALWAYS" minWidth="500"/>
|
<ColumnConstraints hgrow="ALWAYS" minWidth="500"/>
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||||
@FXML
|
@FXML
|
||||||
InputTextField xmrNodesInputTextField;
|
InputTextField xmrNodesInputTextField;
|
||||||
@FXML
|
@FXML
|
||||||
TextField onionAddress, sentDataTextField, receivedDataTextField, chainHeightTextField, minVersionForTrading;
|
TextField onionAddress, sentDataTextField, receivedDataTextField, chainHeightTextField;
|
||||||
@FXML
|
@FXML
|
||||||
Label p2PPeersLabel, moneroConnectionsLabel;
|
Label p2PPeersLabel, moneroConnectionsLabel;
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -156,7 +156,6 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||||
sentDataTextField.getStyleClass().add("label-float");
|
sentDataTextField.getStyleClass().add("label-float");
|
||||||
receivedDataTextField.getStyleClass().add("label-float");
|
receivedDataTextField.getStyleClass().add("label-float");
|
||||||
chainHeightTextField.getStyleClass().add("label-float");
|
chainHeightTextField.getStyleClass().add("label-float");
|
||||||
minVersionForTrading.getStyleClass().add("label-float");
|
|
||||||
|
|
||||||
btcHeader.setText(Res.get("settings.net.xmrHeader"));
|
btcHeader.setText(Res.get("settings.net.xmrHeader"));
|
||||||
p2pHeader.setText(Res.get("settings.net.p2pHeader"));
|
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"));
|
sentDataTextField.setPromptText(Res.get("settings.net.sentDataLabel"));
|
||||||
receivedDataTextField.setPromptText(Res.get("settings.net.receivedDataLabel"));
|
receivedDataTextField.setPromptText(Res.get("settings.net.receivedDataLabel"));
|
||||||
chainHeightTextField.setPromptText(Res.get("settings.net.chainHeightLabel"));
|
chainHeightTextField.setPromptText(Res.get("settings.net.chainHeightLabel"));
|
||||||
minVersionForTrading.setPromptText(Res.get("filterWindow.disableTradeBelowVersion"));
|
|
||||||
roundTripTimeColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.roundTripTimeColumn")));
|
roundTripTimeColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.roundTripTimeColumn")));
|
||||||
sentBytesColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.sentBytesColumn")));
|
sentBytesColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.sentBytesColumn")));
|
||||||
receivedBytesColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.receivedBytesColumn")));
|
receivedBytesColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.receivedBytesColumn")));
|
||||||
|
@ -510,10 +508,6 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||||
selectMoneroPeersToggle();
|
selectMoneroPeersToggle();
|
||||||
onMoneroPeersToggleSelected(false);
|
onMoneroPeersToggleSelected(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set min version for trading
|
|
||||||
String minVersion = filterManager.getDisableTradeBelowVersion();
|
|
||||||
minVersionForTrading.textProperty().setValue(minVersion == null ? Res.get("shared.none") : minVersion);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPublicNodesDisabled() {
|
private boolean isPublicNodesDisabled() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue