mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Merge remote-tracking branch 'upstream/master' into finalize-info-icon-for-funds-needed
This commit is contained in:
commit
d7a36e35a3
5 changed files with 46 additions and 11 deletions
|
@ -413,7 +413,7 @@ textfield */
|
|||
}
|
||||
|
||||
#addressColumn {
|
||||
-fx-alignment: left;
|
||||
-fx-alignment: center-left;
|
||||
}
|
||||
|
||||
.table-view .column-header .label {
|
||||
|
|
|
@ -715,6 +715,12 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
|||
statusIcon.getStyleClass().add("small-text");
|
||||
copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));
|
||||
messageAnchorPane.getChildren().addAll(bg, arrow, headerLabel, messageLabel, copyIcon, attachmentsBox, statusIcon);
|
||||
messageLabel.setOnMouseClicked(event -> {
|
||||
if (2 > event.getClickCount()) {
|
||||
return;
|
||||
}
|
||||
GUIUtil.showSelectableTextModal(headerLabel.getText(), messageLabel.getText());
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -46,16 +46,15 @@ import io.bisq.gui.components.indicator.TxConfidenceIndicator;
|
|||
import io.bisq.gui.main.overlays.popups.Popup;
|
||||
import io.bisq.network.p2p.P2PService;
|
||||
import javafx.beans.property.DoubleProperty;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.geometry.Orientation;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.ScrollBar;
|
||||
import javafx.scene.control.TextArea;
|
||||
import javafx.scene.control.Tooltip;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.layout.Region;
|
||||
import javafx.stage.DirectoryChooser;
|
||||
import javafx.stage.FileChooser;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.*;
|
||||
import javafx.util.StringConverter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bitcoinj.core.Address;
|
||||
|
@ -64,7 +63,6 @@ import org.bitcoinj.core.TransactionConfidence;
|
|||
import org.bitcoinj.uri.BitcoinURI;
|
||||
import org.bitcoinj.wallet.DeterministicSeed;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -73,9 +71,9 @@ import java.net.URI;
|
|||
import java.net.URISyntaxException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
public class GUIUtil {
|
||||
|
@ -446,4 +444,22 @@ public class GUIUtil {
|
|||
.show();
|
||||
}));
|
||||
}
|
||||
|
||||
public static void showSelectableTextModal(String title, String text) {
|
||||
TextArea textArea = new TextArea();
|
||||
textArea.setText(text);
|
||||
textArea.setEditable(false);
|
||||
textArea.setWrapText(true);
|
||||
textArea.setPrefSize(800, 600);
|
||||
|
||||
Scene scene = new Scene(textArea);
|
||||
Stage stage = new Stage();
|
||||
if (null != title) {
|
||||
stage.setTitle(title);
|
||||
}
|
||||
stage.setScene(scene);
|
||||
stage.initModality(Modality.NONE);
|
||||
stage.initStyle(StageStyle.UTILITY);
|
||||
stage.show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,10 +37,11 @@ public class NetworkNodeProvider implements Provider<NetworkNode> {
|
|||
public NetworkNodeProvider(NetworkProtoResolver networkProtoResolver,
|
||||
BridgeAddressProvider bridgeAddressProvider,
|
||||
@Named(NetworkOptionKeys.USE_LOCALHOST_FOR_P2P) boolean useLocalhostForP2P,
|
||||
@Named(NetworkOptionKeys.MY_ADDRESS) String address,
|
||||
@Named(NetworkOptionKeys.PORT_KEY) int port,
|
||||
@Named(NetworkOptionKeys.TOR_DIR) File torDir) {
|
||||
networkNode = useLocalhostForP2P ?
|
||||
new LocalhostNetworkNode(port, networkProtoResolver) :
|
||||
new LocalhostNetworkNode(address, port, networkProtoResolver) :
|
||||
new TorNetworkNode(port, torDir, networkProtoResolver, bridgeAddressProvider);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ public class LocalhostNetworkNode extends NetworkNode {
|
|||
private static int simulateTorDelayTorNode = 500;
|
||||
private static int simulateTorDelayHiddenService = 500;
|
||||
|
||||
private String address;
|
||||
|
||||
public static void setSimulateTorDelayTorNode(int simulateTorDelayTorNode) {
|
||||
LocalhostNetworkNode.simulateTorDelayTorNode = simulateTorDelayTorNode;
|
||||
}
|
||||
|
@ -33,8 +35,15 @@ public class LocalhostNetworkNode extends NetworkNode {
|
|||
// Constructor
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public LocalhostNetworkNode(int port, NetworkProtoResolver networkProtoResolver) {
|
||||
public LocalhostNetworkNode(String address, int port, NetworkProtoResolver networkProtoResolver) {
|
||||
super(port, networkProtoResolver);
|
||||
if (null != address && !address.trim().isEmpty()) {
|
||||
this.address = address;
|
||||
}
|
||||
}
|
||||
|
||||
public LocalhostNetworkNode(int port, NetworkProtoResolver networkProtoResolver) {
|
||||
this(null, port, networkProtoResolver);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -59,7 +68,10 @@ public class LocalhostNetworkNode extends NetworkNode {
|
|||
log.error("Exception at startServer: " + e.getMessage());
|
||||
}
|
||||
|
||||
nodeAddressProperty.set(new NodeAddress("localhost", servicePort));
|
||||
final NodeAddress nodeAddress;
|
||||
if (null == address) nodeAddress = new NodeAddress("localhost", servicePort);
|
||||
else nodeAddress = new NodeAddress(address);
|
||||
nodeAddressProperty.set(nodeAddress);
|
||||
setupListeners.stream().forEach(SetupListener::onHiddenServicePublished);
|
||||
}, simulateTorDelayTorNode, TimeUnit.MILLISECONDS);
|
||||
}, simulateTorDelayHiddenService, TimeUnit.MILLISECONDS);
|
||||
|
|
Loading…
Add table
Reference in a new issue