mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-21 05:14:31 -04:00
Use localized strings for create offer screen and validators
This commit is contained in:
parent
40107785ab
commit
d2e98ff93a
15 changed files with 279 additions and 149 deletions
|
@ -75,14 +75,18 @@ public class BitSquare extends Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws IOException {
|
public void start(Stage primaryStage) {
|
||||||
Profiler.printMsgWithTime("BitSquare.start called");
|
Profiler.printMsgWithTime("BitSquare.start called");
|
||||||
BitSquare.primaryStage = primaryStage;
|
BitSquare.primaryStage = primaryStage;
|
||||||
|
|
||||||
Thread.currentThread().setUncaughtExceptionHandler((thread, throwable) -> Popups.handleUncaughtExceptions
|
Thread.currentThread().setUncaughtExceptionHandler((thread, throwable) -> Popups.handleUncaughtExceptions
|
||||||
(Throwables.getRootCause(throwable)));
|
(Throwables.getRootCause(throwable)));
|
||||||
|
|
||||||
|
try {
|
||||||
AppDirectory.initAppDir(APP_NAME);
|
AppDirectory.initAppDir(APP_NAME);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// currently there is not SystemTray support for java fx (planned for version 3) so we use the old AWT
|
// currently there is not SystemTray support for java fx (planned for version 3) so we use the old AWT
|
||||||
AWTSystemTray.createSystemTray(primaryStage);
|
AWTSystemTray.createSystemTray(primaryStage);
|
||||||
|
@ -111,7 +115,9 @@ public class BitSquare extends Application {
|
||||||
|
|
||||||
final GuiceFXMLLoader loader =
|
final GuiceFXMLLoader loader =
|
||||||
new GuiceFXMLLoader(getClass().getResource(NavigationItem.MAIN.getFxmlUrl()), false);
|
new GuiceFXMLLoader(getClass().getResource(NavigationItem.MAIN.getFxmlUrl()), false);
|
||||||
|
try {
|
||||||
final Parent view = loader.load();
|
final Parent view = loader.load();
|
||||||
|
|
||||||
final Scene scene = new Scene(view, 1000, 750);
|
final Scene scene = new Scene(view, 1000, 750);
|
||||||
scene.getStylesheets().setAll(getClass().getResource("/io/bitsquare/gui/bitsquare.css").toExternalForm());
|
scene.getStylesheets().setAll(getClass().getResource("/io/bitsquare/gui/bitsquare.css").toExternalForm());
|
||||||
|
|
||||||
|
@ -124,6 +130,9 @@ public class BitSquare extends Application {
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
|
||||||
Profiler.printMsgWithTime("BitSquare: start finished");
|
Profiler.printMsgWithTime("BitSquare: start finished");
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupCloseHandlers(Stage primaryStage, Scene scene) {
|
private void setupCloseHandlers(Stage primaryStage, Scene scene) {
|
||||||
|
|
|
@ -61,6 +61,7 @@ public class GuiceFXMLLoader {
|
||||||
isCached = useCaching && cachedGUIItems.containsKey(url);
|
isCached = useCaching && cachedGUIItems.containsKey(url);
|
||||||
if (!isCached) {
|
if (!isCached) {
|
||||||
loader = new FXMLLoader(url, Localisation.getResourceBundle());
|
loader = new FXMLLoader(url, Localisation.getResourceBundle());
|
||||||
|
|
||||||
if (GuiceFXMLLoader.injector != null)
|
if (GuiceFXMLLoader.injector != null)
|
||||||
loader.setControllerFactory(new GuiceControllerFactory(GuiceFXMLLoader.injector));
|
loader.setControllerFactory(new GuiceControllerFactory(GuiceFXMLLoader.injector));
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,22 +125,17 @@ public class InputTextField extends TextField {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private void applyErrorMessage(InputValidator.ValidationResult validationResult) {
|
private void applyErrorMessage(InputValidator.ValidationResult validationResult) {
|
||||||
if (validationResult.isValid) {
|
|
||||||
if (errorMessageDisplay != null)
|
if (errorMessageDisplay != null)
|
||||||
errorMessageDisplay.hide();
|
errorMessageDisplay.hide();
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
if (errorMessageDisplay == null)
|
if (!validationResult.isValid) {
|
||||||
createErrorPopOver(validationResult.errorMessage);
|
createErrorPopOver(validationResult.errorMessage);
|
||||||
else
|
|
||||||
((Label) errorMessageDisplay.getContentNode()).setText(validationResult.errorMessage);
|
|
||||||
|
|
||||||
if (getScene() != null)
|
if (getScene() != null)
|
||||||
errorMessageDisplay.show(getScene().getWindow(), getErrorPopupPosition().getX(),
|
errorMessageDisplay.show(getScene().getWindow(), getErrorPopupPosition().getX(),
|
||||||
getErrorPopupPosition().getY());
|
getErrorPopupPosition().getY());
|
||||||
|
|
||||||
InputTextField.errorMessageDisplay.setDetached(false);
|
if (errorMessageDisplay != null)
|
||||||
|
errorMessageDisplay.setDetached(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,10 +157,10 @@ public class InputTextField extends TextField {
|
||||||
errorLabel.setPadding(new Insets(0, 10, 0, 10));
|
errorLabel.setPadding(new Insets(0, 10, 0, 10));
|
||||||
errorLabel.setOnMouseClicked(e -> hideErrorMessageDisplay());
|
errorLabel.setOnMouseClicked(e -> hideErrorMessageDisplay());
|
||||||
|
|
||||||
InputTextField.errorMessageDisplay = new PopOver(errorLabel);
|
errorMessageDisplay = new PopOver(errorLabel);
|
||||||
InputTextField.errorMessageDisplay.setDetachable(true);
|
errorMessageDisplay.setDetachable(true);
|
||||||
InputTextField.errorMessageDisplay.setDetachedTitle("Close");
|
errorMessageDisplay.setDetachedTitle("Close");
|
||||||
InputTextField.errorMessageDisplay.setArrowIndent(5);
|
errorMessageDisplay.setArrowIndent(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -28,6 +28,7 @@ import io.bitsquare.gui.help.Help;
|
||||||
import io.bitsquare.gui.help.HelpId;
|
import io.bitsquare.gui.help.HelpId;
|
||||||
import io.bitsquare.gui.trade.TradeController;
|
import io.bitsquare.gui.trade.TradeController;
|
||||||
import io.bitsquare.gui.util.ImageUtil;
|
import io.bitsquare.gui.util.ImageUtil;
|
||||||
|
import io.bitsquare.locale.Localisation;
|
||||||
import io.bitsquare.trade.orderbook.OrderBookFilter;
|
import io.bitsquare.trade.orderbook.OrderBookFilter;
|
||||||
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
@ -63,6 +64,8 @@ import org.controlsfx.dialog.Dialog;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import static javafx.beans.binding.Bindings.createStringBinding;
|
||||||
|
|
||||||
// TODO Implement other positioning method in InoutTextField to display it over the field instead of right side
|
// TODO Implement other positioning method in InoutTextField to display it over the field instead of right side
|
||||||
// priceAmountHBox is too large after redesign as to be used as layoutReference.
|
// priceAmountHBox is too large after redesign as to be used as layoutReference.
|
||||||
|
|
||||||
|
@ -84,7 +87,8 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
balanceLabel, payFundsTitleLabel, totalToPayLabel, totalToPayInfoIconLabel,
|
balanceLabel, payFundsTitleLabel, totalToPayLabel, totalToPayInfoIconLabel,
|
||||||
showDetailsTitleLabel, bankAccountTypeLabel, bankAccountCurrencyLabel, bankAccountCountyLabel,
|
showDetailsTitleLabel, bankAccountTypeLabel, bankAccountCurrencyLabel, bankAccountCountyLabel,
|
||||||
acceptedCountriesLabel, acceptedCountriesLabelIcon, acceptedLanguagesLabel, acceptedLanguagesLabelIcon,
|
acceptedCountriesLabel, acceptedCountriesLabelIcon, acceptedLanguagesLabel, acceptedLanguagesLabelIcon,
|
||||||
acceptedArbitratorsLabel, acceptedArbitratorsLabelIcon;
|
acceptedArbitratorsLabel, acceptedArbitratorsLabelIcon, amountBtcLabel,
|
||||||
|
priceFiatLabel, volumeFiatLabel, minAmountBtcLabel, priceDescriptionLabel, volumeDescriptionLabel;
|
||||||
@FXML private Button showPaymentInfoScreenButton, showAdvancedSettingsButton, placeOfferButton;
|
@FXML private Button showPaymentInfoScreenButton, showAdvancedSettingsButton, placeOfferButton;
|
||||||
|
|
||||||
@FXML private InputTextField amountTextField, minAmountTextField, priceTextField, volumeTextField;
|
@FXML private InputTextField amountTextField, minAmountTextField, priceTextField, volumeTextField;
|
||||||
|
@ -113,8 +117,8 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
public void initialize(URL url, ResourceBundle rb) {
|
public void initialize(URL url, ResourceBundle rb) {
|
||||||
super.initialize(url, rb);
|
super.initialize(url, rb);
|
||||||
|
|
||||||
setupBindings();
|
|
||||||
setupListeners();
|
setupListeners();
|
||||||
|
setupBindings();
|
||||||
balanceTextField.setup(presentationModel.getWalletFacade(), presentationModel.address.get());
|
balanceTextField.setup(presentationModel.getWalletFacade(), presentationModel.address.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,12 +193,12 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
private void onToggleShowAdvancedSettings() {
|
private void onToggleShowAdvancedSettings() {
|
||||||
detailsVisible = !detailsVisible;
|
detailsVisible = !detailsVisible;
|
||||||
if (detailsVisible) {
|
if (detailsVisible) {
|
||||||
showAdvancedSettingsButton.setText("Hide advanced settings");
|
showAdvancedSettingsButton.setText(Localisation.get("createOffer.fundsBox.hideAdvanced"));
|
||||||
showAdvancedSettingsButton.setGraphic(collapse);
|
showAdvancedSettingsButton.setGraphic(collapse);
|
||||||
showDetailsScreen();
|
showDetailsScreen();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showAdvancedSettingsButton.setText("Show advanced settings");
|
showAdvancedSettingsButton.setText(Localisation.get("createOffer.fundsBox.showAdvanced"));
|
||||||
showAdvancedSettingsButton.setGraphic(expand);
|
showAdvancedSettingsButton.setGraphic(expand);
|
||||||
hideDetailsScreen();
|
hideDetailsScreen();
|
||||||
}
|
}
|
||||||
|
@ -260,24 +264,24 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
// warnings
|
// warnings
|
||||||
presentationModel.showWarningInvalidBtcDecimalPlaces.addListener((o, oldValue, newValue) -> {
|
presentationModel.showWarningInvalidBtcDecimalPlaces.addListener((o, oldValue, newValue) -> {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
Popups.openWarningPopup("Warning", "The amount you have entered exceeds the number of allowed decimal" +
|
Popups.openWarningPopup(Localisation.get("shared.warning"),
|
||||||
" places.\nThe amount has been adjusted to 4 decimal places.");
|
Localisation.get("createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces"));
|
||||||
presentationModel.showWarningInvalidBtcDecimalPlaces.set(false);
|
presentationModel.showWarningInvalidBtcDecimalPlaces.set(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
presentationModel.showWarningInvalidFiatDecimalPlaces.addListener((o, oldValue, newValue) -> {
|
presentationModel.showWarningInvalidFiatDecimalPlaces.addListener((o, oldValue, newValue) -> {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
Popups.openWarningPopup("Warning", "The amount you have entered exceeds the number of allowed decimal" +
|
Popups.openWarningPopup(Localisation.get("shared.warning"),
|
||||||
" places.\nThe amount has been adjusted to 2 decimal places.");
|
Localisation.get("createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces"));
|
||||||
presentationModel.showWarningInvalidFiatDecimalPlaces.set(false);
|
presentationModel.showWarningInvalidFiatDecimalPlaces.set(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
presentationModel.showWarningAdjustedVolume.addListener((o, oldValue, newValue) -> {
|
presentationModel.showWarningAdjustedVolume.addListener((o, oldValue, newValue) -> {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
Popups.openWarningPopup("Warning", "The total volume you have entered leads to invalid fractional " +
|
Popups.openWarningPopup(Localisation.get("shared.warning"),
|
||||||
"Bitcoin amounts.\nThe amount has been adjusted and a new total volume be calculated from it.");
|
Localisation.get("createOffer.amountPriceBox.warning.adjustedVolume"));
|
||||||
presentationModel.showWarningAdjustedVolume.set(false);
|
presentationModel.showWarningAdjustedVolume.set(false);
|
||||||
volumeTextField.setText(presentationModel.volume.get());
|
volumeTextField.setText(presentationModel.volume.get());
|
||||||
}
|
}
|
||||||
|
@ -285,8 +289,9 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
|
|
||||||
presentationModel.requestPlaceOfferErrorMessage.addListener((o, oldValue, newValue) -> {
|
presentationModel.requestPlaceOfferErrorMessage.addListener((o, oldValue, newValue) -> {
|
||||||
if (newValue != null) {
|
if (newValue != null) {
|
||||||
Popups.openErrorPopup("Error", "An error occurred when placing the offer.\n" +
|
Popups.openErrorPopup(Localisation.get("shared.error"),
|
||||||
presentationModel.requestPlaceOfferErrorMessage.get());
|
Localisation.get("createOffer.amountPriceBox.error.requestPlaceOfferErrorMessage",
|
||||||
|
presentationModel.requestPlaceOfferErrorMessage.get()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -295,7 +300,7 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
||||||
// our own actions.
|
// our own actions.
|
||||||
List<Action> actions = new ArrayList<>();
|
List<Action> actions = new ArrayList<>();
|
||||||
actions.add(new AbstractAction("Copy transaction ID") {
|
actions.add(new AbstractAction(Localisation.get("createOffer.success.copyTxId")) {
|
||||||
@Override
|
@Override
|
||||||
public void handle(ActionEvent actionEvent) {
|
public void handle(ActionEvent actionEvent) {
|
||||||
Clipboard clipboard = Clipboard.getSystemClipboard();
|
Clipboard clipboard = Clipboard.getSystemClipboard();
|
||||||
|
@ -304,7 +309,7 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
clipboard.setContent(content);
|
clipboard.setContent(content);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
actions.add(new AbstractAction("Close") {
|
actions.add(new AbstractAction(Localisation.get("shared.close")) {
|
||||||
@Override
|
@Override
|
||||||
public void handle(ActionEvent actionEvent) {
|
public void handle(ActionEvent actionEvent) {
|
||||||
try {
|
try {
|
||||||
|
@ -316,16 +321,27 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Popups.openInformationPopup("Offer published",
|
Popups.openInformationPopup(Localisation.get("createOffer.success.title"),
|
||||||
"The Bitcoin network transaction ID for the offer payment is: " +
|
Localisation.get("createOffer.success.info", presentationModel.transactionId.get()),
|
||||||
presentationModel.transactionId.get(),
|
Localisation.get("createOffer.success.headline"),
|
||||||
"Your offer has been successfully published to the distributed orderbook.",
|
|
||||||
actions);
|
actions);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupBindings() {
|
private void setupBindings() {
|
||||||
|
amountBtcLabel.textProperty().bind(presentationModel.btcCode);
|
||||||
|
priceFiatLabel.textProperty().bind(presentationModel.fiatCode);
|
||||||
|
volumeFiatLabel.textProperty().bind(presentationModel.fiatCode);
|
||||||
|
minAmountBtcLabel.textProperty().bind(presentationModel.btcCode);
|
||||||
|
priceDescriptionLabel.textProperty().bind(presentationModel.fiatCode);
|
||||||
|
volumeDescriptionLabel.textProperty().bind(presentationModel.fiatCode);//Price per Bitcoin in EUR
|
||||||
|
|
||||||
|
priceDescriptionLabel.textProperty().bind(createStringBinding(() ->
|
||||||
|
Localisation.get("createOffer.amountPriceBox.priceDescr", presentationModel.fiatCode.get())));
|
||||||
|
volumeDescriptionLabel.textProperty().bind(createStringBinding(() ->
|
||||||
|
Localisation.get("createOffer.amountPriceBox.volumeDescr", presentationModel.fiatCode.get())));
|
||||||
|
|
||||||
buyLabel.textProperty().bind(presentationModel.directionLabel);
|
buyLabel.textProperty().bind(presentationModel.directionLabel);
|
||||||
|
|
||||||
amountTextField.textProperty().bindBidirectional(presentationModel.amount);
|
amountTextField.textProperty().bindBidirectional(presentationModel.amount);
|
||||||
|
@ -377,17 +393,17 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
advancedScreenInited = true;
|
advancedScreenInited = true;
|
||||||
acceptedCountriesLabelIcon.setId("clickable-icon");
|
acceptedCountriesLabelIcon.setId("clickable-icon");
|
||||||
AwesomeDude.setIcon(acceptedCountriesLabelIcon, AwesomeIcon.EDIT_SIGN);
|
AwesomeDude.setIcon(acceptedCountriesLabelIcon, AwesomeIcon.EDIT_SIGN);
|
||||||
Tooltip.install(acceptedCountriesLabelIcon, new Tooltip("Open settings for editing"));
|
Tooltip.install(acceptedCountriesLabelIcon, new Tooltip(Localisation.get("shared.openSettings")));
|
||||||
acceptedCountriesLabelIcon.setOnMouseClicked(e -> openSettings());
|
acceptedCountriesLabelIcon.setOnMouseClicked(e -> openSettings());
|
||||||
|
|
||||||
acceptedLanguagesLabelIcon.setId("clickable-icon");
|
acceptedLanguagesLabelIcon.setId("clickable-icon");
|
||||||
AwesomeDude.setIcon(acceptedLanguagesLabelIcon, AwesomeIcon.EDIT_SIGN);
|
AwesomeDude.setIcon(acceptedLanguagesLabelIcon, AwesomeIcon.EDIT_SIGN);
|
||||||
Tooltip.install(acceptedLanguagesLabelIcon, new Tooltip("Open settings for editing"));
|
Tooltip.install(acceptedLanguagesLabelIcon, new Tooltip(Localisation.get("shared.openSettings")));
|
||||||
acceptedLanguagesLabelIcon.setOnMouseClicked(e -> openSettings());
|
acceptedLanguagesLabelIcon.setOnMouseClicked(e -> openSettings());
|
||||||
|
|
||||||
acceptedArbitratorsLabelIcon.setId("clickable-icon");
|
acceptedArbitratorsLabelIcon.setId("clickable-icon");
|
||||||
AwesomeDude.setIcon(acceptedArbitratorsLabelIcon, AwesomeIcon.EDIT_SIGN);
|
AwesomeDude.setIcon(acceptedArbitratorsLabelIcon, AwesomeIcon.EDIT_SIGN);
|
||||||
Tooltip.install(acceptedArbitratorsLabelIcon, new Tooltip("Open settings for editing"));
|
Tooltip.install(acceptedArbitratorsLabelIcon, new Tooltip(Localisation.get("shared.openSettings")));
|
||||||
acceptedArbitratorsLabelIcon.setOnMouseClicked(e -> openSettings());
|
acceptedArbitratorsLabelIcon.setOnMouseClicked(e -> openSettings());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,36 +445,42 @@ public class CreateOfferCB extends CachedCodeBehind<CreateOfferPM> {
|
||||||
totalToPayInfoIconLabel.setId("clickable-icon");
|
totalToPayInfoIconLabel.setId("clickable-icon");
|
||||||
AwesomeDude.setIcon(totalToPayInfoIconLabel, AwesomeIcon.QUESTION_SIGN);
|
AwesomeDude.setIcon(totalToPayInfoIconLabel, AwesomeIcon.QUESTION_SIGN);
|
||||||
|
|
||||||
|
totalToPayInfoIconLabel.setOnMouseEntered(e -> createInfoPopover());
|
||||||
|
totalToPayInfoIconLabel.setOnMouseExited(e -> {
|
||||||
|
if (totalToPayInfoPopover != null)
|
||||||
|
totalToPayInfoPopover.hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// As we don't use binding here we need to recreate it on mouse over to reflect the current state
|
||||||
|
private void createInfoPopover() {
|
||||||
GridPane infoGridPane = new GridPane();
|
GridPane infoGridPane = new GridPane();
|
||||||
infoGridPane.setHgap(5);
|
infoGridPane.setHgap(5);
|
||||||
infoGridPane.setVgap(5);
|
infoGridPane.setVgap(5);
|
||||||
infoGridPane.setPadding(new Insets(10, 10, 10, 10));
|
infoGridPane.setPadding(new Insets(10, 10, 10, 10));
|
||||||
|
|
||||||
addPayInfoEntry(infoGridPane, 0, "Collateral (" + presentationModel.collateralLabel.get() + ")",
|
addPayInfoEntry(infoGridPane, 0,
|
||||||
|
presentationModel.collateralLabel.get(),
|
||||||
presentationModel.collateral.get());
|
presentationModel.collateral.get());
|
||||||
addPayInfoEntry(infoGridPane, 1, "Offer fee:", presentationModel.offerFee.get());
|
addPayInfoEntry(infoGridPane, 1, Localisation.get("createOffer.fundsBox.offerFee"),
|
||||||
addPayInfoEntry(infoGridPane, 2, "Bitcoin network fee:", presentationModel.networkFee.get());
|
presentationModel.offerFee.get());
|
||||||
|
addPayInfoEntry(infoGridPane, 2, Localisation.get("createOffer.fundsBox.networkFee"),
|
||||||
|
presentationModel.networkFee.get());
|
||||||
Separator separator = new Separator();
|
Separator separator = new Separator();
|
||||||
separator.setOrientation(Orientation.HORIZONTAL);
|
separator.setOrientation(Orientation.HORIZONTAL);
|
||||||
separator.setStyle("-fx-background: #666;");
|
separator.setStyle("-fx-background: #666;");
|
||||||
GridPane.setConstraints(separator, 1, 3);
|
GridPane.setConstraints(separator, 1, 3);
|
||||||
infoGridPane.getChildren().add(separator);
|
infoGridPane.getChildren().add(separator);
|
||||||
addPayInfoEntry(infoGridPane, 4, "Total:", presentationModel.totalToPay.get());
|
addPayInfoEntry(infoGridPane, 4, Localisation.get("createOffer.fundsBox.total"),
|
||||||
|
presentationModel.totalToPay.get());
|
||||||
totalToPayInfoIconLabel.setOnMouseEntered(e -> {
|
|
||||||
if (totalToPayInfoIconLabel.getScene() != null) {
|
|
||||||
totalToPayInfoPopover = new PopOver(infoGridPane);
|
totalToPayInfoPopover = new PopOver(infoGridPane);
|
||||||
|
if (totalToPayInfoIconLabel.getScene() != null) {
|
||||||
totalToPayInfoPopover.setDetachable(false);
|
totalToPayInfoPopover.setDetachable(false);
|
||||||
totalToPayInfoPopover.setArrowIndent(5);
|
totalToPayInfoPopover.setArrowIndent(5);
|
||||||
totalToPayInfoPopover.show(totalToPayInfoIconLabel.getScene().getWindow(),
|
totalToPayInfoPopover.show(totalToPayInfoIconLabel.getScene().getWindow(),
|
||||||
getPopupPosition().getX(),
|
getPopupPosition().getX(),
|
||||||
getPopupPosition().getY());
|
getPopupPosition().getY());
|
||||||
}
|
}
|
||||||
});
|
|
||||||
totalToPayInfoIconLabel.setOnMouseExited(e -> {
|
|
||||||
if (totalToPayInfoPopover != null)
|
|
||||||
totalToPayInfoPopover.hide();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addPayInfoEntry(GridPane infoGridPane, int row, String labelText, String value) {
|
private void addPayInfoEntry(GridPane infoGridPane, int row, String labelText, String value) {
|
||||||
|
|
|
@ -82,11 +82,14 @@ class CreateOfferModel extends UIModel {
|
||||||
final StringProperty bankAccountCurrency = new SimpleStringProperty();
|
final StringProperty bankAccountCurrency = new SimpleStringProperty();
|
||||||
final StringProperty bankAccountCounty = new SimpleStringProperty();
|
final StringProperty bankAccountCounty = new SimpleStringProperty();
|
||||||
final StringProperty bankAccountType = new SimpleStringProperty();
|
final StringProperty bankAccountType = new SimpleStringProperty();
|
||||||
|
final StringProperty fiatCode = new SimpleStringProperty();
|
||||||
|
final StringProperty btcCode = new SimpleStringProperty();
|
||||||
|
|
||||||
final LongProperty collateralAsLong = new SimpleLongProperty();
|
final LongProperty collateralAsLong = new SimpleLongProperty();
|
||||||
|
|
||||||
final BooleanProperty requestPlaceOfferSuccess = new SimpleBooleanProperty();
|
final BooleanProperty requestPlaceOfferSuccess = new SimpleBooleanProperty();
|
||||||
final BooleanProperty isWalletFunded = new SimpleBooleanProperty();
|
final BooleanProperty isWalletFunded = new SimpleBooleanProperty();
|
||||||
|
final BooleanProperty useMBTC = new SimpleBooleanProperty();
|
||||||
|
|
||||||
final ObjectProperty<Coin> amountAsCoin = new SimpleObjectProperty<>();
|
final ObjectProperty<Coin> amountAsCoin = new SimpleObjectProperty<>();
|
||||||
final ObjectProperty<Coin> minAmountAsCoin = new SimpleObjectProperty<>();
|
final ObjectProperty<Coin> minAmountAsCoin = new SimpleObjectProperty<>();
|
||||||
|
@ -154,6 +157,7 @@ class CreateOfferModel extends UIModel {
|
||||||
acceptedCountries.setAll(settings.getAcceptedCountries());
|
acceptedCountries.setAll(settings.getAcceptedCountries());
|
||||||
acceptedLanguages.setAll(settings.getAcceptedLanguageLocales());
|
acceptedLanguages.setAll(settings.getAcceptedLanguageLocales());
|
||||||
acceptedArbitrators.setAll(settings.getAcceptedArbitrators());
|
acceptedArbitrators.setAll(settings.getAcceptedArbitrators());
|
||||||
|
btcCode.bind(settings.btcDenominationProperty());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
|
@ -162,6 +166,8 @@ class CreateOfferModel extends UIModel {
|
||||||
bankAccountType.set(bankAccount.getBankAccountType().toString());
|
bankAccountType.set(bankAccount.getBankAccountType().toString());
|
||||||
bankAccountCurrency.set(bankAccount.getCurrency().getCurrencyCode());
|
bankAccountCurrency.set(bankAccount.getCurrency().getCurrencyCode());
|
||||||
bankAccountCounty.set(bankAccount.getCountry().getName());
|
bankAccountCounty.set(bankAccount.getCountry().getName());
|
||||||
|
|
||||||
|
fiatCode.set(bankAccount.getCurrency().getCurrencyCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,8 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||||
final StringProperty paymentLabel = new SimpleStringProperty();
|
final StringProperty paymentLabel = new SimpleStringProperty();
|
||||||
final StringProperty transactionId = new SimpleStringProperty();
|
final StringProperty transactionId = new SimpleStringProperty();
|
||||||
final StringProperty requestPlaceOfferErrorMessage = new SimpleStringProperty();
|
final StringProperty requestPlaceOfferErrorMessage = new SimpleStringProperty();
|
||||||
|
final StringProperty btcCode = new SimpleStringProperty();
|
||||||
|
final StringProperty fiatCode = new SimpleStringProperty();
|
||||||
|
|
||||||
final BooleanProperty isPlaceOfferButtonVisible = new SimpleBooleanProperty(false);
|
final BooleanProperty isPlaceOfferButtonVisible = new SimpleBooleanProperty(false);
|
||||||
final BooleanProperty isPlaceOfferButtonDisabled = new SimpleBooleanProperty(true);
|
final BooleanProperty isPlaceOfferButtonDisabled = new SimpleBooleanProperty(true);
|
||||||
|
@ -114,7 +116,7 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||||
super.initialized();
|
super.initialized();
|
||||||
|
|
||||||
// static
|
// static
|
||||||
paymentLabel.set("Bitsquare trade (" + model.getOfferId() + ")");
|
paymentLabel.set(Localisation.get("createOffer.fundsBox.paymentLabel", model.getOfferId()));
|
||||||
|
|
||||||
if (model.addressEntry != null) {
|
if (model.addressEntry != null) {
|
||||||
addressAsString.set(model.addressEntry.getAddress().toString());
|
addressAsString.set(model.addressEntry.getAddress().toString());
|
||||||
|
@ -151,7 +153,8 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||||
// setOrderBookFilter is a one time call
|
// setOrderBookFilter is a one time call
|
||||||
void setOrderBookFilter(@NotNull OrderBookFilter orderBookFilter) {
|
void setOrderBookFilter(@NotNull OrderBookFilter orderBookFilter) {
|
||||||
model.setDirection(orderBookFilter.getDirection());
|
model.setDirection(orderBookFilter.getDirection());
|
||||||
directionLabel.set(model.getDirection() == Direction.BUY ? "Buy Bitcoin" : "Sell Bitcoin");
|
directionLabel.set(model.getDirection() == Direction.BUY ? Localisation.get("shared.buy") : Localisation.get
|
||||||
|
("shared.sell"));
|
||||||
|
|
||||||
// apply only if valid
|
// apply only if valid
|
||||||
if (orderBookFilter.getAmount() != null && isBtcInputValid(orderBookFilter.getAmount().toPlainString())
|
if (orderBookFilter.getAmount() != null && isBtcInputValid(orderBookFilter.getAmount().toPlainString())
|
||||||
|
@ -206,7 +209,7 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||||
// handle minAmount/amount relationship
|
// handle minAmount/amount relationship
|
||||||
if (!model.isMinAmountLessOrEqualAmount()) {
|
if (!model.isMinAmountLessOrEqualAmount()) {
|
||||||
amountValidationResult.set(new InputValidator.ValidationResult(false,
|
amountValidationResult.set(new InputValidator.ValidationResult(false,
|
||||||
"Amount cannot be smaller than minimum amount."));
|
Localisation.get("createOffer.validation.amountSmallerThanAmount")));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
amountValidationResult.set(result);
|
amountValidationResult.set(result);
|
||||||
|
@ -228,7 +231,7 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||||
|
|
||||||
if (!model.isMinAmountLessOrEqualAmount()) {
|
if (!model.isMinAmountLessOrEqualAmount()) {
|
||||||
minAmountValidationResult.set(new InputValidator.ValidationResult(false,
|
minAmountValidationResult.set(new InputValidator.ValidationResult(false,
|
||||||
"Minimum amount cannot be larger than amount."));
|
Localisation.get("createOffer.validation.minAmountLargerThanAmount")));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
minAmountValidationResult.set(result);
|
minAmountValidationResult.set(result);
|
||||||
|
@ -359,8 +362,10 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||||
collateral.bind(createStringBinding(() -> formatCoinWithCode(model.collateralAsCoin.get()),
|
collateral.bind(createStringBinding(() -> formatCoinWithCode(model.collateralAsCoin.get()),
|
||||||
model.collateralAsCoin));
|
model.collateralAsCoin));
|
||||||
|
|
||||||
collateralLabel.bind(Bindings.createStringBinding(() -> "Collateral (" + BSFormatter.formatCollateralPercent
|
collateralLabel.bind(Bindings.createStringBinding(() ->
|
||||||
(model.collateralAsLong.get()) + "):", model.collateralAsLong));
|
Localisation.get("createOffer.fundsBox.collateral",
|
||||||
|
BSFormatter.formatCollateralPercent(model.collateralAsLong.get())),
|
||||||
|
model.collateralAsLong));
|
||||||
totalToPayAsCoin.bind(model.totalToPayAsCoin);
|
totalToPayAsCoin.bind(model.totalToPayAsCoin);
|
||||||
|
|
||||||
offerFee.bind(createStringBinding(() -> formatCoinWithCode(model.offerFeeAsCoin.get()),
|
offerFee.bind(createStringBinding(() -> formatCoinWithCode(model.offerFeeAsCoin.get()),
|
||||||
|
@ -376,6 +381,9 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||||
requestPlaceOfferErrorMessage.bind(model.requestPlaceOfferErrorMessage);
|
requestPlaceOfferErrorMessage.bind(model.requestPlaceOfferErrorMessage);
|
||||||
showTransactionPublishedScreen.bind(model.requestPlaceOfferSuccess);
|
showTransactionPublishedScreen.bind(model.requestPlaceOfferSuccess);
|
||||||
transactionId.bind(model.transactionId);
|
transactionId.bind(model.transactionId);
|
||||||
|
|
||||||
|
btcCode.bind(model.btcCode);
|
||||||
|
fiatCode.bind(model.fiatCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calculateVolume() {
|
private void calculateVolume() {
|
||||||
|
@ -392,7 +400,7 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||||
// Amount calculation could lead to amount/minAmount invalidation
|
// Amount calculation could lead to amount/minAmount invalidation
|
||||||
if (!model.isMinAmountLessOrEqualAmount()) {
|
if (!model.isMinAmountLessOrEqualAmount()) {
|
||||||
amountValidationResult.set(new InputValidator.ValidationResult(false,
|
amountValidationResult.set(new InputValidator.ValidationResult(false,
|
||||||
"Amount cannot be smaller than minimum amount."));
|
Localisation.get("createOffer.validation.amountSmallerThanAmount")));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (amount.get() != null)
|
if (amount.get() != null)
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<Insets right="-10" bottom="-10" left="-10" top="-10"/>
|
<Insets right="-10" bottom="-10" left="-10" top="-10"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<Label fx:id="priceAmountTitleLabel" id="form-group-title-active"
|
<Label fx:id="priceAmountTitleLabel" id="form-group-title-active"
|
||||||
text="Create your offer" layoutX="8" layoutY="-8">
|
text="%createOffer.amountPriceBox.title" layoutX="8" layoutY="-8">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="5" right="7"/>
|
<Insets left="5" right="7"/>
|
||||||
</padding>
|
</padding>
|
||||||
|
@ -66,7 +66,8 @@
|
||||||
<Image url="@/images/buy_62_54.png"/>
|
<Image url="@/images/buy_62_54.png"/>
|
||||||
</image>
|
</image>
|
||||||
</ImageView>
|
</ImageView>
|
||||||
<Label fx:id="buyLabel" id="direction-icon-label" text="Buy Bitcoins" alignment="CENTER">
|
<Label fx:id="buyLabel" id="direction-icon-label" text="%createOffer.amountPriceBox.subTitle"
|
||||||
|
alignment="CENTER">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets top="-5.0"/>
|
<Insets top="-5.0"/>
|
||||||
</padding>
|
</padding>
|
||||||
|
@ -79,12 +80,14 @@
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<VBox spacing="4">
|
<VBox spacing="4">
|
||||||
<children>
|
<children>
|
||||||
<Label id="input-description-label" text="Amount of Bitcoin to buy" prefWidth="170"/>
|
<Label id="input-description-label" text="%createOffer.amountPriceBox.amountDescr"
|
||||||
|
prefWidth="170"/>
|
||||||
<HBox>
|
<HBox>
|
||||||
<children>
|
<children>
|
||||||
<InputTextField fx:id="amountTextField" id="text-input-with-currency-text-field"
|
<InputTextField fx:id="amountTextField" id="text-input-with-currency-text-field"
|
||||||
promptText="Enter amount" prefWidth="170" alignment="CENTER_RIGHT"/>
|
promptText="%createOffer.amount.prompt" prefWidth="170"
|
||||||
<Label id="currency-info-label" text="BTC"/>
|
alignment="CENTER_RIGHT"/>
|
||||||
|
<Label fx:id="amountBtcLabel" id="currency-info-label"/>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
|
@ -100,12 +103,13 @@
|
||||||
|
|
||||||
<VBox spacing="4">
|
<VBox spacing="4">
|
||||||
<children>
|
<children>
|
||||||
<Label id="input-description-label" text="Price per Bitcoin in EUR" prefWidth="170"/>
|
<Label fx:id="priceDescriptionLabel" id="input-description-label" prefWidth="170"/>
|
||||||
<HBox>
|
<HBox>
|
||||||
<children>
|
<children>
|
||||||
<InputTextField fx:id="priceTextField" id="text-input-with-currency-text-field"
|
<InputTextField fx:id="priceTextField" id="text-input-with-currency-text-field"
|
||||||
promptText="Enter price" prefWidth="170" alignment="CENTER_RIGHT"/>
|
promptText="%createOffer.price.prompt" prefWidth="170"
|
||||||
<Label id="currency-info-label" text="EUR" alignment="CENTER"/>
|
alignment="CENTER_RIGHT"/>
|
||||||
|
<Label fx:id="priceFiatLabel" id="currency-info-label" alignment="CENTER"/>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
|
@ -122,12 +126,13 @@
|
||||||
|
|
||||||
<VBox spacing="4">
|
<VBox spacing="4">
|
||||||
<children>
|
<children>
|
||||||
<Label id="input-description-label" text="Amount in EUR to spend" prefWidth="170"/>
|
<Label fx:id="volumeDescriptionLabel" id="input-description-label" prefWidth="170"/>
|
||||||
<HBox>
|
<HBox>
|
||||||
<children>
|
<children>
|
||||||
<InputTextField fx:id="volumeTextField" id="text-input-with-currency-text-field"
|
<InputTextField fx:id="volumeTextField" id="text-input-with-currency-text-field"
|
||||||
promptText="Trade volume" prefWidth="170" alignment="CENTER_RIGHT"/>
|
promptText="%createOffer.volume.prompt" prefWidth="170"
|
||||||
<Label id="currency-info-label" text="EUR"/>
|
alignment="CENTER_RIGHT"/>
|
||||||
|
<Label fx:id="volumeFiatLabel" id="currency-info-label"/>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
|
@ -138,12 +143,14 @@
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets right="10.0" top="5.0" bottom="5.0"/>
|
<Insets right="10.0" top="5.0" bottom="5.0"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<Label id="input-description-label" text="Minimum amount of Bitcoin" prefWidth="170.0"/>
|
<Label id="input-description-label" text="%createOffer.amountPriceBox.minAmountDescr"
|
||||||
|
prefWidth="170.0"/>
|
||||||
<HBox>
|
<HBox>
|
||||||
<children>
|
<children>
|
||||||
<InputTextField fx:id="minAmountTextField" id="text-input-with-currency-text-field"
|
<InputTextField fx:id="minAmountTextField" id="text-input-with-currency-text-field"
|
||||||
promptText="Enter min. amount" alignment="CENTER_RIGHT" prefWidth="170.0"/>
|
promptText="%createOffer.minAmount.prompt" alignment="CENTER_RIGHT"
|
||||||
<Label id="currency-info-label" text="BTC"/>
|
prefWidth="170.0"/>
|
||||||
|
<Label fx:id="minAmountBtcLabel" id="currency-info-label"/>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
@ -155,17 +162,13 @@
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<Image fx:id="infoIcon" url="@/images/info_44.png"/>
|
<Image fx:id="infoIcon" url="@/images/info_44.png"/>
|
||||||
</ImageView>
|
</ImageView>
|
||||||
<TextFlow GridPane.columnIndex="1" GridPane.rowIndex="2" prefWidth="740.0">
|
|
||||||
|
|
||||||
<Label prefWidth="740.0" wrapText="true"
|
<TextFlow GridPane.columnIndex="1" GridPane.rowIndex="2" prefWidth="740.0">
|
||||||
text="With the minimum amount you can attract more potential traders with giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the orderbook once a trader has taken your offer.">
|
<Label prefWidth="740.0" wrapText="true" text="%createOffer.amountPriceBox.info"/>
|
||||||
</Label>
|
<Hyperlink text="%shared.readMore" id="info-link" onAction="#onOpenGeneralHelp"/>
|
||||||
<GridPane.margin>
|
|
||||||
<Insets bottom="5.0"/>
|
|
||||||
</GridPane.margin>
|
|
||||||
<Hyperlink text="Read more..." id="info-link" onAction="#onOpenGeneralHelp"/>
|
|
||||||
</TextFlow>
|
</TextFlow>
|
||||||
<Button fx:id="showPaymentInfoScreenButton" text="Next step" id="show-details-button"
|
|
||||||
|
<Button fx:id="showPaymentInfoScreenButton" text="%createOffer.amountPriceBox.next" id="show-details-button"
|
||||||
GridPane.columnIndex="1" GridPane.rowIndex="3" defaultButton="true"
|
GridPane.columnIndex="1" GridPane.rowIndex="3" defaultButton="true"
|
||||||
onAction="#onShowPayFundsScreen">
|
onAction="#onShowPayFundsScreen">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
|
@ -183,7 +186,7 @@
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets right="-10" bottom="-10" left="-10" top="-10"/>
|
<Insets right="-10" bottom="-10" left="-10" top="-10"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<Label fx:id="payFundsTitleLabel" text="Fund your trade wallet" id="form-group-title-active"
|
<Label fx:id="payFundsTitleLabel" text="%createOffer.fundsBox.title" id="form-group-title-active"
|
||||||
layoutX="8" layoutY="-8">
|
layoutX="8" layoutY="-8">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="5" right="7"/>
|
<Insets left="5" right="7"/>
|
||||||
|
@ -192,7 +195,7 @@
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
||||||
<HBox GridPane.rowIndex="4" spacing="4" alignment="CENTER_RIGHT">
|
<HBox GridPane.rowIndex="4" spacing="4" alignment="CENTER_RIGHT">
|
||||||
<Label fx:id="totalToPayLabel" text="Funds needed for that trade:" visible="false"/>
|
<Label fx:id="totalToPayLabel" text="%createOffer.fundsBox.totalsNeeded" visible="false"/>
|
||||||
<Label fx:id="totalToPayInfoIconLabel" visible="false"/>
|
<Label fx:id="totalToPayInfoIconLabel" visible="false"/>
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets top="10.0"/>
|
<Insets top="10.0"/>
|
||||||
|
@ -205,11 +208,11 @@
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</TextField>
|
</TextField>
|
||||||
|
|
||||||
<Label fx:id="addressLabel" text="Trade wallet address:" GridPane.rowIndex="5" visible="false"/>
|
<Label fx:id="addressLabel" text="%createOffer.fundsBox.address" GridPane.rowIndex="5" visible="false"/>
|
||||||
<AddressTextField fx:id="addressTextField" GridPane.columnIndex="1" GridPane.rowIndex="5"
|
<AddressTextField fx:id="addressTextField" GridPane.columnIndex="1" GridPane.rowIndex="5"
|
||||||
focusTraversable="true" visible="false"/>
|
focusTraversable="true" visible="false"/>
|
||||||
|
|
||||||
<Label fx:id="balanceLabel" text="Trade wallet balance:" GridPane.rowIndex="6" visible="false">
|
<Label fx:id="balanceLabel" text="%createOffer.fundsBox.balance" GridPane.rowIndex="6" visible="false">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets bottom="5.0"/>
|
<Insets bottom="5.0"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
|
@ -231,22 +234,18 @@
|
||||||
|
|
||||||
<TextFlow fx:id="payFundsInfoTextFlow" GridPane.columnIndex="1" GridPane.rowIndex="7" prefWidth="740.0"
|
<TextFlow fx:id="payFundsInfoTextFlow" GridPane.columnIndex="1" GridPane.rowIndex="7" prefWidth="740.0"
|
||||||
visible="false">
|
visible="false">
|
||||||
<Label prefWidth="740.0" wrapText="true"
|
<Label prefWidth="740.0" wrapText="true" text="%createOffer.fundsBox.info"/>
|
||||||
text="For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary BTC amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment which will be done now when placing the offer is the offer fee payment.">
|
<Hyperlink text="%shared.readMore" id="info-link" onAction="#onOpenFundingHelp"/>
|
||||||
</Label>
|
|
||||||
<Hyperlink text="Read more..." id="info-link" onAction="#onOpenFundingHelp"/>
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets bottom="5.0"/>
|
|
||||||
</GridPane.margin>
|
|
||||||
</TextFlow>
|
</TextFlow>
|
||||||
|
|
||||||
<HBox spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="8">
|
<HBox spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="8">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets bottom="20" top="20.0"/>
|
<Insets bottom="20" top="20.0"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<Button fx:id="showAdvancedSettingsButton" text="Show advanced settings"
|
<Button fx:id="showAdvancedSettingsButton" text="%createOffer.fundsBox.showAdvanced"
|
||||||
onAction="#onToggleShowAdvancedSettings" visible="false"/>
|
onAction="#onToggleShowAdvancedSettings" visible="false"/>
|
||||||
<Button fx:id="placeOfferButton" text="Place offer" visible="false" defaultButton="true"
|
<Button fx:id="placeOfferButton" text="%createOffer.fundsBox.placeOffer" visible="false"
|
||||||
|
defaultButton="true"
|
||||||
onAction="#onPlaceOffer"/>
|
onAction="#onPlaceOffer"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
|
|
||||||
|
@ -260,7 +259,8 @@
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets right="-10" bottom="-10" left="-10" top="-10"/>
|
<Insets right="-10" bottom="-10" left="-10" top="-10"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<Label fx:id="showDetailsTitleLabel" text="Advanced settings" id="form-group-title-active" layoutX="8"
|
<Label fx:id="showDetailsTitleLabel" text="%createOffer.advancedBox.title" id="form-group-title-active"
|
||||||
|
layoutX="8"
|
||||||
layoutY="-8">
|
layoutY="-8">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="5" right="7"/>
|
<Insets left="5" right="7"/>
|
||||||
|
@ -269,7 +269,7 @@
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
||||||
<HBox GridPane.rowIndex="9" spacing="4" alignment="CENTER_RIGHT">
|
<HBox GridPane.rowIndex="9" spacing="4" alignment="CENTER_RIGHT">
|
||||||
<Label fx:id="acceptedCountriesLabel" text="Accepted countries:" visible="false"/>
|
<Label fx:id="acceptedCountriesLabel" text="%createOffer.advancedBox.countries" visible="false"/>
|
||||||
<Label fx:id="acceptedCountriesLabelIcon" visible="false"/>
|
<Label fx:id="acceptedCountriesLabelIcon" visible="false"/>
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets top="0.0"/>
|
<Insets top="0.0"/>
|
||||||
|
@ -279,28 +279,31 @@
|
||||||
editable="false" focusTraversable="false"/>
|
editable="false" focusTraversable="false"/>
|
||||||
|
|
||||||
<HBox GridPane.rowIndex="10" spacing="4" alignment="CENTER_RIGHT">
|
<HBox GridPane.rowIndex="10" spacing="4" alignment="CENTER_RIGHT">
|
||||||
<Label fx:id="acceptedLanguagesLabel" text="Accepted languages:" visible="false"/>
|
<Label fx:id="acceptedLanguagesLabel" text="%createOffer.advancedBox.languages" visible="false"/>
|
||||||
<Label fx:id="acceptedLanguagesLabelIcon" visible="false"/>
|
<Label fx:id="acceptedLanguagesLabelIcon" visible="false"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
<TextField fx:id="acceptedLanguagesTextField" GridPane.columnIndex="1" GridPane.rowIndex="10"
|
<TextField fx:id="acceptedLanguagesTextField" GridPane.columnIndex="1" GridPane.rowIndex="10"
|
||||||
editable="false" focusTraversable="false" visible="false"/>
|
editable="false" focusTraversable="false" visible="false"/>
|
||||||
|
|
||||||
<HBox GridPane.rowIndex="11" spacing="4" alignment="CENTER_RIGHT">
|
<HBox GridPane.rowIndex="11" spacing="4" alignment="CENTER_RIGHT">
|
||||||
<Label fx:id="acceptedArbitratorsLabel" text="Accepted arbitrators:" visible="false"/>
|
<Label fx:id="acceptedArbitratorsLabel" text="%createOffer.advancedBox.arbitrators" visible="false"/>
|
||||||
<Label fx:id="acceptedArbitratorsLabelIcon" visible="false"/>
|
<Label fx:id="acceptedArbitratorsLabelIcon" visible="false"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
<TextField fx:id="acceptedArbitratorsTextField" GridPane.columnIndex="1" GridPane.rowIndex="11"
|
<TextField fx:id="acceptedArbitratorsTextField" GridPane.columnIndex="1" GridPane.rowIndex="11"
|
||||||
editable="false" focusTraversable="false" visible="false"/>
|
editable="false" focusTraversable="false" visible="false"/>
|
||||||
|
|
||||||
<Label fx:id="bankAccountTypeLabel" text="Fiat transfer type:" GridPane.rowIndex="12" visible="false"/>
|
<Label fx:id="bankAccountTypeLabel" text="%createOffer.advancedBox.txType" GridPane.rowIndex="12"
|
||||||
|
visible="false"/>
|
||||||
<TextField fx:id="bankAccountTypeTextField" GridPane.columnIndex="1" GridPane.rowIndex="12" editable="false"
|
<TextField fx:id="bankAccountTypeTextField" GridPane.columnIndex="1" GridPane.rowIndex="12" editable="false"
|
||||||
focusTraversable="false" visible="false"/>
|
focusTraversable="false" visible="false"/>
|
||||||
|
|
||||||
<Label fx:id="bankAccountCurrencyLabel" text="Currency:" GridPane.rowIndex="13" visible="false"/>
|
<Label fx:id="bankAccountCurrencyLabel" text="%createOffer.advancedBox.currency" GridPane.rowIndex="13"
|
||||||
|
visible="false"/>
|
||||||
<TextField fx:id="bankAccountCurrencyTextField" GridPane.rowIndex="13" GridPane.columnIndex="1"
|
<TextField fx:id="bankAccountCurrencyTextField" GridPane.rowIndex="13" GridPane.columnIndex="1"
|
||||||
editable="false" focusTraversable="false" visible="false"/>
|
editable="false" focusTraversable="false" visible="false"/>
|
||||||
|
|
||||||
<Label fx:id="bankAccountCountyLabel" text="County of Fiat account:" GridPane.rowIndex="14" visible="false">
|
<Label fx:id="bankAccountCountyLabel" text="%createOffer.advancedBox.county" GridPane.rowIndex="14"
|
||||||
|
visible="false">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets bottom="5.0"/>
|
<Insets bottom="5.0"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
|
@ -322,13 +325,8 @@
|
||||||
|
|
||||||
<TextFlow fx:id="showDetailsInfoLabel" GridPane.columnIndex="1" GridPane.rowIndex="15" prefWidth="740.0"
|
<TextFlow fx:id="showDetailsInfoLabel" GridPane.columnIndex="1" GridPane.rowIndex="15" prefWidth="740.0"
|
||||||
visible="false">
|
visible="false">
|
||||||
<Label prefWidth="740.0" wrapText="true"
|
<Label prefWidth="740.0" wrapText="true" text="%createOffer.advancedBox.info"/>
|
||||||
text="Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The Fiat account details are used from your current selected Fiat account (if you have multiple Fiat accounts).">
|
<Hyperlink text="%shared.readMore" id="info-link" onAction="#onOpenAdvancedSettingsHelp"/>
|
||||||
</Label>
|
|
||||||
<Hyperlink text="Read more..." id="info-link" onAction="#onOpenAdvancedSettingsHelp"/>
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets bottom="5.0"/>
|
|
||||||
</GridPane.margin>
|
|
||||||
</TextFlow>
|
</TextFlow>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.util.validation;
|
package io.bitsquare.gui.util.validation;
|
||||||
|
|
||||||
|
import io.bitsquare.locale.Localisation;
|
||||||
|
|
||||||
import com.google.bitcoin.core.NetworkParameters;
|
import com.google.bitcoin.core.NetworkParameters;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -78,9 +80,7 @@ public class BtcValidator extends NumberValidator {
|
||||||
BigDecimal bd = new BigDecimal(input);
|
BigDecimal bd = new BigDecimal(input);
|
||||||
final BigDecimal satoshis = bd.movePointRight(8);
|
final BigDecimal satoshis = bd.movePointRight(8);
|
||||||
if (satoshis.scale() > 0)
|
if (satoshis.scale() > 0)
|
||||||
return new ValidationResult(
|
return new ValidationResult(false, Localisation.get("validation.btc.toSmall"));
|
||||||
false,
|
|
||||||
"Input results in a Bitcoin value with a fraction of the smallest unit (Satoshi).");
|
|
||||||
else
|
else
|
||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
}
|
}
|
||||||
|
@ -89,9 +89,7 @@ public class BtcValidator extends NumberValidator {
|
||||||
BigDecimal bd = new BigDecimal(input);
|
BigDecimal bd = new BigDecimal(input);
|
||||||
final BigDecimal satoshis = bd.movePointRight(8);
|
final BigDecimal satoshis = bd.movePointRight(8);
|
||||||
if (satoshis.longValue() > NetworkParameters.MAX_MONEY.longValue())
|
if (satoshis.longValue() > NetworkParameters.MAX_MONEY.longValue())
|
||||||
return new ValidationResult(
|
return new ValidationResult(false, Localisation.get("validation.btc.toLarge"));
|
||||||
false,
|
|
||||||
"Input larger as maximum possible Bitcoin value is not allowed.");
|
|
||||||
else
|
else
|
||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.util.validation;
|
package io.bitsquare.gui.util.validation;
|
||||||
|
|
||||||
|
import io.bitsquare.locale.Localisation;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -63,9 +65,7 @@ public class FiatValidator extends NumberValidator {
|
||||||
protected ValidationResult validateIfNotExceedsMinFiatValue(String input) {
|
protected ValidationResult validateIfNotExceedsMinFiatValue(String input) {
|
||||||
double d = Double.parseDouble(input);
|
double d = Double.parseDouble(input);
|
||||||
if (d < MIN_FIAT_VALUE)
|
if (d < MIN_FIAT_VALUE)
|
||||||
return new ValidationResult(
|
return new ValidationResult(false, Localisation.get("validation.fiat.toSmall"));
|
||||||
false,
|
|
||||||
"Input smaller as minimum possible Fiat value is not allowed..");
|
|
||||||
else
|
else
|
||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
}
|
}
|
||||||
|
@ -73,9 +73,7 @@ public class FiatValidator extends NumberValidator {
|
||||||
protected ValidationResult validateIfNotExceedsMaxFiatValue(String input) {
|
protected ValidationResult validateIfNotExceedsMaxFiatValue(String input) {
|
||||||
double d = Double.parseDouble(input);
|
double d = Double.parseDouble(input);
|
||||||
if (d > MAX_FIAT_VALUE)
|
if (d > MAX_FIAT_VALUE)
|
||||||
return new ValidationResult(
|
return new ValidationResult(false, Localisation.get("validation.fiat.toLarge"));
|
||||||
false,
|
|
||||||
"Input larger as maximum possible Fiat value is not allowed.");
|
|
||||||
else
|
else
|
||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.util.validation;
|
package io.bitsquare.gui.util.validation;
|
||||||
|
|
||||||
|
import io.bitsquare.locale.Localisation;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -44,7 +46,7 @@ public abstract class InputValidator {
|
||||||
|
|
||||||
protected ValidationResult validateIfNotEmpty(String input) {
|
protected ValidationResult validateIfNotEmpty(String input) {
|
||||||
if (input == null || input.length() == 0)
|
if (input == null || input.length() == 0)
|
||||||
return new ValidationResult(false, "Empty input is not allowed.");
|
return new ValidationResult(false, Localisation.get("validation.empty"));
|
||||||
else
|
else
|
||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.util.validation;
|
package io.bitsquare.gui.util.validation;
|
||||||
|
|
||||||
|
import io.bitsquare.locale.Localisation;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -45,20 +47,20 @@ public abstract class NumberValidator extends InputValidator {
|
||||||
Double.parseDouble(input);
|
Double.parseDouble(input);
|
||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return new ValidationResult(false, "Input is not a valid number.");
|
return new ValidationResult(false, Localisation.get("validation.NaN"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ValidationResult validateIfNotZero(String input) {
|
protected ValidationResult validateIfNotZero(String input) {
|
||||||
if (Double.parseDouble(input) == 0)
|
if (Double.parseDouble(input) == 0)
|
||||||
return new ValidationResult(false, "Input of 0 is not allowed.");
|
return new ValidationResult(false, Localisation.get("validation.zero"));
|
||||||
else
|
else
|
||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ValidationResult validateIfNotNegative(String input) {
|
protected ValidationResult validateIfNotNegative(String input) {
|
||||||
if (Double.parseDouble(input) < 0)
|
if (Double.parseDouble(input) < 0)
|
||||||
return new ValidationResult(false, "A negative value is not allowed.");
|
return new ValidationResult(false, Localisation.get("validation.negative"));
|
||||||
else
|
else
|
||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,17 @@ package io.bitsquare.settings;
|
||||||
import io.bitsquare.arbitrator.Arbitrator;
|
import io.bitsquare.arbitrator.Arbitrator;
|
||||||
import io.bitsquare.locale.Country;
|
import io.bitsquare.locale.Country;
|
||||||
|
|
||||||
|
import com.google.bitcoin.utils.CoinFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
|
import javafx.beans.property.StringProperty;
|
||||||
|
|
||||||
public class Settings implements Serializable {
|
public class Settings implements Serializable {
|
||||||
private static final long serialVersionUID = 7995048077355006861L;
|
private static final long serialVersionUID = 7995048077355006861L;
|
||||||
|
|
||||||
|
@ -36,6 +41,7 @@ public class Settings implements Serializable {
|
||||||
private long collateral = 100; // is 1/1000 so 100 results to 100/1000 = 0,1 (or 10%)
|
private long collateral = 100; // is 1/1000 so 100 results to 100/1000 = 0,1 (or 10%)
|
||||||
// which will be used for multiplying with the amount to get the collateral size in BTC.
|
// which will be used for multiplying with the amount to get the collateral size in BTC.
|
||||||
|
|
||||||
|
final StringProperty btcDenomination = new SimpleStringProperty(CoinFormat.CODE_BTC);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Constructor
|
// Constructor
|
||||||
|
@ -113,4 +119,15 @@ public class Settings implements Serializable {
|
||||||
return collateral;
|
return collateral;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBtcDenomination() {
|
||||||
|
return btcDenomination.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringProperty btcDenominationProperty() {
|
||||||
|
return btcDenomination;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBtcDenomination(String useMBTC) {
|
||||||
|
this.btcDenomination.set(useMBTC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
com.google.bitcoin = FATAL
|
com.google.bitcoin = FATAL
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,77 @@
|
||||||
# TODO: locale support will be added when ui is more final
|
|
||||||
|
|
||||||
|
# shared
|
||||||
|
shared.readMore=Read more...
|
||||||
|
shared.warning=Warning
|
||||||
|
shared.error=Error
|
||||||
|
shared.close=Close
|
||||||
|
shared.openSettings=Open settings for editing
|
||||||
|
shared.buy=Buy Bitcoin
|
||||||
|
shared.sell=Sell Bitcoin
|
||||||
|
|
||||||
|
|
||||||
|
# validation
|
||||||
|
validation.empty=Empty input is not allowed.
|
||||||
|
validation.NaN=Input is not a valid number.
|
||||||
|
validation.zero=Input of 0 is not allowed.
|
||||||
|
validation.negative=A negative value is not allowed.
|
||||||
|
validation.fiat.toSmall=Input smaller as minimum possible Fiat value is not allowed.
|
||||||
|
validation.fiat.toLarge=Input larger as maximum possible Fiat value is not allowed.
|
||||||
|
validation.btc.toSmall=Input results in a Bitcoin value with a fraction of the smallest unit (Satoshi).
|
||||||
|
validation.btc.toLarge=Input larger as maximum possible Bitcoin value is not allowed..
|
||||||
|
|
||||||
|
|
||||||
|
# Create offer
|
||||||
|
createOffer.amount.prompt=Enter amount
|
||||||
|
createOffer.price.prompt=Enter price
|
||||||
|
createOffer.volume.prompt=Trade volume
|
||||||
|
createOffer.minAmount.prompt=Enter min. amount
|
||||||
|
|
||||||
|
createOffer.amountPriceBox.title=Create your offer
|
||||||
|
createOffer.amountPriceBox.subTitle=Buy Bitcoin
|
||||||
|
createOffer.amountPriceBox.amountDescr=Amount of Bitcoin to buy
|
||||||
|
createOffer.amountPriceBox.priceDescr=Price per Bitcoin in {0}
|
||||||
|
createOffer.amountPriceBox.volumeDescr=Amount in {0} to spend
|
||||||
|
createOffer.amountPriceBox.minAmountDescr=Minimum amount of Bitcoin
|
||||||
|
createOffer.amountPriceBox.info=With the minimum amount you can attract more potential traders with giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the orderbook once a trader has taken your offer.
|
||||||
|
createOffer.amountPriceBox.next=Next step
|
||||||
|
createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places.
|
||||||
|
createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places. The amount has been adjusted to 2 decimal places.
|
||||||
|
createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional Bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it.
|
||||||
|
|
||||||
|
createOffer.validation.amountSmallerThanAmount=Amount cannot be smaller than minimum amount.
|
||||||
|
createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount.
|
||||||
|
|
||||||
|
createOffer.fundsBox.title=Fund your trade wallet
|
||||||
|
createOffer.fundsBox.totalsNeeded=Funds needed for that trade:
|
||||||
|
createOffer.fundsBox.address=Trade wallet address:
|
||||||
|
createOffer.fundsBox.balance=Trade wallet balance:
|
||||||
|
createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary Bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment which will be done now when placing the offer is the offer fee payment.
|
||||||
|
createOffer.fundsBox.collateral=Collateral ("{0}"):
|
||||||
|
createOffer.fundsBox.offerFee=Offer fee:
|
||||||
|
createOffer.fundsBox.networkFee=Bitcoin network fee:
|
||||||
|
createOffer.fundsBox.total=Total:
|
||||||
|
createOffer.fundsBox.showAdvanced=Show advanced settings
|
||||||
|
createOffer.fundsBox.hideAdvanced=Hide advanced settings
|
||||||
|
createOffer.fundsBox.placeOffer=Place offer
|
||||||
|
createOffer.fundsBox.paymentLabel=Bitsquare trade ({0})
|
||||||
|
|
||||||
|
createOffer.advancedBox.title=Advanced settings
|
||||||
|
createOffer.advancedBox.countries=Accepted countries:
|
||||||
|
createOffer.advancedBox.languages=Accepted languages:
|
||||||
|
createOffer.advancedBox.arbitrators=Accepted arbitrators:
|
||||||
|
createOffer.advancedBox.txType=Fiat transfer type:
|
||||||
|
createOffer.advancedBox.currency=Currency:
|
||||||
|
createOffer.advancedBox.county=County of Fiat account:
|
||||||
|
createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The Fiat account details are used from your current selected Fiat account (if you have multiple Fiat accounts).
|
||||||
|
|
||||||
|
createOffer.success.title=Offer published
|
||||||
|
createOffer.success.headline=Your offer has been successfully published to the distributed orderbook.
|
||||||
|
createOffer.success.info=The Bitcoin network transaction ID for the offer payment is: {0}
|
||||||
|
createOffer.success.copyTxId=Copy transaction ID
|
||||||
|
createOffer.error.requestPlaceOfferErrorMessage=An error occurred when placing the offer.\n{0}
|
||||||
|
|
||||||
|
|
||||||
|
# TODO update the following when doing the UI
|
||||||
# generic
|
# generic
|
||||||
OTHER=Other
|
OTHER=Other
|
||||||
|
|
||||||
|
|
|
@ -71,12 +71,12 @@ public class UITestRunner extends Application {
|
||||||
getUrl("/io/bitsquare/gui/trade/createoffer/CreateOfferView.fxml"), false);
|
getUrl("/io/bitsquare/gui/trade/createoffer/CreateOfferView.fxml"), false);
|
||||||
try {
|
try {
|
||||||
view = loader.load();
|
view = loader.load();
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
pane.getChildren().setAll(view);
|
pane.getChildren().setAll(view);
|
||||||
refreshStylesheets();
|
refreshStylesheets();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.error(e.getStackTrace().toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshStylesheets() {
|
private void refreshStylesheets() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue