mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Show better text in PeerInfo if 0 trades
This commit is contained in:
parent
361a520048
commit
a76b4d17f5
@ -1343,6 +1343,7 @@ confidence.invalid=Transaction is invalid
|
||||
|
||||
peerInfo.title=Peer info
|
||||
peerInfo.nrOfTrades=Number of completed trades:
|
||||
peerInfo.notTradedYet=You have not traded with that user so far.
|
||||
peerInfo.setTag=Set tag for that peer:
|
||||
|
||||
addressTextField.openWallet=Open your default bitcoin wallet
|
||||
|
@ -78,6 +78,8 @@ public class PeerInfoWithTagEditor extends Overlay<PeerInfoWithTagEditor> {
|
||||
|
||||
public PeerInfoWithTagEditor numTrades(int numTrades) {
|
||||
this.numTrades = numTrades;
|
||||
if (numTrades == 0)
|
||||
width = 500;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -141,7 +143,10 @@ public class PeerInfoWithTagEditor extends Overlay<PeerInfoWithTagEditor> {
|
||||
|
||||
protected void addContent() {
|
||||
FormBuilder.addLabelTextField(gridPane, ++rowIndex, Res.getWithCol("shared.onionAddress"), hostName).second.setMouseTransparent(false);
|
||||
FormBuilder.addLabelTextField(gridPane, ++rowIndex, Res.get("peerInfo.nrOfTrades"), String.valueOf(numTrades));
|
||||
FormBuilder.addLabelTextField(gridPane, ++rowIndex,
|
||||
Res.get("peerInfo.nrOfTrades"),
|
||||
numTrades > 0 ? String.valueOf(numTrades) : Res.get("peerInfo.notTradedYet"));
|
||||
|
||||
inputTextField = FormBuilder.addLabelInputTextField(gridPane, ++rowIndex, Res.get("peerInfo.setTag")).second;
|
||||
Map<String, String> peerTagMap = preferences.getPeerTagMap();
|
||||
String tag = peerTagMap.containsKey(hostName) ? peerTagMap.get(hostName) : "";
|
||||
|
Loading…
Reference in New Issue
Block a user