moment/src/gui/Pages/AccountSettings/ImportExportKeys.qml

49 lines
1.3 KiB
QML
Raw Normal View History

2019-12-19 07:46:16 -04:00
// SPDX-License-Identifier: LGPL-3.0-or-later
2019-08-28 03:54:53 -04:00
import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../../Base"
2019-08-28 11:56:05 -04:00
HBox {
2019-08-28 11:54:25 -04:00
buttonModel: [
2019-09-07 19:17:32 -04:00
{ name: "export", text: qsTr("Export"), iconName: "export-keys"},
2019-08-28 11:54:25 -04:00
{ name: "import", text: qsTr("Import"), iconName: "import-keys"},
]
buttonCallbacks: ({
2019-09-07 19:17:32 -04:00
export: button => {
utils.makeObject(
"Dialogs/ExportKeys.qml",
2019-11-10 09:07:35 -04:00
accountSettings,
{ userId: accountSettings.userId },
obj => {
button.loading = Qt.binding(() => obj.exporting)
obj.dialog.open()
}
)
},
import: button => {
utils.makeObject(
"Dialogs/ImportKeys.qml",
2019-11-10 09:07:35 -04:00
accountSettings,
{ userId: accountSettings.userId },
obj => { obj.dialog.open() }
)
2019-09-07 19:17:32 -04:00
},
2019-08-28 11:54:25 -04:00
})
2019-08-28 03:54:53 -04: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-07 19:17:32 -04:00
"client, to be able to decrypt these messages again."
)
2019-08-28 03:54:53 -04:00
Layout.fillWidth: true
}
}