mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
callview: move swarm details access to the actionbar
Change-Id: I0a450ab0a82943bd5e929ccd281784867edebd30 GitLab: #998
This commit is contained in:
parent
eaec313a3c
commit
edeff74c52
5 changed files with 59 additions and 6 deletions
|
@ -55,6 +55,7 @@ Control {
|
|||
signal pluginsClicked
|
||||
signal recordCallClicked
|
||||
signal fullScreenClicked
|
||||
signal swarmDetailsClicked
|
||||
|
||||
Component {
|
||||
id: buttonDelegate
|
||||
|
@ -407,6 +408,22 @@ Control {
|
|||
text: JamiStrings.viewPlugin
|
||||
enabled: PluginAdapter.isEnabled
|
||||
&& 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 {
|
|||
CallOverlayModel.addSecondaryControl(recordAction)
|
||||
if (pluginsAction.enabled)
|
||||
CallOverlayModel.addSecondaryControl(pluginsAction)
|
||||
if (swarmDetailsAction.enabled)
|
||||
CallOverlayModel.addSecondaryControl(swarmDetailsAction)
|
||||
overflowItemCount = CallOverlayModel.secondaryModel().rowCount()
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ Item {
|
|||
signal chatButtonClicked
|
||||
signal fullScreenClicked
|
||||
signal closeClicked
|
||||
signal swarmDetailsClicked
|
||||
|
||||
function closeContextMenuAndRelatedWindows() {
|
||||
sipInputPanel.close()
|
||||
|
@ -172,6 +173,7 @@ Item {
|
|||
function onShareFileClicked() { openShareFileDialog() }
|
||||
function onPluginsClicked() { openPluginsMenu() }
|
||||
function onFullScreenClicked() { root.fullScreenClicked() }
|
||||
function onSwarmDetailsClicked() { root.swarmDetailsClicked() }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,11 @@ Rectangle {
|
|||
}
|
||||
|
||||
function resetPanels() {
|
||||
chatViewHeader.showSearch = true
|
||||
swarmDetailsPanel.visible = false
|
||||
addMemberPanel.visible = false
|
||||
chatContents.visible = true
|
||||
messagesResearchPanel.visible = false
|
||||
}
|
||||
|
||||
function instanceMapObject() {
|
||||
|
@ -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 {
|
||||
anchors.fill: root
|
||||
|
||||
|
@ -134,6 +151,8 @@ Rectangle {
|
|||
}
|
||||
|
||||
onWidthChanged: {
|
||||
if (inCallView)
|
||||
return
|
||||
const isExpanding = previousWidth < width
|
||||
|
||||
if (!swarmDetailsPanel.visible && !addMemberPanel.visible && !messagesResearchPanel.visible)
|
||||
|
|
|
@ -31,6 +31,8 @@ import "../../commoncomponents"
|
|||
Rectangle {
|
||||
id: root
|
||||
|
||||
property bool showSearch: true
|
||||
|
||||
signal backClicked
|
||||
signal addToConversationClicked
|
||||
signal pluginSelector
|
||||
|
@ -156,7 +158,7 @@ Rectangle {
|
|||
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
spacing: headerButtons.spacing
|
||||
visible: CurrentConversation.isSwarm
|
||||
visible: root.showSearch && CurrentConversation.isSwarm
|
||||
}
|
||||
|
||||
PushButton {
|
||||
|
@ -197,7 +199,7 @@ Rectangle {
|
|||
normalColor: JamiTheme.chatviewBgColor
|
||||
imageColor: JamiTheme.chatviewButtonColor
|
||||
|
||||
visible: CurrentConversationMembers.count < 8 && addMemberVisibility
|
||||
visible: interactionButtonsVisibility && CurrentConversationMembers.count < 8 && addMemberVisibility
|
||||
|
||||
onClicked: addToConversationClicked()
|
||||
}
|
||||
|
@ -236,7 +238,7 @@ Rectangle {
|
|||
PushButton {
|
||||
id: detailsButton
|
||||
|
||||
visible: swarmDetailsVisibility
|
||||
visible: interactionButtonsVisibility && swarmDetailsVisibility
|
||||
|
||||
source: JamiResources.swarm_details_panel_svg
|
||||
toolTipText: JamiStrings.details
|
||||
|
|
|
@ -65,6 +65,7 @@ Rectangle {
|
|||
|
||||
function openInCallConversation() {
|
||||
mainColumnLayout.isHorizontal = UtilsAdapter.getAppValue(Settings.Key.ShowChatviewHorizontally)
|
||||
chatViewContainer.visible = false
|
||||
chatViewContainer.visible = true
|
||||
}
|
||||
|
||||
|
@ -336,14 +337,23 @@ Rectangle {
|
|||
}
|
||||
|
||||
onChatButtonClicked: {
|
||||
chatViewContainer.visible ?
|
||||
closeInCallConversation() :
|
||||
openInCallConversation()
|
||||
var detailsVisible = chatViewContainer.showDetails
|
||||
chatViewContainer.showDetails = false
|
||||
!chatViewContainer.visible || detailsVisible ?
|
||||
openInCallConversation() :
|
||||
closeInCallConversation()
|
||||
}
|
||||
|
||||
onFullScreenClicked: {
|
||||
callStackView.toggleFullScreen()
|
||||
}
|
||||
|
||||
onSwarmDetailsClicked: {
|
||||
chatViewContainer.showDetails = !chatViewContainer.showDetails
|
||||
chatViewContainer.showDetails ?
|
||||
openInCallConversation() :
|
||||
closeInCallConversation()
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
@ -399,6 +409,7 @@ Rectangle {
|
|||
SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth
|
||||
visible: false
|
||||
clip: true
|
||||
property bool showDetails: false
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible && root.width < JamiTheme.chatViewHeaderMinimumWidth * 2) {
|
||||
|
|
Loading…
Add table
Reference in a new issue