mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-21 03:49:59 +00:00
2fa65968c0
- make `SendContactRequestModal.qml` use the common dialog, use the contact details if we already have it - make some minimal changes to the "Send ID verification" flow since it shares the same dialog - simplify the `CommonContactDialog.qml` footer/buttons handling - adjust the menu item texts - emit toasts when the action is performed - display a tooltip over the compressed elided key Fixes #13518
55 lines
1.4 KiB
QML
55 lines
1.4 KiB
QML
import QtQuick 2.14
|
|
import QtQuick.Layouts 1.14
|
|
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
import StatusQ.Components 0.1
|
|
import StatusQ.Controls 0.1
|
|
|
|
import shared 1.0
|
|
import shared.panels 1.0
|
|
import utils 1.0
|
|
|
|
import "../panels"
|
|
import "../popups"
|
|
import "../stores"
|
|
|
|
ActivityNotificationMessage {
|
|
id: root
|
|
|
|
function checkAndUpdateContactDetails(pubKey) {
|
|
if (pubKey === root.contactId)
|
|
root.updateContactDetails()
|
|
}
|
|
|
|
Connections {
|
|
target: root.store.contactsStore.sentContactRequestsModel
|
|
|
|
function onItemChanged(pubKey) {
|
|
root.checkAndUpdateContactDetails(pubKey)
|
|
}
|
|
}
|
|
|
|
Connections {
|
|
target: root.store.contactsStore.receivedContactRequestsModel
|
|
|
|
function onItemChanged(pubKey) {
|
|
root.checkAndUpdateContactDetails(pubKey)
|
|
}
|
|
}
|
|
|
|
messageSubheaderComponent: StatusBaseText {
|
|
text: qsTr("Removed you as a contact")
|
|
font.italic: true
|
|
font.pixelSize: 15
|
|
color: Theme.palette.baseColor1
|
|
}
|
|
|
|
ctaComponent: StatusFlatButton {
|
|
enabled: root.contactDetails && !root.contactDetails.added && !root.contactDetails.isContactRequestReceived
|
|
size: StatusBaseButton.Size.Small
|
|
text: qsTr("Send Contact Request")
|
|
onClicked: Global.openContactRequestPopup(root.contactId, root.contactDetails, null)
|
|
}
|
|
}
|