2024-02-16 17:34:09 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQml.Models 2.15
|
|
|
|
|
|
|
|
import StatusQ 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
CommonContactDialog {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
readonly property bool removeIDVerification: ctrlRemoveIDVerification.checked
|
|
|
|
readonly property bool removeContact: ctrlRemoveContact.checked
|
|
|
|
|
|
|
|
title: qsTr("Mark as untrusted")
|
|
|
|
|
|
|
|
readonly property var d: QtObject {
|
|
|
|
id: d
|
|
|
|
readonly property int outgoingVerificationStatus: contactDetails.verificationStatus
|
|
|
|
readonly property int incomingVerificationStatus: contactDetails.incomingVerificationStatus
|
|
|
|
readonly property bool isTrusted: outgoingVerificationStatus === Constants.verificationStatus.trusted ||
|
|
|
|
incomingVerificationStatus === Constants.verificationStatus.trusted
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
Layout.fillWidth: true
|
2024-10-15 19:26:12 +00:00
|
|
|
Layout.bottomMargin: Theme.halfPadding
|
2024-02-16 17:34:09 +00:00
|
|
|
text: qsTr("%1 will be marked as untrusted. This mark will only be visible to you.").arg(mainDisplayName)
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusCheckBox {
|
|
|
|
id: ctrlRemoveIDVerification
|
2024-02-26 18:54:05 +00:00
|
|
|
visible: (contactDetails.isContact && d.isTrusted) || contactDetails.trustStatus === Constants.trustStatus.trusted
|
2024-02-16 17:34:09 +00:00
|
|
|
checked: visible
|
|
|
|
enabled: false
|
|
|
|
text: qsTr("Remove ID verification")
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusCheckBox {
|
|
|
|
id: ctrlRemoveContact
|
|
|
|
visible: contactDetails.isContact
|
|
|
|
text: qsTr("Remove contact")
|
|
|
|
}
|
|
|
|
|
|
|
|
rightButtons: ObjectModel {
|
|
|
|
StatusFlatButton {
|
|
|
|
text: qsTr("Cancel")
|
|
|
|
onClicked: root.close()
|
|
|
|
}
|
|
|
|
StatusButton {
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
text: qsTr("Mark as untrusted")
|
|
|
|
onClicked: root.accepted()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|