fix: some notification UI fixes
This aims at bringing the notifcation display closer to what regular messages look like, namely: - show compressed chat keys - don't show identicon rings for ENS names - fix timestamps and their tooltips (`notification` isn't part of StatusMessage!) - unbreak clicking outside of the whole popup overlay (`activityCenter` is undefined) - fix blurry checkmark icon for marking notification as read
This commit is contained in:
parent
cda881af46
commit
3d4cb12d0c
|
@ -73,8 +73,8 @@ Control {
|
|||
property StatusMessageDetails messageDetails: StatusMessageDetails {}
|
||||
property StatusMessageDetails replyDetails: StatusMessageDetails {}
|
||||
|
||||
property string timestampString: new Date(notification.timestamp).toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
|
||||
property string timestampTooltipString: new Date(notification.timestamp).toLocaleString()
|
||||
property string timestampString: new Date(timestamp).toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
|
||||
property string timestampTooltipString: new Date(timestamp).toLocaleString()
|
||||
|
||||
signal clicked(var sender, var mouse)
|
||||
signal profilePictureClicked(var sender, var mouse)
|
||||
|
|
|
@ -43,4 +43,4 @@ Badge {
|
|||
onClicked: root.replyClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ Popup {
|
|||
root.membershipCount += cnt;
|
||||
break;
|
||||
case Constants.activityCenterNotificationTypeCommunityMembershipRequest:
|
||||
// NOTE: not a typo, membership requests are shown in both categories
|
||||
// NOTE: not a typo, membership requests are shown in both categories
|
||||
root.membershipCount += cnt;
|
||||
root.adminCount += cnt;
|
||||
break;
|
||||
|
@ -107,14 +107,11 @@ Popup {
|
|||
x: Global.applicationWindow.width - root.width - Style.current.halfPadding
|
||||
width: 560
|
||||
padding: 0
|
||||
dim: true
|
||||
modal: false
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||
parent: Overlay.overlay
|
||||
|
||||
Overlay.modeless: MouseArea {
|
||||
onClicked: activityCenter.close()
|
||||
}
|
||||
Overlay.modeless: null
|
||||
|
||||
background: Rectangle {
|
||||
color: Style.current.background
|
||||
|
|
|
@ -57,11 +57,10 @@ Item {
|
|||
anchors.rightMargin: Style.current.padding
|
||||
|
||||
sourceComponent: StatusFlatRoundButton {
|
||||
id: markReadBtn
|
||||
icon.width: 20
|
||||
icon.height: 20
|
||||
icon.source: Style.svg("check-activity")
|
||||
icon.color: root.notification.read ? icon.disabledColor : "transparent"
|
||||
icon.name: "checkmark"
|
||||
icon.color: root.notification.read ? icon.disabledColor : Theme.palette.primaryColor1
|
||||
tooltip.text: !root.notification.read ? qsTr("Mark as Read") : qsTr("Mark as Unread")
|
||||
tooltip.orientation: StatusToolTip.Orientation.Left
|
||||
tooltip.x: -tooltip.width - Style.current.padding
|
||||
|
@ -73,4 +72,4 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,8 +33,7 @@ ActivityNotificationBase {
|
|||
assetSettings.isImage: notification.message.senderIcon.startsWith("data")
|
||||
pubkey: notification.message.senderId
|
||||
colorId: Utils.colorIdForPubkey(notification.message.senderId)
|
||||
colorHash: Utils.getColorHashAsJson(notification.message.senderId, false, true)
|
||||
showRing: true
|
||||
colorHash: Utils.getColorHashAsJson(notification.message.senderId)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,6 +85,7 @@ ActivityNotificationBase {
|
|||
sender: root.messageDetails.sender
|
||||
amISender: root.messageDetails.amISender
|
||||
messageOriginInfo: root.messageDetails.messageOriginInfo
|
||||
tertiaryDetail: Utils.getElidedCompressedPk(sender.id)
|
||||
timestamp.text: root.timestampString
|
||||
timestamp.tooltip.text: root.timestampTooltipString
|
||||
onClicked: root.openProfilePopup()
|
||||
|
|
|
@ -490,13 +490,6 @@ Loader {
|
|||
profileClickable: !root.isDiscordMessage
|
||||
messageAttachments: root.messageAttachments
|
||||
|
||||
timestampString: Utils.formatShortTime(timestamp,
|
||||
localAccountSensitiveSettings.is24hTimeFormat)
|
||||
|
||||
timestampTooltipString: Utils.formatLongDateTime(timestamp,
|
||||
localAccountSensitiveSettings.isDDMMYYDateFormat,
|
||||
localAccountSensitiveSettings.is24hTimeFormat);
|
||||
|
||||
onEditCancelled: {
|
||||
root.messageStore.setEditModeOff(root.messageId)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue