2022-09-15 16:34:41 +00:00
|
|
|
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 shared 1.0
|
2022-09-27 16:21:00 +00:00
|
|
|
import shared.panels 1.0
|
2022-09-15 16:34:41 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
2022-09-27 16:21:00 +00:00
|
|
|
import "../panels"
|
|
|
|
|
2022-09-16 13:06:52 +00:00
|
|
|
ActivityNotificationMessage {
|
2022-09-15 16:34:41 +00:00
|
|
|
id: root
|
|
|
|
|
2022-11-16 17:17:38 +00:00
|
|
|
maximumLineCount: 5
|
|
|
|
|
2022-09-27 16:21:00 +00:00
|
|
|
ctaComponent: ContactRequestCta {
|
|
|
|
readonly property string senderId: notification.message.senderId
|
2022-09-30 16:49:54 +00:00
|
|
|
readonly property var contactDetails: Utils.getContactDetailsAsJson(senderId)
|
2022-09-27 16:21:00 +00:00
|
|
|
|
|
|
|
pending: notification.message.contactRequestState == Constants.contactRequestStatePending
|
|
|
|
accepted: notification.message.contactRequestState == Constants.contactRequestStateAccepted
|
|
|
|
dismissed: notification.message.contactRequestState == Constants.contactRequestStateDismissed
|
2022-09-30 16:49:54 +00:00
|
|
|
blocked: contactDetails.isBlocked
|
2022-09-27 16:21:00 +00:00
|
|
|
onAcceptClicked: root.store.contactsStore.acceptContactRequest(senderId)
|
|
|
|
onDeclineClicked: root.store.contactsStore.dismissContactRequest(senderId)
|
|
|
|
onProfileClicked: Global.openProfilePopup(senderId)
|
2022-09-30 16:49:54 +00:00
|
|
|
onBlockClicked: {
|
|
|
|
root.store.contactsStore.dismissContactRequest(senderId)
|
|
|
|
root.store.contactsStore.blockContact(senderId)
|
|
|
|
}
|
2022-09-27 16:21:00 +00:00
|
|
|
}
|
2022-09-15 16:34:41 +00:00
|
|
|
}
|