mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Apply display strings for windows
This commit is contained in:
parent
2cf0e094dd
commit
c7c7b490ba
34 changed files with 429 additions and 286 deletions
|
@ -18,6 +18,7 @@
|
|||
package io.bitsquare.gui.components;
|
||||
|
||||
import io.bitsquare.gui.util.validation.InputValidator;
|
||||
import io.bitsquare.locale.Res;
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.geometry.Insets;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package io.bitsquare.gui.components;
|
||||
|
||||
import io.bitsquare.gui.util.validation.InputValidator;
|
||||
import io.bitsquare.locale.Res;
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.geometry.Insets;
|
||||
|
|
|
@ -83,7 +83,7 @@ public class AliPayForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", aliPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(aliPayAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(aliPayAccount.getPaymentMethod().getId()));
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Account no.:", aliPayAccount.getAccountNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), aliPayAccount.getSingleTradeCurrency().getNameAndCode());
|
||||
|
|
|
@ -203,7 +203,7 @@ abstract class BankForm extends PaymentMethodForm {
|
|||
String countryCode = bankAccountContractData.getCountryCode();
|
||||
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", paymentAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(paymentAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(paymentAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Country:", getCountryBasedPaymentAccount().getCountry() != null ? getCountryBasedPaymentAccount().getCountry().name : "");
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), paymentAccount.getSingleTradeCurrency().getNameAndCode());
|
||||
addAcceptedBanksForDisplayAccount();
|
||||
|
|
|
@ -215,7 +215,7 @@ public class CashDepositForm extends PaymentMethodForm {
|
|||
String countryCode = cashDepositAccountContractData.getCountryCode();
|
||||
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", paymentAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(paymentAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(paymentAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Country:", getCountryBasedPaymentAccount().getCountry() != null ? getCountryBasedPaymentAccount().getCountry().name : "");
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), paymentAccount.getSingleTradeCurrency().getNameAndCode());
|
||||
addAcceptedBanksForDisplayAccount();
|
||||
|
|
|
@ -92,7 +92,7 @@ public class ChaseQuickPayForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", chaseQuickPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(chaseQuickPayAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(chaseQuickPayAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", chaseQuickPayAccount.getHolderName());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Email:", chaseQuickPayAccount.getEmail()).second;
|
||||
field.setMouseTransparent(false);
|
||||
|
|
|
@ -91,7 +91,7 @@ public class ClearXchangeForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", clearXchangeAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(clearXchangeAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(clearXchangeAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", clearXchangeAccount.getHolderName());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Email or mobile no.:", clearXchangeAccount.getEmailOrMobileNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
|
|
|
@ -109,7 +109,7 @@ public class CryptoCurrencyForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", cryptoCurrencyAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(cryptoCurrencyAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(cryptoCurrencyAccount.getPaymentMethod().getId()));
|
||||
Tuple2<Label, TextField> tuple2 = addLabelTextField(gridPane, ++gridRow, "Altcoin address:", cryptoCurrencyAccount.getAddress());
|
||||
addressLabel = tuple2.first;
|
||||
TextField field = tuple2.second;
|
||||
|
|
|
@ -94,7 +94,7 @@ public class FasterPaymentsForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", fasterPaymentsAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(fasterPaymentsAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(fasterPaymentsAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "UK Sort code:", fasterPaymentsAccount.getSortCode());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Account number:", fasterPaymentsAccount.getAccountNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
|
|
|
@ -109,7 +109,7 @@ public class InteracETransferForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", interacETransferAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(interacETransferAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(interacETransferAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", interacETransferAccount.getHolderName());
|
||||
addLabelTextField(gridPane, ++gridRow, "Email:", interacETransferAccount.getEmail()).second.setMouseTransparent(false);
|
||||
addLabelTextField(gridPane, ++gridRow, "Secret question:", interacETransferAccount.getQuestion()).second.setMouseTransparent(false);
|
||||
|
|
|
@ -127,7 +127,7 @@ public class OKPayForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", okPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(okPayAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(okPayAccount.getPaymentMethod().getId()));
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Wallet ID:", okPayAccount.getAccountNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
addAllowedPeriod();
|
||||
|
|
|
@ -89,7 +89,7 @@ public class PerfectMoneyForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", perfectMoneyAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(perfectMoneyAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(perfectMoneyAccount.getPaymentMethod().getId()));
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Account no.:", perfectMoneyAccount.getAccountNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ public class SepaForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", sepaAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(sepaAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(sepaAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", sepaAccount.getHolderName());
|
||||
addLabelTextField(gridPane, ++gridRow, "IBAN:", sepaAccount.getIban()).second.setMouseTransparent(false);
|
||||
addLabelTextField(gridPane, ++gridRow, "BIC:", sepaAccount.getBic()).second.setMouseTransparent(false);
|
||||
|
|
|
@ -92,7 +92,7 @@ public class SwishForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", swishAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(swishAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(swishAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", swishAccount.getHolderName());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Mobile no.:", swishAccount.getMobileNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
|
|
|
@ -97,7 +97,7 @@ public class USPostalMoneyOrderForm extends PaymentMethodForm {
|
|||
public void addFormForDisplayAccount() {
|
||||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", usPostalMoneyOrderAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(usPostalMoneyOrderAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(usPostalMoneyOrderAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", usPostalMoneyOrderAccount.getHolderName());
|
||||
TextArea textArea = addLabelTextArea(gridPane, ++gridRow, "Postal address:", "").second;
|
||||
textArea.setText(usPostalMoneyOrderAccount.getPostalAddress());
|
||||
|
|
|
@ -223,7 +223,7 @@ public class ArbitratorRegistrationView extends ActivatableViewAndModel<VBox, Ar
|
|||
model.onRevoke(
|
||||
() -> new Popup().feedback(Res.get("account.arbitratorRegistration.removedSuccess")).show(),
|
||||
(errorMessage) -> new Popup().error(Res.get("account.arbitratorRegistration.removedFailed",
|
||||
Res.get("shared.errorMessage", errorMessage))).show());
|
||||
Res.get("shared.errorMessageInline", errorMessage))).show());
|
||||
} else {
|
||||
new Popup().information(Res.get("popup.warning.notFullyConnected")).show();
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ public class ArbitratorRegistrationView extends ActivatableViewAndModel<VBox, Ar
|
|||
model.onRegister(
|
||||
() -> new Popup().feedback(Res.get("account.arbitratorRegistration.registerSuccess")).show(),
|
||||
(errorMessage) -> new Popup().error(Res.get("account.arbitratorRegistration.registerFailed",
|
||||
Res.get("shared.errorMessage", errorMessage))).show());
|
||||
Res.get("shared.errorMessageInline", errorMessage))).show());
|
||||
} else {
|
||||
new Popup().information(Res.get("popup.warning.notFullyConnected")).show();
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ public class BackupView extends ActivatableView<GridPane, Void> {
|
|||
}
|
||||
|
||||
private void showWrongPathWarningAndReset(@Nullable Throwable t) {
|
||||
String error = t != null ? Res.get("shared.errorMessage", t.getMessage()) : "";
|
||||
String error = t != null ? Res.get("shared.errorMessageInline", t.getMessage()) : "";
|
||||
new Popup<>().warning(Res.get("account.backup.directoryNotAccessible", error)).show();
|
||||
applyBackupDirectory(Utilities.getSystemHomeDirectory());
|
||||
}
|
||||
|
|
|
@ -89,19 +89,19 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
|||
@Override
|
||||
protected void initialize() {
|
||||
addTitledGroupBg(root, gridRow, 2, Res.get("account.seed.backup.title"));
|
||||
displaySeedWordsTextArea = addLabelTextArea(root, gridRow, Res.get("account.seed.seedWords"), "", Layout.FIRST_ROW_DISTANCE).second;
|
||||
displaySeedWordsTextArea = addLabelTextArea(root, gridRow, Res.get("seed.seedWords"), "", Layout.FIRST_ROW_DISTANCE).second;
|
||||
displaySeedWordsTextArea.setPrefHeight(60);
|
||||
displaySeedWordsTextArea.setEditable(false);
|
||||
|
||||
datePicker = addLabelDatePicker(root, ++gridRow, Res.get("account.seed.date")).second;
|
||||
datePicker = addLabelDatePicker(root, ++gridRow, Res.get("seed.date")).second;
|
||||
datePicker.setMouseTransparent(true);
|
||||
|
||||
addTitledGroupBg(root, ++gridRow, 2, Res.get("account.seed.restore.title"), Layout.GROUP_DISTANCE);
|
||||
seedWordsTextArea = addLabelTextArea(root, gridRow, Res.get("account.seed.seedWords"), "", Layout.FIRST_ROW_AND_GROUP_DISTANCE).second;
|
||||
addTitledGroupBg(root, ++gridRow, 2, Res.get("seed.restore.title"), Layout.GROUP_DISTANCE);
|
||||
seedWordsTextArea = addLabelTextArea(root, gridRow, Res.get("seed.seedWords"), "", Layout.FIRST_ROW_AND_GROUP_DISTANCE).second;
|
||||
seedWordsTextArea.setPrefHeight(60);
|
||||
|
||||
restoreDatePicker = addLabelDatePicker(root, ++gridRow, Res.get("account.seed.date")).second;
|
||||
restoreButton = addButtonAfterGroup(root, ++gridRow, Res.get("account.seed.restore"));
|
||||
restoreDatePicker = addLabelDatePicker(root, ++gridRow, Res.get("seed.date")).second;
|
||||
restoreButton = addButtonAfterGroup(root, ++gridRow, Res.get("seed.restore"));
|
||||
|
||||
addTitledGroupBg(root, ++gridRow, 1, Res.get("shared.information"), Layout.GROUP_DISTANCE);
|
||||
addMultilineLabel(root, gridRow, Res.get("account.seed.info"),
|
||||
|
@ -215,10 +215,10 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
|||
|
||||
private void onRestore() {
|
||||
if (walletsManager.hasPositiveBalance()) {
|
||||
new Popup().warning(Res.get("account.seed.warn.walletNotEmpty.msg"))
|
||||
.actionButtonText(Res.get("account.seed.warn.walletNotEmpty.restore"))
|
||||
new Popup().warning(Res.get("seed.warn.walletNotEmpty.msg"))
|
||||
.actionButtonText(Res.get("seed.warn.walletNotEmpty.restore"))
|
||||
.onAction(this::checkIfEncrypted)
|
||||
.closeButtonText(Res.get("account.seed.warn.walletNotEmpty.emptyWallet"))
|
||||
.closeButtonText(Res.get("seed.warn.walletNotEmpty.emptyWallet"))
|
||||
.show();
|
||||
} else {
|
||||
checkIfEncrypted();
|
||||
|
@ -227,7 +227,7 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
|||
|
||||
private void checkIfEncrypted() {
|
||||
if (walletsManager.areWalletsEncrypted()) {
|
||||
new Popup().information(Res.get("account.seed.warn.notEncryptedAnymore"))
|
||||
new Popup().information(Res.get("seed.warn.notEncryptedAnymore"))
|
||||
.closeButtonText(Res.get("shared.no"))
|
||||
.actionButtonText(Res.get("shared.yes"))
|
||||
.onAction(this::doRestore)
|
||||
|
@ -244,12 +244,13 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
|||
seed,
|
||||
() -> UserThread.execute(() -> {
|
||||
log.info("Wallets restored with seed words");
|
||||
new Popup().feedback(Res.get("account.seed.restore.success"))
|
||||
new Popup().feedback(Res.get("seed.restore.success"))
|
||||
.useShutDownButton();
|
||||
}),
|
||||
throwable -> UserThread.execute(() -> {
|
||||
log.error(throwable.getMessage());
|
||||
new Popup().error(Res.get("account.seed.restore.error", Res.get("shared.errorMessage", throwable.getMessage())))
|
||||
new Popup().error(Res.get("seed.restore.error", Res.get("shared.errorMessageInline",
|
||||
throwable.getMessage())))
|
||||
.show();
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import io.bitsquare.btc.wallet.BsqWalletService;
|
|||
import io.bitsquare.btc.wallet.BtcWalletService;
|
||||
import io.bitsquare.btc.wallet.ChangeBelowDustException;
|
||||
import io.bitsquare.common.UserThread;
|
||||
import io.bitsquare.common.util.Utilities;
|
||||
import io.bitsquare.dao.compensation.CompensationRequest;
|
||||
import io.bitsquare.dao.compensation.CompensationRequestManager;
|
||||
import io.bitsquare.dao.vote.*;
|
||||
|
|
|
@ -130,12 +130,12 @@ public class ContractWindow extends Overlay<ContractWindow> {
|
|||
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("contractWindow.numDisputes"), disputeManager.getNrOfDisputes(true, contract) + " / " + disputeManager.getNrOfDisputes(false, contract));
|
||||
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("contractWindow.paymentDetails", Res.get("shared.buyer")),
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("shared.paymentDetails", Res.get("shared.buyer")),
|
||||
Res.get(contract.getBuyerPaymentAccountContractData().getPaymentDetails())).second.setMouseTransparent(false);
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("contractWindow.paymentDetails", Res.get("shared.seller")),
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("shared.paymentDetails", Res.get("shared.seller")),
|
||||
Res.get(sellerPaymentAccountContractData.getPaymentDetails())).second.setMouseTransparent(false);
|
||||
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("contractWindow.arbitrator"), contract.arbitratorNodeAddress.getFullAddress());
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("shared.arbitrator"), contract.arbitratorNodeAddress.getFullAddress());
|
||||
|
||||
if (showAcceptedCountryCodes) {
|
||||
String countries;
|
||||
|
@ -162,19 +162,19 @@ public class ContractWindow extends Overlay<ContractWindow> {
|
|||
}
|
||||
}
|
||||
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("contractWindow.makerFeeTxId"), offer.getOfferFeePaymentTxID());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("contractWindow.takerFeeTxId"), contract.takeOfferFeeTxID);
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.makerFeeTxId"), offer.getOfferFeePaymentTxID());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.takerFeeTxId"), contract.takeOfferFeeTxID);
|
||||
if (dispute.getDepositTxSerialized() != null)
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.getWithCol("shared.depositTransactionId"), dispute.getDepositTxId());
|
||||
if (dispute.getPayoutTxSerialized() != null)
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("contractWindow.payoutTxId"), dispute.getPayoutTxId());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.payoutTxId"), dispute.getPayoutTxId());
|
||||
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("contractWindow.contractHash"),
|
||||
Utils.HEX.encode(dispute.getContractHash())).second.setMouseTransparent(false);
|
||||
|
||||
if (contract != null) {
|
||||
Button viewContractButton = addLabelButton(gridPane, ++rowIndex, Res.get("contractWindow.contractAsJson"),
|
||||
Res.get("contractWindow.viewContractAsJson"), 0).second;
|
||||
Button viewContractButton = addLabelButton(gridPane, ++rowIndex, Res.get("shared.contractAsJson"),
|
||||
Res.get("shared.viewContractAsJson"), 0).second;
|
||||
viewContractButton.setDefaultButton(false);
|
||||
viewContractButton.setOnAction(e -> {
|
||||
TextArea textArea = new TextArea();
|
||||
|
@ -186,7 +186,7 @@ public class ContractWindow extends Overlay<ContractWindow> {
|
|||
|
||||
Scene viewContractScene = new Scene(textArea);
|
||||
Stage viewContractStage = new Stage();
|
||||
viewContractStage.setTitle(Res.get("contractWindow.contract.title", dispute.getShortTradeId()));
|
||||
viewContractStage.setTitle(Res.get("shared.contract.title", dispute.getShortTradeId()));
|
||||
viewContractStage.setScene(viewContractScene);
|
||||
if (owner == null)
|
||||
owner = MainView.getRootContainer();
|
||||
|
@ -207,7 +207,7 @@ public class ContractWindow extends Overlay<ContractWindow> {
|
|||
//TODO app wide focus
|
||||
//closeButton.requestFocus();
|
||||
closeButton.setOnAction(e -> {
|
||||
closeHandlerOptional.ifPresent(closeHandler -> closeHandler.run());
|
||||
closeHandlerOptional.ifPresent(Runnable::run);
|
||||
hide();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
|
|||
|
||||
public void show() {
|
||||
if (headLine == null)
|
||||
headLine = "Empty wallet";
|
||||
headLine = Res.get("emptyWalletWindow.headline");
|
||||
|
||||
width = 700;
|
||||
createGridPane();
|
||||
|
@ -87,7 +87,6 @@ public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
|
|||
applyStyles();
|
||||
display();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Protected
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -105,24 +104,18 @@ public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
|
|||
}
|
||||
|
||||
private void addContent() {
|
||||
addMultilineLabel(gridPane, ++rowIndex,
|
||||
"Please use that only in emergency case if you cannot access your fund from the UI.\n\n" +
|
||||
"Please note that all open offers will be closed automatically when using this tool.\n\n" +
|
||||
"Before you use this tool, please backup your data directory. " +
|
||||
"You can do this under \"Account/Backup\".\n\n" +
|
||||
"Please file a bug report on Github so that we can investigate what was causing the problem.",
|
||||
10);
|
||||
addMultilineLabel(gridPane, ++rowIndex, Res.get("emptyWalletWindow.info"), 10);
|
||||
|
||||
Coin totalBalance = walletService.getAvailableBalance();
|
||||
balanceTextField = addLabelTextField(gridPane, ++rowIndex, "Your available wallet balance:",
|
||||
balanceTextField = addLabelTextField(gridPane, ++rowIndex, Res.get("emptyWalletWindow.balance"),
|
||||
formatter.formatCoinWithCode(totalBalance), 10).second;
|
||||
|
||||
Tuple2<Label, InputTextField> tuple = addLabelInputTextField(gridPane, ++rowIndex, "Your destination address:");
|
||||
Tuple2<Label, InputTextField> tuple = addLabelInputTextField(gridPane, ++rowIndex, Res.get("emptyWalletWindow.address"));
|
||||
addressInputTextField = tuple.second;
|
||||
if (DevFlags.DEV_MODE)
|
||||
addressInputTextField.setText("mpaZiEh8gSr4LcH11FrLdRY57aArt88qtg");
|
||||
|
||||
emptyWalletButton = new Button("Empty wallet");
|
||||
emptyWalletButton = new Button(Res.get("emptyWalletWindow.button"));
|
||||
boolean isBalanceSufficient = Restrictions.isAboveDust(totalBalance);
|
||||
emptyWalletButton.setDefaultButton(isBalanceSufficient);
|
||||
emptyWalletButton.setDisable(!isBalanceSufficient && addressInputTextField.getText().length() > 0);
|
||||
|
@ -158,9 +151,8 @@ public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
|
|||
private void doEmptyWallet(KeyParameter aesKey) {
|
||||
if (!openOfferManager.getOpenOffers().isEmpty()) {
|
||||
UserThread.runAfter(() ->
|
||||
new Popup().warning("You have open offers which will be removed if you empty the wallet.\n" +
|
||||
"Are you sure that you want to empty your wallet?")
|
||||
.actionButtonText("Yes, I am sure")
|
||||
new Popup().warning(Res.get("emptyWalletWindow.openOffers.warn"))
|
||||
.actionButtonText(Res.get("emptyWalletWindow.openOffers.yes"))
|
||||
.onAction(() -> doEmptyWallet2(aesKey))
|
||||
.show(), 300, TimeUnit.MILLISECONDS);
|
||||
} else {
|
||||
|
@ -180,7 +172,7 @@ public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
|
|||
emptyWalletButton.setDisable(true);
|
||||
log.debug("wallet empty successful");
|
||||
onClose(() -> UserThread.runAfter(() -> new Popup()
|
||||
.feedback("The balance of your wallet was successfully transferred.")
|
||||
.feedback(Res.get("emptyWalletWindow.sent.success"))
|
||||
.show(), Transitions.DEFAULT_DURATION, TimeUnit.MILLISECONDS));
|
||||
doClose();
|
||||
},
|
||||
|
|
|
@ -65,7 +65,7 @@ public class EnterPrivKeyWindow extends Overlay<EnterPrivKeyWindow> {
|
|||
}
|
||||
|
||||
if (headLine == null)
|
||||
headLine = "Registration open for invited arbitrators only";
|
||||
headLine = Res.get("enterPrivKeyWindow.headline");
|
||||
|
||||
createGridPane();
|
||||
addHeadLine();
|
||||
|
@ -103,7 +103,7 @@ public class EnterPrivKeyWindow extends Overlay<EnterPrivKeyWindow> {
|
|||
}
|
||||
|
||||
private void addInputFields() {
|
||||
Label label = new Label("Enter private key:");
|
||||
Label label = new Label(Res.get("shared.enterPrivKey"));
|
||||
label.setWrapText(true);
|
||||
GridPane.setMargin(label, new Insets(3, 0, 0, 0));
|
||||
GridPane.setRowIndex(label, ++rowIndex);
|
||||
|
@ -122,20 +122,20 @@ public class EnterPrivKeyWindow extends Overlay<EnterPrivKeyWindow> {
|
|||
}
|
||||
|
||||
private void addButtons() {
|
||||
unlockButton = new Button("Unlock");
|
||||
unlockButton = new Button(Res.get("shared.unlock"));
|
||||
unlockButton.setDefaultButton(true);
|
||||
unlockButton.setDisable(keyInputTextField.getText().length() == 0);
|
||||
unlockButton.setOnAction(e -> {
|
||||
if (privKeyHandler.checkKey(keyInputTextField.getText()))
|
||||
hide();
|
||||
else
|
||||
new Popup().warning("The key you entered was not correct.").width(300).onClose(() -> blurAgain()).show();
|
||||
new Popup().warning(Res.get("shared.invalidKey")).width(300).onClose(this::blurAgain).show();
|
||||
});
|
||||
|
||||
Button closeButton = new Button(Res.get("shared.close"));
|
||||
closeButton.setOnAction(event -> {
|
||||
hide();
|
||||
closeHandlerOptional.ifPresent(closeHandler -> closeHandler.run());
|
||||
closeHandlerOptional.ifPresent(Runnable::run);
|
||||
});
|
||||
|
||||
HBox hBox = new HBox();
|
||||
|
|
|
@ -42,6 +42,7 @@ import static io.bitsquare.gui.util.FormBuilder.addLabelInputTextField;
|
|||
|
||||
public class FilterWindow extends Overlay<FilterWindow> {
|
||||
private static final Logger log = LoggerFactory.getLogger(FilterWindow.class);
|
||||
|
||||
private Button sendButton;
|
||||
private SendFilterMessageHandler sendFilterMessageHandler;
|
||||
private RemoveFilterMessageHandler removeFilterMessageHandler;
|
||||
|
@ -71,7 +72,7 @@ public class FilterWindow extends Overlay<FilterWindow> {
|
|||
|
||||
public void show() {
|
||||
if (headLine == null)
|
||||
headLine = "Edit filter list";
|
||||
headLine = Res.get("filterWindow.headline");
|
||||
|
||||
width = 900;
|
||||
createGridPane();
|
||||
|
@ -108,12 +109,11 @@ public class FilterWindow extends Overlay<FilterWindow> {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void addContent() {
|
||||
InputTextField keyInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Private key to unlock:", 10).second;
|
||||
InputTextField offerIdsInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Filtered offers (comma sep.):").second;
|
||||
InputTextField nodesInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Filtered onion addresses (comma sep.):").second;
|
||||
InputTextField paymentAccountFilterInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Filtered trading account data:\nFormat: comma sep. list of [payment method id | data field | value]").second;
|
||||
InputTextField keyInputTextField = addLabelInputTextField(gridPane, ++rowIndex, Res.get("shared.unlock"), 10).second;
|
||||
InputTextField offerIdsInputTextField = addLabelInputTextField(gridPane, ++rowIndex, Res.get("filterWindow.offers")).second;
|
||||
InputTextField nodesInputTextField = addLabelInputTextField(gridPane, ++rowIndex, Res.get("filterWindow.onions")).second;
|
||||
InputTextField paymentAccountFilterInputTextField = addLabelInputTextField(gridPane, ++rowIndex, Res.get("filterWindow.accounts")).second;
|
||||
GridPane.setHalignment(paymentAccountFilterInputTextField, HPos.RIGHT);
|
||||
|
||||
final Filter filter = filterManager.getDevelopersFilter();
|
||||
|
@ -135,18 +135,26 @@ public class FilterWindow extends Overlay<FilterWindow> {
|
|||
paymentAccountFilterInputTextField.setText(sb.toString());
|
||||
}
|
||||
}
|
||||
sendButton = new Button("Add filter");
|
||||
sendButton = new Button(Res.get("filterWindow.add"));
|
||||
sendButton.setOnAction(e -> {
|
||||
ArrayList<String> offerIds = new ArrayList<>();
|
||||
ArrayList<String> nodes = new ArrayList<>();
|
||||
ArrayList<PaymentAccountFilter> paymentAccountFilters = new ArrayList<>();
|
||||
|
||||
if (!offerIdsInputTextField.getText().isEmpty())
|
||||
offerIds = new ArrayList<>(Arrays.asList(offerIdsInputTextField.getText().replace(" ", "").replace(", ", ",").split(",")));
|
||||
offerIds = new ArrayList<>(Arrays.asList(offerIdsInputTextField.getText().replace(" ", "")
|
||||
.replace(", ", ",")
|
||||
.split(",")));
|
||||
if (!nodesInputTextField.getText().isEmpty())
|
||||
nodes = new ArrayList<>(Arrays.asList(nodesInputTextField.getText().replace(":9999", "").replace(".onion", "").replace(" ", "").replace(", ", ",").split(",")));
|
||||
nodes = new ArrayList<>(Arrays.asList(nodesInputTextField.getText().replace(":9999", "")
|
||||
.replace(".onion", "")
|
||||
.replace(" ", "")
|
||||
.replace(", ", ",")
|
||||
.split(",")));
|
||||
if (!paymentAccountFilterInputTextField.getText().isEmpty())
|
||||
paymentAccountFilters = new ArrayList<>(Arrays.asList(paymentAccountFilterInputTextField.getText().replace(", ", ",").split(","))
|
||||
paymentAccountFilters = new ArrayList<>(Arrays.asList(paymentAccountFilterInputTextField.getText()
|
||||
.replace(", ", ",")
|
||||
.split(","))
|
||||
.stream().map(item -> {
|
||||
String[] list = item.split("\\|");
|
||||
if (list.length == 3)
|
||||
|
@ -159,23 +167,23 @@ public class FilterWindow extends Overlay<FilterWindow> {
|
|||
if (sendFilterMessageHandler.handle(new Filter(offerIds, nodes, paymentAccountFilters), keyInputTextField.getText()))
|
||||
hide();
|
||||
else
|
||||
new Popup().warning("The key you entered was not correct.").width(300).onClose(() -> blurAgain()).show();
|
||||
new Popup().warning(Res.get("shared.invalidKey")).width(300).onClose(this::blurAgain).show();
|
||||
});
|
||||
|
||||
Button removeFilterMessageButton = new Button("Remove filter");
|
||||
Button removeFilterMessageButton = new Button(Res.get("filterWindow.remove"));
|
||||
removeFilterMessageButton.setOnAction(e -> {
|
||||
if (keyInputTextField.getText().length() > 0) {
|
||||
if (removeFilterMessageHandler.handle(keyInputTextField.getText()))
|
||||
hide();
|
||||
else
|
||||
new Popup().warning("The key you entered was not correct.").width(300).onClose(() -> blurAgain()).show();
|
||||
new Popup().warning(Res.get("shared.invalidKey")).width(300).onClose(this::blurAgain).show();
|
||||
}
|
||||
});
|
||||
|
||||
closeButton = new Button(Res.get("shared.close"));
|
||||
closeButton.setOnAction(e -> {
|
||||
hide();
|
||||
closeHandlerOptional.ifPresent(closeHandler -> closeHandler.run());
|
||||
closeHandlerOptional.ifPresent(Runnable::run);
|
||||
});
|
||||
|
||||
HBox hBox = new HBox();
|
||||
|
@ -186,6 +194,4 @@ public class FilterWindow extends Overlay<FilterWindow> {
|
|||
gridPane.getChildren().add(hBox);
|
||||
GridPane.setMargin(hBox, new Insets(10, 0, 0, 0));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -153,46 +153,59 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
if (showAcceptedCountryCodes)
|
||||
rows++;
|
||||
|
||||
addTitledGroupBg(gridPane, ++rowIndex, rows, "Offer");
|
||||
addTitledGroupBg(gridPane, ++rowIndex, rows, Res.get("shared.Offer"));
|
||||
|
||||
String fiatDirectionInfo = ":";
|
||||
String btcDirectionInfo = ":";
|
||||
Offer.Direction direction = offer.getDirection();
|
||||
String currencyCode = offer.getCurrencyCode();
|
||||
String offerTypeLabel = Res.getWithCol("shared.offerType");
|
||||
String toReceive = " " + Res.get("shared.toReceive");
|
||||
String toSpend = " " + Res.get("shared.toSpend");
|
||||
double firstRowDistance = Layout.FIRST_ROW_DISTANCE;
|
||||
if (takeOfferHandlerOptional.isPresent()) {
|
||||
addLabelTextField(gridPane, rowIndex, "Offer type:", formatter.getDirectionForTakeOffer(direction, currencyCode), Layout.FIRST_ROW_DISTANCE);
|
||||
fiatDirectionInfo = direction == Offer.Direction.BUY ? " to receive:" : " to spend:";
|
||||
btcDirectionInfo = direction == Offer.Direction.SELL ? " to receive:" : " to spend:";
|
||||
addLabelTextField(gridPane, rowIndex, offerTypeLabel,
|
||||
formatter.getDirectionForTakeOffer(direction, currencyCode), firstRowDistance);
|
||||
fiatDirectionInfo = direction == Offer.Direction.BUY ? toReceive : toSpend;
|
||||
btcDirectionInfo = direction == Offer.Direction.SELL ? toReceive : toSpend;
|
||||
} else if (placeOfferHandlerOptional.isPresent()) {
|
||||
addLabelTextField(gridPane, rowIndex, "Offer type:", formatter.getOfferDirectionForCreateOffer(direction, currencyCode), Layout.FIRST_ROW_DISTANCE);
|
||||
fiatDirectionInfo = direction == Offer.Direction.SELL ? " to receive:" : " to spend:";
|
||||
btcDirectionInfo = direction == Offer.Direction.BUY ? " to receive:" : " to spend:";
|
||||
addLabelTextField(gridPane, rowIndex, offerTypeLabel,
|
||||
formatter.getOfferDirectionForCreateOffer(direction, currencyCode), firstRowDistance);
|
||||
fiatDirectionInfo = direction == Offer.Direction.SELL ? toReceive : toSpend;
|
||||
btcDirectionInfo = direction == Offer.Direction.BUY ? toReceive : toSpend;
|
||||
} else {
|
||||
addLabelTextField(gridPane, rowIndex, "Offer type:", formatter.getDirectionBothSides(direction, currencyCode), Layout.FIRST_ROW_DISTANCE);
|
||||
addLabelTextField(gridPane, rowIndex, offerTypeLabel,
|
||||
formatter.getDirectionBothSides(direction, currencyCode), firstRowDistance);
|
||||
}
|
||||
String btcAmount = Res.get("shared.btcAmount");
|
||||
if (takeOfferHandlerOptional.isPresent()) {
|
||||
addLabelTextField(gridPane, ++rowIndex, "Bitcoin amount" + btcDirectionInfo, formatter.formatCoinWithCode(tradeAmount));
|
||||
addLabelTextField(gridPane, ++rowIndex, btcAmount + btcDirectionInfo,
|
||||
formatter.formatCoinWithCode(tradeAmount));
|
||||
addLabelTextField(gridPane, ++rowIndex, formatter.formatVolumeLabel(currencyCode) + fiatDirectionInfo,
|
||||
formatter.formatVolumeWithCode(offer.getVolumeByAmount(tradeAmount)));
|
||||
} else {
|
||||
addLabelTextField(gridPane, ++rowIndex, "Bitcoin amount" + btcDirectionInfo, formatter.formatCoinWithCode(offer.getAmount()));
|
||||
addLabelTextField(gridPane, ++rowIndex, "Min. bitcoin amount:", formatter.formatCoinWithCode(offer.getMinAmount()));
|
||||
addLabelTextField(gridPane, ++rowIndex, btcAmount + btcDirectionInfo,
|
||||
formatter.formatCoinWithCode(offer.getAmount()));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("offerDetailsWindow.minBtcAmount"),
|
||||
formatter.formatCoinWithCode(offer.getMinAmount()));
|
||||
String volume = formatter.formatVolumeWithCode(offer.getOfferVolume());
|
||||
String minVolume = "";
|
||||
if (!offer.getAmount().equals(offer.getMinAmount()))
|
||||
minVolume = " (min. " + formatter.formatVolumeWithCode(offer.getMinOfferVolume()) + ")";
|
||||
addLabelTextField(gridPane, ++rowIndex, formatter.formatVolumeLabel(currencyCode) + fiatDirectionInfo, volume + minVolume);
|
||||
minVolume = " " + Res.get("offerDetailsWindow.min");
|
||||
addLabelTextField(gridPane, ++rowIndex,
|
||||
formatter.formatVolumeLabel(currencyCode) + fiatDirectionInfo, volume + minVolume);
|
||||
}
|
||||
|
||||
String priceLabel = Res.getWithCol("shared.price");
|
||||
if (takeOfferHandlerOptional.isPresent()) {
|
||||
addLabelTextField(gridPane, ++rowIndex, "Price:", formatter.formatPrice(tradePrice));
|
||||
addLabelTextField(gridPane, ++rowIndex, priceLabel, formatter.formatPrice(tradePrice));
|
||||
} else {
|
||||
Fiat price = offer.getPrice();
|
||||
if (offer.getUseMarketBasedPrice()) {
|
||||
addLabelTextField(gridPane, ++rowIndex, "Price:", formatter.formatPrice(price) +
|
||||
" (distance from market price: " + formatter.formatPercentagePrice(offer.getMarketPriceMargin()) + ")");
|
||||
addLabelTextField(gridPane, ++rowIndex, priceLabel, formatter.formatPrice(price) +
|
||||
" " + Res.get("offerDetailsWindow.distance"));
|
||||
} else {
|
||||
addLabelTextField(gridPane, ++rowIndex, "Price:", formatter.formatPrice(price));
|
||||
addLabelTextField(gridPane, ++rowIndex, priceLabel, formatter.formatPrice(price));
|
||||
}
|
||||
}
|
||||
final PaymentMethod paymentMethod = offer.getPaymentMethod();
|
||||
|
@ -207,30 +220,36 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
final boolean isNationalBanks = paymentMethod.equals(PaymentMethod.NATIONAL_BANK);
|
||||
final boolean isSepa = paymentMethod.equals(PaymentMethod.SEPA);
|
||||
if (offer.isMyOffer(keyRing) && offererPaymentAccountId != null && paymentAccount != null) {
|
||||
addLabelTextField(gridPane, ++rowIndex, "My trading account:", paymentAccount.getAccountName());
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("offerDetailsWindow.myTradingAccount"), paymentAccount.getAccountName());
|
||||
} else {
|
||||
final String method = Res.get(paymentMethod.getId());
|
||||
String paymentMethodLabel = Res.getWithCol("shared.paymentMethod");
|
||||
if (isNationalBanks || isSpecificBanks || isSepa) {
|
||||
String mathodWithBankId = method + bankId;
|
||||
if (BankUtil.isBankIdRequired(offer.getCountryCode()))
|
||||
addLabelTextField(gridPane, ++rowIndex, "Payment method (offerer's bank ID):", method + bankId);
|
||||
addLabelTextField(gridPane, ++rowIndex,
|
||||
paymentMethodLabel + " " + Res.get("offerDetailsWindow.offererBankId"),
|
||||
mathodWithBankId);
|
||||
else if (BankUtil.isBankNameRequired(offer.getCountryCode()))
|
||||
addLabelTextField(gridPane, ++rowIndex, "Payment method (offerer's bank name):", method + bankId);
|
||||
addLabelTextField(gridPane, ++rowIndex,
|
||||
paymentMethodLabel + " " + Res.get("offerDetailsWindow.offerersBankName"),
|
||||
mathodWithBankId);
|
||||
} else {
|
||||
addLabelTextField(gridPane, ++rowIndex, "Payment method:", method);
|
||||
addLabelTextField(gridPane, ++rowIndex, paymentMethodLabel, method);
|
||||
}
|
||||
}
|
||||
if (showAcceptedBanks) {
|
||||
if (paymentMethod.equals(PaymentMethod.SAME_BANK)) {
|
||||
addLabelTextField(gridPane, ++rowIndex, "Bank ID (e.g. BIC or SWIFT):", acceptedBanks.get(0));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("offerDetailsWindow.bankId"), acceptedBanks.get(0));
|
||||
} else if (isSpecificBanks) {
|
||||
String value = Joiner.on(", ").join(acceptedBanks);
|
||||
Tooltip tooltip = new Tooltip("Accepted banks: " + value);
|
||||
TextField acceptedBanksTextField = addLabelTextField(gridPane, ++rowIndex, "Accepted banks:", value).second;
|
||||
String acceptedBanksLabel = Res.getWithCol("shared.acceptedBanks");
|
||||
Tooltip tooltip = new Tooltip(acceptedBanksLabel + " " + value);
|
||||
TextField acceptedBanksTextField = addLabelTextField(gridPane, ++rowIndex, acceptedBanksLabel, value).second;
|
||||
acceptedBanksTextField.setMouseTransparent(false);
|
||||
acceptedBanksTextField.setTooltip(tooltip);
|
||||
}
|
||||
}
|
||||
|
||||
if (showAcceptedCountryCodes) {
|
||||
String countries;
|
||||
Tooltip tooltip = null;
|
||||
|
@ -261,27 +280,34 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
rows++;
|
||||
|
||||
addTitledGroupBg(gridPane, ++rowIndex, rows, Res.get("shared.details"), Layout.GROUP_DISTANCE);
|
||||
addLabelTextFieldWithCopyIcon(gridPane, rowIndex, Res.getWithCol("shared.offerId"), offer.getId(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("offerDetailsWindow.makersOnion"), offer.getOffererNodeAddress().getFullAddress());
|
||||
addLabelTextField(gridPane, ++rowIndex, "Creation date:", formatter.formatDateTime(offer.getDate()));
|
||||
addLabelTextField(gridPane, ++rowIndex, "Security deposit:", formatter.formatCoinWithCode(offer.getSecurityDeposit()));
|
||||
addLabelTextFieldWithCopyIcon(gridPane, rowIndex, Res.getWithCol("shared.offerId"), offer.getId(),
|
||||
Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("offerDetailsWindow.makersOnion"),
|
||||
offer.getOffererNodeAddress().getFullAddress());
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("offerDetailsWindow.creationDate"),
|
||||
formatter.formatDateTime(offer.getDate()));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.getWithCol("shared.securityDeposit"),
|
||||
formatter.formatCoinWithCode(offer.getSecurityDeposit()));
|
||||
|
||||
if (paymentMethodCountryCode != null)
|
||||
addLabelTextField(gridPane, ++rowIndex, "Offerer's country of bank:",
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("offerDetailsWindow.countryBank"),
|
||||
CountryUtil.getNameAndCode(paymentMethodCountryCode));
|
||||
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, "Accepted arbitrators:", formatter.arbitratorAddressesToString(offer.getArbitratorNodeAddresses()));
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("offerDetailsWindow.acceptedArbitrators"),
|
||||
formatter.arbitratorAddressesToString(offer.getArbitratorNodeAddresses()));
|
||||
if (offer.getOfferFeePaymentTxID() != null)
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, "Offer fee transaction ID:", offer.getOfferFeePaymentTxID());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.makerFeeTxId"), offer.getOfferFeePaymentTxID());
|
||||
|
||||
if (placeOfferHandlerOptional.isPresent()) {
|
||||
addTitledGroupBg(gridPane, ++rowIndex, 1, "Commitment", Layout.GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, rowIndex, "I agree:", Offer.TAC_OFFERER, Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addTitledGroupBg(gridPane, ++rowIndex, 1, Res.get("offerDetailsWindow.commitment"), Layout.GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, rowIndex, Res.get("offerDetailsWindow.agree"), Offer.TAC_OFFERER,
|
||||
Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
|
||||
addConfirmAndCancelButtons(true);
|
||||
} else if (takeOfferHandlerOptional.isPresent()) {
|
||||
addTitledGroupBg(gridPane, ++rowIndex, 1, "Contract", Layout.GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, rowIndex, "Terms and conditions:", Offer.TAC_TAKER, Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addTitledGroupBg(gridPane, ++rowIndex, 1, Res.get("shared.contract"), Layout.GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, rowIndex, Res.get("offerDetailsWindow.tac"), Offer.TAC_TAKER,
|
||||
Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
|
||||
addConfirmAndCancelButtons(false);
|
||||
} else {
|
||||
|
@ -296,14 +322,19 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
private void addConfirmAndCancelButtons(boolean isPlaceOffer) {
|
||||
boolean isBuyOffer = offer.getDirection() == Offer.Direction.BUY;
|
||||
boolean isBuyerRole = isPlaceOffer ? isBuyOffer : !isBuyOffer;
|
||||
|
||||
String placeOfferButtonText = isBuyerRole ? "Confirm: Place offer to buy bitcoin" : "Confirm: Place offer to sell bitcoin";
|
||||
String takeOfferButtonText = isBuyerRole ? "Confirm: Take offer to buy bitcoin" : "Confirm: Take offer to sell bitcoin";
|
||||
String placeOfferButtonText = isBuyerRole ?
|
||||
Res.get("offerDetailsWindow.confirm.maker", Res.get("shared.buy")) :
|
||||
Res.get("offerDetailsWindow.confirm.maker", Res.get("shared.sell"));
|
||||
String takeOfferButtonText = isBuyerRole ?
|
||||
Res.get("offerDetailsWindow.confirm.taker", Res.get("shared.buy")) :
|
||||
Res.get("offerDetailsWindow.confirm.taker", Res.get("shared.sell"));
|
||||
|
||||
ImageView iconView = new ImageView();
|
||||
iconView.setId(isBuyerRole ? "image-buy-white" : "image-sell-white");
|
||||
|
||||
Tuple3<Button, BusyAnimation, Label> placeOfferTuple = addButtonBusyAnimationLabelAfterGroup(gridPane, ++rowIndex, isPlaceOffer ? placeOfferButtonText : takeOfferButtonText);
|
||||
Tuple3<Button, BusyAnimation, Label> placeOfferTuple = addButtonBusyAnimationLabelAfterGroup(gridPane,
|
||||
++rowIndex,
|
||||
isPlaceOffer ? placeOfferButtonText : takeOfferButtonText);
|
||||
|
||||
Button button = placeOfferTuple.first;
|
||||
button.setMinHeight(40);
|
||||
|
@ -337,10 +368,10 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
takeOfferHandlerOptional.get().run();
|
||||
}
|
||||
} else {
|
||||
new Popup().warning("You have no arbitrator selected.\n" +
|
||||
"Please select at least one arbitrator.").show();
|
||||
new Popup().warning(Res.get("offerDetailsWindow.warn.noArbitrator")).show();
|
||||
|
||||
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, ArbitratorSelectionView.class);
|
||||
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class,
|
||||
ArbitratorSelectionView.class);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package io.bitsquare.gui.main.overlays.windows;
|
||||
|
||||
import io.bitsquare.gui.main.overlays.Overlay;
|
||||
import io.bitsquare.locale.Res;
|
||||
import javafx.geometry.HPos;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.Label;
|
||||
|
@ -33,8 +34,8 @@ public class QRCodeWindow extends Overlay<QRCodeWindow> {
|
|||
|
||||
type = Type.Information;
|
||||
width = 400;
|
||||
headLine("QR-Code");
|
||||
message("Please use that QR-Code for funding your Bitsquare wallet from your external wallet.");
|
||||
headLine(Res.get("qRCodeWindow.headline"));
|
||||
message(Res.get("qRCodeWindow.msg"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,7 +50,8 @@ public class QRCodeWindow extends Overlay<QRCodeWindow> {
|
|||
GridPane.setHalignment(qrCodeImageView, HPos.CENTER);
|
||||
gridPane.getChildren().add(qrCodeImageView);
|
||||
|
||||
Label infoLabel = new Label("Payment request:\n" + bitcoinURI.replace("%20", " ").replace("?", "\n?").replace("&", "\n&"));
|
||||
String request = bitcoinURI.replace("%20", " ").replace("?", "\n?").replace("&", "\n&");
|
||||
Label infoLabel = new Label(Res.get("qRCodeWindow.request", request));
|
||||
infoLabel.setMouseTransparent(true);
|
||||
infoLabel.setWrapText(true);
|
||||
infoLabel.setId("popup-qr-code-info");
|
||||
|
|
|
@ -40,6 +40,7 @@ import static io.bitsquare.gui.util.FormBuilder.addMultilineLabel;
|
|||
|
||||
public class SelectDepositTxWindow extends Overlay<SelectDepositTxWindow> {
|
||||
private static final Logger log = LoggerFactory.getLogger(SelectDepositTxWindow.class);
|
||||
|
||||
private ComboBox<Transaction> transactionsComboBox;
|
||||
private List<Transaction> transactions;
|
||||
private Optional<Consumer<Transaction>> selectHandlerOptional;
|
||||
|
@ -56,7 +57,7 @@ public class SelectDepositTxWindow extends Overlay<SelectDepositTxWindow> {
|
|||
|
||||
public void show() {
|
||||
if (headLine == null)
|
||||
headLine = "Select deposit transaction for dispute";
|
||||
headLine = Res.get("selectDepositTxWindow.headline");
|
||||
|
||||
width = 700;
|
||||
createGridPane();
|
||||
|
@ -83,21 +84,10 @@ public class SelectDepositTxWindow extends Overlay<SelectDepositTxWindow> {
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void addContent() {
|
||||
Label label = addMultilineLabel(gridPane, ++rowIndex,
|
||||
"The deposit transaction was not stored in the trade.\n" +
|
||||
"Please select one of the existing MultiSig transactions from your wallet which was the " +
|
||||
"deposit transaction used in the failed trade.\n\n" +
|
||||
"You can find the correct transaction by opening the trade details window (click on the trade ID in the list)" +
|
||||
" and following the offer fee payment transaction output to the next transaction where you see " +
|
||||
"the Multisig deposit transaction (the address starts with 3). That transaction ID should be " +
|
||||
"visible in the list presented here. Once you found the correct transaction select that transaction here and continue.\n\n" +
|
||||
"Sorry for the inconvenience but that error case should be happen very rare and in future we will try " +
|
||||
"to find better ways to resolve it.",
|
||||
10);
|
||||
|
||||
Label label = addMultilineLabel(gridPane, ++rowIndex, Res.get("selectDepositTxWindow.msg"), 10);
|
||||
GridPane.setMargin(label, new Insets(0, 0, 10, 0));
|
||||
|
||||
Tuple2<Label, ComboBox> tuple = addLabelComboBox(gridPane, ++rowIndex, "Select deposit transaction");
|
||||
Tuple2<Label, ComboBox> tuple = addLabelComboBox(gridPane, ++rowIndex, Res.get("selectDepositTxWindow.select"));
|
||||
transactionsComboBox = tuple.second;
|
||||
transactionsComboBox.setPromptText(Res.get("shared.select"));
|
||||
transactionsComboBox.setConverter(new StringConverter<Transaction>() {
|
||||
|
|
|
@ -22,6 +22,7 @@ import io.bitsquare.common.util.Tuple2;
|
|||
import io.bitsquare.gui.components.InputTextField;
|
||||
import io.bitsquare.gui.main.overlays.Overlay;
|
||||
import io.bitsquare.gui.main.overlays.popups.Popup;
|
||||
import io.bitsquare.locale.Res;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
|
@ -38,6 +39,7 @@ import static io.bitsquare.gui.util.FormBuilder.*;
|
|||
|
||||
public class SendAlertMessageWindow extends Overlay<SendAlertMessageWindow> {
|
||||
private static final Logger log = LoggerFactory.getLogger(SendAlertMessageWindow.class);
|
||||
|
||||
private Button sendButton;
|
||||
private SendAlertMessageHandler sendAlertMessageHandler;
|
||||
private RemoveAlertMessageHandler removeAlertMessageHandler;
|
||||
|
@ -65,7 +67,7 @@ public class SendAlertMessageWindow extends Overlay<SendAlertMessageWindow> {
|
|||
|
||||
public void show() {
|
||||
if (headLine == null)
|
||||
headLine = "Send global notification";
|
||||
headLine = Res.get("sendAlertMessageWindow.headline");
|
||||
|
||||
width = 600;
|
||||
createGridPane();
|
||||
|
@ -86,6 +88,7 @@ public class SendAlertMessageWindow extends Overlay<SendAlertMessageWindow> {
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Protected
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -103,44 +106,51 @@ public class SendAlertMessageWindow extends Overlay<SendAlertMessageWindow> {
|
|||
}
|
||||
|
||||
private void addContent() {
|
||||
InputTextField keyInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Alert private key:", 10).second;
|
||||
InputTextField keyInputTextField = addLabelInputTextField(gridPane, ++rowIndex,
|
||||
Res.get("shared.unlock"), 10).second;
|
||||
|
||||
Tuple2<Label, TextArea> labelTextAreaTuple2 = addLabelTextArea(gridPane, ++rowIndex, "Alert message:", "Enter message");
|
||||
Tuple2<Label, TextArea> labelTextAreaTuple2 = addLabelTextArea(gridPane, ++rowIndex,
|
||||
Res.get("sendAlertMessageWindow.alertMsg"),
|
||||
Res.get("sendAlertMessageWindow.enterMsg"));
|
||||
TextArea alertMessageTextArea = labelTextAreaTuple2.second;
|
||||
Label first = labelTextAreaTuple2.first;
|
||||
first.setMinWidth(150);
|
||||
CheckBox isUpdateCheckBox = addLabelCheckBox(gridPane, ++rowIndex, "Is update notification:", "").second;
|
||||
CheckBox isUpdateCheckBox = addLabelCheckBox(gridPane, ++rowIndex,
|
||||
Res.get("sendAlertMessageWindow.isUpdate"), "").second;
|
||||
isUpdateCheckBox.setSelected(true);
|
||||
|
||||
InputTextField versionInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "New version no.:").second;
|
||||
InputTextField versionInputTextField = addLabelInputTextField(gridPane, ++rowIndex,
|
||||
Res.get("sendAlertMessageWindow.version")).second;
|
||||
versionInputTextField.disableProperty().bind(isUpdateCheckBox.selectedProperty().not());
|
||||
|
||||
sendButton = new Button("Send notification");
|
||||
sendButton = new Button(Res.get("sendAlertMessageWindow.send"));
|
||||
sendButton.setOnAction(e -> {
|
||||
if (alertMessageTextArea.getText().length() > 0 && keyInputTextField.getText().length() > 0) {
|
||||
if (sendAlertMessageHandler.handle(
|
||||
new Alert(alertMessageTextArea.getText(), isUpdateCheckBox.isSelected(), versionInputTextField.getText()),
|
||||
new Alert(alertMessageTextArea.getText(),
|
||||
isUpdateCheckBox.isSelected(),
|
||||
versionInputTextField.getText()),
|
||||
keyInputTextField.getText()))
|
||||
hide();
|
||||
else
|
||||
new Popup().warning("The key you entered was not correct.").width(300).onClose(() -> blurAgain()).show();
|
||||
new Popup().warning(Res.get("shared.invalidKey")).width(300).onClose(this::blurAgain).show();
|
||||
}
|
||||
});
|
||||
|
||||
Button removeAlertMessageButton = new Button("Remove notification");
|
||||
Button removeAlertMessageButton = new Button(Res.get("sendAlertMessageWindow.remove"));
|
||||
removeAlertMessageButton.setOnAction(e -> {
|
||||
if (keyInputTextField.getText().length() > 0) {
|
||||
if (removeAlertMessageHandler.handle(keyInputTextField.getText()))
|
||||
hide();
|
||||
else
|
||||
new Popup().warning("The key you entered was not correct.").width(300).onClose(() -> blurAgain()).show();
|
||||
new Popup().warning(Res.get("shared.invalidKey")).width(300).onClose(this::blurAgain).show();
|
||||
}
|
||||
});
|
||||
|
||||
closeButton = new Button(Res.get("shared.close"));
|
||||
closeButton.setOnAction(e -> {
|
||||
hide();
|
||||
closeHandlerOptional.ifPresent(closeHandler -> closeHandler.run());
|
||||
closeHandlerOptional.ifPresent(Runnable::run);
|
||||
});
|
||||
|
||||
HBox hBox = new HBox();
|
||||
|
@ -151,6 +161,4 @@ public class SendAlertMessageWindow extends Overlay<SendAlertMessageWindow> {
|
|||
gridPane.getChildren().add(hBox);
|
||||
GridPane.setMargin(hBox, new Insets(10, 0, 0, 0));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import io.bitsquare.common.util.Tuple2;
|
|||
import io.bitsquare.gui.components.InputTextField;
|
||||
import io.bitsquare.gui.main.overlays.Overlay;
|
||||
import io.bitsquare.gui.main.overlays.popups.Popup;
|
||||
import io.bitsquare.locale.Res;
|
||||
import io.bitsquare.p2p.NodeAddress;
|
||||
import io.bitsquare.p2p.messaging.SendMailboxMessageListener;
|
||||
import javafx.geometry.Insets;
|
||||
|
@ -70,7 +71,7 @@ public class SendPrivateNotificationWindow extends Overlay<SendPrivateNotificati
|
|||
|
||||
public void show() {
|
||||
if (headLine == null)
|
||||
headLine = "Send private message";
|
||||
headLine = Res.get("sendPrivateNotificationWindow.headline");
|
||||
|
||||
width = 800;
|
||||
createGridPane();
|
||||
|
@ -104,13 +105,16 @@ public class SendPrivateNotificationWindow extends Overlay<SendPrivateNotificati
|
|||
}
|
||||
|
||||
private void addContent() {
|
||||
InputTextField keyInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Key for private notification:", 10).second;
|
||||
Tuple2<Label, TextArea> labelTextAreaTuple2 = addLabelTextArea(gridPane, ++rowIndex, "Private notification:", "Enter notification");
|
||||
InputTextField keyInputTextField = addLabelInputTextField(gridPane, ++rowIndex,
|
||||
Res.get("shared.unlock"), 10).second;
|
||||
Tuple2<Label, TextArea> labelTextAreaTuple2 = addLabelTextArea(gridPane, ++rowIndex,
|
||||
Res.get("sendPrivateNotificationWindow.privateNotification"),
|
||||
Res.get("sendPrivateNotificationWindow.enterNotification"));
|
||||
TextArea alertMessageTextArea = labelTextAreaTuple2.second;
|
||||
Label first = labelTextAreaTuple2.first;
|
||||
first.setMinWidth(200);
|
||||
|
||||
sendButton = new Button("Send private notification");
|
||||
sendButton = new Button(Res.get("sendPrivateNotificationWindow.send"));
|
||||
sendButton.setOnAction(e -> {
|
||||
if (alertMessageTextArea.getText().length() > 0 && keyInputTextField.getText().length() > 0) {
|
||||
if (!sendPrivateNotificationHandler.handle(
|
||||
|
@ -122,28 +126,31 @@ public class SendPrivateNotificationWindow extends Overlay<SendPrivateNotificati
|
|||
@Override
|
||||
public void onArrived() {
|
||||
log.trace("PrivateNotificationMessage arrived at peer.");
|
||||
new Popup<>().feedback("Message arrived.").onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
new Popup<>().feedback(Res.get("shared.messageArrived"))
|
||||
.onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStoredInMailbox() {
|
||||
log.trace("PrivateNotificationMessage was stored in mailbox.");
|
||||
new Popup<>().feedback("Message stored in mailbox.").onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
new Popup<>().feedback(Res.get("shared.messageStoredInMailbox"))
|
||||
.onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFault(String errorMessage) {
|
||||
new Popup<>().feedback("Message sending failed. error=" + errorMessage).onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
new Popup<>().feedback(Res.get("shared.messageSendingFailed", errorMessage))
|
||||
.onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
}
|
||||
}))
|
||||
new Popup().warning("The key you entered was not correct.").width(300).onClose(() -> blurAgain()).show();
|
||||
new Popup().warning(Res.get("shared.invalidKey")).width(300).onClose(this::blurAgain).show();
|
||||
}
|
||||
});
|
||||
|
||||
closeButton = new Button(Res.get("shared.close"));
|
||||
closeButton.setOnAction(e -> {
|
||||
hide();
|
||||
closeHandlerOptional.ifPresent(closeHandler -> closeHandler.run());
|
||||
closeHandlerOptional.ifPresent(Runnable::run);
|
||||
});
|
||||
|
||||
HBox hBox = new HBox();
|
||||
|
|
|
@ -21,6 +21,7 @@ import io.bitsquare.btc.wallet.WalletsManager;
|
|||
import io.bitsquare.common.util.Tuple2;
|
||||
import io.bitsquare.common.util.Utilities;
|
||||
import io.bitsquare.gui.main.overlays.Overlay;
|
||||
import io.bitsquare.locale.Res;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.Label;
|
||||
|
@ -34,6 +35,7 @@ import static io.bitsquare.gui.util.FormBuilder.addLabelTextArea;
|
|||
|
||||
public class ShowWalletDataWindow extends Overlay<ShowWalletDataWindow> {
|
||||
private static final Logger log = LoggerFactory.getLogger(ShowWalletDataWindow.class);
|
||||
|
||||
private final WalletsManager walletsManager;
|
||||
|
||||
|
||||
|
@ -48,7 +50,7 @@ public class ShowWalletDataWindow extends Overlay<ShowWalletDataWindow> {
|
|||
|
||||
public void show() {
|
||||
if (headLine == null)
|
||||
headLine = "Wallet data";
|
||||
headLine = Res.get("showWalletDataWindow.walletData");
|
||||
|
||||
width = 1200;
|
||||
createGridPane();
|
||||
|
@ -77,13 +79,15 @@ public class ShowWalletDataWindow extends Overlay<ShowWalletDataWindow> {
|
|||
}
|
||||
|
||||
private void addContent() {
|
||||
Tuple2<Label, TextArea> labelTextAreaTuple2 = addLabelTextArea(gridPane, ++rowIndex, "Wallet data:", "");
|
||||
Tuple2<Label, TextArea> labelTextAreaTuple2 = addLabelTextArea(gridPane, ++rowIndex,
|
||||
Res.getWithCol("showWalletDataWindow.walletData"), "");
|
||||
TextArea textArea = labelTextAreaTuple2.second;
|
||||
Label label = labelTextAreaTuple2.first;
|
||||
label.setMinWidth(150);
|
||||
textArea.setPrefHeight(500);
|
||||
textArea.setStyle("-fx-font-size: 10;");
|
||||
CheckBox isUpdateCheckBox = addLabelCheckBox(gridPane, ++rowIndex, "Include private keys:", "").second;
|
||||
CheckBox isUpdateCheckBox = addLabelCheckBox(gridPane, ++rowIndex,
|
||||
Res.get("showWalletDataWindow.includePrivKeys"), "").second;
|
||||
isUpdateCheckBox.setSelected(false);
|
||||
|
||||
isUpdateCheckBox.selectedProperty().addListener((observable, oldValue, newValue) -> {
|
||||
|
@ -92,7 +96,7 @@ public class ShowWalletDataWindow extends Overlay<ShowWalletDataWindow> {
|
|||
|
||||
showWallet(textArea, isUpdateCheckBox);
|
||||
|
||||
actionButtonText("Copy to clipboard");
|
||||
actionButtonText(Res.get("shared.copyToClipboard"));
|
||||
onAction(() -> Utilities.copyToClipboard(textArea.getText()));
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import javax.annotation.Nullable;
|
|||
|
||||
import static io.bitsquare.gui.util.FormBuilder.addLabelInputTextField;
|
||||
|
||||
// We dont translate here as it is for dev only purpose
|
||||
public class SpendFromDepositTxWindow extends Overlay<SpendFromDepositTxWindow> {
|
||||
private static final Logger log = LoggerFactory.getLogger(SpendFromDepositTxWindow.class);
|
||||
private final TradeWalletService tradeWalletService;
|
||||
|
@ -54,7 +55,7 @@ public class SpendFromDepositTxWindow extends Overlay<SpendFromDepositTxWindow>
|
|||
|
||||
public void show() {
|
||||
if (headLine == null)
|
||||
headLine = "Emergency MultiSig payout tool";
|
||||
headLine = "Emergency MultiSig payout tool"; // We dont translate here as it is for dev only purpose
|
||||
|
||||
width = 1000;
|
||||
createGridPane();
|
||||
|
@ -83,6 +84,7 @@ public class SpendFromDepositTxWindow extends Overlay<SpendFromDepositTxWindow>
|
|||
}
|
||||
|
||||
private void addContent() {
|
||||
// We dont translate here as it is for dev only purpose
|
||||
InputTextField depositTxHex = addLabelInputTextField(gridPane, ++rowIndex, "depositTxHex:").second;
|
||||
|
||||
InputTextField buyerPayoutAmount = addLabelInputTextField(gridPane, ++rowIndex, "buyerPayoutAmount:").second;
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.google.inject.Inject;
|
|||
import io.bitsquare.app.BitsquareApp;
|
||||
import io.bitsquare.app.DevFlags;
|
||||
import io.bitsquare.gui.main.overlays.Overlay;
|
||||
import io.bitsquare.locale.Res;
|
||||
import io.bitsquare.user.Preferences;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -23,7 +24,10 @@ public class TacWindow extends Overlay<TacWindow> {
|
|||
|
||||
public void showIfNeeded() {
|
||||
if (!preferences.getTacAccepted() && !DevFlags.DEV_MODE) {
|
||||
headLine("User agreement");
|
||||
headLine(Res.get("tacWindow.headline"));
|
||||
|
||||
// We do not translate the tacs because of the legal nature. We would need translations checked by lawyers
|
||||
// in each language which is too expensive atm.
|
||||
String text = "1. This software is experimental and provided \"as is\", without warranty of any kind, " +
|
||||
"express or implied, including but not limited to the warranties of " +
|
||||
"merchantability, fitness for a particular purpose and non-infringement.\n" +
|
||||
|
@ -42,8 +46,8 @@ public class TacWindow extends Overlay<TacWindow> {
|
|||
"For more details and a general overview please read the full documentation about the " +
|
||||
"arbitration system and the dispute process.";
|
||||
message(text);
|
||||
actionButtonText("I agree");
|
||||
closeButtonText("I disagree and quit");
|
||||
actionButtonText(Res.get("tacWindow.agree"));
|
||||
closeButtonText(Res.get("tacWindow.disagree"));
|
||||
onAction(() -> preferences.setTacAccepted(true));
|
||||
onClose(BitsquareApp.shutDownHandler::run);
|
||||
|
||||
|
@ -54,7 +58,7 @@ public class TacWindow extends Overlay<TacWindow> {
|
|||
@Override
|
||||
protected void addMessage() {
|
||||
super.addMessage();
|
||||
addHyperlinkWithIcon(gridPane, ++rowIndex, "Arbitration system", "https://bitsquare.io/arbitration_system.pdf", -6);
|
||||
addHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("tacWindow.arbitrationSystem"), "https://bitsquare.io/arbitration_system.pdf", -6);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -109,25 +109,35 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
|
|||
Contract contract = trade.getContract();
|
||||
|
||||
int rows = 5;
|
||||
addTitledGroupBg(gridPane, ++rowIndex, rows, "Trade");
|
||||
addTitledGroupBg(gridPane, ++rowIndex, rows, Res.get("tradeDetailsWindow.headline"));
|
||||
|
||||
boolean myOffer = tradeManager.isMyOffer(offer);
|
||||
String fiatDirectionInfo;
|
||||
String btcDirectionInfo;
|
||||
String toReceive = " " + Res.get("shared.toReceive");
|
||||
String toSpend = " " + Res.get("shared.toSpend");
|
||||
String offerType = Res.getWithCol("shared.offerType");
|
||||
if (tradeManager.isBuyer(offer)) {
|
||||
addLabelTextField(gridPane, rowIndex, Res.getWithCol("shared.offerType"), formatter.getDirectionForBuyer(myOffer, offer.getCurrencyCode()), Layout.FIRST_ROW_DISTANCE);
|
||||
fiatDirectionInfo = " to spend:";
|
||||
btcDirectionInfo = " to receive:";
|
||||
addLabelTextField(gridPane, rowIndex, offerType,
|
||||
formatter.getDirectionForBuyer(myOffer, offer.getCurrencyCode()), Layout.FIRST_ROW_DISTANCE);
|
||||
fiatDirectionInfo = toSpend;
|
||||
btcDirectionInfo = toReceive;
|
||||
} else {
|
||||
addLabelTextField(gridPane, rowIndex, Res.getWithCol("shared.offerType"), formatter.getDirectionForSeller(myOffer, offer.getCurrencyCode()), Layout.FIRST_ROW_DISTANCE);
|
||||
fiatDirectionInfo = " to receive:";
|
||||
btcDirectionInfo = " to spend:";
|
||||
addLabelTextField(gridPane, rowIndex, offerType,
|
||||
formatter.getDirectionForSeller(myOffer, offer.getCurrencyCode()), Layout.FIRST_ROW_DISTANCE);
|
||||
fiatDirectionInfo = toReceive;
|
||||
btcDirectionInfo = toSpend;
|
||||
}
|
||||
|
||||
addLabelTextField(gridPane, ++rowIndex, "Bitcoin amount" + btcDirectionInfo, formatter.formatCoinWithCode(trade.getTradeAmount()));
|
||||
addLabelTextField(gridPane, ++rowIndex, formatter.formatVolumeLabel(offer.getCurrencyCode()) + fiatDirectionInfo, formatter.formatVolumeWithCode(trade.getTradeVolume()));
|
||||
addLabelTextField(gridPane, ++rowIndex, "Trade price:", formatter.formatPrice(trade.getTradePrice()));
|
||||
addLabelTextField(gridPane, ++rowIndex, "Payment method:", Res.get(offer.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("shared.btcAmount") + btcDirectionInfo,
|
||||
formatter.formatCoinWithCode(trade.getTradeAmount()));
|
||||
addLabelTextField(gridPane, ++rowIndex,
|
||||
formatter.formatVolumeLabel(offer.getCurrencyCode()) + fiatDirectionInfo,
|
||||
formatter.formatVolumeWithCode(trade.getTradeVolume()));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("shared.tradePrice"),
|
||||
formatter.formatPrice(trade.getTradePrice()));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.getWithCol("shared.paymentMethod"),
|
||||
Res.get(offer.getPaymentMethod().getId()));
|
||||
|
||||
// second group
|
||||
rows = 6;
|
||||
|
@ -160,7 +170,8 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
|
|||
rows++;
|
||||
if (trade.getPayoutTx() != null)
|
||||
rows++;
|
||||
boolean showDisputedTx = disputeManager.findOwnDispute(trade.getId()).isPresent() && disputeManager.findOwnDispute(trade.getId()).get().getDisputePayoutTxId() != null;
|
||||
boolean showDisputedTx = disputeManager.findOwnDispute(trade.getId()).isPresent() &&
|
||||
disputeManager.findOwnDispute(trade.getId()).get().getDisputePayoutTxId() != null;
|
||||
if (showDisputedTx)
|
||||
rows++;
|
||||
if (trade.errorMessageProperty().get() != null)
|
||||
|
@ -169,41 +180,56 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
|
|||
rows++;
|
||||
|
||||
addTitledGroupBg(gridPane, ++rowIndex, rows, Res.get("shared.details"), Layout.GROUP_DISTANCE);
|
||||
addLabelTextFieldWithCopyIcon(gridPane, rowIndex, "Trade ID:", trade.getId(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++rowIndex, "Trade date:", formatter.formatDateTime(trade.getDate()));
|
||||
addLabelTextField(gridPane, ++rowIndex, "Security deposit:", formatter.formatCoinWithCode(offer.getSecurityDeposit()));
|
||||
addLabelTextField(gridPane, ++rowIndex, "Tx fee:", formatter.formatCoinWithCode(trade.getTxFee()));
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, "Selected arbitrator:", trade.getArbitratorNodeAddress().getFullAddress());
|
||||
addLabelTextFieldWithCopyIcon(gridPane, rowIndex, Res.get("shared.tradeId"),
|
||||
trade.getId(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("tradeDetailsWindow.tradeDate"),
|
||||
formatter.formatDateTime(trade.getDate()));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.getWithCol("shared.securityDeposit"),
|
||||
formatter.formatCoinWithCode(offer.getSecurityDeposit()));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.get("tradeDetailsWindow.txFee"),
|
||||
formatter.formatCoinWithCode(trade.getTxFee()));
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("shared.arbitrator"),
|
||||
trade.getArbitratorNodeAddress().getFullAddress());
|
||||
|
||||
if (trade.getTradingPeerNodeAddress() != null)
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, "Trading peers onion address:", trade.getTradingPeerNodeAddress().getFullAddress());
|
||||
addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("tradeDetailsWindow.tradingPeersOnion"),
|
||||
trade.getTradingPeerNodeAddress().getFullAddress());
|
||||
|
||||
if (contract != null) {
|
||||
if (buyerPaymentAccountContractData != null) {
|
||||
TextFieldWithCopyIcon tf = addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, "BTC buyer payment details:", Res.get(buyerPaymentAccountContractData.getPaymentDetails())).second;
|
||||
TextFieldWithCopyIcon tf = addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex,
|
||||
Res.get("shared.paymentDetails", Res.get("shared.buyer")),
|
||||
Res.get(buyerPaymentAccountContractData.getPaymentDetails())).second;
|
||||
tf.setTooltip(new Tooltip(tf.getText()));
|
||||
}
|
||||
if (sellerPaymentAccountContractData != null) {
|
||||
TextFieldWithCopyIcon tf = addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, "BTC seller payment details:", Res.get(sellerPaymentAccountContractData.getPaymentDetails())).second;
|
||||
TextFieldWithCopyIcon tf = addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex,
|
||||
Res.get("shared.paymentDetails", Res.get("shared.seller")),
|
||||
Res.get(sellerPaymentAccountContractData.getPaymentDetails())).second;
|
||||
tf.setTooltip(new Tooltip(tf.getText()));
|
||||
}
|
||||
if (buyerPaymentAccountContractData == null && sellerPaymentAccountContractData == null)
|
||||
addLabelTextField(gridPane, ++rowIndex, "Payment method:", Res.get(contract.getPaymentMethodName()));
|
||||
addLabelTextField(gridPane, ++rowIndex, Res.getWithCol("shared.paymentMethod"),
|
||||
Res.get(contract.getPaymentMethodName()));
|
||||
}
|
||||
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, "Offer fee transaction ID:", offer.getOfferFeePaymentTxID());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.makerFeeTxId"), offer.getOfferFeePaymentTxID());
|
||||
if (trade.getTakeOfferFeeTxId() != null)
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, "Taker fee transaction ID:", trade.getTakeOfferFeeTxId());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.takerFeeTxId"), trade.getTakeOfferFeeTxId());
|
||||
|
||||
if (trade.getDepositTx() != null)
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.getWithCol("shared.depositTransactionId"), trade.getDepositTx().getHashAsString());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.getWithCol("shared.depositTransactionId"),
|
||||
trade.getDepositTx().getHashAsString());
|
||||
if (trade.getPayoutTx() != null)
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, "Payout transaction ID:", trade.getPayoutTx().getHashAsString());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.payoutTxId"),
|
||||
trade.getPayoutTx().getHashAsString());
|
||||
if (showDisputedTx)
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, "Disputed payout transaction ID:", disputeManager.findOwnDispute(trade.getId()).get().getDisputePayoutTxId());
|
||||
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("tradeDetailsWindow.disputedPayoutTxId"),
|
||||
disputeManager.findOwnDispute(trade.getId()).get().getDisputePayoutTxId());
|
||||
|
||||
if (contract != null) {
|
||||
Button viewContractButton = addLabelButton(gridPane, ++rowIndex, "Contract in JSON format:", "View contract", 0).second;
|
||||
Button viewContractButton = addLabelButton(gridPane, ++rowIndex, Res.get("shared.contractAsJson"),
|
||||
Res.get("shared.viewContractAsJson"), 0).second;
|
||||
viewContractButton.setDefaultButton(false);
|
||||
viewContractButton.setOnAction(e -> {
|
||||
TextArea textArea = new TextArea();
|
||||
|
@ -215,7 +241,7 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
|
|||
|
||||
Scene viewContractScene = new Scene(textArea);
|
||||
Stage viewContractStage = new Stage();
|
||||
viewContractStage.setTitle("Contract for trade with ID: " + trade.getShortId());
|
||||
viewContractStage.setTitle(Res.get("shared.contract.title", trade.getShortId()));
|
||||
viewContractStage.setScene(viewContractScene);
|
||||
if (owner == null)
|
||||
owner = MainView.getRootContainer();
|
||||
|
@ -233,7 +259,7 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
|
|||
}
|
||||
|
||||
if (trade.errorMessageProperty().get() != null) {
|
||||
textArea = addLabelTextArea(gridPane, ++rowIndex, "Error message:", "").second;
|
||||
textArea = addLabelTextArea(gridPane, ++rowIndex, Res.get("shared.errorMessage"), "").second;
|
||||
textArea.setText(trade.errorMessageProperty().get());
|
||||
textArea.setEditable(false);
|
||||
|
||||
|
@ -247,7 +273,7 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
|
|||
textArea.scrollTopProperty().addListener(changeListener);
|
||||
textArea.setScrollTop(30);
|
||||
|
||||
TextField state = addLabelTextField(gridPane, ++rowIndex, "Trade state:").second;
|
||||
TextField state = addLabelTextField(gridPane, ++rowIndex, Res.get("tradeDetailsWindow.tradeState")).second;
|
||||
state.setText(trade.getState().getPhase().name());
|
||||
}
|
||||
|
||||
|
@ -255,7 +281,7 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
|
|||
//TODO app wide focus
|
||||
//closeButton.requestFocus();
|
||||
closeButton.setOnAction(e -> {
|
||||
closeHandlerOptional.ifPresent(closeHandler -> closeHandler.run());
|
||||
closeHandlerOptional.ifPresent(Runnable::run);
|
||||
hide();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
}
|
||||
|
||||
if (headLine == null)
|
||||
headLine = "Enter password to unlock";
|
||||
headLine = Res.get("walletPasswordWindow.headline");
|
||||
|
||||
createGridPane();
|
||||
addHeadLine();
|
||||
|
@ -165,12 +165,11 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
}
|
||||
|
||||
private void addInputFields() {
|
||||
Label label = new Label("Enter password:");
|
||||
Label label = new Label(Res.get("password.enterPassword"));
|
||||
label.setWrapText(true);
|
||||
GridPane.setMargin(label, new Insets(3, 0, 0, 0));
|
||||
GridPane.setRowIndex(label, ++rowIndex);
|
||||
|
||||
|
||||
passwordTextField = new PasswordTextField();
|
||||
GridPane.setMargin(passwordTextField, new Insets(3, 0, 0, 0));
|
||||
GridPane.setRowIndex(passwordTextField, rowIndex);
|
||||
|
@ -185,16 +184,16 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
BusyAnimation busyAnimation = new BusyAnimation(false);
|
||||
Label deriveStatusLabel = new Label();
|
||||
|
||||
unlockButton = new Button("Unlock");
|
||||
unlockButton = new Button(Res.get("shared.unlock"));
|
||||
unlockButton.setDefaultButton(true);
|
||||
unlockButton.setDisable(true);
|
||||
unlockButton.setOnAction(e -> {
|
||||
String password = passwordTextField.getText();
|
||||
checkArgument(password.length() < 50, "Password must be less then 50 characters.");
|
||||
checkArgument(password.length() < 50, Res.get("password.tooLong"));
|
||||
KeyCrypterScrypt keyCrypterScrypt = walletsManager.getKeyCrypterScrypt();
|
||||
if (keyCrypterScrypt != null) {
|
||||
busyAnimation.play();
|
||||
deriveStatusLabel.setText("Derive key from password");
|
||||
deriveStatusLabel.setText(Res.get("password.deriveKey"));
|
||||
ScryptUtil.deriveKeyWithScrypt(keyCrypterScrypt, password, aesKey -> {
|
||||
if (walletsManager.checkAESKey(aesKey)) {
|
||||
if (aesKeyHandler != null)
|
||||
|
@ -206,8 +205,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
deriveStatusLabel.setText("");
|
||||
|
||||
UserThread.runAfter(() -> new Popup()
|
||||
.warning("You entered the wrong password.\n\n" +
|
||||
"Please try entering your password again, carefully checking for typos or spelling errors.")
|
||||
.warning(Res.get("password.wrongPw"))
|
||||
.onClose(this::blurAgain).show(), Transitions.DEFAULT_DURATION, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
});
|
||||
|
@ -216,7 +214,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
}
|
||||
});
|
||||
|
||||
forgotPasswordButton = new Button("Forgot password?");
|
||||
forgotPasswordButton = new Button(Res.get("password.forgotPassword"));
|
||||
forgotPasswordButton.setOnAction(e -> {
|
||||
forgotPasswordButton.setDisable(true);
|
||||
unlockButton.setDefaultButton(false);
|
||||
|
@ -251,7 +249,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
}
|
||||
|
||||
private void showRestoreScreen() {
|
||||
Label headLine2Label = new Label(Res.get("Restore wallet from seed words"));
|
||||
Label headLine2Label = new Label(Res.get(Res.get("seed.restore.title")));
|
||||
headLine2Label.setId("popup-headline");
|
||||
headLine2Label.setMouseTransparent(true);
|
||||
GridPane.setHalignment(headLine2Label, HPos.LEFT);
|
||||
|
@ -270,14 +268,15 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
|
||||
gridPane.getChildren().add(separator);
|
||||
|
||||
Tuple2<Label, TextArea> tuple = addLabelTextArea(gridPane, ++rowIndex, "Wallet seed words:", "", 5);
|
||||
Tuple2<Label, TextArea> tuple = addLabelTextArea(gridPane, ++rowIndex, Res.get("seed.seedWords"), "", 5);
|
||||
seedWordsTextArea = tuple.second;
|
||||
seedWordsTextArea.setPrefHeight(60);
|
||||
seedWordsTextArea.setStyle("-fx-border-color: #ddd;");
|
||||
|
||||
Tuple2<Label, DatePicker> labelDatePickerTuple2 = addLabelDatePicker(gridPane, ++rowIndex, "Creation Date:");
|
||||
Tuple2<Label, DatePicker> labelDatePickerTuple2 = addLabelDatePicker(gridPane, ++rowIndex,
|
||||
Res.get("seed.creationDate"));
|
||||
restoreDatePicker = labelDatePickerTuple2.second;
|
||||
restoreButton = addButton(gridPane, ++rowIndex, "Restore wallets");
|
||||
restoreButton = addButton(gridPane, ++rowIndex, Res.get("seed.restore"));
|
||||
restoreButton.setDefaultButton(true);
|
||||
stage.setHeight(340);
|
||||
|
||||
|
@ -333,16 +332,10 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
|
||||
private void onRestore() {
|
||||
if (walletsManager.hasPositiveBalance()) {
|
||||
new Popup()
|
||||
.warning("Your bitcoin wallet is not empty.\n\n" +
|
||||
"You must empty this wallet before attempting to restore an older one, as mixing wallets " +
|
||||
"together can lead to invalidated backups.\n\n" +
|
||||
"Please finalize your trades, close all your open offers and go to the Funds section to withdraw your bitcoin.\n" +
|
||||
"In case you cannot access your bitcoin you can use the emergency tool to empty the wallet.\n" +
|
||||
"To open that emergency tool press \"cmd + e\".")
|
||||
.actionButtonText("I want to restore anyway")
|
||||
new Popup().warning(Res.get("seed.warn.walletNotEmpty.msg"))
|
||||
.actionButtonText(Res.get("seed.warn.walletNotEmpty.restore"))
|
||||
.onAction(this::checkIfEncrypted)
|
||||
.closeButtonText("I will empty my wallet first")
|
||||
.closeButtonText(Res.get("seed.warn.walletNotEmpty.emptyWallet"))
|
||||
.show();
|
||||
} else {
|
||||
checkIfEncrypted();
|
||||
|
@ -351,10 +344,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
|
||||
private void checkIfEncrypted() {
|
||||
if (walletsManager.areWalletsEncrypted()) {
|
||||
new Popup()
|
||||
.information("Your bitcoin wallet is encrypted.\n\n" +
|
||||
"After restore, the wallet will no longer be encrypted and you must set a new password.\n\n" +
|
||||
"Do you want to proceed?")
|
||||
new Popup().information(Res.get("seed.warn.notEncryptedAnymore"))
|
||||
.closeButtonText(Res.get("shared.no"))
|
||||
.actionButtonText(Res.get("shared.yes"))
|
||||
.onAction(this::doRestore)
|
||||
|
@ -371,18 +361,13 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
seed,
|
||||
() -> UserThread.execute(() -> {
|
||||
log.debug("Wallet restored with seed words");
|
||||
|
||||
new Popup()
|
||||
.feedback("Wallet restored successfully with the new seed words.\n\n" +
|
||||
"You need to shut down and restart the application.")
|
||||
.useShutDownButton()
|
||||
.show();
|
||||
new Popup().feedback(Res.get("seed.restore.success"))
|
||||
.useShutDownButton();
|
||||
}),
|
||||
throwable -> UserThread.execute(() -> {
|
||||
log.error(throwable.getMessage());
|
||||
new Popup()
|
||||
.error("An error occurred when restoring the wallet with seed words.\n" +
|
||||
"Error message: " + throwable.getMessage())
|
||||
new Popup().error(Res.get("seed.restore.error", Res.get("shared.errorMessageInline",
|
||||
throwable.getMessage())))
|
||||
.show();
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ shared.spend=spend
|
|||
shared.bitcoin=bitcoin
|
||||
shared.P2P=P2P
|
||||
shared.offers=offers
|
||||
shared.Offer=Offer
|
||||
shared.openOffers=open offers
|
||||
shared.trades=trades
|
||||
shared.openTrades=open trades
|
||||
|
@ -99,7 +100,7 @@ shared.arbitratorsFee=Arbitrator's fee
|
|||
shared.noDetailsAvailable=No details available
|
||||
shared.notUsedYet=Not used yet
|
||||
shared.date=Date
|
||||
shared.sendFundsDetailsWithFee="Sending: {0}\nFrom address: {1}\nTo receiving address: {2}.\nRequired transaction fee is: {3} ({4} Satoshis/byte)\nTransaction size: {5} Kb\n\nThe recipient will receive: {6}\n\nAre you sure you want to withdraw that amount?"
|
||||
shared.sendFundsDetailsWithFee=Sending: {0}\nFrom address: {1}\nTo receiving address: {2}.\nRequired transaction fee is: {3} ({4} Satoshis/byte)\nTransaction size: {5} Kb\n\nThe recipient will receive: {6}\n\nAre you sure you want to withdraw that amount?
|
||||
shared.copyToClipboard=Copy to clipboard
|
||||
shared.language=Language
|
||||
shared.country=Country
|
||||
|
@ -117,7 +118,8 @@ shared.createNewAccount=Create new account
|
|||
shared.saveNewAccount=Save new account
|
||||
shared.selectedAccount=Selected account
|
||||
shared.deleteAccount=Delete account
|
||||
shared.errorMessage=\nError message: {0}
|
||||
shared.errorMessageInline=\nError message: {0}
|
||||
shared.errorMessage=Error message:
|
||||
shared.information=Information
|
||||
shared.name=Name
|
||||
shared.id=ID
|
||||
|
@ -130,6 +132,36 @@ shared.parameters=Parameters
|
|||
shared.balance=Balance
|
||||
shared.bsqBalance=BSQ balance:
|
||||
share.history=History
|
||||
shared.save=Save
|
||||
shared.onionAddress=Onion address
|
||||
shared.supportTicket=support ticket
|
||||
shared.dispute=dispute
|
||||
shared.seller=seller
|
||||
shared.buyer=buyer
|
||||
shared.allEuroCountries=All Euro countries
|
||||
shared.acceptedTakerCountries=Accepted taker countries
|
||||
shared.arbitrator=Selected arbitrator:
|
||||
shared.tradePrice=Trade price
|
||||
shared.tradeAmount=Trade amount
|
||||
shared.tradeVolume=Trade volume
|
||||
shared.invalidKey=The key you entered was not correct.
|
||||
shared.enterPrivKey=Enter private key to unlock:
|
||||
shared.makerFeeTxId=Maker fee transaction ID:
|
||||
shared.takerFeeTxId=Taker fee transaction ID:
|
||||
shared.payoutTxId=Payout transaction ID:
|
||||
shared.contractAsJson=Contract in JSON format:
|
||||
shared.viewContractAsJson=View contract in JSON format
|
||||
shared.contract.title=Contract for trade with ID: {0}
|
||||
shared.paymentDetails=BTC {0} payment details:
|
||||
shared.securityDeposit=Security deposit
|
||||
shared.contract=Contract
|
||||
shared.messageArrived=Message arrived.
|
||||
shared.messageStoredInMailbox=Message stored in mailbox.
|
||||
shared.messageSendingFailed="Message sending failed. error=" + errorMessage
|
||||
shared.unlock=Unlock
|
||||
shared.toReceive=to receive:
|
||||
shared.toSpend=to spend:
|
||||
shared.btcAmount=BTC amount
|
||||
|
||||
|
||||
####################################################################
|
||||
|
@ -395,7 +427,7 @@ portfolio.pending.step2_buyer.fees=If your bank charges fees you have to cover t
|
|||
portfolio.pending.step2_buyer.altcoin=Please transfer from your external {0} wallet\n{1} to the BTC seller.\n\n
|
||||
portfolio.pending.step2_buyer.cash=Please go to a bank and pay {0} to the BTC seller.\n\n
|
||||
portfolio.pending.step2_buyer.cash.extra=IMPORTANT REQUIREMENT:\nAfter you have done the payment write on the paper receipt: NO REFUNDS.\nThen tear it in 2 parts, make a photo and send it to the BTC seller's email address.
|
||||
portfolio.pending.step2_buyer.postal=Please send {0} by \"US Postal Money Order\" to the BTC seller." + "\n\n"
|
||||
portfolio.pending.step2_buyer.postal=Please send {0} by \"US Postal Money Order\" to the BTC seller.\n\n
|
||||
portfolio.pending.step2_buyer.bank=Please go to your online banking web page and pay {0} to the BTC seller.\n\n
|
||||
portfolio.pending.step2_buyer.startPaymentUsing=Start payment using {0}
|
||||
portfolio.pending.step2_buyer.amountToTransfer=Amount to transfer:
|
||||
|
@ -776,11 +808,7 @@ account.password.setPw.headline=Set password protection for wallet
|
|||
account.password.info=With password protection you need to enter your password when withdrawing bitcoin \
|
||||
out of your wallet or if you want to view or restore a wallet from seed words as well as at application startup.
|
||||
|
||||
account.seed.backup.title=Backup your wallet seed words
|
||||
account.seed.seedWords=Wallet seed words:
|
||||
account.seed.date=Wallet Date:
|
||||
account.seed.restore.title=Restore your wallet seed words
|
||||
account.seed.restore=Restore wallet
|
||||
account.seed.backup.title=Backup your wallets seed words
|
||||
account.seed.info=Please write down both wallet seed words and the date! \
|
||||
You can recover your wallet any time with those seed words and the date.\n\
|
||||
The seed words are used for both the BTC and the BSQ wallet.\n\n\
|
||||
|
@ -791,19 +819,6 @@ account.seed.warn.noPw.msg=You have not setup a wallet password which would prot
|
|||
Do you want to display the seed words?
|
||||
account.seed.warn.noPw.yes=Yes, and don't ask me again
|
||||
account.seed.enterPw=Enter password to view seed words
|
||||
account.seed.warn.walletNotEmpty.msg=Your bitcoin wallet is not empty.\n\n\
|
||||
You must empty this wallet before attempting to restore an older one, as mixing wallets \
|
||||
together can lead to invalidated backups.\n\n\
|
||||
Please finalize your trades, close all your open offers and go to the Funds section to withdraw your bitcoin.\n\
|
||||
In case you cannot access your bitcoin you can use the emergency tool to empty the wallet.\n\
|
||||
To open that emergency tool press \"cmd + e\".
|
||||
account.seed.warn.walletNotEmpty.restore=I want to restore anyway
|
||||
account.seed.warn.walletNotEmpty.emptyWallet=I will empty my wallets first
|
||||
account.seed.warn.notEncryptedAnymore=Your wallets are encrypted.\n\n\
|
||||
After restore, the wallets will no longer be encrypted and you must set a new password.\n\n\
|
||||
Do you want to proceed?
|
||||
account.seed.restore.success=Wallets restored successfully with the new seed words.\n\nYou need to shut down and restart the application.
|
||||
account.seed.restore.error=An error occurred when restoring the wallets with seed words.{0}
|
||||
|
||||
|
||||
####################################################################
|
||||
|
@ -882,15 +897,7 @@ contractWindow.dates=Offer date / Trade date:
|
|||
contractWindow.btcAddresses=Bitcoin address BTC buyer / BTC seller:
|
||||
contractWindow.onions=Network address BTC buyer / BTC seller:
|
||||
contractWindow.numDisputes=No. of disputes BTC buyer / BTC seller:
|
||||
contractWindow.paymentDetails=BTC {0} payment details:
|
||||
contractWindow.arbitrator=Selected arbitrator:
|
||||
contractWindow.makerFeeTxId=Maker fee transaction ID:
|
||||
contractWindow.takerFeeTxId=Taker fee transaction ID:
|
||||
contractWindow.payoutTxId=Payout transaction ID:
|
||||
contractWindow.contractHash=Contract hash:
|
||||
contractWindow.contractAsJson=Contract in JSON format:
|
||||
contractWindow.viewContractAsJson=View contract in JSON format
|
||||
contractWindow.contract.title=Contract for trade with ID: {0}
|
||||
|
||||
displayAlertMessageWindow.headline=Important information!
|
||||
displayAlertMessageWindow.update.headline=Important update information!
|
||||
|
@ -939,38 +946,93 @@ Arbitrator's dispute fee: {9}\n\n\
|
|||
Summary notes:\n{10}
|
||||
disputeSummaryWindow.close.closePeer=You need to close also the trading peers ticket!
|
||||
|
||||
emptyWalletWindow.headline=Emergency wallet tool
|
||||
emptyWalletWindow.info=Please use that only in emergency case if you cannot access your fund from the UI.\n\n\
|
||||
Please note that all open offers will be closed automatically when using this tool.\n\n\
|
||||
Before you use this tool, please backup your data directory. \
|
||||
You can do this at \"Account/Backup\".\n\n\
|
||||
Please report us your problem and file a bug report on Github or at the bisq forum so that we can investigate what was causing the problem.
|
||||
emptyWalletWindow.balance=Your available wallet balance:
|
||||
emptyWalletWindow.address=Your destination address:
|
||||
emptyWalletWindow.button=Send all funds
|
||||
emptyWalletWindow.openOffers.warn=You have open offers which will be removed if you empty the wallet.\nAre you sure that you want to empty your wallet?
|
||||
emptyWalletWindow.openOffers.yes=Yes, I am sure
|
||||
emptyWalletWindow.sent.success=The balance of your wallet was successfully transferred.
|
||||
|
||||
enterPrivKeyWindow.headline=Registration open for invited arbitrators only
|
||||
|
||||
filterWindow.headline=Edit filter list
|
||||
filterWindow.offers=Filtered offers (comma sep.):
|
||||
filterWindow.onions=Filtered onion addresses (comma sep.):
|
||||
filterWindow.accounts=Filtered trading account data:\nFormat: comma sep. list of [payment method id | data field | value]
|
||||
filterWindow.add=Add filter
|
||||
filterWindow.remove=Remove filter
|
||||
|
||||
emptyWalletWindow
|
||||
enterPrivKeyWindow
|
||||
filterWindow
|
||||
offerDetailsWindow.
|
||||
offerDetailsWindow.minBtcAmount=Min. BTC amount:
|
||||
offerDetailsWindow.min=(min. {0})
|
||||
offerDetailsWindow.distance=(distance from market price: {0})
|
||||
offerDetailsWindow.myTradingAccount=My trading account:
|
||||
offerDetailsWindow.offererBankId=(offerer's bank ID):
|
||||
offerDetailsWindow.offerersBankName=(offerer's bank name)
|
||||
offerDetailsWindow.bankId=Bank ID (e.g. BIC or SWIFT):
|
||||
offerDetailsWindow.countryBank=Offerer's country of bank:
|
||||
offerDetailsWindow.acceptedArbitrators=Accepted arbitrators:
|
||||
offerDetailsWindow.commitment=Commitment
|
||||
offerDetailsWindow.agree=I agree:
|
||||
offerDetailsWindow.tac=Terms and conditions:
|
||||
offerDetailsWindow.confirm.maker=Confirm: Place offer to {0} bitcoin
|
||||
offerDetailsWindow.confirm.taker=Confirm: Take offer to {0} bitcoin
|
||||
offerDetailsWindow.warn.noArbitrator=You have no arbitrator selected.\nPlease select at least one arbitrator.
|
||||
offerDetailsWindow.creationDate=Creation date:
|
||||
offerDetailsWindow.makersOnion=Offerer's onion address:
|
||||
qRCodeWindow
|
||||
selectDepositTxWindow
|
||||
sendAlertMessageWindow
|
||||
sendPrivateNotificationWindow
|
||||
showWalletDataWindow
|
||||
spendFromDepositTxWindow
|
||||
tacWindow
|
||||
tradeDetailsWindow
|
||||
walletPasswordWindow
|
||||
|
||||
qRCodeWindow.headline=QR-Code
|
||||
qRCodeWindow.msg=Please use that QR-Code for funding your Bitsquare wallet from your external wallet.
|
||||
qRCodeWindow.request="Payment request:\n{0}
|
||||
|
||||
selectDepositTxWindow.headline=Select deposit transaction for dispute
|
||||
selectDepositTxWindow.msg=The deposit transaction was not stored in the trade.\n\
|
||||
Please select one of the existing MultiSig transactions from your wallet which was the \
|
||||
deposit transaction used in the failed trade.\n\n\
|
||||
You can find the correct transaction by opening the trade details window (click on the trade ID in the list)\
|
||||
and following the offer fee payment transaction output to the next transaction where you see \
|
||||
the Multisig deposit transaction (the address starts with 3). That transaction ID should be \
|
||||
visible in the list presented here. Once you found the correct transaction select that transaction here and continue.\n\n\
|
||||
Sorry for the inconvenience but that error case should be happen very rare and in future we will try \
|
||||
to find better ways to resolve it.
|
||||
selectDepositTxWindow.select=Select deposit transaction
|
||||
|
||||
shared.save=Save
|
||||
shared.onionAddress=Onion address
|
||||
shared.supportTicket=support ticket
|
||||
shared.dispute=dispute
|
||||
shared.seller=seller
|
||||
shared.buyer=buyer
|
||||
shared.allEuroCountries=All Euro countries
|
||||
shared.acceptedTakerCountries=Accepted taker countries
|
||||
shared.tradePrice=Trade price
|
||||
shared.tradeAmount=Trade amount
|
||||
shared.tradeVolume=Trade volume
|
||||
sendAlertMessageWindow.headline=Send global notification
|
||||
sendAlertMessageWindow.alertMsg=Alert message:
|
||||
sendAlertMessageWindow.enterMsg=Enter message
|
||||
sendAlertMessageWindow.isUpdate=Is update notification:
|
||||
sendAlertMessageWindow.version=New version no.:
|
||||
sendAlertMessageWindow.send=Send notification
|
||||
sendAlertMessageWindow.remove=Remove notification
|
||||
|
||||
sendPrivateNotificationWindow.headline=Send private message
|
||||
sendPrivateNotificationWindow.privateNotification=Private notification:
|
||||
sendPrivateNotificationWindow.enterNotification=Enter notification
|
||||
sendPrivateNotificationWindow.send=Send private notification
|
||||
|
||||
showWalletDataWindow.walletData=Wallet data
|
||||
showWalletDataWindow.includePrivKeys=Include private keys:
|
||||
|
||||
# We do not translate the tacs because of the legal nature. We would need translations checked by lawyers
|
||||
# in each language which is too expensive atm.
|
||||
tacWindow.headline=User agreement
|
||||
tacWindow.agree=I agree
|
||||
tacWindow.disagree=I disagree and quit
|
||||
tacWindow.arbitrationSystem=Arbitration system
|
||||
|
||||
tradeDetailsWindow.headline=Trade
|
||||
tradeDetailsWindow.disputedPayoutTxId=Disputed payout transaction ID:
|
||||
tradeDetailsWindow.tradeDate=Trade date
|
||||
tradeDetailsWindow.txFee=Tx fee:
|
||||
tradeDetailsWindow.tradingPeersOnion=Trading peers onion address
|
||||
tradeDetailsWindow.tradeState=Trade state:
|
||||
|
||||
walletPasswordWindow.headline=Enter password to unlock
|
||||
|
||||
|
||||
####################################################################
|
||||
|
@ -1135,6 +1197,26 @@ password.walletDecrypted=Wallet successfully decrypted and password protection r
|
|||
password.wrongPw=You entered the wrong password.\n\nPlease try entering your password again, carefully checking for typos or spelling errors.
|
||||
password.walletEncrypted=Wallet successfully encrypted and password protection enabled.
|
||||
password.passwordsDoNotMatch=The 2 passwords you entered do not match.
|
||||
password.forgotPassword=Forgot password?
|
||||
|
||||
seed.seedWords=Wallet seed words:
|
||||
seed.date=Wallet Date:
|
||||
seed.restore.title=Restore wallets from seed words
|
||||
seed.restore=Restore wallets
|
||||
seed.creationDate=Creation Date:
|
||||
seed.warn.walletNotEmpty.msg=Your bitcoin wallet is not empty.\n\n\
|
||||
You must empty this wallet before attempting to restore an older one, as mixing wallets \
|
||||
together can lead to invalidated backups.\n\n\
|
||||
Please finalize your trades, close all your open offers and go to the Funds section to withdraw your bitcoin.\n\
|
||||
In case you cannot access your bitcoin you can use the emergency tool to empty the wallet.\n\
|
||||
To open that emergency tool press \"cmd + e\".
|
||||
seed.warn.walletNotEmpty.restore=I want to restore anyway
|
||||
seed.warn.walletNotEmpty.emptyWallet=I will empty my wallets first
|
||||
seed.warn.notEncryptedAnymore=Your wallets are encrypted.\n\n\
|
||||
After restore, the wallets will no longer be encrypted and you must set a new password.\n\n\
|
||||
Do you want to proceed?
|
||||
seed.restore.success=Wallets restored successfully with the new seed words.\n\nYou need to shut down and restart the application.
|
||||
seed.restore.error=An error occurred when restoring the wallets with seed words.{0}
|
||||
|
||||
|
||||
####################################################################
|
||||
|
|
Loading…
Add table
Reference in a new issue