feat(@desktop/wallet): Move action buttons to bottom as per new design

fixes #5075
This commit is contained in:
Khushboo Mehta 2022-03-23 12:08:49 +01:00 committed by Iuri Matias
parent 327f64a239
commit 7d58ac9983
5 changed files with 99 additions and 81 deletions

View File

@ -19,6 +19,7 @@ Item {
property var store
property var contactsStore
property var emojiPopup: null
property var sendModal
function showSigningPhrasePopup(){
if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){
@ -54,6 +55,7 @@ Item {
changeSelectedAccount: leftTab.changeSelectedAccount
store: walletView.store
emojiPopup: walletView.emojiPopup
sendModal: walletView.sendModal
}
}

View File

@ -0,0 +1,73 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.13
import StatusQ.Popups 0.1
import StatusQ.Controls 0.1
import utils 1.0
import "../popups"
Rectangle {
id: walletFooter
property var sendModal
height: 61
color: Theme.palette.statusAppLayout.rightPanelBackgroundColor
StatusModalDivider {
anchors.top: parent.top
width: parent.width
}
RowLayout {
anchors.centerIn: parent
height: sendBtn.height
spacing: Style.current.padding
StatusFlatButton {
icon.name: "send"
//% "Send"
text: qsTrId("command-button-send")
onClicked: function() {
sendModal.open()
}
}
StatusFlatButton {
icon.name: "receive"
//% "Receive"
text: qsTrId("receive")
onClicked: function () {
Global.openPopup(receiveModalComponent);
}
}
StatusFlatButton {
id: buySellBtn
icon.name: "token"
//% "Buy / Sell"
text: qsTrId("Buy / Sell")
onClicked: function () {
Global.openPopup(buySellModal);
}
}
}
Component {
id: receiveModalComponent
ReceiveModal {
selectedAccount: walletHeader.walletStore.currentAccount
anchors.centerIn: parent
}
}
Component {
id: buySellModal
CryptoServicesModal {}
}
}

View File

@ -24,14 +24,6 @@ Item {
property var emojiPopup
height: walletAddress.y + walletAddress.height
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: parent.top
anchors.topMargin: 0
Layout.fillHeight: true
Layout.fillWidth: true
StyledText {
id: title
@ -88,17 +80,6 @@ Item {
store: walletHeader.walletStore
}
Component {
id: receiveModalComponent
ReceiveModal {
onClosed: {
destroy();
}
selectedAccount: walletHeader.walletStore.currentAccount
anchors.centerIn: parent
}
}
Component {
id: setCurrencyModalComponent
SetCurrencyModal {
@ -118,56 +99,16 @@ Item {
}
}
Component {
id: buySellModal
CryptoServicesModal {
onClosed: destroy()
}
}
RowLayout {
id: walletMenu
anchors.top: parent.top
anchors.topMargin: 16
anchors.topMargin: Style.current.padding
anchors.right: parent.right
anchors.rightMargin: 16
anchors.rightMargin: Style.current.padding
spacing: Style.current.bigPadding
HeaderButton {
id: sendBtn
imageSource: Style.svg("send")
//% "Send"
text: qsTrId("command-button-send")
onClicked: function() {
sendModal.open()
}
}
HeaderButton {
id: receiveBtn
imageSource: Style.svg("send")
flipImage: true
//% "Receive"
text: qsTrId("receive")
onClicked: function () {
Global.openPopup(receiveModalComponent);
}
}
HeaderButton {
id: buySellBtn
imageSource: Style.svg("crypto-icon")
flipImage: true
//% "Buy / Sell"
text: qsTrId("Buy / Sell")
onClicked: function () {
Global.openPopup(buySellModal);
}
}
HeaderButton {
id: settingsBtn
imageSource: Style.svg("settings")

View File

@ -20,28 +20,23 @@ Item {
property alias currentTabIndex: walletTabBar.currentIndex
property var store
property var emojiPopup
property var sendModal
WalletHeader {
id: walletHeader
locale: RootStore.locale
currency: RootStore.currentCurrency
currentAccount: RootStore.currentAccount
changeSelectedAccount: walletContainer.changeSelectedAccount
store: walletContainer.store
walletStore: RootStore
emojiPopup: walletContainer.emojiPopup
}
ColumnLayout {
width: parent.width
height: parent.height
RowLayout {
id: walletInfoContainer
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
anchors.top: walletHeader.bottom
anchors.topMargin: 23
WalletHeader {
id: walletHeader
Layout.fillWidth: true
locale: RootStore.locale
currency: RootStore.currentCurrency
currentAccount: RootStore.currentAccount
changeSelectedAccount: walletContainer.changeSelectedAccount
store: walletContainer.store
walletStore: RootStore
emojiPopup: walletContainer.emojiPopup
}
Item {
id: walletInfoContent
@ -103,5 +98,11 @@ Item {
}
}
}
WalletFooter {
id: walletFooter
Layout.fillWidth: true
sendModal: walletContainer.sendModal
}
}
}

View File

@ -498,6 +498,7 @@ Item {
store: appMain.rootStore
contactsStore: appMain.rootStore.profileSectionStore.contactsStore
emojiPopup: statusEmojiPopup
sendModal: sendModal
}
Component {