2021-02-12 15:26:57 +00:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.3
|
2022-06-29 16:56:55 +00:00
|
|
|
import QtQuick.Layouts 1.14
|
2021-07-16 13:07:38 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.controls 1.0
|
|
|
|
import shared 1.0
|
2021-02-12 15:26:57 +00:00
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
StatusModal {
|
2022-06-29 16:56:55 +00:00
|
|
|
id: root
|
2021-02-12 15:26:57 +00:00
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
property string privateKey
|
2021-11-11 10:45:59 +00:00
|
|
|
property var store
|
2021-07-16 13:07:38 +00:00
|
|
|
|
2022-06-29 16:56:55 +00:00
|
|
|
header.title: qsTr("Transfer ownership")
|
|
|
|
padding: 16
|
2021-02-12 15:26:57 +00:00
|
|
|
|
2022-06-29 16:56:55 +00:00
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
2021-02-12 18:19:31 +00:00
|
|
|
|
2022-06-29 16:56:55 +00:00
|
|
|
spacing: 16
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
id: pKeyInput
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
readonly property string elidedPkey: root.privateKey.substring(0, 15) + "..." + root.privateKey.substring(root.privateKey.length - 16)
|
|
|
|
|
|
|
|
leftPadding: 0
|
|
|
|
rightPadding: 0
|
|
|
|
label: qsTr("Community private key")
|
|
|
|
|
|
|
|
input.text: elidedPkey
|
|
|
|
input.edit.readOnly: true
|
|
|
|
input.edit.onActiveFocusChanged: {
|
|
|
|
pKeyInput.input.text = pKeyInput.input.edit.focus ? root.privateKey : elidedPkey
|
|
|
|
}
|
|
|
|
input.rightComponent: StatusButton {
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
border.width: 1
|
|
|
|
border.color: Theme.palette.primaryColor1
|
|
|
|
size: StatusBaseButton.Size.Tiny
|
|
|
|
text: qsTr("Copy")
|
|
|
|
onClicked: {
|
|
|
|
text = qsTr("Copied")
|
|
|
|
root.store.copyToClipboard(root.privateKey)
|
2021-04-30 15:05:35 +00:00
|
|
|
}
|
2021-07-16 13:07:38 +00:00
|
|
|
}
|
2022-06-29 16:56:55 +00:00
|
|
|
}
|
2021-02-12 15:26:57 +00:00
|
|
|
|
2022-06-29 16:56:55 +00:00
|
|
|
StatusBaseText {
|
|
|
|
Layout.fillWidth: true
|
2021-11-11 10:45:59 +00:00
|
|
|
|
2022-06-29 16:56:55 +00:00
|
|
|
text: qsTr("You should keep it safe and only share it with people you trust to take ownership of your community")
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 13
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
2021-02-12 15:26:57 +00:00
|
|
|
|
2022-06-29 16:56:55 +00:00
|
|
|
StatusBaseText {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
text: qsTr("You can also use this key to import your community on another device")
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 13
|
|
|
|
color: Theme.palette.baseColor1
|
2021-02-12 15:26:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
leftButtons: [
|
|
|
|
StatusRoundButton {
|
|
|
|
icon.name: "arrow-right"
|
|
|
|
icon.height: 16
|
|
|
|
icon.width: 20
|
|
|
|
rotation: 180
|
|
|
|
onClicked: {
|
2022-06-29 16:56:55 +00:00
|
|
|
root.close()
|
2021-07-16 13:07:38 +00:00
|
|
|
}
|
2021-02-12 15:26:57 +00:00
|
|
|
}
|
2021-07-16 13:07:38 +00:00
|
|
|
]
|
2021-02-12 15:26:57 +00:00
|
|
|
}
|
|
|
|
|