Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve wording & appearance of trade shutdown dialog. #6213

Merged
merged 1 commit into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ shared.readMore=Read more
shared.openHelp=Open Help
shared.warning=Warning
shared.close=Close
shared.closeAnywayDanger=Shut down anyway (DANGER!)
shared.okWait=Ok I'll wait
shared.cancel=Cancel
shared.ok=OK
shared.yes=Yes
Expand Down Expand Up @@ -3080,10 +3082,8 @@ popup.info.shutDownWithOpenOffers=Bisq is being shut down, but there are open of
they will be re-published to the P2P network the next time you start Bisq.\n\n\
To keep your offers online, keep Bisq running and make sure this computer remains online too \
(i.e., make sure it doesn't go into standby mode...monitor standby is not a problem).
popup.info.shutDownWithTradeInit=Bisq is being shut down, but there are trades still being initialized. \n\n\
Specific trade affected: {0}\n\n\
If a trade is still in process of being initialized, shutting down can result in the trade missing some important state.\n\n\
Do not close Bisq if this trade has not had enough time to initialize correctly. One minute should be sufficient time.
popup.info.shutDownWithTradeInit={0}\n\
This trade has not finished initializing; shutting down now will probably make it corrupted. Please wait a minute and try again.
popup.info.qubesOSSetupInfo=It appears you are running Bisq on Qubes OS. \n\n\
Please make sure your Bisq qube is setup according to our Setup Guide at [HYPERLINK:https://bisq.wiki/Running_Bisq_on_Qubes].
popup.info.firewallSetupInfo=It appears this machine blocks incoming Tor connections. \
Expand Down
21 changes: 8 additions & 13 deletions desktop/src/main/java/bisq/desktop/app/BisqApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,24 +384,19 @@ private CompletableFuture<Boolean> shutDownByUserCheckTrades() {
if (trade.getTradePhase().equals(Trade.Phase.TAKER_FEE_PUBLISHED) &&
new Date(trade.getTakeOfferDate()).toInstant().isAfter(fiveMinutesAgo)) {
String tradeDateString = DisplayUtils.formatDateTime(new Date(trade.getTakeOfferDate()));
tradeIdsWithOperationsPending += System.lineSeparator() +
Res.get("shared.tradeId") + ": " + trade.getShortId() + " " +
Res.get("shared.dateTime") + ": " + tradeDateString;
tradeIdsWithOperationsPending += Res.get("shared.tradeId") + ": " + trade.getShortId() + " " +
Res.get("shared.dateTime") + ": " + tradeDateString + System.lineSeparator();
break;
}
}
if (tradeIdsWithOperationsPending.length() > 0) {
// We show a popup to inform user that some trades are still being initialised.
String key = "showInitTradeWarnPopupAtShutDown";
if (injector.getInstance(Preferences.class).showAgain(key) && !DevEnv.isDevMode()) {
new Popup().information(Res.get("popup.info.shutDownWithTradeInit", tradeIdsWithOperationsPending))
.dontShowAgainId(key)
.useShutDownButton()
.onAction(() -> asyncStatus.complete(true))
.closeButtonText(Res.get("shared.cancel"))
.onClose(() -> asyncStatus.complete(false))
.show();
}
new Popup().warning(Res.get("popup.info.shutDownWithTradeInit", tradeIdsWithOperationsPending))
.actionButtonText(Res.get("shared.okWait"))
.onAction(() -> asyncStatus.complete(false))
.closeButtonText(Res.get("shared.closeAnywayDanger"))
.onClose(() -> asyncStatus.complete(true))
.show();
} else {
asyncStatus.complete(true);
}
Expand Down