fix(ActivityCenter): Polishing Activity Center UI

This commit is contained in:
MishkaRogachev 2022-10-29 11:17:35 +04:00 committed by Mikhail Rogachev
parent e8437d3b0c
commit d147d7058e
11 changed files with 51 additions and 20 deletions

View File

@ -57,6 +57,7 @@ Badge {
asset: root.asset
name: root.name
}
StyledText {
Layout.alignment: Qt.AlignVCenter
text: chatType !== Constants.chatType.publicChat ?
@ -66,7 +67,14 @@ Badge {
color: Theme.palette.baseColor1
font.weight: Font.Medium
font.pixelSize: 13
MouseArea {
id: replyArea
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: root.channelNameClicked()
}
}
}
}

View File

@ -60,8 +60,8 @@ Badge {
}
RowLayout {
Layout.alignment: Qt.AlignVCenter
spacing: 0
Layout.alignment: Qt.AlignVCenter
StyledTextEdit {
Layout.maximumWidth: 300
@ -81,6 +81,7 @@ Badge {
StatusIcon {
Layout.preferredWidth: 16
Layout.preferredHeight: 16
visible: root.channelName.length > 0
icon: "tiny/chevron-right"
color: Theme.palette.baseColor1
}
@ -88,6 +89,7 @@ Badge {
StyledTextEdit {
Layout.maximumWidth: 300
Layout.alignment: Qt.AlignVCenter
visible: root.channelName.length > 0
text: Utils.getLinkStyle("#" + root.channelName, hoveredLink, Theme.palette.baseColor1)
readOnly: true
textFormat: Text.RichText

View File

@ -24,13 +24,6 @@ Badge {
width: 16
height: width
source: Style.svg("reply-small-arrow")
MouseArea {
id: arrowArea
hoverEnabled: true
anchors.fill: parent
onClicked: root.replyClicked()
}
}
StyledTextEdit {
@ -46,5 +39,13 @@ Badge {
textFormat: Text.RichText
clip: true
font.pixelSize: 13
MouseArea {
id: replyArea
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: root.replyClicked()
}
}
}

View File

@ -167,6 +167,7 @@ Popup {
anchors.top: activityCenterTopBar.bottom
anchors.bottom: parent.bottom
anchors.margins: Style.current.smallPadding
spacing: Style.current.padding
model: SortFilterProxyModel {
sourceModel: root.activityCenterStore.activityCenterList

View File

@ -22,7 +22,7 @@ Item {
implicitHeight: Math.max(60, bodyLoader.height +
(dateGroupLabel.visible ? dateGroupLabel.height : 0) +
(badgeLoader.item ? badgeLoader.height : 0))
(badgeLoader.item ? badgeLoader.height + Style.current.smallPadding : 0))
StatusDateGroupLabel {
id: dateGroupLabel

View File

@ -25,10 +25,11 @@ ActivityNotificationMessage {
onCommunityNameClicked: {
root.store.setActiveCommunity(notification.message.communityId)
root.activityCenterClose()
}
onChannelNameClicked: {
root.activityCenterClose()
root.activityCenterStore.switchTo(notification)
root.activityCenterClose()
}
}
}

View File

@ -51,8 +51,8 @@ ActivityNotificationBase {
return Global.openProfilePopup(notification.author)
}
root.activityCenterClose()
root.activityCenterStore.switchTo(notification)
root.activityCenterClose()
}
CommunityBadge {
@ -66,7 +66,10 @@ ActivityNotificationBase {
communityImage: community.image
communityColor: community.color
onCommunityNameClicked: root.store.setActiveCommunity(notification.communityId)
onCommunityNameClicked: {
root.store.setActiveCommunity(notification.communityId)
root.activityCenterClose()
}
}
}

View File

@ -34,7 +34,9 @@ ActivityNotificationBase {
StatusBaseText {
text: qsTr("Request to join")
font.pixelSize: 15
color: Theme.palette.baseColor1
font.weight: Font.Medium
font.pixelSize: 13
Layout.alignment: Qt.AlignVCenter
}
@ -56,8 +58,9 @@ ActivityNotificationBase {
return qsTr("declined")
return ""
}
font.pixelSize: 15
color: Style.current.secondaryText
color: Theme.palette.baseColor1
font.weight: Font.Medium
font.pixelSize: 13
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
}
@ -74,7 +77,10 @@ ActivityNotificationBase {
textFormat: Text.RichText
color: Style.current.blue
font.pixelSize: 13
onLinkActivated: root.store.setActiveCommunity(notification.communityId)
onLinkActivated: {
root.store.setActiveCommunity(notification.communityId)
root.activityCenterClose()
}
}
}
}

View File

@ -41,10 +41,11 @@ ActivityNotificationMessage {
onCommunityNameClicked: {
root.store.setActiveCommunity(notification.message.communityId)
root.activityCenterClose()
}
onChannelNameClicked: {
root.activityCenterClose()
root.activityCenterStore.switchTo(notification)
root.activityCenterClose()
}
}
}
@ -61,6 +62,11 @@ ActivityNotificationMessage {
asset.name: group.icon
asset.emoji: group.emoji
asset.color: group.color
onChannelNameClicked: {
root.activityCenterStore.switchTo(notification)
root.activityCenterClose()
}
}
}
}

View File

@ -51,8 +51,8 @@ ActivityNotificationBase {
return Global.openProfilePopup(notification.message.senderId)
}
root.activityCenterClose()
root.activityCenterStore.switchTo(notification)
root.activityCenterClose()
}
}
}

View File

@ -15,6 +15,9 @@ ActivityNotificationMessage {
badgeComponent: ReplyBadge {
repliedMessageContent: notification.repliedMessage.messageText
onReplyClicked: root.activityCenterStore.switchTo(notification)
onReplyClicked: {
root.activityCenterStore.switchTo(notification)
root.activityCenterClose()
}
}
}