Skip to content
Snippets Groups Projects
Commit edeff74c authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

callview: move swarm details access to the actionbar

Change-Id: I0a450ab0a82943bd5e929ccd281784867edebd30
GitLab: #998
parent eaec313a
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,7 @@ Control { ...@@ -55,6 +55,7 @@ Control {
signal pluginsClicked signal pluginsClicked
signal recordCallClicked signal recordCallClicked
signal fullScreenClicked signal fullScreenClicked
signal swarmDetailsClicked
Component { Component {
id: buttonDelegate id: buttonDelegate
...@@ -407,6 +408,22 @@ Control { ...@@ -407,6 +408,22 @@ Control {
text: JamiStrings.viewPlugin text: JamiStrings.viewPlugin
enabled: PluginAdapter.isEnabled enabled: PluginAdapter.isEnabled
&& PluginAdapter.callMediaHandlersListCount && PluginAdapter.callMediaHandlersListCount
},
Action {
id: swarmDetailsAction
onTriggered: root.swarmDetailsClicked()
icon.source: JamiResources.swarm_details_panel_svg
icon.color: "white"
text: JamiStrings.details
enabled: {
if (LRCInstance.currentAccountType === Profile.Type.SIP)
return true
if (!CurrentConversation.isTemporary && !CurrentConversation.isSwarm)
return false
if (CurrentConversation.isRequest || CurrentConversation.needsSyncing)
return false
return true
}
} }
] ]
...@@ -460,6 +477,8 @@ Control { ...@@ -460,6 +477,8 @@ Control {
CallOverlayModel.addSecondaryControl(recordAction) CallOverlayModel.addSecondaryControl(recordAction)
if (pluginsAction.enabled) if (pluginsAction.enabled)
CallOverlayModel.addSecondaryControl(pluginsAction) CallOverlayModel.addSecondaryControl(pluginsAction)
if (swarmDetailsAction.enabled)
CallOverlayModel.addSecondaryControl(swarmDetailsAction)
overflowItemCount = CallOverlayModel.secondaryModel().rowCount() overflowItemCount = CallOverlayModel.secondaryModel().rowCount()
} }
......
...@@ -40,6 +40,7 @@ Item { ...@@ -40,6 +40,7 @@ Item {
signal chatButtonClicked signal chatButtonClicked
signal fullScreenClicked signal fullScreenClicked
signal closeClicked signal closeClicked
signal swarmDetailsClicked
function closeContextMenuAndRelatedWindows() { function closeContextMenuAndRelatedWindows() {
sipInputPanel.close() sipInputPanel.close()
...@@ -172,6 +173,7 @@ Item { ...@@ -172,6 +173,7 @@ Item {
function onShareFileClicked() { openShareFileDialog() } function onShareFileClicked() { openShareFileDialog() }
function onPluginsClicked() { openPluginsMenu() } function onPluginsClicked() { openPluginsMenu() }
function onFullScreenClicked() { root.fullScreenClicked() } function onFullScreenClicked() { root.fullScreenClicked() }
function onSwarmDetailsClicked() { root.swarmDetailsClicked() }
} }
} }
......
...@@ -50,9 +50,11 @@ Rectangle { ...@@ -50,9 +50,11 @@ Rectangle {
} }
function resetPanels() { function resetPanels() {
chatViewHeader.showSearch = true
swarmDetailsPanel.visible = false swarmDetailsPanel.visible = false
addMemberPanel.visible = false addMemberPanel.visible = false
chatContents.visible = true chatContents.visible = true
messagesResearchPanel.visible = false
} }
function instanceMapObject() { function instanceMapObject() {
...@@ -81,6 +83,21 @@ Rectangle { ...@@ -81,6 +83,21 @@ Rectangle {
} }
} }
onVisibleChanged: {
if (visible){
chatViewHeader.showSearch = !root.parent.showDetails
addMemberPanel.visible = false
messagesResearchPanel.visible = false
if (root.parent.showDetails) {
chatContents.visible = false
swarmDetailsPanel.visible = true
} else {
chatContents.visible = true
swarmDetailsPanel.visible = false
}
}
}
ColumnLayout { ColumnLayout {
anchors.fill: root anchors.fill: root
...@@ -134,6 +151,8 @@ Rectangle { ...@@ -134,6 +151,8 @@ Rectangle {
} }
onWidthChanged: { onWidthChanged: {
if (inCallView)
return
const isExpanding = previousWidth < width const isExpanding = previousWidth < width
if (!swarmDetailsPanel.visible && !addMemberPanel.visible && !messagesResearchPanel.visible) if (!swarmDetailsPanel.visible && !addMemberPanel.visible && !messagesResearchPanel.visible)
......
...@@ -31,6 +31,8 @@ import "../../commoncomponents" ...@@ -31,6 +31,8 @@ import "../../commoncomponents"
Rectangle { Rectangle {
id: root id: root
property bool showSearch: true
signal backClicked signal backClicked
signal addToConversationClicked signal addToConversationClicked
signal pluginSelector signal pluginSelector
...@@ -156,7 +158,7 @@ Rectangle { ...@@ -156,7 +158,7 @@ Rectangle {
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
spacing: headerButtons.spacing spacing: headerButtons.spacing
visible: CurrentConversation.isSwarm visible: root.showSearch && CurrentConversation.isSwarm
} }
PushButton { PushButton {
...@@ -197,7 +199,7 @@ Rectangle { ...@@ -197,7 +199,7 @@ Rectangle {
normalColor: JamiTheme.chatviewBgColor normalColor: JamiTheme.chatviewBgColor
imageColor: JamiTheme.chatviewButtonColor imageColor: JamiTheme.chatviewButtonColor
visible: CurrentConversationMembers.count < 8 && addMemberVisibility visible: interactionButtonsVisibility && CurrentConversationMembers.count < 8 && addMemberVisibility
onClicked: addToConversationClicked() onClicked: addToConversationClicked()
} }
...@@ -236,7 +238,7 @@ Rectangle { ...@@ -236,7 +238,7 @@ Rectangle {
PushButton { PushButton {
id: detailsButton id: detailsButton
visible: swarmDetailsVisibility visible: interactionButtonsVisibility && swarmDetailsVisibility
source: JamiResources.swarm_details_panel_svg source: JamiResources.swarm_details_panel_svg
toolTipText: JamiStrings.details toolTipText: JamiStrings.details
......
...@@ -65,6 +65,7 @@ Rectangle { ...@@ -65,6 +65,7 @@ Rectangle {
function openInCallConversation() { function openInCallConversation() {
mainColumnLayout.isHorizontal = UtilsAdapter.getAppValue(Settings.Key.ShowChatviewHorizontally) mainColumnLayout.isHorizontal = UtilsAdapter.getAppValue(Settings.Key.ShowChatviewHorizontally)
chatViewContainer.visible = false
chatViewContainer.visible = true chatViewContainer.visible = true
} }
...@@ -336,14 +337,23 @@ Rectangle { ...@@ -336,14 +337,23 @@ Rectangle {
} }
onChatButtonClicked: { onChatButtonClicked: {
chatViewContainer.visible ? var detailsVisible = chatViewContainer.showDetails
closeInCallConversation() : chatViewContainer.showDetails = false
openInCallConversation() !chatViewContainer.visible || detailsVisible ?
openInCallConversation() :
closeInCallConversation()
} }
onFullScreenClicked: { onFullScreenClicked: {
callStackView.toggleFullScreen() callStackView.toggleFullScreen()
} }
onSwarmDetailsClicked: {
chatViewContainer.showDetails = !chatViewContainer.showDetails
chatViewContainer.showDetails ?
openInCallConversation() :
closeInCallConversation()
}
} }
ColumnLayout { ColumnLayout {
...@@ -399,6 +409,7 @@ Rectangle { ...@@ -399,6 +409,7 @@ Rectangle {
SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth
visible: false visible: false
clip: true clip: true
property bool showDetails: false
onVisibleChanged: { onVisibleChanged: {
if (visible && root.width < JamiTheme.chatViewHeaderMinimumWidth * 2) { if (visible && root.width < JamiTheme.chatViewHeaderMinimumWidth * 2) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment