mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Improve wording for security deposit
This commit is contained in:
parent
eefa649836
commit
0a42b15972
@ -418,7 +418,9 @@ createOffer.changePrice=Change price
|
||||
createOffer.tac=With publishing this offer I agree to trade with any trader who fulfills the conditions as defined in this screen.
|
||||
createOffer.currencyForFee=Trade fee
|
||||
createOffer.setDeposit=Set buyer's security deposit (%)
|
||||
createOffer.setDepositAsBuyer=Set my security deposit as buyer (%)
|
||||
createOffer.securityDepositInfo=Your buyer''s security deposit will be {0}
|
||||
createOffer.securityDepositInfoAsBuyer=Your security deposit as buyer will be {0}
|
||||
|
||||
|
||||
####################################################################
|
||||
|
@ -147,7 +147,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel> extends
|
||||
private FundsTextField totalToPayTextField;
|
||||
private Label amountDescriptionLabel, priceCurrencyLabel, priceDescriptionLabel, volumeDescriptionLabel,
|
||||
waitingForFundsLabel, marketBasedPriceLabel, percentagePriceDescription, tradeFeeDescriptionLabel,
|
||||
resultLabel, tradeFeeInBtcLabel, tradeFeeInBsqLabel, xLabel, fakeXLabel;
|
||||
resultLabel, tradeFeeInBtcLabel, tradeFeeInBsqLabel, xLabel, fakeXLabel, buyerSecurityDepositLabel;
|
||||
protected Label amountBtcLabel, volumeCurrencyLabel, minAmountBtcLabel;
|
||||
private ComboBox<PaymentAccount> paymentAccountsComboBox;
|
||||
private ComboBox<TradeCurrency> currencyComboBox;
|
||||
@ -578,6 +578,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel> extends
|
||||
totalToPayTextField.textProperty().bind(model.totalToPay);
|
||||
addressTextField.amountAsCoinProperty().bind(model.getDataModel().getMissingCoin());
|
||||
buyerSecurityDepositInputTextField.textProperty().bindBidirectional(model.buyerSecurityDeposit);
|
||||
buyerSecurityDepositLabel.textProperty().bind(model.buyerSecurityDepositLabel);
|
||||
tradeFeeInBtcLabel.textProperty().bind(model.tradeFeeInBtcWithFiat);
|
||||
tradeFeeInBsqLabel.textProperty().bind(model.tradeFeeInBsqWithFiat);
|
||||
tradeFeeDescriptionLabel.textProperty().bind(model.tradeFeeDescription);
|
||||
@ -628,6 +629,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel> extends
|
||||
totalToPayTextField.textProperty().unbind();
|
||||
addressTextField.amountAsCoinProperty().unbind();
|
||||
buyerSecurityDepositInputTextField.textProperty().unbindBidirectional(model.buyerSecurityDeposit);
|
||||
buyerSecurityDepositLabel.textProperty().unbind();
|
||||
tradeFeeInBtcLabel.textProperty().unbind();
|
||||
tradeFeeInBsqLabel.textProperty().unbind();
|
||||
tradeFeeDescriptionLabel.textProperty().unbind();
|
||||
@ -767,7 +769,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel> extends
|
||||
|
||||
buyerSecurityDepositInBTCListener = (observable, oldValue, newValue) -> {
|
||||
if (!newValue.equals("")) {
|
||||
Label depositInBTCInfo = createPopoverLabel(Res.get("createOffer.securityDepositInfo", newValue));
|
||||
Label depositInBTCInfo = createPopoverLabel(model.getSecurityDepositPopOverLabel(newValue));
|
||||
buyerSecurityDepositInfoInputTextField.setContentForInfoPopOver(depositInBTCInfo);
|
||||
} else {
|
||||
buyerSecurityDepositInfoInputTextField.setContentForInfoPopOver(null);
|
||||
@ -1127,7 +1129,9 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel> extends
|
||||
// getEditableValueBox delivers BTC, so we overwrite it with %
|
||||
buyerSecurityDepositPercentageLabel.setText("%");
|
||||
|
||||
VBox depositBox = getTradeInputBox(tuple.first, Res.get("createOffer.setDeposit")).second;
|
||||
Tuple2<Label, VBox> tradeInputBoxTuple = getTradeInputBox(tuple.first, model.getSecurityDepositLabel());
|
||||
VBox depositBox = tradeInputBoxTuple.second;
|
||||
buyerSecurityDepositLabel = tradeInputBoxTuple.first;
|
||||
depositBox.setMaxWidth(310);
|
||||
|
||||
editOfferElements.add(buyerSecurityDepositInputTextField);
|
||||
|
@ -106,6 +106,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
||||
public final StringProperty minAmount = new SimpleStringProperty();
|
||||
final StringProperty buyerSecurityDeposit = new SimpleStringProperty();
|
||||
final StringProperty buyerSecurityDepositInBTC = new SimpleStringProperty();
|
||||
final StringProperty buyerSecurityDepositLabel = new SimpleStringProperty();
|
||||
|
||||
// Price in the viewModel is always dependent on fiat/altcoin: Fiat Fiat/BTC, for altcoins we use inverted price.
|
||||
// The domain (dataModel) uses always the same price model (otherCurrencyBTC)
|
||||
@ -600,6 +601,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
||||
isBuy ? Res.get("shared.buy") : Res.get("shared.sell"));
|
||||
|
||||
buyerSecurityDeposit.set(btcFormatter.formatToPercent(dataModel.getBuyerSecurityDeposit().get()));
|
||||
buyerSecurityDepositLabel.set(getSecurityDepositLabel());
|
||||
|
||||
applyMakerFee();
|
||||
return result;
|
||||
@ -920,6 +922,15 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
||||
return btcFormatter.formatCoinWithCode(dataModel.getAmount().get());
|
||||
}
|
||||
|
||||
public String getSecurityDepositLabel() {
|
||||
return dataModel.isBuyOffer() ? Res.get("createOffer.setDepositAsBuyer") : Res.get("createOffer.setDeposit");
|
||||
}
|
||||
|
||||
public String getSecurityDepositPopOverLabel(String depositInBTC) {
|
||||
return dataModel.isBuyOffer() ? Res.get("createOffer.securityDepositInfoAsBuyer", depositInBTC) :
|
||||
Res.get("createOffer.securityDepositInfo", depositInBTC);
|
||||
}
|
||||
|
||||
public String getSecurityDepositInfo() {
|
||||
return btcFormatter.formatCoinWithCode(dataModel.getSecurityDeposit()) +
|
||||
GUIUtil.getPercentageOfTradeAmount(dataModel.getSecurityDeposit(), dataModel.getAmount().get(), btcFormatter);
|
||||
|
@ -1618,7 +1618,7 @@ public class FormBuilder {
|
||||
public static Tuple2<Label, VBox> getTradeInputBox(Pane amountValueBox, String descriptionText) {
|
||||
Label descriptionLabel = new AutoTooltipLabel(descriptionText);
|
||||
descriptionLabel.setId("input-description-label");
|
||||
descriptionLabel.setPrefWidth(170);
|
||||
descriptionLabel.setPrefWidth(190);
|
||||
|
||||
VBox box = new VBox();
|
||||
box.setPadding(new Insets(10, 0, 0, 0));
|
||||
|
Loading…
Reference in New Issue
Block a user