Files
pay/modules/big-transfer/Main.qml
T

97 lines
3.0 KiB
QML
Raw Permalink Normal View History

2024-12-24 15:09:20 +01:00
/*
* This file is part of the Flowee project
* Copyright (C) 2024 Tom Zander <tom@flowee.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick;
import QtQuick.Controls as QQC2;
import QtQuick.Layouts;
2024-12-24 15:09:20 +01:00
import "../mobile" as Mobile;
import "../Flowee" as Flowee;
2024-12-24 15:09:20 +01:00
import Flowee.org.pay;
import Flowee.org.pay.bigtransfer;
Mobile.Page {
id: root
2025-01-09 20:06:18 +01:00
headerText: qsTr("Wallet to Wallet")
property alias initialWallet: fromWalletSelector.startingAccount
2024-12-24 15:09:20 +01:00
ColumnLayout {
width: parent.width
2024-12-24 15:09:20 +01:00
spacing: 10
Flowee.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
2025-01-09 20:06:18 +01:00
text: qsTr("Select two wallets to transfer funds simply, using anonimity preserving transactions.")
}
2024-12-24 15:09:20 +01:00
Mobile.PageTitledBox {
2025-01-09 20:06:18 +01:00
title: qsTr("Spending Wallet")
2024-12-29 19:13:22 +01:00
// TODO Popup with just the name
Mobile.AccountSelectorWidget {
id: fromWalletSelector
onSelectedAccountChanged: transferManager.fromAccount = selectedAccount;
}
GridLayout {
columns: 2
columnSpacing: 10
rowSpacing: 10
Flowee.Label {
text: qsTr("Addresses") + ":"
}
Flowee.Label {
text: transferManager.addressCount
}
Flowee.Label {
text: qsTr("Coins") + ":"
}
Flowee.Label {
text: transferManager.coinCount
}
}
2024-12-24 15:09:20 +01:00
}
Mobile.PageTitledBox {
title: qsTr("Destination Wallet")
// TODO Popup with just the name
// TODO add an entry "create new HD wallet"
Mobile.AccountSelectorWidget {
startingAccount: null
onSelectedAccountChanged: transferManager.toAccount = selectedAccount;
}
2024-12-24 15:09:20 +01:00
}
// button to start.
Flowee.Button {
Layout.alignment: Qt.AlignRight
text: qsTr("Prepare...")
2024-12-29 19:13:22 +01:00
enabled: transferManager.inputsOk
onClicked: {
transferManager.prepare();
thePile.push("ShowPrepared.qml", { "transferManager" : transferManager } );
}
}
}
Item {
// data
TransferManager {
id: transferManager
}
2024-12-24 15:09:20 +01:00
}
}