diff --git a/src/app/constant/JamiStrings.qml b/src/app/constant/JamiStrings.qml index aafdd91e71f75fe3da99b590477d13aa7551e03d..c0b58fcfc67997c28963cabfc51a910e90275018 100644 --- a/src/app/constant/JamiStrings.qml +++ b/src/app/constant/JamiStrings.qml @@ -275,6 +275,7 @@ Item { property string blockContact: qsTr("Block contact") property string blockSwarm: qsTr("Block swarm") property string convDetails: qsTr("Conversation details") + property string contactDetails: qsTr("Contact details") // CallViewContextMenu property string hold: qsTr("Hold") @@ -760,7 +761,7 @@ Item { property string ignoreNotificationsTooltip: qsTr("Ignore all notifications from this conversation") property string chooseAColor: qsTr("Choose a color") property string defaultCallHost: qsTr("Default host (calls)") - property string leaveTheSwarm: qsTr("Leave the swarm") + property string quitConversation: qsTr("Quit conversation") property string leave: qsTr("Leave") property string typeOfSwarm: qsTr("Type of swarm") property string none: qsTr("None") diff --git a/src/app/mainview/components/ChatViewHeader.qml b/src/app/mainview/components/ChatViewHeader.qml index 51e44d6eb41198afe78e5442541ab662269104ed..e31cc7e5f9fe092a4f91838d70226a1da76c6af4 100644 --- a/src/app/mainview/components/ChatViewHeader.qml +++ b/src/app/mainview/components/ChatViewHeader.qml @@ -57,11 +57,11 @@ Rectangle { } property bool addMemberVisibility: { - return swarmDetailsVisibility && !CurrentConversation.isRequest + return swarmDetailsVisibility && !CurrentConversation.isCoreDialog && !CurrentConversation.isRequest } property bool swarmDetailsVisibility: { - return !CurrentConversation.isCoreDialog && CurrentConversation.isSwarm + return CurrentConversation.isSwarm && !CurrentConversation.isRequest } color: JamiTheme.chatviewBgColor diff --git a/src/app/mainview/components/ConversationListView.qml b/src/app/mainview/components/ConversationListView.qml index 07801811aed72718783649787fca0ae14cdf0181..7d609cfc7db8632abd793b881d50e645ac2eb929 100644 --- a/src/app/mainview/components/ConversationListView.qml +++ b/src/app/mainview/components/ConversationListView.qml @@ -130,7 +130,6 @@ JamiListView { "displayId": model.dataForRow(row, ConversationList.BestId), "title": model.dataForRow(row, ConversationList.Title), "uri": model.dataForRow(row, ConversationList.URI), - "isSwarm": model.dataForRow(row, ConversationList.IsSwarm), "isBanned": model.dataForRow(row, ConversationList.IsBanned), "mode": model.dataForRow(row, ConversationList.Mode), "isTemporary": model.dataForRow(row, ConversationList.ContactType) === Profile.Type.TEMPORARY, @@ -138,7 +137,6 @@ JamiListView { responsibleAccountId = LRCInstance.currentAccountId responsibleConvUid = item.convId - isSwarm = item.isSwarm isBanned = item.isBanned mode = item.mode contactType = LRCInstance.currentAccountType @@ -149,7 +147,6 @@ JamiListView { userProfile.registeredNameText = item.displayId userProfile.idText = item.uri userProfile.convId = item.convId - userProfile.isSwarm = item.isSwarm } openMenu() diff --git a/src/app/mainview/components/ConversationSmartListContextMenu.qml b/src/app/mainview/components/ConversationSmartListContextMenu.qml index 45f2020b24db5a37dd1a6c0a22cded1be40ecd29..2cbce07b8938e5a572c0223e35569f864a971512 100644 --- a/src/app/mainview/components/ConversationSmartListContextMenu.qml +++ b/src/app/mainview/components/ConversationSmartListContextMenu.qml @@ -165,11 +165,12 @@ ContextMenuAutoLoader { GeneralMenuItem { id: contactDetails + property bool oneToOne: !(mode && mode !== Conversation.Mode.ONE_TO_ONE && mode !== Conversation.Mode.NON_SWARM) canTrigger: contactType !== Profile.Type.SIP - itemName: JamiStrings.convDetails + itemName: oneToOne ? JamiStrings.contactDetails : JamiStrings.convDetails iconSource: JamiResources.person_24dp_svg onClicked: { - if (!(mode && mode !== Conversation.Mode.ONE_TO_ONE && mode !== Conversation.Mode.NON_SWARM)) + if (oneToOne) userProfile.open() else root.showSwarmDetails() diff --git a/src/app/mainview/components/SwarmDetailsPanel.qml b/src/app/mainview/components/SwarmDetailsPanel.qml index aa1af54e794a053c32b4c97dfa876dade027efb8..3a03bb6513061b7707d1b40d3eced9bfcb562420 100644 --- a/src/app/mainview/components/SwarmDetailsPanel.qml +++ b/src/app/mainview/components/SwarmDetailsPanel.qml @@ -33,7 +33,8 @@ Rectangle { id: root color: CurrentConversation.color - property var isAdmin: UtilsAdapter.getParticipantRole(CurrentAccount.id, CurrentConversation.id, CurrentAccount.uri) === Member.Role.ADMIN + property var isAdmin: !CurrentConversation.isCoreDialog && + UtilsAdapter.getParticipantRole(CurrentAccount.id, CurrentConversation.id, CurrentAccount.uri) === Member.Role.ADMIN DevicesListPopup { @@ -165,10 +166,14 @@ Rectangle { TabBar { id: tabBar - currentIndex: 1 + currentIndex: 0 + + onVisibleChanged: { + tabBar.currentIndex = 0 + } Layout.preferredWidth: root.width - Layout.preferredHeight: membersTabButton.height + Layout.preferredHeight: aboutTabButton.height FilterTabButton { id: aboutTabButton @@ -186,10 +191,14 @@ Rectangle { down: tabBar.currentIndex === 0 labelText: JamiStrings.about + Layout.fillWidth: true } FilterTabButton { id: membersTabButton + visible: !CurrentConversation.isCoreDialog + Layout.fillWidth: true + width: visible ? tabBar.width/3 : 0 backgroundColor: CurrentConversation.color hoverColor: CurrentConversation.color borderWidth: 4 @@ -220,6 +229,7 @@ Rectangle { fontSize: JamiTheme.menuFontSize underlineContentOnly: true + Layout.fillWidth: true textColorHovered: UtilsAdapter.luma(root.color) ? JamiTheme.placeholderTextColorWhite : JamiTheme.placeholderTextColor textColor: UtilsAdapter.luma(root.color) ? JamiTheme.chatviewTextColorLight : @@ -239,6 +249,17 @@ Rectangle { } } + ConfirmDialog { + id: rmDialog + + title: JamiStrings.confirmAction + textLabel: JamiStrings.confirmRmConversation + confirmLabel: JamiStrings.optionRemove + onAccepted: { + MessagesAdapter.removeConversation(LRCInstance.selectedConvUid) + } + } + Rectangle { id: details Layout.fillWidth: true @@ -284,7 +305,7 @@ Rectangle { anchors.left: parent.left anchors.top: parent.top anchors.margins: JamiTheme.preferredMarginSize - text: JamiStrings.leaveTheSwarm + text: JamiStrings.quitConversation font.pointSize: JamiTheme.settingsFontSize font.kerning: true elide: Text.ElideRight @@ -298,7 +319,7 @@ Rectangle { target: parent enabled: parent.visible onTapped: function onTapped(eventPoint) { - MessagesAdapter.removeConversation(LRCInstance.selectedConvUid) + rmDialog.open() } } } @@ -490,6 +511,7 @@ Rectangle { Layout.leftMargin: JamiTheme.preferredMarginSize Layout.preferredHeight: JamiTheme.settingsFontSize + 2 * JamiTheme.preferredMarginSize + 4 Layout.maximumWidth: parent.width + visible: LRCInstance.debugMode() Text { id: idLabel diff --git a/src/app/mainview/components/UserProfile.qml b/src/app/mainview/components/UserProfile.qml index ef3d8f43bd011cab1c572ce8cc63ee827efd89c2..01ab4a520085bf711a23ab47e74d4d1ddbb044a5 100644 --- a/src/app/mainview/components/UserProfile.qml +++ b/src/app/mainview/components/UserProfile.qml @@ -31,7 +31,6 @@ BaseModalDialog { property string aliasText property string registeredNameText property string idText - property bool isSwarm property int preferredImgSize: 80 @@ -194,20 +193,6 @@ BaseModalDialog { "" } - Text { - Layout.alignment: Qt.AlignRight - font.pointSize: JamiTheme.textFontSize - text: JamiStrings.isSwarm - color: JamiTheme.faddedFontColor - } - - Text { - Layout.alignment: Qt.AlignLeft - font.pointSize: JamiTheme.textFontSize - text: isSwarm? JamiStrings.trueStr : JamiStrings.falseStr - color: JamiTheme.faddedFontColor - } - MaterialButton { id: btnClose