mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
UI bugfixes and improvements
This commit is contained in:
parent
87e2119b84
commit
623b07dfcc
12 changed files with 44 additions and 48 deletions
|
@ -18,6 +18,7 @@
|
|||
package io.bitsquare.trade.offer;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import io.bitsquare.app.Log;
|
||||
import io.bitsquare.btc.TradeWalletService;
|
||||
import io.bitsquare.btc.WalletService;
|
||||
import io.bitsquare.common.UserThread;
|
||||
|
@ -148,14 +149,14 @@ public class OpenOfferManager {
|
|||
TimerTask timerTask = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
UserThread.execute(() -> rePublishOffers());
|
||||
UserThread.execute(OpenOfferManager.this::rePublishOffers);
|
||||
}
|
||||
};
|
||||
timer.scheduleAtFixedRate(timerTask, 500, period);
|
||||
}
|
||||
|
||||
private void rePublishOffers() {
|
||||
if (!openOffers.isEmpty()) log.trace("rePublishOffers");
|
||||
Log.traceCall("Number of offer for republish: " + openOffers.size());
|
||||
for (OpenOffer openOffer : openOffers) {
|
||||
offerBookService.republishOffer(openOffer.getOffer(),
|
||||
() -> log.debug("Successful added offer to P2P network"),
|
||||
|
|
|
@ -26,6 +26,7 @@ import io.bitsquare.payment.AliPayAccount;
|
|||
import io.bitsquare.payment.AliPayAccountContractData;
|
||||
import io.bitsquare.payment.PaymentAccount;
|
||||
import io.bitsquare.payment.PaymentAccountContractData;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -83,7 +84,8 @@ public class AliPayForm extends PaymentMethodForm {
|
|||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", aliPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(aliPayAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account nr.:", aliPayAccount.getAccountNr());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Account nr.:", aliPayAccount.getAccountNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
addLabelTextField(gridPane, ++gridRow, "Currency:", aliPayAccount.getSingleTradeCurrency().getCodeAndName());
|
||||
addAllowedPeriod();
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import io.bitsquare.payment.PaymentAccount;
|
|||
import io.bitsquare.payment.PaymentAccountContractData;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.scene.control.ComboBox;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.util.StringConverter;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -70,7 +71,7 @@ public class BlockChainForm extends PaymentMethodForm {
|
|||
|
||||
addTradeCurrencyComboBox();
|
||||
currencyComboBox.setPrefWidth(250);
|
||||
addressInputTextField = addLabelInputTextField(gridPane, ++gridRow, "Address:").second;
|
||||
addressInputTextField = addLabelInputTextField(gridPane, ++gridRow, "Receiving altcoin address:").second;
|
||||
addressInputTextField.setValidator(altCoinAddressValidator);
|
||||
|
||||
addressInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||
|
@ -98,7 +99,8 @@ public class BlockChainForm extends PaymentMethodForm {
|
|||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", blockChainAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(blockChainAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Address:", blockChainAccount.getAddress());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Receiving altcoin address:", blockChainAccount.getAddress()).second;
|
||||
field.setMouseTransparent(false);
|
||||
addLabelTextField(gridPane, ++gridRow, "Crypto currency:", blockChainAccount.getSingleTradeCurrency().getCodeAndName());
|
||||
addAllowedPeriod();
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import javafx.geometry.Insets;
|
|||
import javafx.geometry.VPos;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.control.Tooltip;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
|
@ -127,7 +128,8 @@ public class OKPayForm extends PaymentMethodForm {
|
|||
gridRowFrom = gridRow;
|
||||
addLabelTextField(gridPane, gridRow, "Account name:", okPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(okPayAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account nr.:", okPayAccount.getAccountNr());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Account nr.:", okPayAccount.getAccountNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
addAllowedPeriod();
|
||||
addCurrenciesGrid(false);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import io.bitsquare.payment.PaymentAccount;
|
|||
import io.bitsquare.payment.PaymentAccountContractData;
|
||||
import io.bitsquare.payment.PerfectMoneyAccount;
|
||||
import io.bitsquare.payment.PerfectMoneyAccountContractData;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -95,7 +96,8 @@ public class PerfectMoneyForm extends PaymentMethodForm {
|
|||
addLabelTextField(gridPane, gridRow, "Account name:", perfectMoneyAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(perfectMoneyAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", perfectMoneyAccount.getHolderName());
|
||||
addLabelTextField(gridPane, ++gridRow, "Account nr.:", perfectMoneyAccount.getAccountNr());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Account nr.:", perfectMoneyAccount.getAccountNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
addLabelTextField(gridPane, ++gridRow, "Currency:", perfectMoneyAccount.getSingleTradeCurrency().getCodeAndName());
|
||||
addAllowedPeriod();
|
||||
}
|
||||
|
|
|
@ -244,8 +244,10 @@ public class SepaForm extends PaymentMethodForm {
|
|||
addLabelTextField(gridPane, gridRow, "Account name:", sepaAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(sepaAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", sepaAccount.getHolderName());
|
||||
addLabelTextField(gridPane, ++gridRow, "IBAN:", sepaAccount.getIban());
|
||||
addLabelTextField(gridPane, ++gridRow, "BIC/SWIFT:", sepaAccount.getBic());
|
||||
TextField ibanField = addLabelTextField(gridPane, ++gridRow, "IBAN:", sepaAccount.getIban()).second;
|
||||
ibanField.setMouseTransparent(false);
|
||||
TextField bicField = addLabelTextField(gridPane, ++gridRow, "BIC/SWIFT:", sepaAccount.getBic()).second;
|
||||
bicField.setMouseTransparent(false);
|
||||
addLabelTextField(gridPane, ++gridRow, "Location of Bank:", sepaAccount.getCountry().name);
|
||||
addLabelTextField(gridPane, ++gridRow, "Currency:", sepaAccount.getSingleTradeCurrency().getCodeAndName());
|
||||
addAllowedPeriod();
|
||||
|
|
|
@ -26,6 +26,7 @@ import io.bitsquare.payment.PaymentAccount;
|
|||
import io.bitsquare.payment.PaymentAccountContractData;
|
||||
import io.bitsquare.payment.SwishAccount;
|
||||
import io.bitsquare.payment.SwishAccountContractData;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -93,7 +94,8 @@ public class SwishForm extends PaymentMethodForm {
|
|||
addLabelTextField(gridPane, gridRow, "Account name:", swishAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(swishAccount.getPaymentMethod().getId()));
|
||||
addLabelTextField(gridPane, ++gridRow, "Account holder name:", swishAccount.getHolderName());
|
||||
addLabelTextField(gridPane, ++gridRow, "Mobile nr.:", swishAccount.getMobileNr());
|
||||
TextField field = addLabelTextField(gridPane, ++gridRow, "Mobile nr.:", swishAccount.getMobileNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
addLabelTextField(gridPane, ++gridRow, "Currency:", swishAccount.getSingleTradeCurrency().getCodeAndName());
|
||||
addAllowedPeriod();
|
||||
}
|
||||
|
|
|
@ -34,12 +34,16 @@ class PaymentAccountDataModel extends ActivatableDataModel {
|
|||
@Inject
|
||||
public PaymentAccountDataModel(User user) {
|
||||
this.user = user;
|
||||
setChangeListener = change -> paymentAccounts.setAll(user.getPaymentAccounts());
|
||||
setChangeListener = change -> fillAndSortPaymentAccounts();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void activate() {
|
||||
user.getPaymentAccountsAsObservable().addListener(setChangeListener);
|
||||
fillAndSortPaymentAccounts();
|
||||
}
|
||||
|
||||
private void fillAndSortPaymentAccounts() {
|
||||
paymentAccounts.setAll(user.getPaymentAccounts());
|
||||
}
|
||||
|
||||
|
|
|
@ -58,9 +58,8 @@ public class MarketsChartsView extends ActivatableViewAndModel<VBox, MarketsChar
|
|||
private AreaChart<Number, Number> areaChart;
|
||||
private ComboBox<TradeCurrency> currencyComboBox;
|
||||
private Subscription tradeCurrencySubscriber;
|
||||
private final StringProperty priceColumnLabel = new SimpleStringProperty("Price (EUR/BTC)");
|
||||
private final StringProperty amountColumnLabel = new SimpleStringProperty("Amount (BTC)");
|
||||
private final StringProperty volumeColumnLabel = new SimpleStringProperty("Volume (EUR)");
|
||||
private final StringProperty priceColumnLabel = new SimpleStringProperty();
|
||||
private final StringProperty volumeColumnLabel = new SimpleStringProperty();
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -129,10 +128,10 @@ public class MarketsChartsView extends ActivatableViewAndModel<VBox, MarketsChar
|
|||
newValue -> {
|
||||
String code = newValue.getCode();
|
||||
areaChart.setTitle("Offer book for " + newValue.getName());
|
||||
xAxis.setLabel(priceColumnLabel.get());
|
||||
xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis, "", ""));
|
||||
priceColumnLabel.set("Price (" + code + "/BTC)");
|
||||
volumeColumnLabel.set("Volume (" + code + ")");
|
||||
xAxis.setLabel(priceColumnLabel.get());
|
||||
xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis, "", ""));
|
||||
});
|
||||
|
||||
buyOfferTableView.setItems(model.getBuyOfferList());
|
||||
|
@ -178,7 +177,7 @@ public class MarketsChartsView extends ActivatableViewAndModel<VBox, MarketsChar
|
|||
|
||||
// amount
|
||||
TableColumn<Offer, Offer> amountColumn = new TableColumn<>("Amount (BTC)");
|
||||
amountColumn.textProperty().bind(amountColumnLabel);
|
||||
amountColumn.setText("Amount (BTC)");
|
||||
amountColumn.setMinWidth(120);
|
||||
amountColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
|
||||
amountColumn.setCellFactory(
|
||||
|
@ -202,7 +201,7 @@ public class MarketsChartsView extends ActivatableViewAndModel<VBox, MarketsChar
|
|||
tableView.getColumns().add(amountColumn);
|
||||
|
||||
// volume
|
||||
TableColumn<Offer, Offer> volumeColumn = new TableColumn<>("Amount (EUR)");
|
||||
TableColumn<Offer, Offer> volumeColumn = new TableColumn<>("Amount (BTC)");
|
||||
volumeColumn.setMinWidth(120);
|
||||
volumeColumn.textProperty().bind(volumeColumnLabel);
|
||||
volumeColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
|
||||
|
|
|
@ -209,16 +209,16 @@ class OfferBookViewModel extends ActivatableViewModel {
|
|||
String methodCountryCode = offer.getPaymentMethodCountryCode();
|
||||
|
||||
if (methodCountryCode != null)
|
||||
result = method + "\nOfferers country of bank: " + CountryUtil.getNameByCode(methodCountryCode);
|
||||
result = method + "\n\nOfferers seat of bank country:\n" + CountryUtil.getNameByCode(methodCountryCode);
|
||||
else
|
||||
result = method;
|
||||
|
||||
List<String> acceptedCountryCodes = offer.getAcceptedCountryCodes();
|
||||
if (acceptedCountryCodes != null && acceptedCountryCodes.size() > 0) {
|
||||
if (CountryUtil.containsAllSepaEuroCountries(acceptedCountryCodes))
|
||||
result += "\nAccepted taker countries: All Euro countries";
|
||||
result += "\n\nAccepted takers seat of bank countries:\nAll Euro countries";
|
||||
else
|
||||
result += "\nAccepted taker countries: " + CountryUtil.getNamesByCodesString(acceptedCountryCodes);
|
||||
result += "\n\nAccepted taker seat of bank countries:\n" + CountryUtil.getNamesByCodesString(acceptedCountryCodes);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -144,33 +144,10 @@ takeOffer.error.message=An error occurred when taking the offer.\n\n{0}
|
|||
OK_PAY=OKPay
|
||||
PERFECT_MONEY=Perfect Money
|
||||
ALI_PAY=AliPay
|
||||
SEPA=Sepa
|
||||
SEPA=SEPA
|
||||
FED_WIRE=Fed Wire
|
||||
SWISH= Swish
|
||||
TRANSFER_WISE=TransferWise
|
||||
US_POSTAL_MONEY_ORDER=US Postal money order
|
||||
BLOCK_CHAINS=Blockchains
|
||||
|
||||
# Arbitrator.ID_TYPE
|
||||
REAL_LIFE_ID=Real life ID
|
||||
NICKNAME=Nickname
|
||||
COMPANY=Company
|
||||
|
||||
# Arbitrator.METHODS
|
||||
TLS_NOTARY=TLS Notary
|
||||
SKYPE_SCREEN_SHARING=Skype screen sharing
|
||||
SMART_PHONE_VIDEO_CHAT=Smart phone video chat
|
||||
REQUIRE_REAL_ID=Require real life Identification
|
||||
BANK_STATEMENT=Bank statement
|
||||
|
||||
# Arbitrator.ID_VERIFICATIONS
|
||||
PASSPORT=Passport
|
||||
GOV_ID=Government issued ID
|
||||
UTILITY_BILLS=Utility bills
|
||||
FACEBOOK=Facebook account
|
||||
GOOGLE_PLUS=Google+ account
|
||||
TWITTER=Twitter account
|
||||
PGP=PGP
|
||||
BTC_OTC=BTC OTC
|
||||
|
||||
BLOCK_CHAINS=Crypto currencies
|
||||
|
||||
|
|
|
@ -161,14 +161,17 @@ public class P2PDataStorage implements MessageListener {
|
|||
|
||||
StringBuilder sb = new StringBuilder("\n\n------------------------------------------------------------\n");
|
||||
sb.append("Data set after addProtectedExpirableData:");
|
||||
map.values().stream().forEach(e -> sb.append("\n").append(e.toString()).append("\n"));
|
||||
if (map.values().size() < 10)
|
||||
map.values().stream().forEach(e -> sb.append("\n").append(e.toString()).append("\n"));
|
||||
else
|
||||
map.values().stream().forEach(e -> sb.append("\n").append("Truncated logs:").append(map.values().size())
|
||||
.append(" entries\n").append(e.toString().substring(0, 40)).append("...\n"));
|
||||
sb.append("\n------------------------------------------------------------\n");
|
||||
log.info(sb.toString());
|
||||
|
||||
if (rePublish || !containsKey)
|
||||
broadcast(new AddDataMessage(protectedData), sender);
|
||||
|
||||
|
||||
hashMapChangedListeners.stream().forEach(e -> e.onAdded(protectedData));
|
||||
} else {
|
||||
log.trace("add failed");
|
||||
|
|
Loading…
Add table
Reference in a new issue