Files
pay/modules/backup-sync/WalletOptions-desktop.qml
T
2026-01-07 20:15:58 +01:00

91 lines
2.4 KiB
QML

import QtQuick;
import QtQuick.Layouts;
import QtQuick.Controls.Basic as QQC2
import Flowee.org.pay;
import Flowee.org.pay.backup;
import "../Flowee" as Flowee;
//import "../desktop" as Desktop;
Item {
id: root
implicitWidth: 400
implicitHeight: content.height + 20
required property QtObject pageData;
property string title: qsTr("Store Transaction Comments")
function takeFocus() {
enableCB.forceActiveFocus();
}
Item {
BackupAccountInfo {
id: walletData
account: root.pageData;
}
}
GridLayout {
id: content
width: parent.width
rowSpacing: 10
columns: 2
Flowee.Label {
id: description
Layout.fillWidth: true
Layout.columnSpan: 2
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: qsTr("Enabling this feature allows transaction comments and similar details to be stored for your benefit. They are stored private and encrypted for maximum safety.")
}
Flowee.CheckBox {
id: enableCB
checked: root.pageData.cloudStorageEnabled
onCheckedChanged: root.pageData.cloudStorageEnabled = checked
Layout.alignment: Qt.AlignRight
}
Flowee.CheckBoxLabel {
buddy: enableCB
Layout.fillWidth: true
text: qsTr("Enable Cloud Storage")
}
Flowee.Label {
Layout.alignment: Qt.AlignRight
text: qsTr("Last save") + ":"
}
Flowee.Label {
text: walletData.lastSaved
}
Flowee.Label {
Layout.alignment: Qt.AlignRight
text: qsTr("Identity Address") + ":"
}
Flowee.AddressLabel {
txInfo: { "address": walletData.address }
}
Item {
Layout.columnSpan: 2
height: 100
}
Item {
Layout.columnSpan: 2
implicitHeight: bigButton.height
Layout.fillWidth: true
Flowee.BigButton {
id: bigButton
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Store Now")
onClicked: {
root.pageData.cloudStorageEnabled = true
enabled = false // avoid multiple clicks.
walletData.startBackup();
}
}
}
}
}