mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
add insufficient inputs feedback label
This commit is contained in:
parent
42b96e042b
commit
7b856f32a2
3 changed files with 21 additions and 5 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit 891499aff04b69f53bf143464001b96b44a0ec53
|
||||
Subproject commit 1aeaacaf59484c76d5bf485dabb4a632c5230032
|
|
@ -14,10 +14,7 @@ import com.sparrowwallet.drongo.wallet.UtxoSelector;
|
|||
import com.sparrowwallet.sparrow.AppServices;
|
||||
import com.sparrowwallet.sparrow.CurrencyRate;
|
||||
import com.sparrowwallet.sparrow.EventManager;
|
||||
import com.sparrowwallet.sparrow.control.CoinTextFormatter;
|
||||
import com.sparrowwallet.sparrow.control.CopyableTextField;
|
||||
import com.sparrowwallet.sparrow.control.FiatLabel;
|
||||
import com.sparrowwallet.sparrow.control.QRScanDialog;
|
||||
import com.sparrowwallet.sparrow.control.*;
|
||||
import com.sparrowwallet.sparrow.event.BitcoinUnitChangedEvent;
|
||||
import com.sparrowwallet.sparrow.event.ExchangeRatesUpdatedEvent;
|
||||
import com.sparrowwallet.sparrow.event.FiatCurrencySelectedEvent;
|
||||
|
@ -59,6 +56,9 @@ public class PaymentController extends WalletFormController implements Initializ
|
|||
@FXML
|
||||
private FiatLabel fiatAmount;
|
||||
|
||||
@FXML
|
||||
private Label amountStatus;
|
||||
|
||||
@FXML
|
||||
private ToggleButton maxButton;
|
||||
|
||||
|
@ -141,6 +141,11 @@ public class PaymentController extends WalletFormController implements Initializ
|
|||
sendController.utxoLabelSelectionProperty().addListener((observable, oldValue, newValue) -> {
|
||||
maxButton.setText("Max" + newValue);
|
||||
});
|
||||
amountStatus.managedProperty().bind(amountStatus.visibleProperty());
|
||||
amountStatus.setVisible(sendController.isInsufficientInputs());
|
||||
sendController.insufficientInputsProperty().addListener((observable, oldValue, newValue) -> {
|
||||
amountStatus.setVisible(newValue);
|
||||
});
|
||||
|
||||
Optional<Tab> firstTab = sendController.getPaymentTabs().getTabs().stream().findFirst();
|
||||
if(firstTab.isPresent()) {
|
||||
|
|
|
@ -56,6 +56,17 @@
|
|||
</ComboBox>
|
||||
<Label style="-fx-pref-width: 15" />
|
||||
<FiatLabel fx:id="fiatAmount" />
|
||||
<Label fx:id="amountStatus" text="Insufficient">
|
||||
<tooltip>
|
||||
<Tooltip text="Insufficient confirmed transaction value" />
|
||||
</tooltip>
|
||||
<graphic>
|
||||
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="12" icon="EXCLAMATION_CIRCLE" styleClass="failure" />
|
||||
</graphic>
|
||||
<padding>
|
||||
<Insets left="10" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Region style="-fx-pref-width: 20" />
|
||||
<ToggleButton fx:id="maxButton" text="Max" onAction="#setMaxInput" />
|
||||
</Field>
|
||||
|
|
Loading…
Reference in a new issue