mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-23 20:18:47 +00:00
refactor(SignTransactionModal): make use of StatusModal and other StatusQ components
This commit is contained in:
parent
72e9a31b30
commit
04523a0e85
@ -4,16 +4,17 @@ import QtQuick.Layouts 1.13
|
|||||||
import QtQuick.Dialogs 1.3
|
import QtQuick.Dialogs 1.3
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../../../../shared"
|
|
||||||
import "../../../../shared/status"
|
import StatusQ.Popups 0.1
|
||||||
|
import StatusQ.Controls 0.1
|
||||||
|
|
||||||
import "../../../../shared/panels"
|
import "../../../../shared/panels"
|
||||||
import "../../../../shared/controls"
|
import "../../../../shared/controls"
|
||||||
import "../../../../shared/views"
|
import "../../../../shared/views"
|
||||||
import "../../../../shared/popups"
|
import "../../../../shared/popups"
|
||||||
import "../../Wallet/"
|
import "../../Wallet/"
|
||||||
|
|
||||||
// TODO: replace with StatusModal
|
StatusModal {
|
||||||
ModalPopup {
|
|
||||||
property var selectedAccount
|
property var selectedAccount
|
||||||
property var selectedRecipient
|
property var selectedRecipient
|
||||||
property var selectedAsset
|
property var selectedAsset
|
||||||
@ -62,7 +63,7 @@ ModalPopup {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
//% "Send"
|
//% "Send"
|
||||||
title: qsTrId("command-button-send")
|
header.title: qsTrId("command-button-send")
|
||||||
height: 540
|
height: 540
|
||||||
|
|
||||||
property MessageDialog sendingError: MessageDialog {
|
property MessageDialog sendingError: MessageDialog {
|
||||||
@ -77,9 +78,11 @@ ModalPopup {
|
|||||||
stack.pop(groupPreview, StackView.Immediate)
|
stack.pop(groupPreview, StackView.Immediate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contentItem: Item {
|
||||||
|
width: root.width
|
||||||
|
height: childrenRect.height
|
||||||
TransactionStackView {
|
TransactionStackView {
|
||||||
id: stack
|
id: stack
|
||||||
anchors.fill: parent
|
|
||||||
anchors.leftMargin: Style.current.padding
|
anchors.leftMargin: Style.current.padding
|
||||||
anchors.rightMargin: Style.current.padding
|
anchors.rightMargin: Style.current.padding
|
||||||
initialItem: groupPreview
|
initialItem: groupPreview
|
||||||
@ -107,7 +110,7 @@ ModalPopup {
|
|||||||
stack.pop()
|
stack.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AccountSelector {
|
StatusAccountSelector {
|
||||||
id: selectFromAccount
|
id: selectFromAccount
|
||||||
accounts: walletModel.accountsView.accounts
|
accounts: walletModel.accountsView.accounts
|
||||||
currency: walletModel.balanceView.defaultCurrency
|
currency: walletModel.balanceView.defaultCurrency
|
||||||
@ -255,18 +258,15 @@ ModalPopup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
footer: Item {
|
leftButtons: [
|
||||||
width: parent.width
|
|
||||||
height: btnNext.height
|
|
||||||
|
|
||||||
StatusRoundButton {
|
StatusRoundButton {
|
||||||
id: btnBack
|
id: btnBack
|
||||||
anchors.left: parent.left
|
|
||||||
icon.name: "arrow-right"
|
icon.name: "arrow-right"
|
||||||
icon.width: 20
|
icon.width: 20
|
||||||
icon.height: 16
|
icon.height: 16
|
||||||
rotation: 180
|
icon.rotation: 180
|
||||||
visible: stack.currentGroup.showBackBtn
|
visible: stack.currentGroup.showBackBtn
|
||||||
enabled: stack.currentGroup.isValid || stack.isLastGroup
|
enabled: stack.currentGroup.isValid || stack.isLastGroup
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@ -276,14 +276,9 @@ ModalPopup {
|
|||||||
stack.back()
|
stack.back()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Component {
|
rightButtons: [
|
||||||
id: transactionSettingsConfirmationPopupComponent
|
|
||||||
TransactionSettingsConfirmationPopup {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StatusButton {
|
StatusButton {
|
||||||
id: btnNext
|
id: btnNext
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@ -330,6 +325,14 @@ ModalPopup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: transactionSettingsConfirmationPopupComponent
|
||||||
|
TransactionSettingsConfirmationPopup {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: walletModel.transactionsView
|
target: walletModel.transactionsView
|
||||||
@ -370,5 +373,4 @@ ModalPopup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user