mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
- On chat group creation : create a conference
- Red leave event - Remove hybrid design chat room/group chat - Remove group info menu entry for one to tone - Remove dots menu if empty - Remove chat edition when left
This commit is contained in:
parent
540928e449
commit
67c75e4595
7 changed files with 32 additions and 23 deletions
|
|
@ -325,7 +325,7 @@ QVariantMap CallsListModel::createChatRoom(const QString& subject, const int& se
|
|||
params->setEncryptionBackend(linphone::ChatRoomEncryptionBackend::Lime);
|
||||
}else
|
||||
params->setBackend(linphone::ChatRoomBackend::Basic);
|
||||
params->enableGroup(chatRoomParticipants.size() > 1);
|
||||
params->enableGroup( subject!="" );
|
||||
|
||||
|
||||
if(chatRoomParticipants.size() > 0) {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ Item {
|
|||
enabled: droppableTextArea.dropEnabled
|
||||
icon: 'attachment'
|
||||
iconSize: DroppableTextAreaStyle.fileChooserButton.size
|
||||
visible: droppableTextArea.enabled
|
||||
|
||||
onClicked: fileDialog.open()
|
||||
|
||||
|
|
@ -85,7 +86,7 @@ Item {
|
|||
}
|
||||
// Record audio
|
||||
ActionButton {
|
||||
visible:false // TODO
|
||||
visible:false && droppableTextArea.enabled// TODO
|
||||
id: recordAudioButton
|
||||
|
||||
//anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -193,14 +194,7 @@ Item {
|
|||
Layout.rightMargin: DroppableTextAreaStyle.fileChooserButton.margins+15
|
||||
Layout.leftMargin: 10
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
//anchors.verticalCenter: parent.verticalCenter
|
||||
/*{
|
||||
right: parent.right
|
||||
rightMargin: scrollBar.width +
|
||||
DroppableTextAreaStyle.fileChooserButton.margins
|
||||
verticalCenter: parent.verticalCenter
|
||||
}*/
|
||||
//enabled: droppableTextArea.dropEnabled
|
||||
visible: droppableTextArea.enabled
|
||||
icon: 'send'
|
||||
iconSize: DroppableTextAreaStyle.fileChooserButton.size
|
||||
useStates:false
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ Rectangle {
|
|||
|
||||
borderColor: ChatStyle.sendArea.border.color
|
||||
topWidth: ChatStyle.sendArea.border.width
|
||||
visible: SettingsModel.chatEnabled
|
||||
visible: SettingsModel.chatEnabled && !proxyModel.chatRoomModel.hasBeenLeft
|
||||
|
||||
DroppableTextArea {
|
||||
id: textArea
|
||||
|
|
|
|||
|
|
@ -75,19 +75,20 @@ RowLayout{
|
|||
return qsTr('conferenceEphemeralMessageDisabledEvent');
|
||||
}
|
||||
if (status == LinphoneEnums.EventLogTypeConferenceSubjectChanged) {
|
||||
//: 'New subject : %1' : Little message to show on the event when the subject of the chat romm has been changed. %1 is the new subject.
|
||||
//: 'New subject : %1' : Little message to show on the event when the subject of the chat room has been changed. %1 is the new subject.
|
||||
return qsTr('conferenceSubjectChangedEvent');
|
||||
}
|
||||
|
||||
return 'unknown_notice'
|
||||
}
|
||||
property bool isImportant : $chatEntry.status == ChatNoticeModel.NoticeError || $chatEntry.eventLogType == LinphoneEnums.EventLogTypeConferenceTerminated
|
||||
|
||||
Layout.preferredHeight: ChatStyle.entry.lineHeight
|
||||
spacing: ChatStyle.entry.message.extraContent.spacing
|
||||
Rectangle{
|
||||
height:1
|
||||
Layout.fillWidth: true
|
||||
color:( $chatEntry.status == ChatNoticeModel.NoticeError ? '#FF0000' : '#979797' )
|
||||
color:( isImportant ? '#FF0000' : '#979797' )
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
@ -102,7 +103,7 @@ RowLayout{
|
|||
}
|
||||
Layout.preferredWidth: contentWidth
|
||||
id:message
|
||||
color:( $chatEntry.status == ChatNoticeModel.NoticeError ? '#FF0000' : '#979797' )
|
||||
color:( isImportant ? '#FF0000' : '#979797' )
|
||||
font {
|
||||
//bold: true
|
||||
pointSize: Units.dp * 7
|
||||
|
|
@ -117,6 +118,6 @@ RowLayout{
|
|||
Rectangle{
|
||||
height:1
|
||||
Layout.fillWidth: true
|
||||
color:( $chatEntry.status == ChatNoticeModel.NoticeError ? '#FF0000' : '#979797' )
|
||||
color:( isImportant ? '#FF0000' : '#979797' )
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ Rectangle {
|
|||
|
||||
icon:'chat_room'
|
||||
iconSize: ContactStyle.contentHeight
|
||||
visible: entry!=undefined && entry.isOneToOne!=undefined && !entry.isOneToOne && entry.participants.count > 2
|
||||
visible: entry!=undefined && entry.isOneToOne!=undefined && !entry.isOneToOne
|
||||
|
||||
Icon{
|
||||
anchors.right: parent.right
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ Rectangle {
|
|||
CheckBoxText {
|
||||
id:simpleFilter
|
||||
//: 'Simple rooms' : Filter item
|
||||
//~ Mode Selecting it will show all simple romms
|
||||
//~ Mode Selecting it will show all simple rooms
|
||||
text:qsTr('timelineFilterSimpleRooms')
|
||||
property var value : (checked?TimelineProxyModel.SimpleChatRoom:0)
|
||||
onValueChanged: timeline.model.filterFlags = filterChoices.getFilterFlags()
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ ColumnLayout {
|
|||
|
||||
icon:'chat_room'
|
||||
iconSize: ConversationStyle.bar.groupChatSize
|
||||
visible: conversation.haveMoreThanOneParticipants
|
||||
visible: !chatRoomModel.isOneToOne
|
||||
}
|
||||
Item{
|
||||
Layout.fillHeight: true
|
||||
|
|
@ -156,9 +156,11 @@ ColumnLayout {
|
|||
|
||||
}
|
||||
onUsernameClicked: {
|
||||
if(!conversation.hasBeenLeft) {
|
||||
usernameEdit.visible = !usernameEdit.visible
|
||||
usernameEdit.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
Item{
|
||||
Layout.fillHeight: true
|
||||
|
|
@ -173,6 +175,7 @@ ColumnLayout {
|
|||
iconSize:30
|
||||
MouseArea{
|
||||
anchors.fill:parent
|
||||
visible: !conversation.hasBeenLeft
|
||||
onClicked : {
|
||||
window.detachVirtualWindow()
|
||||
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/InfoEncryption.qml')
|
||||
|
|
@ -254,7 +257,7 @@ ColumnLayout {
|
|||
|
||||
ActionButton {
|
||||
icon: 'group_chat'
|
||||
visible: SettingsModel.outgoingCallsEnabled && conversation.haveMoreThanOneParticipants && conversation.haveLessThanMinParticipantsForCall
|
||||
visible: SettingsModel.outgoingCallsEnabled && conversation.haveMoreThanOneParticipants && conversation.haveLessThanMinParticipantsForCall && !conversation.hasBeenLeft
|
||||
|
||||
//onClicked: CallsListModel.launchAudioCall(conversation.chatRoomModel)
|
||||
onClicked: Logic.openConferenceManager({chatRoomModel:conversation.chatRoomModel, autoCall:true})
|
||||
|
|
@ -296,6 +299,8 @@ ColumnLayout {
|
|||
id:dotButton
|
||||
icon: 'menu_vdots'
|
||||
iconSize: ConversationStyle.bar.actions.edit.iconSize
|
||||
visible: conversationMenu.showGroupInfo || conversationMenu.showDevices || conversationMenu.showEphemerals
|
||||
|
||||
//autoIcon: true
|
||||
|
||||
onClicked: {
|
||||
|
|
@ -309,12 +314,19 @@ ColumnLayout {
|
|||
x:mainBar.width-width
|
||||
y:mainBar.height
|
||||
menuStyle : MenuStyle.aux2
|
||||
|
||||
property bool showGroupInfo: !chatRoomModel.isOneToOne
|
||||
property bool showDevices : conversation.securityLevel != 1
|
||||
property bool showEphemerals: conversation.securityLevel != 1 && chatRoomModel.isMeAdmin
|
||||
|
||||
MenuItem{
|
||||
id:groupInfoMenu
|
||||
//: 'Group information' : Item menu to get information about the chat room
|
||||
text: qsTr('conversationMenuGroupInformations')
|
||||
iconMenu: (hovered ? 'menu_infos_selected' : 'menu_infos')
|
||||
iconSizeMenu: 25
|
||||
menuItemStyle : MenuItemStyle.aux2
|
||||
visible: conversationMenu.showGroupInfo
|
||||
onTriggered: {
|
||||
window.detachVirtualWindow()
|
||||
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/InfoChatRoom.qml')
|
||||
|
|
@ -322,17 +334,18 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
Rectangle{
|
||||
id: separator1
|
||||
height:1
|
||||
width:parent.width
|
||||
color:Colors.u.color
|
||||
visible: devicesMenuItem.visible
|
||||
visible: groupInfoMenu.visible && devicesMenuItem.visible
|
||||
}
|
||||
MenuItem{
|
||||
id: devicesMenuItem
|
||||
//: "Conversation's devices" : Item menu to get all participant devices of the chat room
|
||||
text: qsTr('conversationMenuDevices')
|
||||
iconMenu: (hovered ? 'menu_devices_selected' : 'menu_devices' )
|
||||
visible: conversation.securityLevel != 1
|
||||
visible: conversationMenu.showDevices
|
||||
iconSizeMenu: 25
|
||||
menuItemStyle : MenuItemStyle.aux2
|
||||
onTriggered: {
|
||||
|
|
@ -342,10 +355,11 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
Rectangle{
|
||||
id: separator2
|
||||
height:1
|
||||
width:parent.width
|
||||
color:Colors.u.color
|
||||
visible: ephemeralMenuItem.visible
|
||||
visible: ephemeralMenuItem.visible && (groupInfoMenu.visible || devicesMenuItem.visible)
|
||||
}
|
||||
MenuItem{
|
||||
id: ephemeralMenuItem
|
||||
|
|
@ -354,7 +368,7 @@ ColumnLayout {
|
|||
iconMenu: (hovered ? 'menu_ephemeral_selected' : 'menu_ephemeral')
|
||||
iconSizeMenu: 25
|
||||
menuItemStyle : MenuItemStyle.aux2
|
||||
visible: conversation.securityLevel != 1 && chatRoomModel.isMeAdmin
|
||||
visible: conversationMenu.showEphemerals
|
||||
onTriggered: {
|
||||
window.detachVirtualWindow()
|
||||
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/EphemeralChatRoom.qml')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue