2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
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-09-15 22:17:51 +00:00
|
|
|
id: root
|
|
|
|
|
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
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
height: childrenRect.height + Theme.padding
|
2021-04-28 19:03:41 +00:00
|
|
|
anchors.left: parent.left
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.leftMargin: Theme.padding
|
2021-04-28 19:03:41 +00:00
|
|
|
anchors.right: parent.right
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.rightMargin: Theme.padding
|
|
|
|
border.color: Theme.palette.border
|
2021-04-28 19:03:41 +00:00
|
|
|
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
|
2024-10-15 19:26:12 +00:00
|
|
|
color: Theme.palette.secondaryMenuBackground
|
2021-04-28 19:03:41 +00:00
|
|
|
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
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.right: parent.right
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.rightMargin: Theme.xlPadding
|
2021-04-28 19:03:41 +00:00
|
|
|
anchors.left: parent.left
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.leftMargin: Theme.xlPadding
|
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
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.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
|
|
|
}
|
|
|
|
|