Skip to content

Commit

Permalink
Improve final step UI screen in BisqEasy trade
Browse files Browse the repository at this point in the history
  • Loading branch information
axpoems committed Nov 9, 2023
1 parent d3cab39 commit 2e77bb4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import bisq.common.monetary.Coin;
import bisq.common.monetary.Fiat;
import bisq.desktop.ServiceProvider;
import bisq.desktop.common.utils.ImageUtil;
import bisq.desktop.components.controls.WrappingText;
import bisq.desktop.main.content.bisq_easy.components.WaitingAnimation;
import bisq.offer.bisq_easy.BisqEasyOffer;
Expand All @@ -34,6 +35,7 @@
import bisq.trade.bisq_easy.BisqEasyTradeService;
import bisq.user.identity.UserIdentityService;
import javafx.geometry.Pos;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import lombok.Getter;
Expand Down Expand Up @@ -144,5 +146,16 @@ protected HBox createWaitingInfo(WaitingAnimation animation, WrappingText headli
waitingInfo.setSpacing(20);
return waitingInfo;
}

protected HBox createCompleteTradeInfo(WrappingText headline) {
ImageView tradeCompletedIcon = ImageUtil.getImageViewById("complete-trade");
tradeCompletedIcon.setFitHeight(78);
tradeCompletedIcon.setFitWidth(78);
VBox text = new VBox(headline);
text.setAlignment(Pos.CENTER_LEFT);
HBox completeTradeInfo = new HBox(tradeCompletedIcon, text);
completeTradeInfo.setSpacing(20);
return completeTradeInfo;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ private View(Model model, Controller controller) {
super(model, controller);

WrappingText headline = FormUtils.getHeadline(Res.get("bisqEasy.tradeState.info.buyer.phase5.headline"));
HBox completeTradeInfo = createCompleteTradeInfo(headline);

exportButton = new Button(Res.get("bisqEasy.tradeState.info.phase5.exportTrade"));
leaveButton = new Button(Res.get("bisqEasy.tradeState.info.phase5.leaveChannel"));
leaveButton.getStyleClass().add("outlined-button");
leaveButton.setDefaultButton(true);
quoteAmount = FormUtils.getTextField(Res.get("bisqEasy.tradeState.info.buyer.phase5.quoteAmount"), "", false);
baseAmount = FormUtils.getTextField(Res.get("bisqEasy.tradeState.info.buyer.phase5.baseAmount"), "", false);

Expand All @@ -143,7 +144,7 @@ private View(Model model, Controller controller) {
VBox.setMargin(headline, new Insets(0, 0, 5, 0));
VBox.setMargin(buttons, new Insets(5, 0, 5, 0));
root.getChildren().addAll(
headline,
completeTradeInfo,
quoteAmount,
baseAmount,
txId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ private View(Model model, Controller controller) {
super(model, controller);

WrappingText headline = FormUtils.getHeadline(Res.get("bisqEasy.tradeState.info.seller.phase5.headline"));
HBox completeTradeInfo = createCompleteTradeInfo(headline);

exportButton = new Button(Res.get("bisqEasy.tradeState.info.phase5.exportTrade"));
leaveButton = new Button(Res.get("bisqEasy.tradeState.info.phase5.leaveChannel"));
leaveButton.getStyleClass().add("outlined-button");
leaveButton.setDefaultButton(true);
quoteAmount = FormUtils.getTextField(Res.get("bisqEasy.tradeState.info.seller.phase5.quoteAmount"), "", false);
baseAmount = FormUtils.getTextField(Res.get("bisqEasy.tradeState.info.seller.phase5.baseAmount"), "", false);

Expand All @@ -143,7 +144,7 @@ private View(Model model, Controller controller) {
VBox.setMargin(headline, new Insets(0, 0, 5, 0));
VBox.setMargin(buttons, new Insets(5, 0, 5, 0));
root.getChildren().addAll(
headline,
completeTradeInfo,
quoteAmount,
baseAmount,
txId,
Expand Down
4 changes: 4 additions & 0 deletions desktop/src/main/resources/css/images.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@
-fx-image: url("/images/waitingstates/bitcoin-confirmation.png");
}

#complete-trade {
-fx-image: url("/images/waitingstates/complete-trade.png");
}

#video {
-fx-image: url("/images/video.png");
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2e77bb4

Please sign in to comment.