2020-08-10 11:56:16 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-21 15:07:13 +00:00
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-10-14 13:09:35 +00:00
|
|
|
import "../panels"
|
2021-10-14 11:33:34 +00:00
|
|
|
import "."
|
2020-08-10 11:56:16 +00:00
|
|
|
|
2021-10-14 09:50:59 +00:00
|
|
|
// TODO: replace with StatusModal
|
2020-08-10 11:56:16 +00:00
|
|
|
ModalPopup {
|
|
|
|
id: blockContactConfirmationDialog
|
|
|
|
height: 237
|
|
|
|
width: 400
|
2020-10-02 13:02:56 +00:00
|
|
|
|
2020-08-10 11:56:16 +00:00
|
|
|
property string contactAddress: ""
|
|
|
|
property string contactName: ""
|
2022-02-09 09:43:23 +00:00
|
|
|
|
2020-08-10 11:56:16 +00:00
|
|
|
signal blockButtonClicked()
|
2022-02-09 09:43:23 +00:00
|
|
|
|
2022-04-04 11:26:30 +00:00
|
|
|
title: qsTr("Block User")
|
2020-08-10 11:56:16 +00:00
|
|
|
|
2020-09-15 11:21:23 +00:00
|
|
|
StyledText {
|
2021-08-09 11:11:04 +00:00
|
|
|
text: qsTr("Blocking will stop new messages from reaching you from %1.").arg(contactName)
|
2020-08-10 11:56:16 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: Item {
|
|
|
|
id: footerContainer
|
|
|
|
width: parent.width
|
|
|
|
height: children[0].height
|
|
|
|
|
2021-01-28 11:04:10 +00:00
|
|
|
StatusButton {
|
2020-08-10 11:56:16 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.smallPadding
|
2021-10-21 15:07:13 +00:00
|
|
|
type: StatusBaseButton.Type.Danger
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Block User")
|
2020-08-10 11:56:16 +00:00
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
onClicked: blockContactConfirmationDialog.blockButtonClicked()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|