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-10-19 08:52:08 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Components 0.1
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-04-28 19:03:41 +00:00
|
|
|
|
|
|
|
Rectangle {
|
2022-05-06 19:30:17 +00:00
|
|
|
property string communityId
|
2022-09-14 10:37:05 +00:00
|
|
|
signal backupButtonClicked()
|
2021-11-02 19:39:18 +00:00
|
|
|
|
2021-04-28 19:03:41 +00:00
|
|
|
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
|
2021-11-11 10:45:59 +00:00
|
|
|
color: "transparent"
|
2021-04-28 19:03:41 +00:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 66
|
|
|
|
height: 4
|
|
|
|
color: Style.current.secondaryMenuBackground
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -2
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
|
2021-10-19 08:52:08 +00:00
|
|
|
StatusRoundIcon {
|
2021-04-28 19:03:41 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -6
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: 40
|
|
|
|
height: 40
|
2022-08-11 11:55:08 +00:00
|
|
|
asset.name: "objects"
|
2021-04-28 19:03:41 +00:00
|
|
|
}
|
|
|
|
|
2022-05-06 19:30:17 +00:00
|
|
|
StatusFlatRoundButton {
|
|
|
|
id: closeImg
|
|
|
|
implicitWidth: 32
|
|
|
|
implicitHeight: 32
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 10
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 10
|
|
|
|
icon.height: 20
|
|
|
|
icon.width: 20
|
|
|
|
icon.name: "close-circle"
|
|
|
|
type: StatusFlatRoundButton.Type.Tertiary
|
|
|
|
onClicked: {
|
|
|
|
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityBackUpBanners || []
|
|
|
|
if (hiddenBannerIds.includes(root.communityId)) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
hiddenBannerIds.push(root.communityId)
|
|
|
|
localAccountSensitiveSettings.hiddenCommunityBackUpBanners = hiddenBannerIds
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-19 08:52:08 +00:00
|
|
|
StatusBaseText {
|
2021-04-28 19:03:41 +00:00
|
|
|
id: backUpText
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("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
|
2021-10-19 08:52:08 +00:00
|
|
|
color: Theme.palette.directColor1
|
2021-04-28 19:03:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
id: backUpBtn
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Back up")
|
2021-04-28 19:03:41 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: backUpText.bottom
|
|
|
|
anchors.topMargin: Style.current.padding
|
2022-09-14 10:37:05 +00:00
|
|
|
onClicked: root.backupButtonClicked()
|
2021-07-16 12:36:27 +00:00
|
|
|
}
|
2021-04-28 19:03:41 +00:00
|
|
|
}
|
|
|
|
|