@@ -16,7 +16,7 @@ import fssi.base._
16
16
import fssi .types .base .RandomSeed
17
17
import fssi .types .biz .Account
18
18
import fssi .wallet .{MainFrameFragment , Program , WorkingThreadPool }
19
- import javafx .scene .control .{Label , TextArea , TextField }
19
+ import javafx .scene .control .{Label , ProgressIndicator , TextArea , TextField }
20
20
import scalafx .application .Platform
21
21
import scalafx .stage .FileChooser
22
22
import io .circe ._
@@ -44,6 +44,8 @@ class CreateAccountController extends javafx.fxml.Initializable {
44
44
var cAccountId : TextField = _
45
45
@ FXML
46
46
var cAccountSec : TextField = _
47
+ @ FXML
48
+ var cWorkingIndicator : ProgressIndicator = _
47
49
48
50
var gc : GraphicsContext = _
49
51
val currentAccount : Var [Account ] = Var .empty
@@ -69,6 +71,8 @@ class CreateAccountController extends javafx.fxml.Initializable {
69
71
// cSavePath.textProperty() <==> savePathProperty
70
72
71
73
MainFrameFragment .mainTitle.value = " Create Account"
74
+
75
+ cWorkingIndicator.visibleProperty().value = false
72
76
}
73
77
74
78
@ FXML
@@ -153,6 +157,7 @@ class CreateAccountController extends javafx.fxml.Initializable {
153
157
alert.showAndWait()
154
158
()
155
159
} else {
160
+ cWorkingIndicator.visibleProperty().value = true
156
161
WorkingThreadPool .delay {
157
162
createAccount() match {
158
163
case Left (t) =>
@@ -163,6 +168,7 @@ class CreateAccountController extends javafx.fxml.Initializable {
163
168
contentText = t.getStackTrace.mkString(" \n\t " )
164
169
}
165
170
alert.showAndWait()
171
+ cWorkingIndicator.visibleProperty().value = false
166
172
}
167
173
168
174
case Right ((account, sk)) =>
@@ -174,6 +180,8 @@ class CreateAccountController extends javafx.fxml.Initializable {
174
180
cAccountPrv.textProperty().value = account.encPrivKey.asBytesValue.bcBase58
175
181
cAccountPub.textProperty().value = account.pubKey.asBytesValue.bcBase58
176
182
cAccountSec.textProperty().value = sk.asBytesValue.bcBase58
183
+
184
+ cWorkingIndicator.visibleProperty().value = false
177
185
}
178
186
}
179
187
}
0 commit comments