diff --git a/storybook/pages/ProfileContextMenuPage.qml b/storybook/pages/ProfileContextMenuPage.qml index 64527ae88d3..cbc92a6e522 100644 --- a/storybook/pages/ProfileContextMenuPage.qml +++ b/storybook/pages/ProfileContextMenuPage.qml @@ -1,8 +1,7 @@ -import QtQuick 2.14 -import QtQuick.Controls 2.14 -import QtQuick.Layouts 1.14 +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 -import StatusQ.Controls 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Components 0.1 @@ -11,14 +10,55 @@ import Models 1.0 import utils 1.0 import shared.views.chat 1.0 -import shared.status 1.0 SplitView { + id: root + + property bool globalUtilsReady: false + property bool mainModuleReady: false + + Logs { id: logs } + + // globalUtilsInst mock QtObject { - id: d + function getColorHashAsJson(publicKey, skipEnsVerification=false) { + if (skipEnsVerification) + return + return JSON.stringify([{colorId: 0, segmentLength: 1}, + {colorId: 19, segmentLength: 2}]) + } + + function isCompressedPubKey(value) { + return !!value && value.startsWith("zx3sh") + } + + function getCompressedPk(publicKey) { return "zx3sh" + publicKey } + + Component.onCompleted: { + Utils.globalUtilsInst = this + root.globalUtilsReady = true + + } + Component.onDestruction: { + root.globalUtilsReady = false + Utils.globalUtilsInst = {} + } } - Logs { id: logs } + // mainModuleInst mock + QtObject { + function isEnsVerified(publicKey) { + return ensVerifiedCheckBox.checked + } + Component.onCompleted: { + Utils.mainModuleInst = this + root.mainModuleReady = true + } + Component.onDestruction: { + root.mainModuleReady = false + Utils.mainModuleInst = {} + } + } SplitView { orientation: Qt.Vertical @@ -28,142 +68,45 @@ SplitView { SplitView.fillWidth: true SplitView.fillHeight: true color: Theme.palette.statusAppLayout.rightPanelBackgroundColor - clip: true - ColumnLayout { + Button { anchors.centerIn: parent - spacing: 10 - - RowLayout { - Button { - text: "Profile context menu" - onClicked: { - menu1.createObject(this).popup() - } - } - Button { - text: "Profile context menu (hide disabled items)" - onClicked: { - menu2.createObject(this).popup() - } - } - } + text: "Reopen" + onClicked: profileContextMenu.open() } - Component { - id: menu1 - ProfileContextMenu { - id: profileContextMenu - anchors.centerIn: parent - hideDisabledItems: false - profileType: profileTypeSelector.currentValue - trustStatus: trustStatusSelector.currentValue - contactType: contactTypeSelector.currentValue - ensVerified: ensVerifiedCheckBox.checked - onlineStatus: onlineStatusSelector.currentValue - hasLocalNickname: hasLocalNicknameCheckBox.checked - chatType: chatTypeSelector.currentValue - isAdmin: isAdminCheckBox.checked - publicKey: publicKeyInput.text - - onOpenProfileClicked: () => { - logs.logEvent("Open profile clicked for:", profileContextMenu.publicKey) - } - onCreateOneToOneChat: () => { - logs.logEvent("Create one-to-one chat:", profileContextMenu.publicKey) - } - onReviewContactRequest: () => { - logs.logEvent("Review contact request:", profileContextMenu.publicKey) - } - onSendContactRequest: () => { - logs.logEvent("Send contact request:", profileContextMenu.publicKey) - } - onEditNickname: () => { - logs.logEvent("Edit nickname:", profileContextMenu.publicKey) - } - onRemoveNickname: (displayName) => { - logs.logEvent("Remove nickname:", profileContextMenu.publicKey, displayName) - } - onUnblockContact: () => { - logs.logEvent("Unblock contact:", profileContextMenu.publicKey) - } - onMarkAsUntrusted: () => { - logs.logEvent("Mark as untrusted:", profileContextMenu.publicKey) - } - onRemoveTrustStatus: () => { - logs.logEvent("Remove trust status:", profileContextMenu.publicKey) - } - onRemoveContact: () => { - logs.logEvent("Remove contact:", profileContextMenu.publicKey) - } - onBlockContact: () => { - logs.logEvent("Block contact:", profileContextMenu.publicKey) - } - onRemoveFromGroup: (publicKey) => { - logs.logEvent("Remove from group:", publicKey) - } - onClosed: { - destroy() - } - } - } - - Component { - id: menu2 - ProfileContextMenu { - id: profileContextMenu - anchors.centerIn: parent - hideDisabledItems: true - profileType: profileTypeSelector.currentValue - trustStatus: trustStatusSelector.currentValue - contactType: contactTypeSelector.currentValue - ensVerified: ensVerifiedCheckBox.checked - onlineStatus: onlineStatusSelector.currentValue - hasLocalNickname: hasLocalNicknameCheckBox.checked - chatType: chatTypeSelector.currentValue - isAdmin: isAdminCheckBox.checked - publicKey: publicKeyInput.text - - onOpenProfileClicked: () => { - logs.logEvent("Open profile clicked for:", profileContextMenu.publicKey) - } - onCreateOneToOneChat: () => { - logs.logEvent("Create one-to-one chat:", profileContextMenu.publicKey) - } - onReviewContactRequest: () => { - logs.logEvent("Review contact request:", profileContextMenu.publicKey) - } - onSendContactRequest: () => { - logs.logEvent("Send contact request:", profileContextMenu.publicKey) - } - onEditNickname: () => { - logs.logEvent("Edit nickname:", profileContextMenu.publicKey) - } - onRemoveNickname: (displayName) => { - logs.logEvent("Remove nickname:", profileContextMenu.publicKey, displayName) - } - onUnblockContact: () => { - logs.logEvent("Unblock contact:", profileContextMenu.publicKey) - } - onMarkAsUntrusted: () => { - logs.logEvent("Mark as untrusted:", profileContextMenu.publicKey) - } - onRemoveTrustStatus: () => { - logs.logEvent("Remove trust status:", profileContextMenu.publicKey) - } - onRemoveContact: () => { - logs.logEvent("Remove contact:", profileContextMenu.publicKey) - } - onBlockContact: () => { - logs.logEvent("Block contact:", profileContextMenu.publicKey) - } - onRemoveFromGroup: (publicKey) => { - logs.logEvent("Remove from group:", publicKey) - } - onClosed: { - destroy() - } - } + ProfileContextMenu { + id: profileContextMenu + anchors.centerIn: parent + visible: true + closePolicy: Popup.NoAutoClose + displayName: hasLocalNickname ? "Nick Nickolov" : ensVerified ? "john.doe.eth" : "John Doe" + publicKey: "0x047d6710733523714e65e783f975f2c02f5a0f43ecf6febb4e0fadb48bffae32cdc749ea366b2649c271b76e568e9bf0c173596c6e54a2659293a46947b33c9d72" + userIcon: ModelsData.collectibles.doodles + emojiHash: ["👨🏻‍🍼", "🏃🏿‍♂️", "🌇", "🤶🏿", "🏮","🤷🏻‍♂️", "🤦🏻", "📣", "🤎", "👷🏽", "😺", "🥞", "🔃", "🧝🏽‍♂️"] + profileType: profileTypeSelector.currentValue + trustStatus: trustStatusSelector.currentValue + contactType: contactTypeSelector.currentValue + ensVerified: ensVerifiedCheckBox.checked + onlineStatus: onlineStatusSelector.currentValue + hasLocalNickname: hasLocalNicknameCheckBox.checked + chatType: chatTypeSelector.currentValue + isAdmin: isAdminCheckBox.checked + + onOpenProfileClicked: logs.logEvent(`Open profile clicked for: ${publicKey}`) + onCreateOneToOneChat: logs.logEvent(`Create one-to-one chat: ${publicKey}`) + onReviewContactRequest: logs.logEvent(`Review contact request: ${publicKey}`) + onSendContactRequest: logs.logEvent(`Send contact request: ${publicKey}`) + onEditNickname: logs.logEvent(`Edit nickname: ${publicKey}`) + onRemoveNickname: logs.logEvent(`Remove nickname: ${publicKey}, ${displayName}`) + onUnblockContact: logs.logEvent(`Unblock contact: ${publicKey}`) + onMarkAsUntrusted: logs.logEvent(`Mark as untrusted: ${publicKey}`) + onRemoveTrustStatus: logs.logEvent(`Remove trust status: ${publicKey}`) + onRemoveContact: logs.logEvent(`Remove contact: ${publicKey}`) + onBlockContact: logs.logEvent(`Block contact: ${publicKey}`) + onRemoveFromGroup: logs.logEvent(`Remove from group: ${publicKey}`) + onMarkAsTrusted: logs.logEvent(`Mark as trusted: ${publicKey}`) + onRemoveTrustedMark: logs.logEvent(`Remove trusted mark: ${publicKey}`) } } } @@ -179,144 +122,115 @@ SplitView { controls: ColumnLayout { spacing: 16 - TextField { - id: publicKeyInput + RowLayout { Layout.fillWidth: true - placeholderText: "Enter public key" + Label { text: "Profile type:" } + ComboBox { + Layout.fillWidth: true + id: profileTypeSelector + textRole: "text" + valueRole: "value" + model: [ + { text: "Regular", value: Constants.profileType.regular }, + { text: "Self", value: Constants.profileType.self }, + { text: "Blocked", value: Constants.profileType.blocked }, + { text: "Bridged", value: Constants.profileType.bridged } + ] + currentIndex: 0 + } } - Label { + RowLayout { Layout.fillWidth: true - text: "Public Key: " + (publicKeyInput.text || "0x047d6710733523714e65e783f975f2c02f5a0f43ecf6febb4e0fadb48bffae32cdc749ea366b2649c271b76e568e9bf0c173596c6e54a2659293a46947b33c9d72") - elide: Text.ElideMiddle - } - - ComboBox { - id: profileTypeSelector - textRole: "text" - valueRole: "value" - model: [ - { text: "Regular", value: Constants.profileType.regular }, - { text: "Self", value: Constants.profileType.self }, - { text: "Blocked", value: Constants.profileType.blocked }, - { text: "Bridged", value: Constants.profileType.bridged } - ] - currentIndex: 0 - } - - ComboBox { - id: trustStatusSelector - textRole: "text" - valueRole: "value" - model: [ - { text: "Unknown", value: Constants.trustStatus.unknown }, - { text: "Trusted", value: Constants.trustStatus.trusted }, - { text: "Untrusted", value: Constants.trustStatus.untrustworthy } - ] - currentIndex: 0 + Label { text: "Trust status:" } + ComboBox { + Layout.fillWidth: true + id: trustStatusSelector + textRole: "text" + valueRole: "value" + model: [ + { text: "Unknown", value: Constants.trustStatus.unknown }, + { text: "Trusted", value: Constants.trustStatus.trusted }, + { text: "Untrusted", value: Constants.trustStatus.untrustworthy } + ] + currentIndex: 0 + } } - ComboBox { - id: contactTypeSelector - textRole: "text" - valueRole: "value" - model: [ - { text: "Non Contact", value: Constants.contactType.nonContact }, - { text: "Contact", value: Constants.contactType.contact }, - { text: "Contact Request Received", value: Constants.contactType.contactRequestReceived }, - { text: "Contact Request Sent", value: Constants.contactType.contactRequestSent } - ] - currentIndex: 0 + RowLayout { + Layout.fillWidth: true + Label { text: "Contact type:" } + ComboBox { + Layout.fillWidth: true + id: contactTypeSelector + textRole: "text" + valueRole: "value" + model: [ + { text: "Non Contact", value: Constants.contactType.nonContact }, + { text: "Contact", value: Constants.contactType.contact }, + { text: "Contact Request Received", value: Constants.contactType.contactRequestReceived }, + { text: "Contact Request Sent", value: Constants.contactType.contactRequestSent } + ] + currentIndex: 0 + } } CheckBox { id: ensVerifiedCheckBox text: "ENS Verified" - checked: false - } - - Label { - Layout.fillWidth: true - text: "ENS Verified: " + (ensVerifiedCheckBox.checked ? "Yes" : "No") - } - - Label { - Layout.fillWidth: true - text: "Profile type: " + profileTypeSelector.currentText - } - - Label { - Layout.fillWidth: true - text: "Trust status: " + trustStatusSelector.currentText - } - - Label { - Layout.fillWidth: true - text: "Contact type: " + contactTypeSelector.currentText - } - - ComboBox { - id: onlineStatusSelector - textRole: "text" - valueRole: "value" - model: [ - { text: "Unknown", value: Constants.onlineStatus.unknown }, - { text: "Inactive", value: Constants.onlineStatus.inactive }, - { text: "Online", value: Constants.onlineStatus.online } - ] - currentIndex: 2 // Default to online } - Label { + RowLayout { Layout.fillWidth: true - text: "Online status: " + onlineStatusSelector.currentText + Label { text: "Online status:" } + ComboBox { + Layout.fillWidth: true + id: onlineStatusSelector + textRole: "text" + valueRole: "value" + model: [ + { text: "Unknown", value: Constants.onlineStatus.unknown }, + { text: "Inactive", value: Constants.onlineStatus.inactive }, + { text: "Online", value: Constants.onlineStatus.online } + ] + currentIndex: 2 // Default to online + } } CheckBox { id: hasLocalNicknameCheckBox text: "Has Local Nickname" - checked: false } - Label { + RowLayout { Layout.fillWidth: true - text: "Has Local Nickname: " + (hasLocalNicknameCheckBox.checked ? "Yes" : "No") - } - - ComboBox { - id: chatTypeSelector - textRole: "text" - valueRole: "value" - model: [ - { text: "Unknown", value: Constants.chatType.unknown }, - { text: "Category", value: Constants.chatType.category }, - { text: "One-to-One", value: Constants.chatType.oneToOne }, - { text: "Public Chat", value: Constants.chatType.publicChat }, - { text: "Private Group Chat", value: Constants.chatType.privateGroupChat }, - { text: "Profile", value: Constants.chatType.profile }, - { text: "Community Chat", value: Constants.chatType.communityChat } - ] - currentIndex: 0 + Label { text: "Chat type:" } + ComboBox { + Layout.fillWidth: true + id: chatTypeSelector + textRole: "text" + valueRole: "value" + model: [ + { text: "Unknown", value: Constants.chatType.unknown }, + { text: "Category", value: Constants.chatType.category }, + { text: "One-to-One", value: Constants.chatType.oneToOne }, + { text: "Public Chat", value: Constants.chatType.publicChat }, + { text: "Private Group Chat", value: Constants.chatType.privateGroupChat }, + { text: "Profile", value: Constants.chatType.profile }, + { text: "Community Chat", value: Constants.chatType.communityChat } + ] + currentIndex: 0 + } } CheckBox { id: isAdminCheckBox text: "Is Admin" - checked: false } - - Label { - Layout.fillWidth: true - text: "Is Admin: " + (isAdminCheckBox.checked ? "Yes" : "No") - } - - Label { - Layout.fillWidth: true - text: "Chat type: " + chatTypeSelector.currentText - } - } } } -// category: Views \ No newline at end of file +// category: Views +// status: good +// https://www.figma.com/design/ibJOTPlNtIxESwS96vJb06/%F0%9F%91%A4-Profile-%7C-Desktop?node-id=7898-265693&node-type=canvas&m=dev diff --git a/ui/app/AppLayouts/Chat/panels/UserListPanel.qml b/ui/app/AppLayouts/Chat/panels/UserListPanel.qml index 182e636be83..6b7bad63aa7 100644 --- a/ui/app/AppLayouts/Chat/panels/UserListPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/UserListPanel.qml @@ -186,7 +186,7 @@ Item { const contactDetails = profileContextMenu.publicKey === "" ? {} : Utils.getContactDetailsAsJson(profileContextMenu.publicKey, true, true) Global.openNicknamePopupRequested(profileContextMenu.publicKey, contactDetails, null) } - onRemoveNickname: (displayName) => { + onRemoveNickname: { root.store.contactsStore.changeContactNickname(profileContextMenu.publicKey, "", displayName, true) } onUnblockContact: { @@ -209,6 +209,15 @@ Item { onRemoveFromGroup: { root.store.removeMemberFromGroupChat(profileContextMenu.publicKey) } + onMarkAsTrusted: { + const contactDetails = publicKey === "" ? {} : Utils.getContactDetailsAsJson(publicKey, true, true) + Global.openMarkAsIDVerifiedPopup(publicKey, contactDetails, null) + } + onRemoveTrustedMark: { + const contactDetails = publicKey === "" ? {} : Utils.getContactDetailsAsJson(publicKey, true, true) + Global.openRemoveIDVerificationDialog(publicKey, contactDetails, null) + } + onClosed: destroy() } } diff --git a/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml b/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml index bd0a0643538..cf70f862052 100644 --- a/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml @@ -353,7 +353,7 @@ Item { const contactDetails = memberContextMenuView.publicKey === "" ? {} : Utils.getContactDetailsAsJson(memberContextMenuView.publicKey, true, true) Global.openNicknamePopupRequested(memberContextMenuView.publicKey, contactDetails, null) } - onRemoveNickname: (displayName) => { + onRemoveNickname: { root.rootStore.contactsStore.changeContactNickname(memberContextMenuView.publicKey, "", displayName, true) } onUnblockContact: { @@ -373,6 +373,14 @@ Item { const contactDetails = memberContextMenuView.publicKey === "" ? {} : Utils.getContactDetailsAsJson(memberContextMenuView.publicKey, true, true) Global.blockContactRequested(memberContextMenuView.publicKey, contactDetails) } + onMarkAsTrusted: { + const contactDetails = publicKey === "" ? {} : Utils.getContactDetailsAsJson(publicKey, true, true) + Global.openMarkAsIDVerifiedPopup(publicKey, contactDetails, null) + } + onRemoveTrustedMark: { + const contactDetails = publicKey === "" ? {} : Utils.getContactDetailsAsJson(publicKey, true, true) + Global.openRemoveIDVerificationDialog(publicKey, contactDetails, null) + } onClosed: destroy() } } diff --git a/ui/app/AppLayouts/Profile/views/ContactsView.qml b/ui/app/AppLayouts/Profile/views/ContactsView.qml index c5bcfe158b4..ed491720fd6 100644 --- a/ui/app/AppLayouts/Profile/views/ContactsView.qml +++ b/ui/app/AppLayouts/Profile/views/ContactsView.qml @@ -74,7 +74,7 @@ SettingsContentBase { const contactDetails = contactContextMenu.publicKey === "" ? {} : Utils.getContactDetailsAsJson(contactContextMenu.publicKey, true, true) Global.openNicknamePopupRequested(contactContextMenu.publicKey, contactDetails, null) } - onRemoveNickname: (displayName) => { + onRemoveNickname: { root.contactsStore.changeContactNickname(contactContextMenu.publicKey, "", displayName, true) } onUnblockContact: () => { @@ -94,6 +94,14 @@ SettingsContentBase { const contactDetails = contactContextMenu.publicKey === "" ? {} : Utils.getContactDetailsAsJson(contactContextMenu.publicKey, true, true) Global.blockContactRequested(contactContextMenu.publicKey, contactDetails) } + onMarkAsTrusted: { + const contactDetails = publicKey === "" ? {} : Utils.getContactDetailsAsJson(publicKey, true, true) + Global.openMarkAsIDVerifiedPopup(publicKey, contactDetails, null) + } + onRemoveTrustedMark: { + const contactDetails = publicKey === "" ? {} : Utils.getContactDetailsAsJson(publicKey, true, true) + Global.openRemoveIDVerificationDialog(publicKey, contactDetails, null) + } onClosed: destroy() } } @@ -124,7 +132,7 @@ SettingsContentBase { enabled: root.contactsStore.receivedContactRequestsModel.count > 0 || root.contactsStore.sentContactRequestsModel.count > 0 text: qsTr("Pending Requests") - badge.value: root.contactsStore.receivedContactRequestsModel.count + badge.value: root.contactsStore.receivedContactRequestsModel.count + root.contactsStore.sentContactRequestsModel.count } StatusTabButton { id: blockedBtn diff --git a/ui/imports/shared/popups/RemoveIDVerificationDialog.qml b/ui/imports/shared/popups/RemoveIDVerificationDialog.qml index 4536dfc33e6..9812085b30e 100644 --- a/ui/imports/shared/popups/RemoveIDVerificationDialog.qml +++ b/ui/imports/shared/popups/RemoveIDVerificationDialog.qml @@ -20,7 +20,7 @@ CommonContactDialog { Layout.fillWidth: true Layout.bottomMargin: Theme.halfPadding wrapMode: Text.WordWrap - text: qsTr("%1's identity will no longer be verified. This is only visible to you.").arg(mainDisplayName) + text: qsTr("%1' will no longer be trusted. This is only visible to you.").arg(mainDisplayName) } StatusCheckBox { diff --git a/ui/imports/shared/views/chat/MessageView.qml b/ui/imports/shared/views/chat/MessageView.qml index 48b138c869c..42e94e9fbbe 100644 --- a/ui/imports/shared/views/chat/MessageView.qml +++ b/ui/imports/shared/views/chat/MessageView.qml @@ -1226,6 +1226,14 @@ Loader { onRemoveFromGroup: () => { root.store.removeMemberFromGroupChat(profileContextMenu.publicKey) } + onMarkAsTrusted: { + const contactDetails = publicKey === "" ? {} : Utils.getContactDetailsAsJson(publicKey, true, true) + Global.openMarkAsIDVerifiedPopup(publicKey, contactDetails, null) + } + onRemoveTrustedMark: { + const contactDetails = publicKey === "" ? {} : Utils.getContactDetailsAsJson(publicKey, true, true) + Global.openRemoveIDVerificationDialog(publicKey, contactDetails, null) + } onOpened: root.setMessageActive(root.messageId, true) onClosed: { root.setMessageActive(root.messageId, false) diff --git a/ui/imports/shared/views/chat/ProfileContextMenu.qml b/ui/imports/shared/views/chat/ProfileContextMenu.qml index 52ee3a048b2..847fd940733 100644 --- a/ui/imports/shared/views/chat/ProfileContextMenu.qml +++ b/ui/imports/shared/views/chat/ProfileContextMenu.qml @@ -30,8 +30,10 @@ StatusMenu { signal reviewContactRequest signal sendContactRequest signal editNickname - signal removeNickname(string displayName) + signal removeNickname signal unblockContact + signal markAsTrusted + signal removeTrustedMark signal markAsUntrusted signal removeTrustStatus signal removeContact @@ -73,14 +75,24 @@ StatusMenu { } } - // Edit Nickname + // Send Message + SendMessageMenuItem { + id: sendMessageMenuItem + objectName: "sendMessage_StatusItem" + enabled: root.profileType === Constants.profileType.regular && root.contactType === Constants.contactType.contact + onTriggered: { + root.createOneToOneChat() + root.close() + } + } + + // Mark as trusted StatusAction { - id: renameAction - objectName: "rename_StatusItem" - enabled: root.profileType === Constants.profileType.blocked || root.profileType === Constants.profileType.regular - text: root.hasLocalNickname ? qsTr("Edit nickname") : qsTr("Add nickname") - icon.name: "edit_pencil" - onTriggered: root.editNickname() + objectName: "markAsTrusted_StatusItem" + enabled: root.profileType === Constants.profileType.regular && root.contactType === Constants.contactType.contact && root.trustStatus !== Constants.trustStatus.trusted + text: qsTr("Mark as trusted") + icon.name: "checkmark-circle" + onTriggered: root.markAsTrusted() } // Review Contact Request @@ -92,17 +104,6 @@ StatusMenu { onTriggered: root.reviewContactRequest() } - // Send Message - SendMessageMenuItem { - id: sendMessageMenuItem - objectName: "sendMessage_StatusItem" - enabled: root.profileType === Constants.profileType.regular && root.contactType === Constants.contactType.contact - onTriggered: { - root.createOneToOneChat() - root.close() - } - } - // Send Contact Request SendContactRequestMenuItem { id: sendContactRequestMenuItem @@ -111,6 +112,16 @@ StatusMenu { onTriggered: root.sendContactRequest() } + // Edit Nickname + StatusAction { + id: renameAction + objectName: "rename_StatusItem" + enabled: root.profileType === Constants.profileType.blocked || root.profileType === Constants.profileType.regular + text: root.hasLocalNickname ? qsTr("Edit nickname") : qsTr("Add nickname") + icon.name: "edit_pencil" + onTriggered: root.editNickname() + } + StatusMenuSeparator { topPadding: root.topPadding visible: root.profileType !== Constants.profileType.bridged && @@ -124,7 +135,17 @@ StatusMenu { icon.name: "delete" type: StatusAction.Type.Danger enabled: (root.profileType === Constants.profileType.blocked || root.profileType === Constants.profileType.regular) && root.hasLocalNickname - onTriggered: root.removeNickname(root.displayName) + onTriggered: root.removeNickname() + } + + // Remove trusted mark + StatusAction { + objectName: "removeTrustedMark_StatusItem" + enabled: root.profileType === Constants.profileType.regular && root.contactType === Constants.contactType.contact && root.trustStatus === Constants.trustStatus.trusted + text: qsTr("Remove trusted mark") + icon.name: "checkmark-circle" + type: StatusAction.Type.Danger + onTriggered: root.removeTrustedMark() } // Unblock User