mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-26 15:50:42 -04:00
rename paymentaccountview
This commit is contained in:
parent
4f7becf018
commit
59ad7653b5
12 changed files with 56 additions and 56 deletions
|
@ -21,7 +21,7 @@ import io.bitsquare.gui.Navigation;
|
||||||
import io.bitsquare.gui.common.view.*;
|
import io.bitsquare.gui.common.view.*;
|
||||||
import io.bitsquare.gui.main.MainView;
|
import io.bitsquare.gui.main.MainView;
|
||||||
import io.bitsquare.gui.main.account.arbitratorregistration.ArbitratorRegistrationView;
|
import io.bitsquare.gui.main.account.arbitratorregistration.ArbitratorRegistrationView;
|
||||||
import io.bitsquare.gui.main.account.content.paymentsaccount.PaymentAccountView;
|
import io.bitsquare.gui.main.account.content.fiataccounts.FiatAccountsView;
|
||||||
import io.bitsquare.gui.main.account.settings.AccountSettingsView;
|
import io.bitsquare.gui.main.account.settings.AccountSettingsView;
|
||||||
import javafx.beans.value.ChangeListener;
|
import javafx.beans.value.ChangeListener;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
|
@ -67,7 +67,7 @@ public class AccountView extends ActivatableView<TabPane, AccountViewModel> {
|
||||||
navigationListener = viewPath -> {
|
navigationListener = viewPath -> {
|
||||||
if (viewPath.size() == 3 && viewPath.indexOf(AccountView.class) == 1) {
|
if (viewPath.size() == 3 && viewPath.indexOf(AccountView.class) == 1) {
|
||||||
if (arbitratorRegistrationTab == null && viewPath.get(2).equals(ArbitratorRegistrationView.class))
|
if (arbitratorRegistrationTab == null && viewPath.get(2).equals(ArbitratorRegistrationView.class))
|
||||||
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, PaymentAccountView.class);
|
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, FiatAccountsView.class);
|
||||||
else
|
else
|
||||||
loadView(viewPath.tip());
|
loadView(viewPath.tip());
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ public class AccountView extends ActivatableView<TabPane, AccountViewModel> {
|
||||||
if (newValue == accountSettingsTab) {
|
if (newValue == accountSettingsTab) {
|
||||||
Class<? extends View> selectedViewClass = accountSettingsView.getSelectedViewClass();
|
Class<? extends View> selectedViewClass = accountSettingsView.getSelectedViewClass();
|
||||||
if (selectedViewClass == null)
|
if (selectedViewClass == null)
|
||||||
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, PaymentAccountView.class);
|
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, FiatAccountsView.class);
|
||||||
else
|
else
|
||||||
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, selectedViewClass);
|
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, selectedViewClass);
|
||||||
} else if (arbitratorRegistrationTab != null) {
|
} else if (arbitratorRegistrationTab != null) {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.bitsquare.gui.main.account.content.altcoinsaccount;
|
package io.bitsquare.gui.main.account.content.altcoinaccounts;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import io.bitsquare.gui.common.model.ActivatableDataModel;
|
import io.bitsquare.gui.common.model.ActivatableDataModel;
|
||||||
|
@ -28,14 +28,14 @@ import javafx.collections.SetChangeListener;
|
||||||
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
class AltCoinsAccountDataModel extends ActivatableDataModel {
|
class AltCoinAccountsDataModel extends ActivatableDataModel {
|
||||||
|
|
||||||
private final User user;
|
private final User user;
|
||||||
final ObservableList<PaymentAccount> paymentAccounts = FXCollections.observableArrayList();
|
final ObservableList<PaymentAccount> paymentAccounts = FXCollections.observableArrayList();
|
||||||
private final SetChangeListener<PaymentAccount> setChangeListener;
|
private final SetChangeListener<PaymentAccount> setChangeListener;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public AltCoinsAccountDataModel(User user) {
|
public AltCoinAccountsDataModel(User user) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
setChangeListener = change -> fillAndSortPaymentAccounts();
|
setChangeListener = change -> fillAndSortPaymentAccounts();
|
||||||
}
|
}
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<GridPane fx:id="root" fx:controller="io.bitsquare.gui.main.account.content.altcoinsaccount.AltCoinsAccountView"
|
<GridPane fx:id="root" fx:controller="io.bitsquare.gui.main.account.content.altcoinaccounts.AltCoinAccountsView"
|
||||||
hgap="5.0" vgap="5.0"
|
hgap="5.0" vgap="5.0"
|
||||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.bitsquare.gui.main.account.content.altcoinsaccount;
|
package io.bitsquare.gui.main.account.content.altcoinaccounts;
|
||||||
|
|
||||||
import io.bitsquare.common.util.Tuple2;
|
import io.bitsquare.common.util.Tuple2;
|
||||||
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
||||||
|
@ -47,7 +47,7 @@ import javax.inject.Inject;
|
||||||
import static io.bitsquare.gui.util.FormBuilder.*;
|
import static io.bitsquare.gui.util.FormBuilder.*;
|
||||||
|
|
||||||
@FxmlView
|
@FxmlView
|
||||||
public class AltCoinsAccountView extends ActivatableViewAndModel<GridPane, AltCoinsAccountViewModel> {
|
public class AltCoinAccountsView extends ActivatableViewAndModel<GridPane, AltCoinAccountsViewModel> {
|
||||||
|
|
||||||
private ListView<PaymentAccount> paymentAccountsListView;
|
private ListView<PaymentAccount> paymentAccountsListView;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public class AltCoinsAccountView extends ActivatableViewAndModel<GridPane, AltCo
|
||||||
private ChangeListener<PaymentAccount> paymentAccountChangeListener;
|
private ChangeListener<PaymentAccount> paymentAccountChangeListener;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public AltCoinsAccountView(AltCoinsAccountViewModel model,
|
public AltCoinAccountsView(AltCoinAccountsViewModel model,
|
||||||
IBANValidator ibanValidator,
|
IBANValidator ibanValidator,
|
||||||
BICValidator bicValidator,
|
BICValidator bicValidator,
|
||||||
InputValidator inputValidator,
|
InputValidator inputValidator,
|
||||||
|
@ -96,7 +96,7 @@ public class AltCoinsAccountView extends ActivatableViewAndModel<GridPane, AltCo
|
||||||
if (newValue != null)
|
if (newValue != null)
|
||||||
onSelectAccount(newValue);
|
onSelectAccount(newValue);
|
||||||
};
|
};
|
||||||
Label placeholder = new Label("There are no altcoin accounts set up yet");
|
Label placeholder = new Label("There are no accounts set up yet");
|
||||||
placeholder.setWrapText(true);
|
placeholder.setWrapText(true);
|
||||||
paymentAccountsListView.setPlaceholder(placeholder);
|
paymentAccountsListView.setPlaceholder(placeholder);
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ public class AltCoinsAccountView extends ActivatableViewAndModel<GridPane, AltCo
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDeleteAccount(PaymentAccount paymentAccount) {
|
private void onDeleteAccount(PaymentAccount paymentAccount) {
|
||||||
new Popup().warning("Do you really want to delete the selected altcoin account?")
|
new Popup().warning("Do you really want to delete the selected account?")
|
||||||
.onAction(() -> {
|
.onAction(() -> {
|
||||||
model.onDeleteAccount(paymentAccount);
|
model.onDeleteAccount(paymentAccount);
|
||||||
removeSelectAccountForm();
|
removeSelectAccountForm();
|
||||||
|
@ -149,9 +149,9 @@ public class AltCoinsAccountView extends ActivatableViewAndModel<GridPane, AltCo
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private void buildForm() {
|
private void buildForm() {
|
||||||
addTitledGroupBg(root, gridRow, 1, "Manage altcoin accounts");
|
addTitledGroupBg(root, gridRow, 2, "Manage accounts");
|
||||||
|
|
||||||
Tuple2<Label, ListView> tuple = addLabelListView(root, gridRow, "Your altcoin accounts:", Layout.FIRST_ROW_DISTANCE);
|
Tuple2<Label, ListView> tuple = addLabelListView(root, gridRow, "Your accounts:", Layout.FIRST_ROW_DISTANCE);
|
||||||
GridPane.setValignment(tuple.first, VPos.TOP);
|
GridPane.setValignment(tuple.first, VPos.TOP);
|
||||||
paymentAccountsListView = tuple.second;
|
paymentAccountsListView = tuple.second;
|
||||||
paymentAccountsListView.setPrefHeight(2 * Layout.LIST_ROW_HEIGHT + 14);
|
paymentAccountsListView.setPrefHeight(2 * Layout.LIST_ROW_HEIGHT + 14);
|
||||||
|
@ -185,7 +185,7 @@ public class AltCoinsAccountView extends ActivatableViewAndModel<GridPane, AltCo
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
addAccountButton = addButtonAfterGroup(root, ++gridRow, "Add new account");
|
addAccountButton = addButton(root, ++gridRow, "Add new account");
|
||||||
addAccountButton.setOnAction(event -> addNewAccount());
|
addAccountButton.setOnAction(event -> addNewAccount());
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.bitsquare.gui.main.account.content.altcoinsaccount;
|
package io.bitsquare.gui.main.account.content.altcoinaccounts;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import io.bitsquare.gui.common.model.ActivatableWithDataModel;
|
import io.bitsquare.gui.common.model.ActivatableWithDataModel;
|
||||||
|
@ -23,11 +23,11 @@ import io.bitsquare.gui.common.model.ViewModel;
|
||||||
import io.bitsquare.payment.PaymentAccount;
|
import io.bitsquare.payment.PaymentAccount;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
|
|
||||||
class AltCoinsAccountViewModel extends ActivatableWithDataModel<AltCoinsAccountDataModel> implements ViewModel {
|
class AltCoinAccountsViewModel extends ActivatableWithDataModel<AltCoinAccountsDataModel> implements ViewModel {
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public AltCoinsAccountViewModel(AltCoinsAccountDataModel dataModel) {
|
public AltCoinAccountsViewModel(AltCoinAccountsDataModel dataModel) {
|
||||||
super(dataModel);
|
super(dataModel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.bitsquare.gui.main.account.content.paymentsaccount;
|
package io.bitsquare.gui.main.account.content.fiataccounts;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import io.bitsquare.gui.common.model.ActivatableDataModel;
|
import io.bitsquare.gui.common.model.ActivatableDataModel;
|
||||||
|
@ -29,14 +29,14 @@ import javafx.collections.SetChangeListener;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
class PaymentAccountDataModel extends ActivatableDataModel {
|
class FiatAccountsDataModel extends ActivatableDataModel {
|
||||||
|
|
||||||
private final User user;
|
private final User user;
|
||||||
final ObservableList<PaymentAccount> paymentAccounts = FXCollections.observableArrayList();
|
final ObservableList<PaymentAccount> paymentAccounts = FXCollections.observableArrayList();
|
||||||
private final SetChangeListener<PaymentAccount> setChangeListener;
|
private final SetChangeListener<PaymentAccount> setChangeListener;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PaymentAccountDataModel(User user) {
|
public FiatAccountsDataModel(User user) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
setChangeListener = change -> fillAndSortPaymentAccounts();
|
setChangeListener = change -> fillAndSortPaymentAccounts();
|
||||||
}
|
}
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<GridPane fx:id="root" fx:controller="io.bitsquare.gui.main.account.content.paymentsaccount.PaymentAccountView"
|
<GridPane fx:id="root" fx:controller="io.bitsquare.gui.main.account.content.fiataccounts.FiatAccountsView"
|
||||||
hgap="5.0" vgap="5.0"
|
hgap="5.0" vgap="5.0"
|
||||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.bitsquare.gui.main.account.content.paymentsaccount;
|
package io.bitsquare.gui.main.account.content.fiataccounts;
|
||||||
|
|
||||||
import io.bitsquare.common.util.Tuple2;
|
import io.bitsquare.common.util.Tuple2;
|
||||||
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
||||||
|
@ -48,7 +48,7 @@ import java.util.stream.Collectors;
|
||||||
import static io.bitsquare.gui.util.FormBuilder.*;
|
import static io.bitsquare.gui.util.FormBuilder.*;
|
||||||
|
|
||||||
@FxmlView
|
@FxmlView
|
||||||
public class PaymentAccountView extends ActivatableViewAndModel<GridPane, PaymentAccountViewModel> {
|
public class FiatAccountsView extends ActivatableViewAndModel<GridPane, FiatAccountsViewModel> {
|
||||||
|
|
||||||
private ListView<PaymentAccount> paymentAccountsListView;
|
private ListView<PaymentAccount> paymentAccountsListView;
|
||||||
private ComboBox<PaymentMethod> paymentMethodsComboBox;
|
private ComboBox<PaymentMethod> paymentMethodsComboBox;
|
||||||
|
@ -70,15 +70,15 @@ public class PaymentAccountView extends ActivatableViewAndModel<GridPane, Paymen
|
||||||
private ChangeListener<PaymentAccount> paymentAccountChangeListener;
|
private ChangeListener<PaymentAccount> paymentAccountChangeListener;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PaymentAccountView(PaymentAccountViewModel model,
|
public FiatAccountsView(FiatAccountsViewModel model,
|
||||||
IBANValidator ibanValidator,
|
IBANValidator ibanValidator,
|
||||||
BICValidator bicValidator,
|
BICValidator bicValidator,
|
||||||
InputValidator inputValidator,
|
InputValidator inputValidator,
|
||||||
OKPayValidator okPayValidator,
|
OKPayValidator okPayValidator,
|
||||||
AliPayValidator aliPayValidator,
|
AliPayValidator aliPayValidator,
|
||||||
PerfectMoneyValidator perfectMoneyValidator,
|
PerfectMoneyValidator perfectMoneyValidator,
|
||||||
SwishValidator swishValidator,
|
SwishValidator swishValidator,
|
||||||
AltCoinAddressValidator altCoinAddressValidator) {
|
AltCoinAddressValidator altCoinAddressValidator) {
|
||||||
super(model);
|
super(model);
|
||||||
|
|
||||||
this.ibanValidator = ibanValidator;
|
this.ibanValidator = ibanValidator;
|
||||||
|
@ -98,7 +98,7 @@ public class PaymentAccountView extends ActivatableViewAndModel<GridPane, Paymen
|
||||||
if (newValue != null)
|
if (newValue != null)
|
||||||
onSelectAccount(newValue);
|
onSelectAccount(newValue);
|
||||||
};
|
};
|
||||||
Label placeholder = new Label("There are no payment accounts set up yet");
|
Label placeholder = new Label("There are no accounts set up yet");
|
||||||
placeholder.setWrapText(true);
|
placeholder.setWrapText(true);
|
||||||
paymentAccountsListView.setPlaceholder(placeholder);
|
paymentAccountsListView.setPlaceholder(placeholder);
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ public class PaymentAccountView extends ActivatableViewAndModel<GridPane, Paymen
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDeleteAccount(PaymentAccount paymentAccount) {
|
private void onDeleteAccount(PaymentAccount paymentAccount) {
|
||||||
new Popup().warning("Do you really want to delete the selected payment account?")
|
new Popup().warning("Do you really want to delete the selected account?")
|
||||||
.onAction(() -> {
|
.onAction(() -> {
|
||||||
model.onDeleteAccount(paymentAccount);
|
model.onDeleteAccount(paymentAccount);
|
||||||
removeSelectAccountForm();
|
removeSelectAccountForm();
|
||||||
|
@ -151,9 +151,9 @@ public class PaymentAccountView extends ActivatableViewAndModel<GridPane, Paymen
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private void buildForm() {
|
private void buildForm() {
|
||||||
addTitledGroupBg(root, gridRow, 1, "Manage payment accounts");
|
addTitledGroupBg(root, gridRow, 2, "Manage accounts");
|
||||||
|
|
||||||
Tuple2<Label, ListView> tuple = addLabelListView(root, gridRow, "Your payment accounts:", Layout.FIRST_ROW_DISTANCE);
|
Tuple2<Label, ListView> tuple = addLabelListView(root, gridRow, "Your accounts:", Layout.FIRST_ROW_DISTANCE);
|
||||||
GridPane.setValignment(tuple.first, VPos.TOP);
|
GridPane.setValignment(tuple.first, VPos.TOP);
|
||||||
paymentAccountsListView = tuple.second;
|
paymentAccountsListView = tuple.second;
|
||||||
paymentAccountsListView.setPrefHeight(2 * Layout.LIST_ROW_HEIGHT + 14);
|
paymentAccountsListView.setPrefHeight(2 * Layout.LIST_ROW_HEIGHT + 14);
|
||||||
|
@ -187,7 +187,7 @@ public class PaymentAccountView extends ActivatableViewAndModel<GridPane, Paymen
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
addAccountButton = addButtonAfterGroup(root, ++gridRow, "Add new account");
|
addAccountButton = addButton(root, ++gridRow, "Add new account");
|
||||||
addAccountButton.setOnAction(event -> addNewAccount());
|
addAccountButton.setOnAction(event -> addNewAccount());
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.bitsquare.gui.main.account.content.paymentsaccount;
|
package io.bitsquare.gui.main.account.content.fiataccounts;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import io.bitsquare.gui.common.model.ActivatableWithDataModel;
|
import io.bitsquare.gui.common.model.ActivatableWithDataModel;
|
||||||
|
@ -23,11 +23,11 @@ import io.bitsquare.gui.common.model.ViewModel;
|
||||||
import io.bitsquare.payment.PaymentAccount;
|
import io.bitsquare.payment.PaymentAccount;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
|
|
||||||
class PaymentAccountViewModel extends ActivatableWithDataModel<PaymentAccountDataModel> implements ViewModel {
|
class FiatAccountsViewModel extends ActivatableWithDataModel<FiatAccountsDataModel> implements ViewModel {
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PaymentAccountViewModel(PaymentAccountDataModel dataModel) {
|
public FiatAccountsViewModel(FiatAccountsDataModel dataModel) {
|
||||||
super(dataModel);
|
super(dataModel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
prefHeight="660.0" prefWidth="1000.0"
|
prefHeight="660.0" prefWidth="1000.0"
|
||||||
xmlns:fx="http://javafx.com/fxml">
|
xmlns:fx="http://javafx.com/fxml">
|
||||||
|
|
||||||
<VBox fx:id="leftVBox" spacing="5" prefWidth="200" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
<VBox fx:id="leftVBox" spacing="5" prefWidth="220" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||||
AnchorPane.topAnchor="20"/>
|
AnchorPane.topAnchor="20"/>
|
||||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="10" AnchorPane.rightAnchor="25" AnchorPane.leftAnchor="250"
|
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="10" AnchorPane.rightAnchor="25" AnchorPane.leftAnchor="270"
|
||||||
AnchorPane.topAnchor="30" prefWidth="720"/>
|
AnchorPane.topAnchor="30"/>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@ import io.bitsquare.gui.Navigation;
|
||||||
import io.bitsquare.gui.common.view.*;
|
import io.bitsquare.gui.common.view.*;
|
||||||
import io.bitsquare.gui.main.MainView;
|
import io.bitsquare.gui.main.MainView;
|
||||||
import io.bitsquare.gui.main.account.AccountView;
|
import io.bitsquare.gui.main.account.AccountView;
|
||||||
import io.bitsquare.gui.main.account.content.altcoinsaccount.AltCoinsAccountView;
|
import io.bitsquare.gui.main.account.content.altcoinaccounts.AltCoinAccountsView;
|
||||||
import io.bitsquare.gui.main.account.content.arbitratorselection.ArbitratorSelectionView;
|
import io.bitsquare.gui.main.account.content.arbitratorselection.ArbitratorSelectionView;
|
||||||
import io.bitsquare.gui.main.account.content.backup.BackupView;
|
import io.bitsquare.gui.main.account.content.backup.BackupView;
|
||||||
|
import io.bitsquare.gui.main.account.content.fiataccounts.FiatAccountsView;
|
||||||
import io.bitsquare.gui.main.account.content.password.PasswordView;
|
import io.bitsquare.gui.main.account.content.password.PasswordView;
|
||||||
import io.bitsquare.gui.main.account.content.paymentsaccount.PaymentAccountView;
|
|
||||||
import io.bitsquare.gui.main.account.content.seedwords.SeedWordsView;
|
import io.bitsquare.gui.main.account.content.seedwords.SeedWordsView;
|
||||||
import io.bitsquare.gui.util.Colors;
|
import io.bitsquare.gui.util.Colors;
|
||||||
import javafx.beans.value.ChangeListener;
|
import javafx.beans.value.ChangeListener;
|
||||||
|
@ -75,8 +75,8 @@ public class AccountSettingsView extends ActivatableViewAndModel {
|
||||||
};
|
};
|
||||||
|
|
||||||
ToggleGroup toggleGroup = new ToggleGroup();
|
ToggleGroup toggleGroup = new ToggleGroup();
|
||||||
paymentAccount = new MenuItem(navigation, toggleGroup, "Payment account(s)", PaymentAccountView.class, AwesomeIcon.MONEY);
|
paymentAccount = new MenuItem(navigation, toggleGroup, "National currency accounts", FiatAccountsView.class, AwesomeIcon.MONEY);
|
||||||
altCoinsAccountView = new MenuItem(navigation, toggleGroup, "Altcoin account(s)", AltCoinsAccountView.class, AwesomeIcon.LINK);
|
altCoinsAccountView = new MenuItem(navigation, toggleGroup, "Cryptocurrency accounts", AltCoinAccountsView.class, AwesomeIcon.LINK);
|
||||||
arbitratorSelection = new MenuItem(navigation, toggleGroup, "Arbitrator selection", ArbitratorSelectionView.class, AwesomeIcon.USER_MD);
|
arbitratorSelection = new MenuItem(navigation, toggleGroup, "Arbitrator selection", ArbitratorSelectionView.class, AwesomeIcon.USER_MD);
|
||||||
password = new MenuItem(navigation, toggleGroup, "Wallet password", PasswordView.class, AwesomeIcon.UNLOCK_ALT);
|
password = new MenuItem(navigation, toggleGroup, "Wallet password", PasswordView.class, AwesomeIcon.UNLOCK_ALT);
|
||||||
seedWords = new MenuItem(navigation, toggleGroup, "Wallet seed", SeedWordsView.class, AwesomeIcon.KEY);
|
seedWords = new MenuItem(navigation, toggleGroup, "Wallet seed", SeedWordsView.class, AwesomeIcon.KEY);
|
||||||
|
@ -98,7 +98,7 @@ public class AccountSettingsView extends ActivatableViewAndModel {
|
||||||
ViewPath viewPath = navigation.getCurrentPath();
|
ViewPath viewPath = navigation.getCurrentPath();
|
||||||
if (viewPath.size() == 3 && viewPath.indexOf(AccountSettingsView.class) == 2 ||
|
if (viewPath.size() == 3 && viewPath.indexOf(AccountSettingsView.class) == 2 ||
|
||||||
viewPath.size() == 2 && viewPath.indexOf(AccountView.class) == 1) {
|
viewPath.size() == 2 && viewPath.indexOf(AccountView.class) == 1) {
|
||||||
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, PaymentAccountView.class);
|
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, FiatAccountsView.class);
|
||||||
} else if (viewPath.size() == 4 && viewPath.indexOf(AccountSettingsView.class) == 2) {
|
} else if (viewPath.size() == 4 && viewPath.indexOf(AccountSettingsView.class) == 2) {
|
||||||
selectedViewClass = viewPath.get(3);
|
selectedViewClass = viewPath.get(3);
|
||||||
loadView(selectedViewClass);
|
loadView(selectedViewClass);
|
||||||
|
@ -121,8 +121,8 @@ public class AccountSettingsView extends ActivatableViewAndModel {
|
||||||
View view = viewLoader.load(viewClass);
|
View view = viewLoader.load(viewClass);
|
||||||
content.getChildren().setAll(view.getRoot());
|
content.getChildren().setAll(view.getRoot());
|
||||||
|
|
||||||
if (view instanceof PaymentAccountView) paymentAccount.setSelected(true);
|
if (view instanceof FiatAccountsView) paymentAccount.setSelected(true);
|
||||||
else if (view instanceof AltCoinsAccountView) altCoinsAccountView.setSelected(true);
|
else if (view instanceof AltCoinAccountsView) altCoinsAccountView.setSelected(true);
|
||||||
else if (view instanceof ArbitratorSelectionView) arbitratorSelection.setSelected(true);
|
else if (view instanceof ArbitratorSelectionView) arbitratorSelection.setSelected(true);
|
||||||
else if (view instanceof PasswordView) password.setSelected(true);
|
else if (view instanceof PasswordView) password.setSelected(true);
|
||||||
else if (view instanceof SeedWordsView) seedWords.setSelected(true);
|
else if (view instanceof SeedWordsView) seedWords.setSelected(true);
|
||||||
|
@ -150,7 +150,7 @@ class MenuItem extends ToggleButton {
|
||||||
setText(title);
|
setText(title);
|
||||||
setId("account-settings-item-background-active");
|
setId("account-settings-item-background-active");
|
||||||
setPrefHeight(40);
|
setPrefHeight(40);
|
||||||
setPrefWidth(200);
|
setPrefWidth(220);
|
||||||
setAlignment(Pos.CENTER_LEFT);
|
setAlignment(Pos.CENTER_LEFT);
|
||||||
|
|
||||||
Label icon = new Label();
|
Label icon = new Label();
|
||||||
|
|
|
@ -25,7 +25,7 @@ import io.bitsquare.gui.components.TitledGroupBg;
|
||||||
import io.bitsquare.gui.main.MainView;
|
import io.bitsquare.gui.main.MainView;
|
||||||
import io.bitsquare.gui.main.account.AccountView;
|
import io.bitsquare.gui.main.account.AccountView;
|
||||||
import io.bitsquare.gui.main.account.content.arbitratorselection.ArbitratorSelectionView;
|
import io.bitsquare.gui.main.account.content.arbitratorselection.ArbitratorSelectionView;
|
||||||
import io.bitsquare.gui.main.account.content.paymentsaccount.PaymentAccountView;
|
import io.bitsquare.gui.main.account.content.fiataccounts.FiatAccountsView;
|
||||||
import io.bitsquare.gui.main.account.settings.AccountSettingsView;
|
import io.bitsquare.gui.main.account.settings.AccountSettingsView;
|
||||||
import io.bitsquare.gui.main.funds.FundsView;
|
import io.bitsquare.gui.main.funds.FundsView;
|
||||||
import io.bitsquare.gui.main.funds.withdrawal.WithdrawalView;
|
import io.bitsquare.gui.main.funds.withdrawal.WithdrawalView;
|
||||||
|
@ -251,12 +251,12 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||||
private void onCreateOffer() {
|
private void onCreateOffer() {
|
||||||
if (!model.hasPaymentAccount()) {
|
if (!model.hasPaymentAccount()) {
|
||||||
showWarning("You don't have setup a payment account yet.",
|
showWarning("You don't have setup a payment account yet.",
|
||||||
"You need to setup your payment account before you can trade.\nDo you want to do this now?", PaymentAccountView.class);
|
"You need to setup your payment account before you can trade.\nDo you want to do this now?", FiatAccountsView.class);
|
||||||
} else if (!model.hasPaymentAccountForCurrency()) {
|
} else if (!model.hasPaymentAccountForCurrency()) {
|
||||||
showWarning("You don't have a payment account for the currency:\n" +
|
showWarning("You don't have a payment account for the currency:\n" +
|
||||||
model.getSelectedTradeCurrency().getCodeAndName(),
|
model.getSelectedTradeCurrency().getCodeAndName(),
|
||||||
"You need to setup a payment account for the selected currency to be able to trade in that currency.\n" +
|
"You need to setup a payment account for the selected currency to be able to trade in that currency.\n" +
|
||||||
"Do you want to do this now?", PaymentAccountView.class);
|
"Do you want to do this now?", FiatAccountsView.class);
|
||||||
} else if (!model.hasAcceptedArbitrators()) {
|
} else if (!model.hasAcceptedArbitrators()) {
|
||||||
showWarning("You don't have an arbitrator selected.",
|
showWarning("You don't have an arbitrator selected.",
|
||||||
"You need to setup at least one arbitrator to be able to trade.\n" +
|
"You need to setup at least one arbitrator to be able to trade.\n" +
|
||||||
|
@ -275,7 +275,7 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||||
} else if (!isPaymentAccountValidForOffer) {
|
} else if (!isPaymentAccountValidForOffer) {
|
||||||
showWarning("You don't have a payment account with the payment method required for that offer.",
|
showWarning("You don't have a payment account with the payment method required for that offer.",
|
||||||
"You need to setup a payment account with that payment method if you want to take that offer.\n" +
|
"You need to setup a payment account with that payment method if you want to take that offer.\n" +
|
||||||
"Do you want to do this now?", PaymentAccountView.class);
|
"Do you want to do this now?", FiatAccountsView.class);
|
||||||
} else if (!hasSameProtocolVersion) {
|
} else if (!hasSameProtocolVersion) {
|
||||||
new Popup().information("That offer requires a different protocol version as the one used in your " +
|
new Popup().information("That offer requires a different protocol version as the one used in your " +
|
||||||
"version of the software." +
|
"version of the software." +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue