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"
|
2020-07-11 22:52:14 -04:00
|
|
|
import "../../Base/Buttons"
|
2019-08-28 03:54:53 -04:00
|
|
|
|
2020-06-25 08:32:08 -04:00
|
|
|
HFlickableColumnPage {
|
|
|
|
id: page
|
2019-08-28 11:54:25 -04:00
|
|
|
|
2020-06-25 08:32:08 -04:00
|
|
|
property string userId
|
|
|
|
|
|
|
|
function takeFocus() { exportButton.forceActiveFocus() }
|
|
|
|
|
|
|
|
|
2020-07-11 22:52:14 -04:00
|
|
|
footer: AutoDirectionLayout {
|
|
|
|
GroupButton {
|
2020-06-25 08:32:08 -04:00
|
|
|
id: exportButton
|
|
|
|
text: qsTr("Export")
|
|
|
|
icon.name: "export-keys"
|
|
|
|
|
|
|
|
onClicked: utils.makeObject(
|
2019-09-09 14:42:58 -04:00
|
|
|
"Dialogs/ExportKeys.qml",
|
2020-06-25 08:32:08 -04:00
|
|
|
page,
|
|
|
|
{ userId: page.userId },
|
2019-09-09 14:42:58 -04:00
|
|
|
obj => {
|
2020-06-25 08:32:08 -04:00
|
|
|
loading = Qt.binding(() => obj.exporting)
|
2019-09-09 14:42:58 -04:00
|
|
|
obj.dialog.open()
|
|
|
|
}
|
|
|
|
)
|
2020-06-25 08:32:08 -04:00
|
|
|
}
|
|
|
|
|
2020-07-11 22:52:14 -04:00
|
|
|
GroupButton {
|
2020-06-25 08:32:08 -04:00
|
|
|
text: qsTr("Import")
|
|
|
|
icon.name: "import-keys"
|
|
|
|
|
|
|
|
onClicked: utils.makeObject(
|
2019-09-09 14:42:58 -04:00
|
|
|
"Dialogs/ImportKeys.qml",
|
2020-06-25 08:32:08 -04:00
|
|
|
page,
|
|
|
|
{ userId: page.userId },
|
2019-09-09 14:42:58 -04:00
|
|
|
obj => { obj.dialog.open() }
|
|
|
|
)
|
2020-06-25 08:32:08 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-28 11:54:25 -04:00
|
|
|
|
2019-08-28 03:54:53 -04:00
|
|
|
HLabel {
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
text: qsTr(
|
2020-03-12 15:52:43 -04:00
|
|
|
"The decryption keys for messages received in encrypted rooms " +
|
2020-06-25 08:32:08 -04:00
|
|
|
"<b>until present time</b> can be saved " +
|
2020-03-12 15:52:43 -04:00
|
|
|
"to a passphrase-protected file.<br><br>" +
|
2019-09-09 12:57:40 -04:00
|
|
|
|
|
|
|
"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."
|
|
|
|
)
|
2020-03-12 15:52:43 -04:00
|
|
|
textFormat: Text.StyledText
|
2019-08-28 03:54:53 -04:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
}
|