Add support/help links on the UI - trade details

This commit is contained in:
xyzmaker123 2022-01-26 12:31:58 +01:00
parent 90c2bfa651
commit 19d6b2607c
No known key found for this signature in database
GPG key ID: 47689699B7B0AAFC
3 changed files with 33 additions and 22 deletions

View file

@ -924,6 +924,8 @@ portfolio.pending.tradePeriodInfo=After the first blockchain confirmation, the t
portfolio.pending.tradePeriodWarning=If the period is exceeded both traders can open a dispute.
portfolio.pending.tradeNotCompleted=Trade not completed in time (until {0})
portfolio.pending.tradeProcess=Trade process
portfolio.pending.stillNotResolved=If your issue still is not resolved ask the Bisq community or request support \
from a mediator using the link below: \n[https://bisq.chat](https://bisq.chat)
portfolio.pending.openAgainDispute.msg=If you are not sure that the message to the mediator or arbitrator arrived \
(e.g. if you did not get a response after 1 day) feel free to open a dispute again with Cmd/Ctrl+o. You can also ask \
for additional help on the Bisq forum at [HYPERLINK:https://bisq.community].
@ -946,9 +948,9 @@ portfolio.pending.error.depositTxNotConfirmed=The deposit transaction is not con
For further help please contact the Bisq support channel at the Bisq Matrix Space.
portfolio.pending.support.headline.getHelp=Need help?
portfolio.pending.support.text.getHelp=If you have any problems you can try to contact the trade peer in the trade \
chat or ask the Bisq community at https://bisq.community. \
If your issue still isn't resolved, you can request more help from a mediator.
portfolio.pending.support.text.getHelp=Take a look at the trade process \
[here](https://docs.bisq.network/getting-started.html#4-send-payment)\
\n\nIf you have any problems you can try to contact the trade peer in the trade chat.
portfolio.pending.support.button.getHelp=Open Trader Chat
portfolio.pending.support.headline.halfPeriodOver=Check payment
portfolio.pending.support.headline.periodOver=Trade period is over

View file

@ -18,12 +18,12 @@
package bisq.desktop.main.portfolio.pendingtrades;
import bisq.desktop.components.AutoTooltipButton;
import bisq.desktop.components.SimpleMarkdownLabel;
import bisq.desktop.components.TitledGroupBg;
import bisq.core.locale.Res;
import bisq.core.trade.model.bisq_v1.Trade;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.event.ActionEvent;
@ -58,7 +58,8 @@ public class TradeStepInfo {
}
private final TitledGroupBg titledGroupBg;
private final Label label;
private final SimpleMarkdownLabel label;
private final SimpleMarkdownLabel footerLabel;
private final AutoTooltipButton button;
@Nullable
@Setter
@ -68,10 +69,14 @@ public class TradeStepInfo {
private Supplier<String> firstHalfOverWarnTextSupplier = () -> "";
private Supplier<String> periodOverWarnTextSupplier = () -> "";
TradeStepInfo(TitledGroupBg titledGroupBg, Label label, AutoTooltipButton button) {
TradeStepInfo(TitledGroupBg titledGroupBg,
SimpleMarkdownLabel label,
AutoTooltipButton button,
SimpleMarkdownLabel footerLabel) {
this.titledGroupBg = titledGroupBg;
this.label = label;
this.button = button;
this.footerLabel = footerLabel;
GridPane.setColumnIndex(button, 0);
setState(State.SHOW_GET_HELP_BUTTON);
@ -103,7 +108,7 @@ public class TradeStepInfo {
case SHOW_GET_HELP_BUTTON:
// grey button
titledGroupBg.setText(Res.get("portfolio.pending.support.headline.getHelp"));
label.setText(Res.get("portfolio.pending.support.text.getHelp"));
label.updateContent(Res.get("portfolio.pending.support.text.getHelp"));
button.setText(Res.get("portfolio.pending.support.button.getHelp").toUpperCase());
button.setId(null);
button.getStyleClass().remove("action-button");
@ -112,7 +117,7 @@ public class TradeStepInfo {
case IN_MEDIATION_SELF_REQUESTED:
// red button
titledGroupBg.setText(Res.get("portfolio.pending.mediationRequested"));
label.setText(Res.get("portfolio.pending.disputeOpenedMyUser", Res.get("portfolio.pending.communicateWithMediator")));
label.updateContent(Res.get("portfolio.pending.disputeOpenedMyUser", Res.get("portfolio.pending.communicateWithMediator")));
button.setText(Res.get("portfolio.pending.mediationRequested").toUpperCase());
button.setId("open-dispute-button");
button.getStyleClass().remove("action-button");
@ -121,7 +126,7 @@ public class TradeStepInfo {
case IN_MEDIATION_PEER_REQUESTED:
// red button
titledGroupBg.setText(Res.get("portfolio.pending.mediationRequested"));
label.setText(Res.get("portfolio.pending.disputeOpenedByPeer", Res.get("portfolio.pending.communicateWithMediator")));
label.updateContent(Res.get("portfolio.pending.disputeOpenedByPeer", Res.get("portfolio.pending.communicateWithMediator")));
button.setText(Res.get("portfolio.pending.mediationRequested").toUpperCase());
button.setId("open-dispute-button");
button.getStyleClass().remove("action-button");
@ -130,7 +135,7 @@ public class TradeStepInfo {
case MEDIATION_RESULT:
// green button
titledGroupBg.setText(Res.get("portfolio.pending.mediationResult.headline"));
label.setText(Res.get("portfolio.pending.mediationResult.info.noneAccepted"));
label.updateContent(Res.get("portfolio.pending.mediationResult.info.noneAccepted"));
button.setText(Res.get("portfolio.pending.mediationResult.button").toUpperCase());
button.setId(null);
button.getStyleClass().add("action-button");
@ -139,7 +144,7 @@ public class TradeStepInfo {
case MEDIATION_RESULT_SELF_ACCEPTED:
// green button deactivated
titledGroupBg.setText(Res.get("portfolio.pending.mediationResult.headline"));
label.setText(Res.get("portfolio.pending.mediationResult.info.selfAccepted"));
label.updateContent(Res.get("portfolio.pending.mediationResult.info.selfAccepted"));
button.setText(Res.get("portfolio.pending.mediationResult.button").toUpperCase());
button.setId(null);
button.getStyleClass().add("action-button");
@ -148,7 +153,7 @@ public class TradeStepInfo {
case MEDIATION_RESULT_PEER_ACCEPTED:
// green button
titledGroupBg.setText(Res.get("portfolio.pending.mediationResult.headline"));
label.setText(Res.get("portfolio.pending.mediationResult.info.peerAccepted"));
label.updateContent(Res.get("portfolio.pending.mediationResult.info.peerAccepted"));
button.setText(Res.get("portfolio.pending.mediationResult.button").toUpperCase());
button.setId(null);
button.getStyleClass().add("action-button");
@ -157,7 +162,7 @@ public class TradeStepInfo {
case IN_REFUND_REQUEST_SELF_REQUESTED:
// red button
titledGroupBg.setText(Res.get("portfolio.pending.refundRequested"));
label.setText(Res.get("portfolio.pending.disputeOpenedMyUser", Res.get("portfolio.pending.communicateWithArbitrator")));
label.updateContent(Res.get("portfolio.pending.disputeOpenedMyUser", Res.get("portfolio.pending.communicateWithArbitrator")));
button.setText(Res.get("portfolio.pending.refundRequested").toUpperCase());
button.setId("open-dispute-button");
button.getStyleClass().remove("action-button");
@ -166,7 +171,7 @@ public class TradeStepInfo {
case IN_REFUND_REQUEST_PEER_REQUESTED:
// red button
titledGroupBg.setText(Res.get("portfolio.pending.refundRequested"));
label.setText(Res.get("portfolio.pending.disputeOpenedByPeer", Res.get("portfolio.pending.communicateWithArbitrator")));
label.updateContent(Res.get("portfolio.pending.disputeOpenedByPeer", Res.get("portfolio.pending.communicateWithArbitrator")));
button.setText(Res.get("portfolio.pending.refundRequested").toUpperCase());
button.setId("open-dispute-button");
button.getStyleClass().remove("action-button");
@ -175,7 +180,7 @@ public class TradeStepInfo {
case WARN_HALF_PERIOD:
// orange button
titledGroupBg.setText(Res.get("portfolio.pending.support.headline.halfPeriodOver"));
label.setText(firstHalfOverWarnTextSupplier.get());
label.updateContent(firstHalfOverWarnTextSupplier.get());
button.setText(Res.get("portfolio.pending.support.button.getHelp").toUpperCase());
button.setId(null);
button.getStyleClass().remove("action-button");
@ -184,7 +189,7 @@ public class TradeStepInfo {
case WARN_PERIOD_OVER:
// red button
titledGroupBg.setText(Res.get("portfolio.pending.support.headline.periodOver"));
label.setText(periodOverWarnTextSupplier.get());
label.updateContent(periodOverWarnTextSupplier.get());
button.setText(Res.get("portfolio.pending.openSupport").toUpperCase());
button.setId("open-dispute-button");
button.getStyleClass().remove("action-button");
@ -195,6 +200,7 @@ public class TradeStepInfo {
titledGroupBg.setVisible(false);
label.setVisible(false);
button.setVisible(false);
footerLabel.setVisible(false);
}
if (trade != null && trade.getPayoutTx() != null) {

View file

@ -18,6 +18,7 @@
package bisq.desktop.main.portfolio.pendingtrades;
import bisq.desktop.components.AutoTooltipButton;
import bisq.desktop.components.SimpleMarkdownLabel;
import bisq.desktop.components.TitledGroupBg;
import bisq.desktop.main.portfolio.pendingtrades.steps.TradeStepView;
import bisq.desktop.main.portfolio.pendingtrades.steps.TradeWizardItem;
@ -26,7 +27,6 @@ import bisq.desktop.util.Layout;
import bisq.core.locale.Res;
import bisq.core.trade.model.bisq_v1.Trade;
import javafx.scene.control.Label;
import javafx.scene.control.Separator;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
@ -43,7 +43,7 @@ import org.fxmisc.easybind.Subscription;
import lombok.extern.slf4j.Slf4j;
import static bisq.desktop.util.FormBuilder.addButtonAfterGroup;
import static bisq.desktop.util.FormBuilder.addMultilineLabel;
import static bisq.desktop.util.FormBuilder.addSimpleMarkdownLabel;
import static bisq.desktop.util.FormBuilder.addTitledGroupBg;
@Slf4j
@ -102,11 +102,14 @@ public abstract class TradeSubView extends HBox {
addWizards();
TitledGroupBg titledGroupBg = addTitledGroupBg(leftGridPane, leftGridPaneRowIndex, 1, "", 30);
TitledGroupBg titledGroupBg = addTitledGroupBg(leftGridPane, ++leftGridPaneRowIndex, 1, "", 10);
titledGroupBg.getStyleClass().add("last");
Label label = addMultilineLabel(leftGridPane, leftGridPaneRowIndex, "", 30);
SimpleMarkdownLabel label = addSimpleMarkdownLabel(leftGridPane, ++leftGridPaneRowIndex);
AutoTooltipButton button = (AutoTooltipButton) addButtonAfterGroup(leftGridPane, ++leftGridPaneRowIndex, "");
tradeStepInfo = new TradeStepInfo(titledGroupBg, label, button);
SimpleMarkdownLabel footerLabel = addSimpleMarkdownLabel(leftGridPane, ++leftGridPaneRowIndex, Res.get("portfolio.pending.stillNotResolved"), 10);
footerLabel.getStyleClass().add("small-text");
tradeStepInfo = new TradeStepInfo(titledGroupBg, label, button, footerLabel);
}
void showItem(TradeWizardItem item) {
@ -132,7 +135,7 @@ public abstract class TradeSubView extends HBox {
void addLineSeparatorToGridPane() {
final Separator separator = new Separator(Orientation.VERTICAL);
separator.setMinHeight(22);
separator.setMinHeight(10);
GridPane.setMargin(separator, new Insets(0, 0, 0, 13));
GridPane.setHalignment(separator, HPos.LEFT);
GridPane.setRowIndex(separator, leftGridPaneRowIndex++);