Commit 02017159 authored by armin's avatar armin
Browse files

added new message types

parent b6761873
Pipeline #643 passed with stage
in 3 minutes and 21 seconds
Subproject commit 3ebba28b3137aa524d82fc57b89f01d8aebb7e3c
Subproject commit ab822c209f3558dc5a47447f996ee51bf26baee2
......@@ -168,5 +168,7 @@
<file>res/ucom_logo_square.svg</file>
<file>res/ucom_logo_square_push.svg</file>
<file>qml/style/StyledToolButton.qml</file>
<file>qml/pages/channelView/messageTypes/RoomNameChangedMessage.qml</file>
<file>qml/pages/channelView/messageTypes/PrivacyMessage.qml</file>
</qresource>
</RCC>
......@@ -307,7 +307,7 @@ Page {
Connections {
target: rocketChatController
onChannelDetailsReady:{
var details1 = details
/* var details1 = details
if (details1) {
var archivedFlag = false
var readonlyFlag = false
......@@ -341,7 +341,7 @@ Page {
channelView.readOnly = (readonlyFlag && !owner) || archivedFlag || mutedFlag || blocked
channelView.archived = archivedFlag
channelView.owner = owner
}
}*/
}
onServerReady:{
......@@ -365,7 +365,7 @@ Page {
function init(){
if(rocketChatController.isServerReady()){
window.activeChannel = currentChannel
rocketChatController.getChannelDetails("default", currentChannel)
// rocketChatController.getChannelDetails("default", currentChannel)
checkForJump()
}
rocketChatController.joinChannel("default",currentChannel);
......
......@@ -80,85 +80,6 @@ Item {
}
radius: 5
/* RectangularGlow {
id: effect
visible: true
cached: true
anchors.fill: parent
glowRadius: 1
spread: 0.1
color: "#aaaaaa"
cornerRadius: parent.radius + glowRadius
}*/
/* Rectangle{
id: leftbottomEdge
visible: model.ownMessage?false:true
height: 10
width: 10
color:containerRect.color
border.color: parent.border.color
border.width: parent.border.width
radius: 1
anchors.left: parent.left
anchors.bottom: parent.bottom
// RectangularGlow {
// visible: parent.visible
// id: effect1
// cached: true
// anchors.fill: parent
// // visible: loader.status == Loader.Ready
// glowRadius: 2
// spread: 0.2
// color: "#aaaaaa"
// transform: Translate{x: +1;y:+1}
// cornerRadius: parent.radius + glowRadius
// }
Rectangle{
color: parent.color
height: parent.height
width: parent.width
anchors.fill: parent
border.width: parent.border.width
border.color: parent.border.color
radius: parent.radius
}
}
Rectangle{
id: rightbottomEdge
visible: model.ownMessage?true:false
height: 10
width: 10
color:containerRect.color
border.color: parent.border.color
border.width: parent.border.width
radius: 1
anchors.right: parent.right
anchors.bottom: parent.bottom
// RectangularGlow {
// visible: parent.visible
// id: effect2
// cached: true
// anchors.fill: parent
// glowRadius: 2
// spread: 0.1
// color: "#aaaaaa"
// transform: Translate{x: +1;y:+1}
// cornerRadius: parent.radius + glowRadius
// }
Rectangle{
color: parent.color
height: parent.height
width: parent.width
anchors.fill: parent
border.width: parent.border.width
border.color: parent.border.color
radius: parent.radius
}
}*/
Rectangle{
id:container1
z:2
......@@ -221,23 +142,42 @@ Item {
case "ul":
case "uj":
messageHeader.visible = false
//effect.visible = false
containerRect.color = "transparent"
container1.color = "transparent"
//rightbottomEdge.visible = false
containerRect.border.width = 0
containerRect.anchors.leftMargin = 30
return "qrc:qml/pages/channelView/messageTypes/JoinMessage.qml"
case "au":
messageHeader.visible = false
//effect.visible = false
containerRect.color = "transparent"
container1.color = "transparent"
//rightbottomEdge.visible = false
containerRect.border.width = 0
return "qrc:qml/pages/channelView/messageTypes/AddedUserMessage.qml"
case "replyMessage":
return "qrc:qml/pages/channelView/messageTypes/MessageReply.qml"
case "r":
messageHeader.visible = false
containerRect.color = "transparent"
container1.color = "transparent"
containerRect.border.width = 0
return "qrc:qml/pages/channelView/messageTypes/RoomNameChangedMessage.qml"
case "room_changed_privacy":
messageHeader.visible = false
containerRect.color = "transparent"
container1.color = "transparent"
containerRect.border.width = 0
return "qrc:qml/pages/channelView/messageTypes/PrivacyMessage.qml"
case "room_changed_topic":
case "room_changed_announcement":
case "room_changed_description":
case "wm":
case "rm":
case "user-muted":
case "user-unmuted":
case "subscription-role-added":
case "subscription-role-removed":
case "room-archived":
case "room-unarchived":
default:
return "qrc:qml/pages/channelView/messageTypes/MessageText.qml"
}
......
/********************************************************************************************
* *
* Copyright (C) 2017 Armin Felder, Dennis Beier *
* This file is part of RocketChatMobileEngine <https://git.fairkom.net/chat/fairchat>. *
* *
* RocketChatMobileEngine is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* RocketChatMobileEngine is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with RocketChatMobileEngine. If not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************************/
import QtQuick 2.9
import "qrc:/qml/style"
Item {
id: textBackground
anchors.left: parent.left
anchors.right: parent.right
height: messageText.implicitHeight
signal blockUser();
signal reportContent();
StyledText {
anchors.left: parent.left
anchors.right: parent.right
id: messageText
smooth:true
font.italic: true
text: model.author+" changed room type to "+model.msg
// readOnly: true
// activeFocusOnPress: false
// selectByKeyboard: true
// selectByMouse: true
textFormat: Text.RichText
color: "black"
// anchors.fill: parent
wrapMode: Text.Wrap
}
}
/********************************************************************************************
* *
* Copyright (C) 2017 Armin Felder, Dennis Beier *
* This file is part of RocketChatMobileEngine <https://git.fairkom.net/chat/fairchat>. *
* *
* RocketChatMobileEngine is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* RocketChatMobileEngine is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with RocketChatMobileEngine. If not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************************/
import QtQuick 2.9
import "qrc:/qml/style"
Item {
id: textBackground
anchors.left: parent.left
anchors.right: parent.right
height: messageText.implicitHeight
signal blockUser();
signal reportContent();
StyledText {
anchors.left: parent.left
anchors.right: parent.right
id: messageText
smooth:true
font.italic: true
text: model.author+" changed the room name"
// readOnly: true
// activeFocusOnPress: false
// selectByKeyboard: true
// selectByMouse: true
textFormat: Text.RichText
color: "black"
// anchors.fill: parent
wrapMode: Text.Wrap
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment