mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-15 18:00:24 -04:00
remove unused wizard interface
This commit is contained in:
parent
efc365f7e3
commit
cdba55f23e
3 changed files with 2 additions and 50 deletions
|
@ -1,28 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of Bitsquare.
|
|
||||||
*
|
|
||||||
* Bitsquare is free software: you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or (at
|
|
||||||
* your option) any later version.
|
|
||||||
*
|
|
||||||
* Bitsquare is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
|
||||||
* License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package io.bitsquare.gui.common.view;
|
|
||||||
|
|
||||||
public interface Wizard extends View {
|
|
||||||
void nextStep(Step currentStep);
|
|
||||||
|
|
||||||
interface Step {
|
|
||||||
void hideWizardNavigation();
|
|
||||||
|
|
||||||
void setWizard(Wizard wizard);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -19,7 +19,6 @@ package io.bitsquare.gui.main.account.content.changepassword;
|
||||||
|
|
||||||
import io.bitsquare.gui.common.view.FxmlView;
|
import io.bitsquare.gui.common.view.FxmlView;
|
||||||
import io.bitsquare.gui.common.view.InitializableView;
|
import io.bitsquare.gui.common.view.InitializableView;
|
||||||
import io.bitsquare.gui.common.view.Wizard;
|
|
||||||
import io.bitsquare.gui.main.help.Help;
|
import io.bitsquare.gui.main.help.Help;
|
||||||
import io.bitsquare.gui.main.help.HelpId;
|
import io.bitsquare.gui.main.help.HelpId;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
@ -31,7 +30,7 @@ import javafx.scene.layout.HBox;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
@FxmlView
|
@FxmlView
|
||||||
public class ChangePasswordView extends InitializableView<GridPane, ChangePasswordViewModel> implements Wizard.Step {
|
public class ChangePasswordView extends InitializableView<GridPane, ChangePasswordViewModel> {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
HBox buttonsHBox;
|
HBox buttonsHBox;
|
||||||
|
@ -40,8 +39,6 @@ public class ChangePasswordView extends InitializableView<GridPane, ChangePasswo
|
||||||
@FXML
|
@FXML
|
||||||
PasswordField oldPasswordField, passwordField, repeatedPasswordField;
|
PasswordField oldPasswordField, passwordField, repeatedPasswordField;
|
||||||
|
|
||||||
private Wizard wizard;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ChangePasswordView(ChangePasswordViewModel model) {
|
private ChangePasswordView(ChangePasswordViewModel model) {
|
||||||
super(model);
|
super(model);
|
||||||
|
@ -55,21 +52,9 @@ public class ChangePasswordView extends InitializableView<GridPane, ChangePasswo
|
||||||
saveButton.disableProperty().bind(model.saveButtonDisabled);
|
saveButton.disableProperty().bind(model.saveButtonDisabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setWizard(Wizard wizard) {
|
|
||||||
this.wizard = wizard;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void hideWizardNavigation() {
|
|
||||||
buttonsHBox.getChildren().remove(skipButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void onSaved() {
|
private void onSaved() {
|
||||||
if (wizard != null && model.requestSavePassword())
|
if (!model.requestSavePassword())
|
||||||
wizard.nextStep(this);
|
|
||||||
else
|
|
||||||
log.debug(model.getErrorMessage()); // TODO use validating TF
|
log.debug(model.getErrorMessage()); // TODO use validating TF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,8 +65,6 @@ public class ChangePasswordView extends InitializableView<GridPane, ChangePasswo
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void onSkipped() {
|
private void onSkipped() {
|
||||||
if (wizard != null)
|
|
||||||
wizard.nextStep(this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,9 +123,6 @@ public class AccountSettingsView extends ActivatableViewAndModel {
|
||||||
else {*/
|
else {*/
|
||||||
View view = viewLoader.load(viewClass);
|
View view = viewLoader.load(viewClass);
|
||||||
content.getChildren().setAll(view.getRoot());
|
content.getChildren().setAll(view.getRoot());
|
||||||
if (view instanceof Wizard.Step)
|
|
||||||
((Wizard.Step) view).hideWizardNavigation();
|
|
||||||
|
|
||||||
|
|
||||||
if (view instanceof PasswordView) password.setSelected(true);
|
if (view instanceof PasswordView) password.setSelected(true);
|
||||||
else if (view instanceof SeedWordsView) seedWords.setSelected(true);
|
else if (view instanceof SeedWordsView) seedWords.setSelected(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue