status-desktop/ui/app/AppLayouts/Chat/CommunityComponents/TransferOwnershipPopup.qml

78 lines
2.0 KiB
QML
Raw Normal View History

2021-02-12 15:26:57 +00:00
import QtQuick 2.12
import QtQuick.Controls 2.3
import QtGraphicalEffects 1.13
import QtQuick.Dialogs 1.3
import "../../../../imports"
import "../../../../shared"
import "../../../../shared/status"
ModalPopup {
property string privateKey
id: popup
height: 504
title: qsTr("Transfer ownership")
2021-02-12 18:19:31 +00:00
onClosed: {
popup.destroy();
}
2021-02-12 15:26:57 +00:00
Item {
anchors.fill: parent
Input {
property string elidedPkey: popup.privateKey.substring(0, 15) + "..." + popup.privateKey.substring(popup.privateKey.length - 16)
2021-02-12 15:26:57 +00:00
id: pKeyInput
label: qsTr("Community private key")
text: elidedPkey
textField.onFocusChanged: {
if (textField.focus) {
pKeyInput.text = popup.privateKey
} else {
pKeyInput.text = elidedPkey
}
}
copyToClipboard: true
textToCopy: popup.privateKey
2021-02-12 15:26:57 +00:00
}
StyledText {
id: infoText1
text: qsTr("You should keep it safe and only share it with people you trust to take ownership of your community")
anchors.top: pKeyInput.bottom
wrapMode: Text.WordWrap
anchors.topMargin: Style.current.padding
width: parent.width
font.pixelSize: 13
color: Style.current.secondaryText
}
StyledText {
id: infoText2
text: qsTr("You can also use this key to import your community on another device")
anchors.top: infoText1.bottom
wrapMode: Text.WordWrap
anchors.topMargin: Style.current.bigPadding
width: parent.width
font.pixelSize: 13
color: Style.current.secondaryText
}
}
footer: StatusRoundButton {
id: btnBack
anchors.left: parent.left
icon.name: "arrow-right"
icon.width: 20
icon.height: 16
rotation: 180
onClicked: {
popup.close()
}
}
}