Files
pay/modules/backup-sync/WalletOptions.qml

77 lines
2.1 KiB
QML

import QtQuick;
import QtQuick.Controls.Basic as QQC2
import Flowee.org.pay;
import Flowee.org.pay.backup;
import "../Flowee" as Flowee;
import "../mobile" as Mobile;
Mobile.Page {
id: root
headerText: qsTr("Store Comments")
required property QtObject pageData;
Item {
BackupAccountInfo {
id: walletData
account: root.pageData;
}
}
Column {
width: parent.width
spacing: 10
Flowee.Label {
width: parent.width
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 {
text: qsTr("Enable Cloud Storage")
checked: root.pageData.cloudStorageEnabled
onCheckedChanged: root.pageData.cloudStorageEnabled = checked
}
Mobile.PageTitledBox {
id: lastSaveBox
width: parent.width
title: qsTr("Last save")
visible: lastSaved.text !== "" // never saved, no data.
Flowee.Label {
id: lastSaved
text: walletData.lastSaved
}
}
Mobile.PageTitledBox {
width: parent.width
title: qsTr("Identity Address")
Flowee.AddressLabel {
width: parent.width
txInfo: { "address": walletData.address }
}
}
Item {
width: 1
height: 100
}
Item {
width: parent.width
height: bigButton.height
Flowee.BigButton {
id: bigButton
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Store Now")
onClicked: {
root.pageData.cloudStorageEnabled = true
enabled = false // avoid multiple clicks.
walletData.startBackup();
}
}
}
}
}