moment/src/qml/Pages/EditAccount/ImportExportKeys.qml

51 lines
1.4 KiB
QML
Raw Normal View History

2019-08-28 17:54:53 +10:00
import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../../Base"
import "../../utils.js" as Utils
2019-08-29 01:56:05 +10:00
HBox {
2019-08-29 01:54:25 +10:00
horizontalSpacing: currentSpacing
verticalSpacing: currentSpacing
buttonModel: [
2019-09-08 09:17:32 +10:00
{ name: "export", text: qsTr("Export"), iconName: "export-keys"},
2019-08-29 01:54:25 +10:00
{ name: "import", text: qsTr("Import"), iconName: "import-keys"},
]
buttonCallbacks: ({
2019-09-08 09:17:32 +10:00
export: button => {
Utils.makeObject(
"Dialogs/ExportKeys.qml",
editAccount,
{ userId: editAccount.userId },
obj => {
button.loading = Qt.binding(() => obj.exporting)
obj.dialog.open()
}
)
},
import: button => {
Utils.makeObject(
"Dialogs/ImportKeys.qml",
editAccount,
{ userId: editAccount.userId },
obj => { obj.dialog.open() }
)
2019-09-08 09:17:32 +10:00
},
2019-08-29 01:54:25 +10:00
})
2019-08-28 17:54:53 +10:00
HLabel {
wrapMode: Text.Wrap
text: qsTr(
"The decryption keys for messages you received in encrypted " +
"rooms can be exported to a passphrase-protected file.\n\n" +
"You can then import this file on any Matrix account or " +
2019-09-08 09:17:32 +10:00
"client, to be able to decrypt these messages again."
)
2019-08-28 17:54:53 +10:00
Layout.fillWidth: true
}
}