mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
allow mix counterparty to retry listening
This commit is contained in:
parent
d86517606b
commit
ef5cca26ea
5 changed files with 21 additions and 3 deletions
|
@ -25,6 +25,7 @@ public class ProgressTimer extends ProgressIndicator {
|
|||
}
|
||||
|
||||
public void start(EventHandler<ActionEvent> onFinished) {
|
||||
getStyleClass().remove("warn");
|
||||
timeline = new Timeline(
|
||||
new KeyFrame(Duration.ZERO, new KeyValue(progressProperty(), 0)),
|
||||
new KeyFrame(Duration.seconds(getSeconds() * 0.8), e -> getStyleClass().add("warn")),
|
||||
|
|
|
@ -90,7 +90,7 @@ public class CounterpartyController extends SorobanController {
|
|||
private PayNymAvatar mixPartnerAvatar;
|
||||
|
||||
@FXML
|
||||
private Label meetingFail;
|
||||
private Hyperlink meetingFail;
|
||||
|
||||
@FXML
|
||||
private VBox mixDetails;
|
||||
|
@ -187,6 +187,15 @@ public class CounterpartyController extends SorobanController {
|
|||
mixingPartner.managedProperty().bind(mixingPartner.visibleProperty());
|
||||
meetingFail.managedProperty().bind(meetingFail.visibleProperty());
|
||||
meetingFail.visibleProperty().bind(mixingPartner.visibleProperty().not());
|
||||
meetingFail.setOnAction(event -> {
|
||||
step2Desc.setText("Ask your mix partner to initiate the Soroban communication.");
|
||||
mixingPartner.setVisible(true);
|
||||
startCounterpartyMeetingReceive();
|
||||
step2Timer.start(e -> {
|
||||
step2Desc.setText("Mix declined due to timeout.");
|
||||
meetingReceived.set(Boolean.FALSE);
|
||||
});
|
||||
});
|
||||
|
||||
mixDetails.managedProperty().bind(mixDetails.visibleProperty());
|
||||
mixDetails.setVisible(false);
|
||||
|
|
|
@ -173,6 +173,10 @@
|
|||
-fx-text-fill: #e06c75;
|
||||
}
|
||||
|
||||
.root .failure.hyperlink:visited {
|
||||
-fx-text-fill: #e06c75;
|
||||
}
|
||||
|
||||
.root .titled-description-pane > .title {
|
||||
-fx-background-color: derive(-fx-base, 10%);
|
||||
-fx-padding: 0;
|
||||
|
|
|
@ -114,6 +114,10 @@
|
|||
-fx-underline: false;
|
||||
}
|
||||
|
||||
.failure.hyperlink:visited {
|
||||
-fx-text-fill: rgb(202, 18, 67);
|
||||
}
|
||||
|
||||
.hyperlink:hover:visited {
|
||||
-fx-underline: true;
|
||||
}
|
||||
|
|
|
@ -107,11 +107,11 @@
|
|||
<HBox styleClass="field-box">
|
||||
<Label text="Mix partner:" styleClass="field-label" />
|
||||
<Label fx:id="mixingPartner" text="Waiting for mix partner..." styleClass="field-control" />
|
||||
<Label fx:id="meetingFail" text="Failed to find mix partner." styleClass="failure" graphicTextGap="5">
|
||||
<Hyperlink fx:id="meetingFail" text="Failed to find mix partner. Try again?" styleClass="failure" graphicTextGap="5">
|
||||
<graphic>
|
||||
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="12" icon="EXCLAMATION_CIRCLE" styleClass="failure" />
|
||||
</graphic>
|
||||
</Label>
|
||||
</Hyperlink>
|
||||
</HBox>
|
||||
<VBox fx:id="mixDetails" spacing="10">
|
||||
<HBox styleClass="field-box">
|
||||
|
|
Loading…
Reference in a new issue