mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 14:54:48 +00:00
e5a414a927
- `chatType` added to `Constants` to group chat type related values - `messageContentType` added to `Constants` to group message content type related values - `MessageStore` maintained per message list now - added new `ChatContentView` component used to display chat/channel content - components updated to display messages from the new backend - `StatusChatToolBar` appropriately updated - mute/unmute feature added to chat/channel list as well as to `StatusChatToolBar`
65 lines
1.7 KiB
QML
65 lines
1.7 KiB
QML
import QtQuick 2.3
|
|
import QtQuick.Controls 2.3
|
|
import QtQuick.Layouts 1.3
|
|
import Qt.labs.platform 1.1
|
|
|
|
import utils 1.0
|
|
import shared 1.0
|
|
import shared.panels 1.0
|
|
|
|
import StatusQ.Components 0.1
|
|
import StatusQ.Core 0.1
|
|
|
|
Item {
|
|
id: channelBadge
|
|
|
|
property int realChatType: -1
|
|
property string name: "channelName"
|
|
property color textColor
|
|
property string chatId: ""
|
|
property string profileImage: ""
|
|
property string identicon
|
|
|
|
SVGImage {
|
|
id: channelIcon
|
|
width: 16
|
|
height: 16
|
|
fillMode: Image.PreserveAspectFit
|
|
source: Style.svg("channel-icon-" + (realChatType === Constants.chatType.publicChat ? "public-chat" : "group"))
|
|
anchors.left: parent.left
|
|
anchors.verticalCenter:parent.verticalCenter
|
|
}
|
|
|
|
StatusSmartIdenticon {
|
|
id: contactImage
|
|
anchors.left: channelIcon.right
|
|
anchors.leftMargin: 4
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
image: StatusImageSettings {
|
|
width: 16
|
|
height: 16
|
|
source: profileImage || identicon
|
|
isIdenticon: true
|
|
}
|
|
icon: StatusIconSettings {
|
|
width: 16
|
|
height: 16
|
|
letterSize: 11
|
|
}
|
|
name: channelBadge.name
|
|
}
|
|
|
|
StyledText {
|
|
id: contactInfo
|
|
text: realChatType !== Constants.chatType.publicChat ?
|
|
Emoji.parse(Utils.removeStatusEns(Utils.filterXSS(name))) :
|
|
"#" + Utils.filterXSS(name)
|
|
anchors.left: contactImage.right
|
|
anchors.leftMargin: 4
|
|
color: textColor
|
|
font.weight: Font.Medium
|
|
font.pixelSize: 13
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|