From b17c5c9353b42aecc7c81f1c028e486ec4707e29 Mon Sep 17 00:00:00 2001 From: jmacxx <47253594+jmacxx@users.noreply.github.com> Date: Tue, 13 Oct 2020 08:52:21 -0500 Subject: [PATCH 1/2] Make URLs in popup notices clickable Fixes #4623 URLs in Javafx label controls are not clickable, so separate them out to one or more clickable Hyperlinks displayed at the footer of the popup. The approach taken for this is to embed the tag `[HYPERLINK:]` in the message around a link that you want to be handled this way. The links can be anywhere within the popup message, in the same order that they will be displayed. Using the tag has the advantage of being optional, and does not require new code to be written for each individual popup. Refactor to be more flexible; allowing inline hyperlinks Codacy nits. --- .../resources/i18n/displayStrings.properties | 68 ++++++++--------- .../bisq/desktop/main/overlays/Overlay.java | 74 ++++++++++++++----- .../main/java/bisq/desktop/util/GUIUtil.java | 4 + 3 files changed, 92 insertions(+), 54 deletions(-) diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 3afb4f273af..4c868ebf1b1 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -386,7 +386,7 @@ offerbook.warning.counterpartyTradeRestrictions=This offer cannot be taken due t offerbook.warning.newVersionAnnouncement=With this version of the software, trading peers can verify and sign each others' payment accounts to create a network of trusted payment accounts.\n\n\ After successfully trading with a peer with a verified payment account, your payment account will be signed and trading limits will be lifted after a certain time interval (length of this interval is based on the verification method).\n\n\ - For more information on account signing, please see the documentation at https://docs.bisq.network/payment-methods#account-signing. + For more information on account signing, please see the documentation at [HYPERLINK:https://docs.bisq.network/payment-methods#account-signing]. popup.warning.tradeLimitDueAccountAgeRestriction.seller=The allowed trade amount is limited to {0} because of security restrictions based on the following criteria:\n\ - The buyer''s account has not been signed by an arbitrator or a peer\n\ @@ -404,7 +404,7 @@ offerbook.warning.currencyBanned=The currency used in that offer was blocked by offerbook.warning.paymentMethodBanned=The payment method used in that offer was blocked by the Bisq developers.\nPlease visit the Bisq Forum for more information. offerbook.warning.nodeBlocked=The onion address of that trader was blocked by the Bisq developers.\nProbably there is an unhandled bug causing issues when taking offers from that trader. offerbook.warning.requireUpdateToNewVersion=Your version of Bisq is not compatible for trading anymore.\n\ - Please update to the latest Bisq version at https://bisq.network/downloads. + Please update to the latest Bisq version at [HYPERLINK:https://bisq.network/downloads]. offerbook.warning.tradeLimitNotMatching=Your payment account has been created {0} ago. Your trade limit is based on the account age and is not sufficient for that offer.\n\n\ Your trade limit is: {1}\n\ The min. trade amount of the offer is: {2}.\n\n\ @@ -564,8 +564,8 @@ portfolio.tab.editOpenOffer=Edit offer portfolio.pending.invalidDelayedPayoutTx=There is an issue with a missing or invalid transaction.\n\n\ Please do NOT send the fiat or altcoin payment. Contact Bisq \ - developers on Keybase (https://keybase.io/team/bisq) or on the \ - forum (https://bisq.community) for further assistance.\n\n\ + developers on Keybase [HYPERLINK:https://keybase.io/team/bisq] or on the \ + forum [HYPERLINK:https://bisq.community] for further assistance.\n\n\ Error message: {0} portfolio.pending.step1.waitForConf=Wait for blockchain confirmation @@ -676,7 +676,7 @@ portfolio.pending.step2_buyer.confirmStart.proof.warningTitle=You have not provi portfolio.pending.step2_buyer.confirmStart.proof.noneProvided=You have not entered the transaction ID and the transaction key.\n\n\ By not providing this data the peer cannot use the auto-confirm feature to release the BTC as soon the XMR has been received.\n\ Beside that, Bisq requires that the sender of the XMR transaction is able to provide this information to the mediator or arbitrator in case of a dispute.\n\ - See more details on the Bisq wiki: https://bisq.wiki/Trading_Monero#Auto-confirming_trades + See more details on the Bisq wiki [HYPERLINK:https://bisq.wiki/Trading_Monero#Auto-confirming_trades]. portfolio.pending.step2_buyer.confirmStart.proof.invalidInput=Input is not a 32 byte hexadecimal value portfolio.pending.step2_buyer.confirmStart.warningButton=Ignore and continue anyway portfolio.pending.step2_seller.waitPayment.headline=Wait for payment @@ -823,7 +823,7 @@ portfolio.pending.tradeNotCompleted=Trade not completed in time (until {0}) portfolio.pending.tradeProcess=Trade process 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 https://bisq.community. + for additional help on the Bisq forum at [HYPERLINK:https://bisq.community]. portfolio.pending.openAgainDispute.button=Open dispute again portfolio.pending.openSupportTicket.headline=Open support ticket portfolio.pending.openSupportTicket.msg=Please use this function only in emergency cases if you don't see a \ @@ -896,14 +896,13 @@ portfolio.pending.mediationResult.popup.info=The mediator has suggested the foll Both traders agreeing to the mediator''s suggestion is the happy path—requesting arbitration is meant for \ exceptional circumstances, such as if a trader is sure the mediator did not make a fair payout suggestion \ (or if the other peer is unresponsive).\n\n\ - More details about the new arbitration model:\n\ - https://docs.bisq.network/trading-rules.html#arbitration + More details about the new arbitration model: [HYPERLINK:https://docs.bisq.network/trading-rules.html#arbitration] portfolio.pending.mediationResult.popup.selfAccepted.lockTimeOver=You have accepted the mediator''s suggested payout \ but it seems that your trading peer has not accepted it.\n\n\ Once the lock time is over on {0} (block {1}), you can open a second-round dispute with an arbitrator who will \ investigate the case again and do a payout based on their findings.\n\n\ - You can find more details about the arbitration model at:\n\ - https://docs.bisq.network/trading-rules.html#arbitration + You can find more details about the arbitration model at:\ + [HYPERLINK:https://docs.bisq.network/trading-rules.html#arbitration] portfolio.pending.mediationResult.popup.openArbitration=Reject and request arbitration portfolio.pending.mediationResult.popup.alreadyAccepted=You've already accepted @@ -916,7 +915,8 @@ portfolio.pending.failedTrade.maker.missingTakerFeeTx=The peer's taker fee trans You can move this trade to failed trades. portfolio.pending.failedTrade.missingDepositTx=The deposit transaction (the 2-of-2 multisig transaction) is missing.\n\n\ Without this tx, the trade cannot be completed. No funds have been locked but your trade fee has been paid. \ - You can make a request to be reimbursed the trade fee here: https://github.com/bisq-network/support/issues. \n\n\ + You can make a request to be reimbursed the trade fee here: \ + [HYPERLINK:https://github.com/bisq-network/support/issues]\n\n\ Feel free to move this trade to failed trades. portfolio.pending.failedTrade.buyer.existingDepositTxButMissingDelayedPayoutTx=The delayed payout transaction is missing, \ but funds have been locked in the deposit transaction.\n\n\ @@ -925,7 +925,8 @@ portfolio.pending.failedTrade.buyer.existingDepositTxButMissingDelayedPayoutTx=T The mediator should suggest that both peers each get back the the full amount of their security deposits \ (with seller receiving full trade amount back as well). \ This way, there is no security risk, and only trade fees are lost. \n\n\ - You can request a reimbursement for lost trade fees here: https://github.com/bisq-network/support/issues. + You can request a reimbursement for lost trade fees here: \ + [HYPERLINK:https://github.com/bisq-network/support/issues] portfolio.pending.failedTrade.seller.existingDepositTxButMissingDelayedPayoutTx=The delayed payout transaction is missing \ but funds have been locked in the deposit transaction.\n\n\ If the buyer is also missing the delayed payout transaction, they will be instructed to NOT send the payment and open \ @@ -933,17 +934,19 @@ portfolio.pending.failedTrade.seller.existingDepositTxButMissingDelayedPayoutTx= If the buyer has not sent payment yet, the mediator should suggest that both peers each get back the full amount of \ their security deposits (with seller receiving full trade amount back as well). \ Otherwise the trade amount should go to the buyer. \n\n\ - You can request a reimbursement for lost trade fees here: https://github.com/bisq-network/support/issues. + You can request a reimbursement for lost trade fees here: \ + [HYPERLINK:https://github.com/bisq-network/support/issues] portfolio.pending.failedTrade.errorMsgSet=There was an error during trade protocol execution.\n\n\ Error: {0}\n\n\ It might be that this error is not critical, and the trade can be completed normally. If you are unsure, open a mediation \ ticket to get advice from Bisq mediators. \n\n\ If the error was critical and the trade cannot be completed, you might have lost your trade fee. \ - Request a reimbursement for lost trade fees here: https://github.com/bisq-network/support/issues. + Request a reimbursement for lost trade fees here: \ + [HYPERLINK:https://github.com/bisq-network/support/issues] portfolio.pending.failedTrade.missingContract=The trade contract is not set.\n\n\ The trade cannot be completed and you might \ have lost your trade fee. If so, you can request a reimbursement for lost trade fees here: \ - https://github.com/bisq-network/support/issues. + [HYPERLINK:https://github.com/bisq-network/support/issues] portfolio.pending.failedTrade.info.popup=The trade protocol encountered some problems.\n\n{0} portfolio.pending.failedTrade.txChainInvalid.moveToFailed=The trade protocol encountered a serious problem.\n\n{0}\n\n\ Do you want to move the trade to failed trades?\n\n\ @@ -1244,7 +1247,7 @@ settings.net.useProvidedNodesRadio=Use provided Bitcoin Core nodes settings.net.usePublicNodesRadio=Use public Bitcoin network settings.net.useCustomNodesRadio=Use custom Bitcoin Core nodes settings.net.warn.usePublicNodes=If you use the public Bitcoin network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Bisq). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\n\ - Please read more about the details at: https://bisq.network/blog/privacy-in-bitsquare.\n\n\ + Please read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\n\ Are you sure you want to use the public nodes? settings.net.warn.usePublicNodes.useProvided=No, use provided nodes settings.net.warn.usePublicNodes.usePublic=Yes, use public network @@ -1365,7 +1368,8 @@ setting.info.msg=When selling BTC for XMR you can use the auto-confirm feature t own XMR explorer node for maximum privacy and security.\n\n\ You can also set the maximum amount of BTC per trade to auto-confirm as well as the number of required \ confirmations here in Settings.\n\n\ - See more details (including how to set up your own explorer node) on the Bisq wiki: https://bisq.wiki/Trading_Monero#Auto-confirming_trades + See more details (including how to set up your own explorer node) on the Bisq wiki \ + [HYPERLINK:https://bisq.wiki/Trading_Monero#Auto-confirming_trades] #################################################################### # Account #################################################################### @@ -1453,13 +1457,11 @@ If selling XMR, you must be able to provide the following information to a media - the transaction key (Tx Key, Tx Secret Key or Tx Private Key)\n\ - the transaction ID (Tx ID or Tx Hash)\n\ - the destination address (recipient's address)\n\n\ -See the wiki for details on where to find this information on popular Monero wallets:\n\ -https://bisq.wiki/Trading_Monero#Proving_payments\n\n\ +See the wiki for details on where to find this information on popular Monero wallets [HYPERLINK:https://bisq.wiki/Trading_Monero#Proving_payments].\n\ Failure to provide the required transaction data will result in losing disputes.\n\n\ Also note that Bisq now offers automatic confirming for XMR transactions to make trades quicker, \ but you need to enable it in Settings.\n\n\ -See the wiki for more information about the auto-confirm feature:\n\ -https://bisq.wiki/Trading_Monero#Auto-confirming_trades +See the wiki for more information about the auto-confirm feature: [HYPERLINK:https://bisq.wiki/Trading_Monero#Auto-confirming_trades]. # suppress inspection "TrailingSpacesInProperty" account.altcoin.popup.msr.msg=Trading MSR on Bisq requires that you understand and fulfill \ the following requirements:\n\n\ @@ -1639,7 +1641,7 @@ Importing seed words is only recommended for emergency cases. The application wi account.seed.backup.warning=Please note that the seed words are NOT a replacement for a backup.\n\ You need to create a backup of the whole application directory from the \"Account/Backup\" screen to recover application state and data.\n\ Importing seed words is only recommended for emergency cases. The application will not be functional without a proper backup of the database files and keys!\n\n\ -See the wiki page https://bisq.wiki/Backing_up_application_data for extended info. +See the wiki page [HYPERLINK:https://bisq.wiki/Backing_up_application_data] for extended info. account.seed.warn.noPw.msg=You have not setup a wallet password which would protect the display of the seed words.\n\n\ Do you want to display the seed words? account.seed.warn.noPw.yes=Yes, and don't ask me again @@ -2471,10 +2473,11 @@ displayUpdateDownloadWindow.button.ignoreDownload=Ignore this version displayUpdateDownloadWindow.headline=A new Bisq update is available! displayUpdateDownloadWindow.download.failed.headline=Download failed displayUpdateDownloadWindow.download.failed=Download failed.\n\ - Please download and verify manually at https://bisq.network/downloads -displayUpdateDownloadWindow.installer.failed=Unable to determine the correct installer. Please download and verify manually at https://bisq.network/downloads + Please download and verify manually at [HYPERLINK:https://bisq.network/downloads] +displayUpdateDownloadWindow.installer.failed=Unable to determine the correct installer. Please download and verify manually at \ + [HYPERLINK:https://bisq.network/downloads] displayUpdateDownloadWindow.verify.failed=Verification failed.\n\ - Please download and verify manually at https://bisq.network/downloads + Please download and verify manually at [HYPERLINK:https://bisq.network/downloads] displayUpdateDownloadWindow.success=The new version has been successfully downloaded and the signature verified.\n\n\ Please open the download directory, shut down the application and install the new version. displayUpdateDownloadWindow.download.openDir=Open download directory @@ -2751,8 +2754,7 @@ We made a backup of the corrupted file(s) and applied the default values to a ne The backup is located at:\n\ {1}/db/backup_of_corrupted_data.\n\n\ Please check if you have the latest version of Bisq installed.\n\ -You can download it at:\n\ -https://bisq.network/downloads\n\n\ +You can download it at: [HYPERLINK:https://bisq.network/downloads].\n\n\ Please restart the application. popup.warning.startupFailed.twoInstances=Bisq is already running. You cannot run two instances of Bisq. popup.warning.cryptoTestFailed=Seems that you use a self compiled binary and have not following the build instructions in https://github.com/bisq-network/exchange/blob/master/doc/build.md#7-enable-unlimited-strength-for-cryptographic-keys.\n\nIf that is not the case and you use the official Bisq binary, please file a bug report to the GitHub page.\nError={0} @@ -2859,8 +2861,7 @@ popup.info.shutDownWithOpenOffers=Bisq is being shut down, but there are open of 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.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 \ - https://bisq.wiki/Running_Bisq_on_Qubes + Please make sure your Bisq qube is setup according to our Setup Guide at [HYPERLINK:https://bisq.wiki/Running_Bisq_on_Qubes]. popup.privateNotification.headline=Important private notification! @@ -2902,7 +2903,7 @@ popup.accountSigning.signAccounts.ECKey.error=Bad arbitrator ECKey popup.accountSigning.success.headline=Congratulations popup.accountSigning.success.description=All {0} payment accounts were successfully signed! popup.accountSigning.generalInformation=You'll find the signing state of all your accounts in the account section.\n\n\ - For further information, please visit https://docs.bisq.network/payment-methods#account-signing. + For further information, please visit [HYPERLINK:https://docs.bisq.network/payment-methods#account-signing]. popup.accountSigning.signedByArbitrator=One of your payment accounts has been verified and signed by an arbitrator. Trading with this account will automatically sign your trading peer''s account after a successful trade.\n\n{0} popup.accountSigning.signedByPeer=One of your payment accounts has been verified and signed by a trading peer. Your initial trading limit will be lifted and you''ll be able to sign other accounts in {0} days from now.\n\n{1} popup.accountSigning.peerLimitLifted=The initial limit for one of your accounts has been lifted.\n\n{0} @@ -3228,7 +3229,7 @@ payment.checking=Checking payment.savings=Savings payment.personalId=Personal ID payment.clearXchange.info=Zelle is a money transfer service that works best *through* another bank.\n\n\ - 1. Check this page to see if (and how) your bank works with Zelle:\nhttps://www.zellepay.com/get-started\n\n\ + 1. Check this page to see if (and how) your bank works with Zelle: [HYPERLINK:https://www.zellepay.com/get-started]\n\n\ 2. Take special note of your transfer limits—sending limits vary by bank, and banks often specify separate daily, weekly, and monthly limits.\n\n\ 3. If your bank does not work with Zelle, you can still use it through the Zelle mobile app, but your transfer limits will be much lower.\n\n\ 4. The name specified on your Bisq account MUST match the name on your Zelle/bank account. \n\n\ @@ -3282,8 +3283,7 @@ payment.limits.info.withSigning=To limit chargeback risk, Bisq sets per-trade li \n\ Sell limits are not affected by account signing, and increase with account age.\n\ \n\ - See more:\n\ - https://bisq.wiki/Account_limits\n\ + See more: [HYPERLINK:https://bisq.wiki/Account_limits]\n\ \n\ Please note: limits only apply to trade size. You can place as many trades as you like. @@ -3325,7 +3325,7 @@ payment.f2f.info='Face to Face' trades have different rules and come with differ happened at the meeting. In such cases the BTC funds might get locked indefinitely or until the trading peers come to \ an agreement.\n\n\ To be sure you fully understand the differences with 'Face to Face' trades please read the instructions and \ - recommendations at: 'https://docs.bisq.network/trading-rules.html#f2f-trading' + recommendations at: [HYPERLINK:https://docs.bisq.network/trading-rules.html#f2f-trading] payment.f2f.info.openURL=Open web page payment.f2f.offerbook.tooltip.countryAndCity=Country and city: {0} / {1} payment.f2f.offerbook.tooltip.extra=Additional information: {0} diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java b/desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java index 2efa76baa4b..b43aaab917e 100644 --- a/desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java +++ b/desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java @@ -57,6 +57,7 @@ import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.CheckBox; +import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; import javafx.scene.input.KeyCode; import javafx.scene.layout.ColumnConstraints; @@ -65,6 +66,7 @@ import javafx.scene.layout.Pane; import javafx.scene.layout.Priority; import javafx.scene.layout.Region; +import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.transform.Rotate; @@ -84,9 +86,12 @@ import java.io.File; import java.io.IOException; +import java.util.ArrayList; import java.util.Objects; import java.util.Optional; import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import lombok.Getter; import lombok.Setter; @@ -168,6 +173,7 @@ protected enum Type { protected String headLine, message, closeButtonText, actionButtonText, secondaryActionButtonText, dontShowAgainId, dontShowAgainText, truncatedMessage; + private ArrayList messageHyperlinks; private String headlineStyle; protected Button actionButton, secondaryActionButton; private HBox buttonBox; @@ -299,8 +305,7 @@ public T notification(String message) { type = Type.Notification; if (headLine == null) this.headLine = Res.get("popup.headline.notification"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -308,8 +313,7 @@ public T instruction(String message) { type = Type.Instruction; if (headLine == null) this.headLine = Res.get("popup.headline.instruction"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -317,8 +321,7 @@ public T attention(String message) { type = Type.Attention; if (headLine == null) this.headLine = Res.get("popup.headline.attention"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -326,8 +329,7 @@ public T backgroundInfo(String message) { type = Type.BackgroundInfo; if (headLine == null) this.headLine = Res.get("popup.headline.backgroundInfo"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -335,8 +337,7 @@ public T feedback(String message) { type = Type.Feedback; if (headLine == null) this.headLine = Res.get("popup.headline.feedback"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -344,8 +345,7 @@ public T confirmation(String message) { type = Type.Confirmation; if (headLine == null) this.headLine = Res.get("popup.headline.confirmation"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -353,8 +353,7 @@ public T information(String message) { type = Type.Information; if (headLine == null) this.headLine = Res.get("popup.headline.information"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -363,8 +362,7 @@ public T warning(String message) { if (headLine == null) this.headLine = Res.get("popup.headline.warning"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -374,8 +372,7 @@ public T error(String message) { width = 1100; if (headLine == null) this.headLine = Res.get("popup.headline.error"); - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -386,8 +383,7 @@ public T showReportErrorButtons() { } public T message(String message) { - this.message = message; - setTruncatedMessage(); + preProcessMessage(message); return cast(); } @@ -830,6 +826,24 @@ protected void addMessage() { GridPane.setColumnIndex(messageLabel, 0); GridPane.setColumnSpan(messageLabel, 2); gridPane.getChildren().add(messageLabel); + addFooter(); + } + } + + // footer contains optional hyperlinks extracted from the message + private void addFooter() { + if (messageHyperlinks != null && messageHyperlinks.size() > 0) { + VBox footerBox = new VBox(); + GridPane.setRowIndex(footerBox, ++rowIndex); + GridPane.setColumnSpan(footerBox, 2); + GridPane.setMargin(footerBox, new Insets(buttonDistance, 0, 0, 0)); + gridPane.getChildren().add(footerBox); + for (int i = 0; i < messageHyperlinks.size(); i++) { + Label label = new Label(String.format("[%d]", i + 1)); + Hyperlink link = new Hyperlink(messageHyperlinks.get(i)); + link.setOnAction(event -> GUIUtil.openWebPageNoPopup(link.getText())); + footerBox.getChildren().addAll(new HBox(label, link)); + } } } @@ -975,6 +989,26 @@ protected void setTruncatedMessage() { else truncatedMessage = Objects.requireNonNullElse(message, ""); } + // separate a popup message from optional hyperlinks. [bisq-network/bisq/pull/4637] + // hyperlinks are distinguished by [HYPERLINK:] tag + // referenced in order from within the message via [1], [2] etc. + // e.g. [HYPERLINK:https://bisq.wiki] + private void preProcessMessage(String message) { + Pattern pattern = Pattern.compile("\\[HYPERLINK:(.*?)\\]"); + Matcher matcher = pattern.matcher(message); + String work = message; + while (matcher.find()) { // extract hyperlinks & store in array + if (messageHyperlinks == null) { + messageHyperlinks = new ArrayList<>(); + } + messageHyperlinks.add(matcher.group(1)); + // replace hyperlink in message with [n] reference + work = work.replaceFirst(pattern.toString(), String.format("[%d]", messageHyperlinks.size())); + } + this.message = work; + setTruncatedMessage(); + } + protected double getDuration(double duration) { return useAnimation && GlobalSettings.getUseAnimations() ? duration : 1; } diff --git a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java index 42f95f7e738..1b0c496ab28 100644 --- a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java +++ b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java @@ -603,6 +603,10 @@ public static void openWebPage(String target, boolean useReferrer) { openWebPage(target, useReferrer, null); } + public static void openWebPageNoPopup(String target) { + doOpenWebPage(target); + } + public static void openWebPage(String target, boolean useReferrer, Runnable closeHandler) { if (useReferrer && target.contains("bisq.network")) { From ce1efa1337ba6b223cc9f43c74b286e55a3bef31 Mon Sep 17 00:00:00 2001 From: jmacxx <47253594+jmacxx@users.noreply.github.com> Date: Wed, 14 Oct 2020 20:54:09 -0500 Subject: [PATCH 2/2] Remove unused strings, ref: https://github.com/bisq-network/bisq/pull/4637#issuecomment-708721299 --- .../main/resources/i18n/displayStrings.properties | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 4c868ebf1b1..e9409936020 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -2831,21 +2831,6 @@ popup.warning.openOfferWithInvalidMakerFeeTx=The maker fee transaction for offer Please go to \"Settings/Network info\" and do a SPV resync.\n\ For further help please contact the Bisq support channel at the Bisq Keybase team. -popup.warning.trade.depositTxNull=The trade with ID ''{0}'' has no deposit transaction set.\n\n\ - Please restart the application to see if the problem still exists.\n\n\ - If it does, please open the trade details popup by clicking on the trade ID. Then click on the transaction IDs for \ - the maker fee transaction and the taker fee transaction to view them on a block explorer. A transaction \ - that cannot be found in a block explorer is probably an invalid transaction.\n\n\ - If this happens, please report it in the #support channel on the Bisq Keybase (https://keybase.io/team/bisq). \ - If your trade fee transaction is invalid, no funds have left your wallet, you can move the trade to failed trades,\ - and do an SPV resync for your funds to reappear (see how below).\n\n\ - If your trade fee transaction is valid, the fee amount is lost, and you can make a \ - request for reimbursement on the support repository on GitHub (https://github.com/bisq-network/support/issues).\n\n\ - In both cases, please do an SPV resync from the ''Settings/Network'' screen to clean your wallet of any lingering issues! - -popup.warning.trade.depositTxNull.moveToFailedTrades=Move to failed trades -popup.warning.trade.depositTxNull.shutDown=Shut down Bisq - popup.info.securityDepositInfo=To ensure both traders follow the trade protocol, both traders need to pay a security \ deposit.\n\nThis deposit is kept in your trade wallet until your trade has been successfully completed, and then it's \ refunded to you.\n\nPlease note: if you're creating a new offer, Bisq needs to be running for another trader to take \