2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2022-08-16 18:15:39 +00:00
|
|
|
import QtQml.Models 2.14
|
2020-09-15 20:10:43 +00:00
|
|
|
import QtGraphicalEffects 1.13
|
2021-08-30 14:01:34 +00:00
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
|
|
|
import shared.popups 1.0
|
2021-12-21 20:52:17 +00:00
|
|
|
import shared.stores 1.0
|
2022-06-22 12:16:21 +00:00
|
|
|
import shared.views 1.0 as SharedViews
|
2022-03-09 10:27:32 +00:00
|
|
|
import shared.controls.chat 1.0
|
2022-06-28 18:11:18 +00:00
|
|
|
import shared.panels 1.0
|
2020-06-04 10:30:49 +00:00
|
|
|
|
2022-03-09 10:27:32 +00:00
|
|
|
import StatusQ.Core 0.1
|
2021-08-30 14:01:34 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
2022-08-16 18:15:39 +00:00
|
|
|
import StatusQ.Popups.Dialog 0.1
|
2021-08-30 14:01:34 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
StatusDialog {
|
2020-06-04 10:30:49 +00:00
|
|
|
id: popup
|
2020-10-02 13:02:56 +00:00
|
|
|
|
|
|
|
property Popup parentPopup
|
|
|
|
|
2022-01-17 14:56:19 +00:00
|
|
|
property var profileStore
|
2021-12-31 12:29:51 +00:00
|
|
|
property var contactsStore
|
|
|
|
|
|
|
|
property string userPublicKey: ""
|
|
|
|
property string userDisplayName: ""
|
|
|
|
property string userName: ""
|
|
|
|
property string userNickname: ""
|
|
|
|
property string userEnsName: ""
|
|
|
|
property string userIcon: ""
|
2022-08-10 08:36:14 +00:00
|
|
|
property string userBio: ""
|
|
|
|
property string userSocialLinks: ""
|
2022-06-28 18:11:18 +00:00
|
|
|
property int userTrustStatus: Constants.trustStatus.unknown
|
2022-07-07 19:44:54 +00:00
|
|
|
property int outgoingVerificationStatus: Constants.verificationStatus.unverified
|
|
|
|
property int incomingVerificationStatus: Constants.verificationStatus.unverified
|
2022-06-28 18:11:18 +00:00
|
|
|
property string text: ""
|
|
|
|
property string challenge: ""
|
|
|
|
property string response: ""
|
2021-12-31 12:29:51 +00:00
|
|
|
|
|
|
|
property bool userIsEnsVerified: false
|
|
|
|
property bool userIsBlocked: false
|
2022-06-28 18:11:18 +00:00
|
|
|
property bool userIsUntrustworthy: false
|
|
|
|
property bool userTrustIsUnknown: false
|
2021-07-22 17:08:37 +00:00
|
|
|
property bool isCurrentUser: false
|
2022-01-04 12:06:05 +00:00
|
|
|
property bool isAddedContact: false
|
2022-07-06 16:51:56 +00:00
|
|
|
property bool isContact: false
|
2022-06-28 18:11:18 +00:00
|
|
|
property bool isVerificationSent: false
|
|
|
|
property bool isVerified: false
|
|
|
|
property bool isTrusted: false
|
|
|
|
property bool hasReceivedVerificationRequest: false
|
|
|
|
|
|
|
|
property bool showRemoveVerified: false
|
|
|
|
property bool showVerifyIdentitySection: false
|
|
|
|
property bool showVerificationPendingSection: false
|
|
|
|
property bool showIdentityVerified: false
|
|
|
|
property bool showIdentityVerifiedUntrustworthy: false
|
|
|
|
|
|
|
|
property string verificationChallenge: ""
|
|
|
|
property string verificationResponse: ""
|
|
|
|
property string verificationResponseDisplayName: ""
|
|
|
|
property string verificationResponseIcon: ""
|
|
|
|
property string verificationRequestedAt: ""
|
|
|
|
property string verificationRepliedAt: ""
|
|
|
|
|
|
|
|
signal blockButtonClicked(name: string, address: string)
|
|
|
|
signal unblockButtonClicked(name: string, address: string)
|
|
|
|
signal removeButtonClicked(address: string)
|
2020-06-17 21:43:26 +00:00
|
|
|
|
2020-12-02 09:10:22 +00:00
|
|
|
signal contactUnblocked(publicKey: string)
|
2020-10-02 14:37:51 +00:00
|
|
|
signal contactBlocked(publicKey: string)
|
|
|
|
|
2022-06-20 14:48:38 +00:00
|
|
|
function openPopup(publicKey, state = "") {
|
2021-12-31 12:29:51 +00:00
|
|
|
// All this should be improved more, but for now we leave it like this.
|
2022-06-22 12:16:21 +00:00
|
|
|
const contactDetails = Utils.getContactDetailsAsJson(publicKey);
|
2022-08-10 08:36:14 +00:00
|
|
|
|
2022-06-20 14:48:38 +00:00
|
|
|
userPublicKey = publicKey;
|
|
|
|
userDisplayName = contactDetails.displayName;
|
|
|
|
userName = contactDetails.alias;
|
|
|
|
userNickname = contactDetails.localNickname;
|
|
|
|
userEnsName = contactDetails.name;
|
2022-07-06 19:07:33 +00:00
|
|
|
userIcon = contactDetails.largeImage;
|
2022-08-10 08:36:14 +00:00
|
|
|
userBio = contactDetails.bio;
|
|
|
|
userSocialLinks = contactDetails.socialLinks;
|
2022-06-20 14:48:38 +00:00
|
|
|
userIsEnsVerified = contactDetails.ensVerified;
|
|
|
|
userIsBlocked = contactDetails.isBlocked;
|
2022-07-06 16:51:56 +00:00
|
|
|
isAddedContact = contactDetails.isAdded;
|
|
|
|
isContact = contactDetails.isContact
|
2022-06-28 18:11:18 +00:00
|
|
|
userTrustStatus = contactDetails.trustStatus
|
|
|
|
userTrustIsUnknown = contactDetails.trustStatus === Constants.trustStatus.unknown
|
|
|
|
userIsUntrustworthy = contactDetails.trustStatus === Constants.trustStatus.untrustworthy
|
2022-07-07 19:44:54 +00:00
|
|
|
outgoingVerificationStatus = contactDetails.verificationStatus
|
|
|
|
incomingVerificationStatus = contactDetails.incomingVerificationStatus
|
|
|
|
isVerificationSent = outgoingVerificationStatus !== Constants.verificationStatus.unverified
|
2022-06-28 18:11:18 +00:00
|
|
|
|
2022-07-06 16:51:56 +00:00
|
|
|
if (isContact && popup.contactsStore.hasReceivedVerificationRequestFrom(publicKey)) {
|
2022-06-28 18:11:18 +00:00
|
|
|
popup.hasReceivedVerificationRequest = true
|
|
|
|
}
|
|
|
|
|
2022-07-06 16:51:56 +00:00
|
|
|
if(isContact && isVerificationSent) {
|
2022-06-28 18:11:18 +00:00
|
|
|
let verificationDetails = popup.contactsStore.getSentVerificationDetailsAsJson(publicKey);
|
|
|
|
|
2022-07-07 19:44:54 +00:00
|
|
|
outgoingVerificationStatus = verificationDetails.requestStatus;
|
2022-06-28 18:11:18 +00:00
|
|
|
verificationChallenge = verificationDetails.challenge;
|
|
|
|
verificationResponse = verificationDetails.response;
|
|
|
|
verificationResponseDisplayName = verificationDetails.displayName;
|
|
|
|
verificationResponseIcon = verificationDetails.icon;
|
|
|
|
verificationRequestedAt = verificationDetails.requestedAt;
|
|
|
|
verificationRepliedAt = verificationDetails.repliedAt;
|
|
|
|
}
|
2022-07-07 19:44:54 +00:00
|
|
|
isTrusted = outgoingVerificationStatus === Constants.verificationStatus.trusted
|
|
|
|
|| incomingVerificationStatus === Constants.verificationStatus.trusted
|
|
|
|
isVerified = outgoingVerificationStatus === Constants.verificationStatus.verified
|
2022-06-28 18:11:18 +00:00
|
|
|
|
|
|
|
text = ""; // this is most likely unneeded
|
2022-06-20 14:48:38 +00:00
|
|
|
isCurrentUser = popup.profileStore.pubkey === publicKey;
|
2022-06-22 12:16:21 +00:00
|
|
|
|
2022-06-20 14:48:38 +00:00
|
|
|
popup.open();
|
|
|
|
|
2022-07-07 19:44:54 +00:00
|
|
|
if (state === Constants.profilePopupStates.openNickname) {
|
2022-07-06 19:27:04 +00:00
|
|
|
profileView.nicknamePopup.open();
|
2022-07-07 19:44:54 +00:00
|
|
|
} else if (state === Constants.profilePopupStates.contactRequest) {
|
2022-06-20 14:48:38 +00:00
|
|
|
sendContactRequestModal.open()
|
2022-07-07 19:44:54 +00:00
|
|
|
} else if (state === Constants.profilePopupStates.blockUser) {
|
2022-06-20 14:48:38 +00:00
|
|
|
blockUser();
|
2022-07-07 19:44:54 +00:00
|
|
|
} else if (state === Constants.profilePopupStates.unblockUser) {
|
2022-06-20 14:48:38 +00:00
|
|
|
unblockUser();
|
2022-07-07 19:44:54 +00:00
|
|
|
} else if (state === Constants.profilePopupStates.verifyIdentity) {
|
2022-07-06 19:27:04 +00:00
|
|
|
showVerifyIdentitySection = true;
|
2022-07-07 19:44:54 +00:00
|
|
|
} else if (state === Constants.profilePopupStates.respondToPendingRequest) {
|
|
|
|
popup.openPendingRequestPopup()
|
|
|
|
} else if (state === Constants.profilePopupStates.showVerificationPendingSection) {
|
|
|
|
popup.showVerificationPendingSection = true
|
|
|
|
profileView.wizardAnimation.running = true
|
2022-03-15 15:55:18 +00:00
|
|
|
}
|
2020-06-17 21:43:26 +00:00
|
|
|
}
|
2020-06-09 10:05:25 +00:00
|
|
|
|
2022-06-20 14:48:38 +00:00
|
|
|
function blockUser() {
|
2022-06-22 12:16:21 +00:00
|
|
|
profileView.blockContactConfirmationDialog.contactName = userName;
|
|
|
|
profileView.blockContactConfirmationDialog.contactAddress = userPublicKey;
|
|
|
|
profileView.blockContactConfirmationDialog.open();
|
2022-06-20 14:48:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function unblockUser() {
|
2022-06-22 12:16:21 +00:00
|
|
|
profileView.unblockContactConfirmationDialog.contactName = userName;
|
|
|
|
profileView.unblockContactConfirmationDialog.contactAddress = userPublicKey;
|
|
|
|
profileView.unblockContactConfirmationDialog.open();
|
2022-06-20 14:48:38 +00:00
|
|
|
}
|
|
|
|
|
2022-07-07 19:44:54 +00:00
|
|
|
function openPendingRequestPopup() {
|
|
|
|
try {
|
|
|
|
let request = popup.contactsStore.getVerificationDetailsFromAsJson(popup.userPublicKey)
|
|
|
|
Global.openPopup(contactVerificationRequestPopupComponent, {
|
|
|
|
senderPublicKey: request.from,
|
|
|
|
senderDisplayName: request.displayName,
|
|
|
|
senderIcon: request.icon,
|
|
|
|
challengeText: request.challenge,
|
|
|
|
responseText: request.response,
|
|
|
|
messageTimestamp: request.requestedAt,
|
|
|
|
responseTimestamp: request.repliedAt
|
|
|
|
})
|
|
|
|
} catch (e) {
|
|
|
|
console.error("Error getting or parsing verification data", e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-28 18:11:18 +00:00
|
|
|
width: 700
|
2022-06-22 12:16:21 +00:00
|
|
|
padding: 8
|
2021-08-30 14:01:34 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
header: StatusDialogHeader {
|
|
|
|
id: dialogHeader
|
2021-08-30 14:01:34 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
headline.title: {
|
|
|
|
if(showVerifyIdentitySection || showVerificationPendingSection){
|
|
|
|
return qsTr("Verify %1's Identity").arg(userIsEnsVerified ? userName : userDisplayName)
|
|
|
|
}
|
|
|
|
return popup.isCurrentUser ? qsTr("My Profile") :
|
|
|
|
qsTr("%1's Profile").arg(userIsEnsVerified ? userName : userDisplayName)
|
|
|
|
}
|
2021-01-12 20:51:00 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
headline.subtitle: popup.isCurrentUser ? "" : userIsEnsVerified ? userName : Utils.getElidedCompressedPk(userPublicKey)
|
2022-06-22 12:16:21 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
actions {
|
|
|
|
customButtons: ObjectModel {
|
|
|
|
StatusFlatRoundButton {
|
|
|
|
type: StatusFlatRoundButton.Type.Secondary
|
|
|
|
width: 32
|
|
|
|
height: 32
|
2022-06-22 12:16:21 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
icon.width: 20
|
|
|
|
icon.height: 20
|
|
|
|
icon.name: "qr"
|
|
|
|
onClicked: profileView.qrCodePopup.open()
|
|
|
|
}
|
|
|
|
}
|
2022-08-10 08:36:14 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
closeButton.onClicked: popup.close()
|
2020-12-04 13:51:25 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
}
|
2020-06-29 15:23:28 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
footer: StatusDialogFooter {
|
|
|
|
visible: !popup.isCurrentUser
|
2020-09-15 20:10:43 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
leftButtons: ObjectModel {
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Cancel verification")
|
|
|
|
visible: !isVerified && isContact && isVerificationSent && showVerificationPendingSection
|
|
|
|
onClicked: {
|
|
|
|
popup.contactsStore.cancelVerificationRequest(userPublicKey);
|
|
|
|
popup.close()
|
|
|
|
}
|
|
|
|
}
|
2020-09-15 20:10:43 +00:00
|
|
|
}
|
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
rightButtons: ObjectModel {
|
|
|
|
StatusFlatButton {
|
|
|
|
text: userIsBlocked ?
|
|
|
|
qsTr("Unblock User") :
|
|
|
|
qsTr("Block User")
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
visible: !isAddedContact
|
|
|
|
onClicked: userIsBlocked ? unblockUser() : blockUser()
|
|
|
|
}
|
2020-06-09 10:05:25 +00:00
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
StatusFlatButton {
|
|
|
|
visible: !showRemoveVerified && !showIdentityVerified && !showVerifyIdentitySection && !showVerificationPendingSection && !userIsBlocked && isAddedContact
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
text: qsTr('Remove Contact')
|
|
|
|
onClicked: {
|
|
|
|
profileView.removeContactConfirmationDialog.parentPopup = popup;
|
|
|
|
profileView.removeContactConfirmationDialog.open();
|
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Send Contact Request")
|
|
|
|
visible: !userIsBlocked && !isAddedContact
|
|
|
|
onClicked: sendContactRequestModal.open()
|
2020-06-19 17:18:04 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Mark Untrustworthy")
|
|
|
|
visible: !showIdentityVerifiedUntrustworthy && !showIdentityVerified && !showVerifyIdentitySection && userTrustIsUnknown
|
|
|
|
enabled: !showVerificationPendingSection || verificationResponse !== ""
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
onClicked: {
|
|
|
|
if (showVerificationPendingSection) {
|
|
|
|
popup.showIdentityVerified = false;
|
|
|
|
popup.showIdentityVerifiedUntrustworthy = true;
|
|
|
|
popup.showVerificationPendingSection = false;
|
|
|
|
popup.showVerifyIdentitySection = false;
|
|
|
|
profileView.stepsListModel.setProperty(2, "stepCompleted", true);
|
|
|
|
popup.contactsStore.verifiedUntrustworthy(userPublicKey);
|
|
|
|
} else {
|
|
|
|
popup.contactsStore.markUntrustworthy(userPublicKey);
|
|
|
|
popup.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Remove 'Identity Verified' status")
|
|
|
|
visible: isTrusted && !showIdentityVerified && !showRemoveVerified
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
onClicked: {
|
|
|
|
showRemoveVerified = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("No")
|
|
|
|
visible: showRemoveVerified
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
onClicked: {
|
|
|
|
showRemoveVerified = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Yes")
|
|
|
|
visible: showRemoveVerified
|
|
|
|
onClicked: {
|
|
|
|
popup.contactsStore.removeTrustStatus(userPublicKey);
|
2022-06-28 18:11:18 +00:00
|
|
|
popup.close();
|
|
|
|
}
|
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Remove Untrustworthy Mark")
|
|
|
|
visible: userIsUntrustworthy
|
|
|
|
onClicked: {
|
|
|
|
popup.contactsStore.removeTrustStatus(userPublicKey);
|
|
|
|
popup.close();
|
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Verify Identity")
|
|
|
|
visible: !showIdentityVerifiedUntrustworthy && !showIdentityVerified &&
|
|
|
|
!showVerifyIdentitySection && isContact && !isVerificationSent
|
|
|
|
&& !hasReceivedVerificationRequest
|
|
|
|
onClicked: {
|
|
|
|
popup.showVerifyIdentitySection = true
|
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Verify Identity pending...")
|
|
|
|
visible: (!showIdentityVerifiedUntrustworthy && !showIdentityVerified && !isTrusted
|
|
|
|
&& isContact && isVerificationSent && !showVerificationPendingSection) ||
|
|
|
|
(hasReceivedVerificationRequest && !isTrusted)
|
|
|
|
onClicked: {
|
|
|
|
if (hasReceivedVerificationRequest) {
|
|
|
|
popup.openPendingRequestPopup()
|
|
|
|
} else {
|
|
|
|
popup.showVerificationPendingSection = true
|
|
|
|
profileView.wizardAnimation.running = true
|
|
|
|
}
|
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Send verification request")
|
|
|
|
visible: showVerifyIdentitySection && isContact && !isVerificationSent
|
|
|
|
onClicked: {
|
|
|
|
popup.contactsStore.sendVerificationRequest(userPublicKey, Utils.escapeHtml(profileView.challengeTxt.input.text));
|
|
|
|
profileView.stepsListModel.setProperty(1, "stepCompleted", true);
|
|
|
|
Global.displayToastMessage(qsTr("Verification request sent"),
|
|
|
|
"",
|
|
|
|
"checkmark-circle",
|
|
|
|
false,
|
|
|
|
Constants.ephemeralNotificationType.normal,
|
|
|
|
"");
|
|
|
|
popup.close();
|
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Confirm Identity")
|
|
|
|
visible: isContact && isVerificationSent && !isTrusted && showVerificationPendingSection
|
|
|
|
enabled: verificationChallenge !== "" && verificationResponse !== ""
|
|
|
|
onClicked: {
|
|
|
|
popup.showIdentityVerified = true;
|
|
|
|
popup.showIdentityVerifiedUntrustworthy = false;
|
|
|
|
popup.showVerificationPendingSection = false;
|
|
|
|
popup.showVerifyIdentitySection = false;
|
|
|
|
profileView.stepsListModel.setProperty(2, "stepCompleted", true);
|
|
|
|
popup.contactsStore.verifiedTrusted(userPublicKey);
|
|
|
|
popup.isTrusted = true
|
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
visible: showIdentityVerified || showIdentityVerifiedUntrustworthy
|
|
|
|
text: qsTr("Rename")
|
|
|
|
onClicked: {
|
|
|
|
profileView.nicknamePopup.open()
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
visible: showIdentityVerified || showIdentityVerifiedUntrustworthy
|
|
|
|
text: qsTr("Close")
|
|
|
|
onClicked: {
|
|
|
|
popup.close();
|
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusScrollView {
|
|
|
|
id: scrollView
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
padding: 0
|
|
|
|
|
|
|
|
SharedViews.ProfileView {
|
|
|
|
id: profileView
|
|
|
|
|
|
|
|
width: scrollView.availableWidth
|
|
|
|
|
|
|
|
profileStore: popup.profileStore
|
|
|
|
contactsStore: popup.contactsStore
|
|
|
|
|
|
|
|
|
|
|
|
userPublicKey: popup.userPublicKey
|
|
|
|
userDisplayName: popup.userDisplayName
|
|
|
|
userName: popup.userName
|
|
|
|
userNickname: popup.userNickname
|
|
|
|
userEnsName: popup.userEnsName
|
|
|
|
userIcon: popup.userIcon
|
|
|
|
userBio: popup.userBio
|
|
|
|
userSocialLinks: popup.userSocialLinks
|
|
|
|
userIsEnsVerified: popup.userIsEnsVerified
|
|
|
|
userIsBlocked: popup.userIsBlocked
|
|
|
|
isAddedContact: popup.isAddedContact
|
|
|
|
isCurrentUser: popup.isCurrentUser
|
|
|
|
|
|
|
|
isContact: popup.isContact
|
|
|
|
isVerificationSent: popup.isVerificationSent
|
|
|
|
isVerified: popup.isVerified
|
|
|
|
isTrusted: popup.isTrusted
|
|
|
|
hasReceivedVerificationRequest: popup.hasReceivedVerificationRequest
|
|
|
|
|
|
|
|
userTrustStatus: popup.userTrustStatus
|
|
|
|
outgoingVerificationStatus: popup.outgoingVerificationStatus
|
|
|
|
|
|
|
|
showVerifyIdentitySection: popup.showVerifyIdentitySection
|
|
|
|
showVerificationPendingSection: popup.showVerificationPendingSection
|
|
|
|
showIdentityVerified: popup.showIdentityVerified
|
|
|
|
showIdentityVerifiedUntrustworthy: popup.showIdentityVerifiedUntrustworthy
|
|
|
|
|
|
|
|
challenge: popup.challenge
|
|
|
|
response: popup.response
|
|
|
|
|
|
|
|
userIsUntrustworthy: popup.userIsUntrustworthy
|
|
|
|
userTrustIsUnknown: popup.userTrustIsUnknown
|
|
|
|
|
|
|
|
verificationChallenge: popup.verificationChallenge
|
|
|
|
verificationResponse: popup.verificationResponse
|
|
|
|
verificationResponseDisplayName: popup.verificationResponseDisplayName
|
|
|
|
verificationResponseIcon: popup.verificationResponseIcon
|
|
|
|
verificationRequestedAt: popup.verificationRequestedAt
|
|
|
|
verificationRepliedAt: popup.verificationRepliedAt
|
|
|
|
|
|
|
|
onContactUnblocked: {
|
|
|
|
popup.close()
|
|
|
|
popup.contactUnblocked(publicKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
onContactBlocked: {
|
|
|
|
popup.close()
|
|
|
|
popup.contactBlocked(publicKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
onContactAdded: {
|
|
|
|
popup.close()
|
|
|
|
popup.contactAdded(publicKey)
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
onContactRemoved: {
|
|
|
|
popup.close()
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
|
|
|
|
2022-08-16 18:15:39 +00:00
|
|
|
onNicknameEdited: {
|
|
|
|
popup.close()
|
2022-06-28 18:11:18 +00:00
|
|
|
}
|
2021-01-12 20:51:00 +00:00
|
|
|
}
|
2022-08-16 18:15:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: replace with StatusStackModal
|
|
|
|
SendContactRequestModal {
|
|
|
|
id: sendContactRequestModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
width: popup.width
|
|
|
|
visible: false
|
|
|
|
header.title: qsTr("Send Contact Request to %1").arg(userDisplayName)
|
|
|
|
userPublicKey: popup.userPublicKey
|
|
|
|
userDisplayName: popup.userDisplayName
|
|
|
|
userIcon: popup.userIcon
|
|
|
|
onAccepted: popup.contactsStore.sendContactRequest(userPublicKey, message)
|
|
|
|
onClosed: popup.close()
|
|
|
|
}
|
2022-06-28 18:11:18 +00:00
|
|
|
|
|
|
|
Component {
|
|
|
|
id: contactVerificationRequestPopupComponent
|
|
|
|
ContactVerificationRequestPopup {
|
|
|
|
onResponseSent: {
|
|
|
|
popup.contactsStore.acceptVerificationRequest(senderPublicKey, response)
|
|
|
|
}
|
|
|
|
onVerificationRefused: {
|
|
|
|
popup.contactsStore.declineVerificationRequest(senderPublicKey)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-04 10:30:49 +00:00
|
|
|
}
|