diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 258d168c8a6..78be901e844 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -405,9 +405,14 @@ createOffer.warning.buyAboveMarketPrice=You will always pay {0}% more than the c createOffer.tradeFee.descriptionBTCOnly=Trade fee createOffer.tradeFee.descriptionBSQEnabled=Select trade fee currency createOffer.tradeFee.fiatAndPercent=≈ {0} / {1} of trade amount -createOffer.takerRestriction.canSign=Require taker who can attest trade +createOffer.takerRestriction.canSign=Require taker who can attest trade (level silver or higher) +createOffer.takerRestriction.canSign.seller=Require seller who can attest trade (level silver or higher) +createOffer.takerRestriction.canSign.buyer=Require buyer who can attest trade (level silver or higher) +createOffer.takerRestriction.canSign.info=Having your payment account attested by an already attested account, removes your payout delay and other restrictions after four weeks and increases your account level to silver. createOffer.takerRestriction.delay=Tolerate payout delay -createOffer.takerRestriction=Restriction for taker +createOffer.takerRestriction=Restrictions for taker +createOffer.takerRestriction.seller=Restrictions for seller +createOffer.takerRestriction.buyer=Restrictions for buyer # new entries createOffer.placeOfferButton=Review: Place offer to {0} bitcoin diff --git a/desktop/src/main/java/bisq/desktop/components/InfoAutoTooltipLabel.java b/desktop/src/main/java/bisq/desktop/components/InfoAutoTooltipLabel.java index 3db6c9a7948..7f7e3a10f35 100644 --- a/desktop/src/main/java/bisq/desktop/components/InfoAutoTooltipLabel.java +++ b/desktop/src/main/java/bisq/desktop/components/InfoAutoTooltipLabel.java @@ -47,6 +47,7 @@ public InfoAutoTooltipLabel(String text, GlyphIcons icon, ContentDisplay content addIcon(contentDisplay, info, 300); } + public InfoAutoTooltipLabel(String text, AwesomeIcon icon, ContentDisplay contentDisplay, String info, double width) { super(text); @@ -54,6 +55,10 @@ public InfoAutoTooltipLabel(String text, AwesomeIcon icon, ContentDisplay conten addIcon(contentDisplay, info, width); } + public InfoAutoTooltipLabel(String text, AwesomeIcon icon, ContentDisplay contentDisplay, String info) { + this(text, icon, contentDisplay, info, 300); + } + private void addIcon(ContentDisplay contentDisplay, String info, double width) { textIcon.setOpacity(0.4); diff --git a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java index 513f5d46060..15aee4026dd 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java @@ -26,6 +26,7 @@ import bisq.desktop.components.BalanceTextField; import bisq.desktop.components.BusyAnimation; import bisq.desktop.components.FundsTextField; +import bisq.desktop.components.InfoAutoTooltipLabel; import bisq.desktop.components.InfoInputTextField; import bisq.desktop.components.InputTextField; import bisq.desktop.components.NewBadge; @@ -72,11 +73,13 @@ import net.glxn.qrgen.QRCode; import net.glxn.qrgen.image.ImageType; +import de.jensd.fx.fontawesome.AwesomeIcon; import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; import javafx.scene.Node; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; +import javafx.scene.control.ContentDisplay; import javafx.scene.control.Label; import javafx.scene.control.ScrollPane; import javafx.scene.control.Separator; @@ -318,16 +321,21 @@ public void initWithData(OfferPayload.Direction direction, TradeCurrency tradeCu placeOfferButton.setId("buy-button-big"); placeOfferButton.updateText(Res.get("createOffer.placeOfferButton", Res.get("shared.buy"))); percentagePriceDescription.setText(Res.get("shared.belowInPercent")); + takerRestrictionsLabel.setText(Res.get("createOffer.takerRestriction.seller")); + requireAuthorizedBuyerLabel.setText(Res.get("createOffer.takerRestriction.canSign.seller")); } else { placeOfferButton.setId("sell-button-big"); placeOfferButton.updateText(Res.get("createOffer.placeOfferButton", Res.get("shared.sell"))); percentagePriceDescription.setText(Res.get("shared.aboveInPercent")); + takerRestrictionsLabel.setText(Res.get("createOffer.takerRestriction.buyer")); + requireAuthorizedBuyerLabel.setText(Res.get("createOffer.takerRestriction.canSign.buyer")); } updatePriceToggle(); if (!model.getDataModel().isMakerFeeValid() && model.getDataModel().getMakerFee() != null) showInsufficientBsqFundsForBtcFeePaymentPopup(); + } // called form parent as the view does not get notified when the tab is closed @@ -867,6 +875,7 @@ private void createListeners() { }; requireAuthorizedTakerToggleListener = (observable, oldValue, newValue) -> { + requireAuthorizedTakerToggle.setText(newValue ? Res.get("shared.yes") : Res.get("shared.no")); model.getDataModel().setRequireAuthorizedTaker(newValue); }; @@ -1492,12 +1501,14 @@ private VBox getTradeFeeFieldsBox() { } private VBox getTakerRestrictionFieldsBox() { - requireAuthorizedBuyerLabel = new Label(Res.get("createOffer.takerRestriction.canSign")); - requireAuthorizedBuyerLabel.setMouseTransparent(true); + requireAuthorizedBuyerLabel = new InfoAutoTooltipLabel(Res.get("createOffer.takerRestriction.canSign"), + AwesomeIcon.QUESTION_SIGN, + ContentDisplay.RIGHT, + Res.get("createOffer.takerRestriction.canSign.info")); requireAuthorizedBuyerLabel.setId("trade-fee-textfield"); requireAuthorizedTakerToggle = new AutoTooltipSlideToggleButton(); - requireAuthorizedTakerToggle.setText(Res.get("shared.yes")); + requireAuthorizedTakerToggle.setText(Res.get("shared.no")); requireAuthorizedTakerToggle.setPadding(new Insets(-8, 5, -10, 5)); HBox hBox = new HBox(); @@ -1507,6 +1518,7 @@ private VBox getTakerRestrictionFieldsBox() { final Tuple2 tuple = getTradeInputBox(hBox, Res.get("createOffer.takerRestriction")); takerRestrictionsLabel = tuple.first; + tuple.second.setSpacing(15); return tuple.second; }