mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-21 14:04:10 +01:00
(gui) reconnect is enabled if state=offline and node is funder
This commit is contained in:
parent
ed70d0299c
commit
4e2bf2b047
3 changed files with 10 additions and 3 deletions
|
@ -27,7 +27,7 @@
|
|||
HBox.hgrow="ALWAYS" focusTraversable="false" />
|
||||
<HBox GridPane.columnIndex="4" GridPane.halignment="RIGHT" alignment="CENTER_RIGHT" HBox.hgrow="NEVER" spacing="5.0">
|
||||
<children>
|
||||
<Button fx:id="reconnect" mnemonicParsing="false" styleClass="" text="Reconnect"/>
|
||||
<Button fx:id="reconnect" mnemonicParsing="false" styleClass="" text="Reconnect" disable="true"/>
|
||||
<Button fx:id="close" mnemonicParsing="false" styleClass="close-channel" text="Close"/>
|
||||
</children>
|
||||
</HBox>
|
||||
|
|
|
@ -71,7 +71,14 @@ class GUIUpdater(primaryStage: Stage, mainController: MainController, setup: Set
|
|||
case ChannelChangedState(channel, _, _, previousState, currentState, currentData) if m.contains(channel) =>
|
||||
val channelPane = m(channel)
|
||||
Platform.runLater(new Runnable() {
|
||||
override def run = channelPane.state.setText(currentState.toString)
|
||||
override def run = {
|
||||
if (channelPane.channelParams.isFunder && OFFLINE.equals(currentState)) {
|
||||
channelPane.reconnect.setDisable(false)
|
||||
} else {
|
||||
channelPane.reconnect.setDisable(true)
|
||||
}
|
||||
channelPane.state.setText(currentState.toString)
|
||||
}
|
||||
})
|
||||
|
||||
case ChannelSignatureReceived(channel, commitments) =>
|
||||
|
|
|
@ -12,7 +12,7 @@ import grizzled.slf4j.Logging
|
|||
/**
|
||||
* Created by DPA on 23/09/2016.
|
||||
*/
|
||||
class ChannelPaneController(theirNodeIdValue: String, channelParams: LocalParams) extends Logging {
|
||||
class ChannelPaneController(theirNodeIdValue: String, val channelParams: LocalParams) extends Logging {
|
||||
|
||||
@FXML var channelId: TextField = _
|
||||
@FXML var balanceBar: ProgressBar = _
|
||||
|
|
Loading…
Add table
Reference in a new issue