2021-02-12 15:26:57 +00:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.3
|
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-02-12 15:26:57 +00:00
|
|
|
import "../../../../imports"
|
|
|
|
import "../../../../shared"
|
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
StatusModal {
|
2021-02-12 15:26:57 +00:00
|
|
|
id: popup
|
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
property string privateKey
|
|
|
|
|
|
|
|
header.title: qsTr("Transfer ownership")
|
2021-02-12 15:26:57 +00:00
|
|
|
|
2021-02-12 18:19:31 +00:00
|
|
|
onClosed: {
|
|
|
|
popup.destroy();
|
|
|
|
}
|
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
content: Item {
|
|
|
|
width: popup.width
|
|
|
|
height: Math.max(300, content.height + 32)
|
|
|
|
Column {
|
|
|
|
id: content
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 16
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
width: popup.width - 32
|
|
|
|
spacing: 16
|
|
|
|
|
|
|
|
Input {
|
|
|
|
property string elidedPkey: popup.privateKey.substring(0, 15) + "..." + popup.privateKey.substring(popup.privateKey.length - 16)
|
|
|
|
|
|
|
|
id: pKeyInput
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
label: qsTr("Community private key")
|
|
|
|
text: elidedPkey
|
|
|
|
textField.onFocusChanged: {
|
|
|
|
if (textField.focus) {
|
|
|
|
pKeyInput.text = popup.privateKey
|
|
|
|
} else {
|
|
|
|
pKeyInput.text = elidedPkey
|
|
|
|
}
|
2021-04-30 15:05:35 +00:00
|
|
|
}
|
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
copyToClipboard: true
|
|
|
|
textToCopy: popup.privateKey
|
|
|
|
}
|
2021-02-12 15:26:57 +00:00
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
StatusBaseText {
|
|
|
|
id: infoText1
|
|
|
|
text: qsTr("You should keep it safe and only share it with people you trust to take ownership of your community")
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
width: parent.width
|
|
|
|
font.pixelSize: 13
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
2021-02-12 15:26:57 +00:00
|
|
|
|
2021-07-16 13:07:38 +00:00
|
|
|
StatusBaseText {
|
|
|
|
id: infoText2
|
|
|
|
text: qsTr("You can also use this key to import your community on another device")
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
width: parent.width
|
|
|
|
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: {
|
|
|
|
popup.close()
|
|
|
|
}
|
2021-02-12 15:26:57 +00:00
|
|
|
}
|
2021-07-16 13:07:38 +00:00
|
|
|
]
|
2021-02-12 15:26:57 +00:00
|
|
|
}
|
|
|
|
|