mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
finalize form ui change
This commit is contained in:
parent
b8edfd9731
commit
62618e5da5
3 changed files with 37 additions and 22 deletions
|
@ -21,6 +21,7 @@ import javafx.fxml.Initializable;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.input.Clipboard;
|
import javafx.scene.input.Clipboard;
|
||||||
import javafx.scene.input.ClipboardContent;
|
import javafx.scene.input.ClipboardContent;
|
||||||
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.controlsfx.glyphfont.Glyph;
|
import org.controlsfx.glyphfont.Glyph;
|
||||||
|
@ -116,7 +117,7 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
private IdLabel blockHash;
|
private IdLabel blockHash;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Form finalizeForm;
|
private Form signingWalletForm;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ComboBox<Wallet> signingWallet;
|
private ComboBox<Wallet> signingWallet;
|
||||||
|
@ -127,9 +128,15 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
@FXML
|
@FXML
|
||||||
private Hyperlink noWalletsWarningLink;
|
private Hyperlink noWalletsWarningLink;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Form sigHashForm;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ComboBox<SigHash> sigHash;
|
private ComboBox<SigHash> sigHash;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private VBox finalizeButtonBox;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Button finalizeTransaction;
|
private Button finalizeTransaction;
|
||||||
|
|
||||||
|
@ -275,12 +282,18 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
}
|
}
|
||||||
|
|
||||||
blockchainForm.managedProperty().bind(blockchainForm.visibleProperty());
|
blockchainForm.managedProperty().bind(blockchainForm.visibleProperty());
|
||||||
finalizeForm.managedProperty().bind(finalizeForm.visibleProperty());
|
|
||||||
|
signingWalletForm.managedProperty().bind(signingWalletForm.visibleProperty());
|
||||||
|
sigHashForm.managedProperty().bind(sigHashForm.visibleProperty());
|
||||||
|
sigHashForm.visibleProperty().bind(signingWalletForm.visibleProperty());
|
||||||
|
finalizeButtonBox.managedProperty().bind(finalizeButtonBox.visibleProperty());
|
||||||
|
finalizeButtonBox.visibleProperty().bind(signingWalletForm.visibleProperty());
|
||||||
|
|
||||||
signaturesForm.managedProperty().bind(signaturesForm.visibleProperty());
|
signaturesForm.managedProperty().bind(signaturesForm.visibleProperty());
|
||||||
broadcastForm.managedProperty().bind(broadcastForm.visibleProperty());
|
broadcastForm.managedProperty().bind(broadcastForm.visibleProperty());
|
||||||
|
|
||||||
blockchainForm.setVisible(false);
|
blockchainForm.setVisible(false);
|
||||||
finalizeForm.setVisible(false);
|
signingWalletForm.setVisible(false);
|
||||||
signaturesForm.setVisible(false);
|
signaturesForm.setVisible(false);
|
||||||
broadcastForm.setVisible(false);
|
broadcastForm.setVisible(false);
|
||||||
|
|
||||||
|
@ -291,7 +304,7 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
PSBT psbt = headersForm.getPsbt();
|
PSBT psbt = headersForm.getPsbt();
|
||||||
|
|
||||||
if(headersForm.isEditable()) {
|
if(headersForm.isEditable()) {
|
||||||
finalizeForm.setVisible(true);
|
signingWalletForm.setVisible(true);
|
||||||
} else if(headersForm.getPsbt().isSigned()) {
|
} else if(headersForm.getPsbt().isSigned()) {
|
||||||
broadcastForm.setVisible(true);
|
broadcastForm.setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -622,7 +635,7 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
|
|
||||||
headersForm.setSigningWallet(event.getSigningWallet());
|
headersForm.setSigningWallet(event.getSigningWallet());
|
||||||
|
|
||||||
finalizeForm.setVisible(false);
|
signingWalletForm.setVisible(false);
|
||||||
signaturesForm.setVisible(true);
|
signaturesForm.setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,10 +20,6 @@
|
||||||
|
|
||||||
.locktime { -fx-fill: #986801 }
|
.locktime { -fx-fill: #986801 }
|
||||||
|
|
||||||
.signatures-button {
|
|
||||||
-fx-padding: 10 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.unfinalized-psbt {
|
.unfinalized-psbt {
|
||||||
-fx-text-fill: #a0a1a7;
|
-fx-text-fill: #a0a1a7;
|
||||||
}
|
}
|
||||||
|
@ -37,12 +33,16 @@
|
||||||
-fx-text-fill: rgb(202, 18, 67);
|
-fx-text-fill: rgb(202, 18, 67);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#finalizeButtonBox.signatures-buttons {
|
||||||
|
-fx-padding: 0 20 10 20;
|
||||||
|
}
|
||||||
|
|
||||||
.signatures-buttons {
|
.signatures-buttons {
|
||||||
-fx-padding: 10 20 10 20;
|
-fx-padding: 10 20 10 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signatures-buttons .segmented-button, .signatures-buttons .button, .signatures-buttons .toggle-button {
|
.signatures-buttons .segmented-button, .signatures-buttons .button, .signatures-buttons .toggle-button {
|
||||||
-fx-pref-height: 75px;
|
-fx-pref-height: 65px;
|
||||||
-fx-max-width: Infinity;
|
-fx-max-width: Infinity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,10 +50,6 @@
|
||||||
-fx-padding: 10 0 10 0;
|
-fx-padding: 10 0 10 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signatures-progress-bar {
|
|
||||||
-fx-padding: 10 0 10 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signatures-progress-bar > .segment {
|
.signatures-progress-bar > .segment {
|
||||||
-fx-background-color: transparent;
|
-fx-background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<Form fx:id="finalizeForm" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="6">
|
<Form fx:id="signingWalletForm" GridPane.columnIndex="0" GridPane.rowIndex="6">
|
||||||
<Fieldset text="Signatures" inputGrow="SOMETIMES">
|
<Fieldset text="Signatures" inputGrow="SOMETIMES">
|
||||||
<Field text="Signing Wallet:">
|
<Field text="Signing Wallet:">
|
||||||
<ComboBox fx:id="signingWallet" />
|
<ComboBox fx:id="signingWallet" />
|
||||||
|
@ -140,6 +140,11 @@
|
||||||
</Label>
|
</Label>
|
||||||
<Hyperlink fx:id="noWalletsWarningLink" text="Open another wallet?" onAction="#openWallet" />
|
<Hyperlink fx:id="noWalletsWarningLink" text="Open another wallet?" onAction="#openWallet" />
|
||||||
</Field>
|
</Field>
|
||||||
|
</Fieldset>
|
||||||
|
</Form>
|
||||||
|
|
||||||
|
<Form fx:id="sigHashForm" GridPane.columnIndex="1" GridPane.rowIndex="6">
|
||||||
|
<Fieldset text="" inputGrow="SOMETIMES">
|
||||||
<Field text="Sighash:">
|
<Field text="Sighash:">
|
||||||
<ComboBox fx:id="sigHash">
|
<ComboBox fx:id="sigHash">
|
||||||
<items>
|
<items>
|
||||||
|
@ -155,15 +160,16 @@
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
<StackPane styleClass="signatures-button">
|
|
||||||
<Button fx:id="finalizeTransaction" graphicTextGap="5" text="Finalize Transaction for Signing" prefWidth="Infinity" defaultButton="true" onAction="#finalizeTransaction">
|
|
||||||
<graphic>
|
|
||||||
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="10" icon="LOCK" />
|
|
||||||
</graphic>
|
|
||||||
</Button>
|
|
||||||
</StackPane>
|
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
<VBox fx:id="finalizeButtonBox" styleClass="signatures-buttons" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="7">
|
||||||
|
<Button fx:id="finalizeTransaction" graphicTextGap="5" text="Finalize Transaction for Signing" prefWidth="Infinity" defaultButton="true" onAction="#finalizeTransaction">
|
||||||
|
<graphic>
|
||||||
|
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="10" icon="LOCK" />
|
||||||
|
</graphic>
|
||||||
|
</Button>
|
||||||
|
</VBox>
|
||||||
|
|
||||||
<Form fx:id="signaturesForm" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="6">
|
<Form fx:id="signaturesForm" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="6">
|
||||||
<Fieldset text="Signatures" inputGrow="SOMETIMES">
|
<Fieldset text="Signatures" inputGrow="SOMETIMES">
|
||||||
<VBox>
|
<VBox>
|
||||||
|
|
Loading…
Reference in a new issue