2021-04-28 19:03:41 +00:00
|
|
|
import QtQuick 2.13
|
2021-07-19 16:21:43 +00:00
|
|
|
import QtGraphicalEffects 1.13
|
2021-04-28 19:03:41 +00:00
|
|
|
import "../../../../shared"
|
|
|
|
import "../../../../shared/status"
|
|
|
|
import "../../../../imports"
|
|
|
|
import "."
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: root
|
|
|
|
height: childrenRect.height + Style.current.padding
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: Style.current.padding
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.padding
|
|
|
|
border.color: Style.current.border
|
|
|
|
radius: 16
|
|
|
|
color: Style.current.transparent
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 66
|
|
|
|
height: 4
|
|
|
|
color: Style.current.secondaryMenuBackground
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -2
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
SVGImage {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -6
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
source: "../../../img/key.svg"
|
|
|
|
width: 40
|
|
|
|
height: 40
|
2021-07-19 16:21:43 +00:00
|
|
|
ColorOverlay {
|
|
|
|
anchors.fill: parent
|
|
|
|
source: parent
|
|
|
|
color: Style.current.blue
|
|
|
|
}
|
2021-04-28 19:03:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: backUpText
|
2021-07-16 20:22:50 +00:00
|
|
|
//% "Back up community key"
|
|
|
|
text: qsTrId("back-up-community-key")
|
2021-04-28 19:03:41 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 48
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 15
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.xlPadding
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: Style.current.xlPadding
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
id: backUpBtn
|
2021-07-16 20:22:50 +00:00
|
|
|
//% "Back up"
|
|
|
|
text: qsTrId("back-up")
|
2021-04-28 19:03:41 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: backUpText.bottom
|
|
|
|
anchors.topMargin: Style.current.padding
|
2021-04-29 14:48:16 +00:00
|
|
|
onClicked: {
|
|
|
|
let hiddenBannerIds = appSettings.hiddenCommunityBackUpBanners
|
|
|
|
hiddenBannerIds.push(chatsModel.communities.activeCommunity.id)
|
|
|
|
appSettings.hiddenCommunityBackUpBanners = hiddenBannerIds
|
|
|
|
openPopup(transferOwnershipPopup, {privateKey: chatsModel.communities.exportComumnity()})
|
|
|
|
}
|
2021-04-28 19:03:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|