Search in sources :

Example 56 with Popup

use of bisq.desktop.main.overlays.popups.Popup in project bisq-desktop by bisq-network.

the class BuyerStep2View method showConfirmPaymentStartedPopup.

@SuppressWarnings("PointlessBooleanExpression")
private void showConfirmPaymentStartedPopup() {
    // noinspection UnusedAssignment
    String key = "confirmPaymentStarted";
    // noinspection ConstantConditions
    if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
        Popup popup = new Popup<>();
        popup.headLine(Res.get("portfolio.pending.step2_buyer.confirmStart.headline")).confirmation(Res.get("portfolio.pending.step2_buyer.confirmStart.msg", CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()))).width(700).actionButtonText(Res.get("portfolio.pending.step2_buyer.confirmStart.yes")).onAction(this::confirmPaymentStarted).closeButtonText(Res.get("shared.no")).onClose(popup::hide).dontShowAgainId(key).show();
    } else {
        confirmPaymentStarted();
    }
}
Also used : Popup(bisq.desktop.main.overlays.popups.Popup)

Example 57 with Popup

use of bisq.desktop.main.overlays.popups.Popup in project bisq-desktop by bisq-network.

the class BuyerStep2View method onPaymentStarted.

// /////////////////////////////////////////////////////////////////////////////////////////
// UI Handlers
// /////////////////////////////////////////////////////////////////////////////////////////
@SuppressWarnings("PointlessBooleanExpression")
private void onPaymentStarted() {
    if (model.p2PService.isBootstrapped()) {
        if (model.dataModel.getSellersPaymentAccountPayload() instanceof CashDepositAccountPayload) {
            // noinspection UnusedAssignment
            String key = "confirmPaperReceiptSent";
            // noinspection ConstantConditions
            if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
                Popup popup = new Popup<>();
                popup.headLine(Res.get("portfolio.pending.step2_buyer.paperReceipt.headline")).feedback(Res.get("portfolio.pending.step2_buyer.paperReceipt.msg")).onAction(this::showConfirmPaymentStartedPopup).closeButtonText(Res.get("shared.no")).onClose(popup::hide).dontShowAgainId(key).show();
            } else {
                showConfirmPaymentStartedPopup();
            }
        } else if (model.dataModel.getSellersPaymentAccountPayload() instanceof WesternUnionAccountPayload) {
            // noinspection UnusedAssignment
            // noinspection ConstantConditions
            String key = "westernUnionMTCNSent";
            if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
                String email = ((WesternUnionAccountPayload) model.dataModel.getSellersPaymentAccountPayload()).getEmail();
                Popup popup = new Popup<>();
                popup.headLine(Res.get("portfolio.pending.step2_buyer.westernUnionMTCNInfo.headline")).feedback(Res.get("portfolio.pending.step2_buyer.westernUnionMTCNInfo.msg", email)).onAction(this::showConfirmPaymentStartedPopup).actionButtonText(Res.get("shared.yes")).closeButtonText(Res.get("shared.no")).onClose(popup::hide).dontShowAgainId(key).show();
            } else {
                showConfirmPaymentStartedPopup();
            }
        } else {
            showConfirmPaymentStartedPopup();
        }
    } else {
        new Popup<>().information(Res.get("popup.warning.notFullyConnected")).show();
    }
}
Also used : CashDepositAccountPayload(bisq.core.payment.payload.CashDepositAccountPayload) Popup(bisq.desktop.main.overlays.popups.Popup) WesternUnionAccountPayload(bisq.core.payment.payload.WesternUnionAccountPayload)

Aggregations

Popup (bisq.desktop.main.overlays.popups.Popup)57 Label (javafx.scene.control.Label)22 Coin (org.bitcoinj.core.Coin)17 AutoTooltipLabel (bisq.desktop.components.AutoTooltipLabel)16 Button (javafx.scene.control.Button)16 Res (bisq.core.locale.Res)13 AutoTooltipButton (bisq.desktop.components.AutoTooltipButton)13 Insets (javafx.geometry.Insets)13 InputTextField (bisq.desktop.components.InputTextField)12 BSFormatter (bisq.desktop.util.BSFormatter)12 Transaction (org.bitcoinj.core.Transaction)12 List (java.util.List)11 UserThread (bisq.common.UserThread)10 ChangeListener (javafx.beans.value.ChangeListener)9 BusyAnimation (bisq.desktop.components.BusyAnimation)8 ObservableList (javafx.collections.ObservableList)8 HBox (javafx.scene.layout.HBox)8 Tuple2 (bisq.common.util.Tuple2)7 FxmlView (bisq.desktop.common.view.FxmlView)7 TradeCurrency (bisq.core.locale.TradeCurrency)6