2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
2020-05-26 18:16:07 +00:00
|
|
|
import "../../../../imports"
|
2020-06-19 18:06:58 +00:00
|
|
|
import "../../../../shared"
|
2020-05-26 18:16:07 +00:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
property string channel: "status"
|
2020-08-18 17:43:53 +00:00
|
|
|
property var onJoin: function() {}
|
2020-05-26 18:16:07 +00:00
|
|
|
|
|
|
|
border.width: 1
|
|
|
|
radius: 8
|
|
|
|
width: children[0].width + 10
|
|
|
|
height: 32
|
2020-07-13 18:45:54 +00:00
|
|
|
border.color: Style.current.border
|
|
|
|
color: Style.current.background
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-05-26 18:16:07 +00:00
|
|
|
id: suggestedChannelText
|
|
|
|
text: "#" + channel
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.blue;
|
2020-05-26 18:16:07 +00:00
|
|
|
anchors.top: parent.top;
|
|
|
|
anchors.topMargin: 5;
|
|
|
|
anchors.left: parent.left;
|
|
|
|
anchors.leftMargin: 5;
|
|
|
|
horizontalAlignment: Text.AlignLeft;
|
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
2020-08-18 17:43:53 +00:00
|
|
|
onClicked: {
|
|
|
|
chatsModel.joinChat(channel, Constants.chatTypePublic)
|
|
|
|
onJoin()
|
|
|
|
}
|
2020-05-26 18:16:07 +00:00
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
}
|
|
|
|
}
|