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 {
|
2022-11-30 11:15:29 +00:00
|
|
|
readonly property string senderId: notification ? notification.message.senderId : ""
|
|
|
|
readonly property var contactDetails: notification ?
|
2022-12-01 10:24:25 +00:00
|
|
|
Utils.getContactDetailsAsJson(notification.message.senderId, false) :
|
2022-11-30 11:15:29 +00:00
|
|
|
null
|
2022-09-27 16:21:00 +00:00
|
|
|
|
2022-12-01 10:24:25 +00:00
|
|
|
pending: notification && notification.message.contactRequestState === Constants.contactRequestStatePending
|
|
|
|
accepted: notification && notification.message.contactRequestState === Constants.contactRequestStateAccepted
|
|
|
|
dismissed: notification && notification.message.contactRequestState === Constants.contactRequestStateDismissed
|
2022-11-30 11:15:29 +00:00
|
|
|
blocked: contactDetails && 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-12-01 10:24:25 +00:00
|
|
|
}
|