diff --git a/ui/app/AppLayouts/Chat/popups/community/SelfDestructAlertPopup.qml b/ui/app/AppLayouts/Chat/popups/community/SelfDestructAlertPopup.qml new file mode 100644 index 0000000000..c9bb881582 --- /dev/null +++ b/ui/app/AppLayouts/Chat/popups/community/SelfDestructAlertPopup.qml @@ -0,0 +1,59 @@ +import QtQuick 2.14 +import QtQuick.Controls 2.14 +import QtQuick.Layouts 1.14 +import QtQml.Models 2.14 + +import StatusQ.Core 0.1 +import StatusQ.Controls 0.1 +import StatusQ.Popups.Dialog 0.1 +import StatusQ.Core.Theme 0.1 + +import AppLayouts.Chat.panels.communities 1.0 + +import utils 1.0 + +StatusDialog { + id: root + + property int tokenCount: 0 + + signal selfDestructClicked + signal cancelClicked + + title: qsTr("Self-destruct %n token(s)", "", root.tokenCount) + implicitWidth: 400 // by design + topPadding: Style.current.padding + bottomPadding: topPadding + contentItem: StatusBaseText { + text: qsTr("Continuing will destroy tokens held by members and revoke any perissions they given. To undo you will have to issue them new tokens.") + font.pixelSize: Style.current.primaryTextFontSize + wrapMode: Text.WordWrap + lineHeight: 1.2 + } + + footer: StatusDialogFooter { + spacing: Style.current.padding + rightButtons: ObjectModel { + + StatusButton { + text: qsTr("Cancel") + normalColor: "transparent" + + onClicked: { + root.cancelClicked() + close() + } + } + + StatusButton { + text: qsTr("Self-destruct") + type: StatusBaseButton.Type.Danger + + onClicked: { + root.selfDestructClicked() + close() + } + } + } + } +} diff --git a/ui/app/AppLayouts/Chat/popups/community/qmldir b/ui/app/AppLayouts/Chat/popups/community/qmldir index fc229d1d83..81f58bfd54 100644 --- a/ui/app/AppLayouts/Chat/popups/community/qmldir +++ b/ui/app/AppLayouts/Chat/popups/community/qmldir @@ -1,4 +1,5 @@ CreateChannelPopup 1.0 CreateChannelPopup.qml CommunityTokenPermissionsPopup 1.0 CommunityTokenPermissionsPopup.qml -SignMintTokenTransactionPopup 1.0 SignMintTokenTransactionPopup.qml RemoteSelfDestructPopup 1.0 RemoteSelfDestructPopup.qml +SelfDestructAlertPopup 1.0 SelfDestructAlertPopup.qml +SignMintTokenTransactionPopup 1.0 SignMintTokenTransactionPopup.qml