Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Settings: move Merchant menu entry
Browse files Browse the repository at this point in the history
  • Loading branch information
tobtoht authored and selsta committed Apr 13, 2020
1 parent 8e4124f commit 5ebe3f5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 33 deletions.
26 changes: 0 additions & 26 deletions LeftPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,13 @@ Rectangle {
signal addressBookClicked()
signal miningClicked()
signal signClicked()
signal merchantClicked()
signal accountClicked()

function selectItem(pos) {
menuColumn.previousButton.checked = false
if(pos === "History") menuColumn.previousButton = historyButton
else if(pos === "Transfer") menuColumn.previousButton = transferButton
else if(pos === "Receive") menuColumn.previousButton = receiveButton
else if(pos === "Merchant") menuColumn.previousButton = merchantButton
else if(pos === "AddressBook") menuColumn.previousButton = addressBookButton
else if(pos === "Mining") menuColumn.previousButton = miningButton
else if(pos === "TxKey") menuColumn.previousButton = txkeyButton
Expand Down Expand Up @@ -454,30 +452,6 @@ Rectangle {
anchors.leftMargin: 20
}

// ------------- Merchant tab ---------------

MoneroComponents.MenuButton {
id: merchantButton
visible: appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Merchant") + translationManager.emptyString
symbol: qsTr("U") + translationManager.emptyString
under: receiveButton
onClicked: {
parent.previousButton.checked = false
parent.previousButton = merchantButton
panel.merchantClicked()
}
}

MoneroComponents.MenuButtonDivider {
visible: merchantButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 20
}

// ------------- History tab ---------------

MoneroComponents.MenuButton {
Expand Down
1 change: 1 addition & 0 deletions fonts/FontAwesome/FontAwesome.qml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ Object {
property string caretUp : "\uf0d8"
property string cartArrowDown : "\uf218"
property string cartPlus : "\uf217"
property string cashRegister: "\uf788"
property string cc : "\uf20a"
property string ccAmex : "\uf1f3"
property string ccDinersClub : "\uf24c"
Expand Down
6 changes: 0 additions & 6 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1619,12 +1619,6 @@ ApplicationWindow {
updateBalance();
}

onMerchantClicked: {
middlePanel.state = "Merchant";
middlePanel.flickable.contentY = 0;
updateBalance();
}

onTxkeyClicked: {
middlePanel.state = "TxKey";
middlePanel.flickable.contentY = 0;
Expand Down
14 changes: 13 additions & 1 deletion pages/settings/SettingsWallet.qml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ Rectangle {

MoneroComponents.SettingsListItem {
iconText: FontAwesome.ellipsisH
isLast: true
description: qsTr("Change the password of your wallet.") + translationManager.emptyString
title: qsTr("Change wallet password") + translationManager.emptyString

Expand All @@ -137,6 +136,19 @@ Rectangle {
passwordDialog.open()
}
}

MoneroComponents.SettingsListItem {
iconText: FontAwesome.cashRegister
isLast: true
description: qsTr("Receive Monero for your business, easily.") + translationManager.emptyString
title: qsTr("Enter merchant mode") + translationManager.emptyString

onClicked: {
middlePanel.state = "Merchant";
middlePanel.flickable.contentY = 0;
updateBalance();
}
}
}

Component.onCompleted: {
Expand Down

0 comments on commit 5ebe3f5

Please sign in to comment.