mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-03 18:25:33 +00:00
7a3b80e5ea
Fixes #16601 The original issue of seeing ` ` was already fixed, but the popup, when opening from the activity center didn't have any spaces. However, when displayed from the profile, everything showed fine. So the fix was simply to remove the old way of opening from the AC and use the same call that is used in the profile popup.
60 lines
2.3 KiB
QML
60 lines
2.3 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 shared 1.0
|
|
import shared.panels 1.0
|
|
import utils 1.0
|
|
|
|
import "../panels"
|
|
import "../popups"
|
|
import "../stores"
|
|
|
|
ActivityNotificationMessage {
|
|
id: root
|
|
|
|
readonly property bool pending: notification && notification.message.contactRequestState === ActivityCenterStore.ActivityCenterContactRequestState.Pending
|
|
readonly property bool accepted: notification && notification.message.contactRequestState === ActivityCenterStore.ActivityCenterContactRequestState.Accepted
|
|
readonly property bool dismissed: notification && notification.message.contactRequestState === ActivityCenterStore.ActivityCenterContactRequestState.Dismissed
|
|
|
|
readonly property string contactRequestId: notification && notification.message ? notification.message.id : ""
|
|
|
|
maximumLineCount: 5
|
|
messageDetails.messageText: !root.isOutgoingMessage && notification ? notification.message.messageText : ""
|
|
|
|
messageSubheaderComponent: StatusBaseText {
|
|
text: root.isOutgoingMessage ? qsTr("Contact request sent to %1").arg(contactName) :
|
|
qsTr("Contact request:")
|
|
font.italic: true
|
|
font.pixelSize: 15
|
|
maximumLineCount: 2
|
|
wrapMode: Text.WordWrap
|
|
color: Theme.palette.baseColor1
|
|
}
|
|
|
|
ctaComponent: ContactRequestCta {
|
|
isOutgoingRequest: root.isOutgoingMessage
|
|
pending: root.pending
|
|
accepted: root.accepted
|
|
dismissed: root.dismissed
|
|
blocked: contactDetails && contactDetails.isBlocked
|
|
onAcceptClicked: root.store.contactsStore.acceptContactRequest(root.contactId, root.contactRequestId)
|
|
onDeclineClicked: root.store.contactsStore.dismissContactRequest(root.contactId, root.contactRequestId)
|
|
onProfileClicked: Global.openProfilePopup(root.contactId)
|
|
onBlockClicked: {
|
|
root.store.contactsStore.dismissContactRequest(root.contactId, root.contactRequestId)
|
|
root.store.contactsStore.blockContact(root.contactId)
|
|
}
|
|
onDetailsClicked: {
|
|
Global.openReviewContactRequestPopup(root.contactId, null)
|
|
}
|
|
}
|
|
|
|
onMessageClicked: {
|
|
root.openProfilePopup()
|
|
}
|
|
}
|