add row to invite any address in a conference
This commit is contained in:
parent
b6a0ae1c76
commit
fd09a79957
3 changed files with 307 additions and 272 deletions
|
|
@ -48,6 +48,21 @@ ListView {
|
||||||
signal contactDeletionRequested(FriendGui contact)
|
signal contactDeletionRequested(FriendGui contact)
|
||||||
signal contactAddedToSelection()
|
signal contactAddedToSelection()
|
||||||
|
|
||||||
|
function addContactToSelection(address) {
|
||||||
|
if (multiSelectionEnabled) {
|
||||||
|
var indexInSelection = selectedContacts.indexOf(address)
|
||||||
|
if (indexInSelection == -1) {
|
||||||
|
selectedContacts.push(address)
|
||||||
|
contactAddedToSelection()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function removeContactFromSelection(indexInSelection) {
|
||||||
|
if (indexInSelection != -1) {
|
||||||
|
selectedContacts.splice(indexInSelection, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
searchText: searchBarText.length === 0 ? "*" : searchBarText
|
searchText: searchBarText.length === 0 ? "*" : searchBarText
|
||||||
}
|
}
|
||||||
|
|
@ -249,11 +264,10 @@ ListView {
|
||||||
if (mainItem.multiSelectionEnabled) {
|
if (mainItem.multiSelectionEnabled) {
|
||||||
var indexInSelection = mainItem.selectedContacts.indexOf(modelData.core.defaultAddress)
|
var indexInSelection = mainItem.selectedContacts.indexOf(modelData.core.defaultAddress)
|
||||||
if (indexInSelection == -1) {
|
if (indexInSelection == -1) {
|
||||||
mainItem.selectedContacts.push(modelData.core.defaultAddress)
|
mainItem.addContactToSelection(modelData.core.defaultAddress)
|
||||||
mainItem.contactAddedToSelection()
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mainItem.selectedContacts.splice(indexInSelection, 1)
|
mainItem.removeContactFromSelection(indexInSelection, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
ContactsList {
|
ContactsList {
|
||||||
id: contactList
|
id: contactList
|
||||||
|
visible: contentHeight > 0 || searchbar.text.length > 0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
|
|
@ -119,6 +120,32 @@ ColumnLayout {
|
||||||
confInfoGui: mainItem.conferenceInfoGui
|
confInfoGui: mainItem.conferenceInfoGui
|
||||||
searchBarText: searchbar.text
|
searchBarText: searchbar.text
|
||||||
onContactAddedToSelection: participantList.positionViewAtEnd()
|
onContactAddedToSelection: participantList.positionViewAtEnd()
|
||||||
|
headerPositioning: ListView.InlineHeader
|
||||||
|
header: MouseArea {
|
||||||
|
onClicked: contactList.addContactToSelection(sipAddr.text)
|
||||||
|
visible: searchbar.text.length > 0
|
||||||
|
height: searchbar.text.length > 0 ? 56 * DefaultStyle.dp : 0
|
||||||
|
width: contactList.width
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.leftMargin: 30 * DefaultStyle.dp
|
||||||
|
anchors.left: parent.left
|
||||||
|
Avatar {
|
||||||
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||||
|
address: sipAddr.text
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
Text {
|
||||||
|
id: sipAddr
|
||||||
|
text: UtilsCpp.generateLinphoneSipAddress(searchbar.text)
|
||||||
|
font.pixelSize: 14 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,12 @@ AbstractMainPage {
|
||||||
onVisibleChanged: if (visible) rightPanelStackView.push(overridenRightPanel, Control.StackView.Immediate)
|
onVisibleChanged: if (visible) rightPanelStackView.push(overridenRightPanel, Control.StackView.Immediate)
|
||||||
|
|
||||||
onSelectedConferenceChanged: {
|
onSelectedConferenceChanged: {
|
||||||
|
overridenRightPanelStackView.clear()
|
||||||
if (selectedConference) {
|
if (selectedConference) {
|
||||||
/*if (!overridenRightPanelStackView.currentItem || overridenRightPanelStackView.currentItem.objectName != "meetingDetail") */overridenRightPanelStackView.replace(meetingDetail, Control.StackView.Immediate)
|
if (!overridenRightPanelStackView.currentItem || overridenRightPanelStackView.currentItem.objectName != "meetingDetail") overridenRightPanelStackView.replace(meetingDetail, Control.StackView.Immediate)
|
||||||
} else {
|
}// else {
|
||||||
/*if (overridenRightPanelStackView.currentItem && overridenRightPanelStackView.currentItem.objectName === "meetingDetail")*/ overridenRightPanelStackView.clear()
|
/*if (overridenRightPanelStackView.currentItem && overridenRightPanelStackView.currentItem.objectName === "meetingDetail")*/
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
@ -161,9 +162,10 @@ AbstractMainPage {
|
||||||
id: overridenRightPanel
|
id: overridenRightPanel
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: overridenRightPanelStackView
|
id: overridenRightPanelStackView
|
||||||
RectangleTest{anchors.fill: parent}
|
|
||||||
width: 393 * DefaultStyle.dp
|
width: 393 * DefaultStyle.dp
|
||||||
|
height: parent.height
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
// anchors.bottom: parent.bottom
|
||||||
// Layout.fillWidth: false
|
// Layout.fillWidth: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -240,12 +242,9 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: editConf
|
id: editConf
|
||||||
RowLayout {
|
|
||||||
property bool isCreation
|
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
|
||||||
MeetingSetUp {
|
MeetingSetUp {
|
||||||
|
property bool isCreation
|
||||||
isCreation: parent.isCreation
|
isCreation: parent.isCreation
|
||||||
conferenceInfoGui: parent.conferenceInfoGui
|
|
||||||
onReturnRequested: {
|
onReturnRequested: {
|
||||||
overridenRightPanelStackView.pop()
|
overridenRightPanelStackView.pop()
|
||||||
}
|
}
|
||||||
|
|
@ -258,29 +257,24 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Component {
|
Component {
|
||||||
id: addParticipants
|
id: addParticipants
|
||||||
RowLayout {
|
AddParticipantsLayout {
|
||||||
id: addParticipantLayout
|
id: addParticipantLayout
|
||||||
property Control.StackView container
|
property Control.StackView container
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
// Layout.fillHeight: true
|
||||||
AddParticipantsLayout {
|
|
||||||
conferenceInfoGui: parent.conferenceInfoGui
|
|
||||||
title: qsTr("Ajouter des participants")
|
title: qsTr("Ajouter des participants")
|
||||||
validateButtonText: qsTr("Ajouter")
|
validateButtonText: qsTr("Ajouter")
|
||||||
titleColor: DefaultStyle.main1_500_main
|
titleColor: DefaultStyle.main1_500_main
|
||||||
onReturnRequested: {
|
onReturnRequested: {
|
||||||
addParticipantLayout.container.pop()
|
container.pop()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: meetingDetail
|
id: meetingDetail
|
||||||
RowLayout {
|
|
||||||
visible: mainItem.selectedConference
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
visible: mainItem.selectedConference
|
||||||
spacing: 25 * DefaultStyle.dp
|
spacing: 25 * DefaultStyle.dp
|
||||||
Section {
|
Section {
|
||||||
content: RowLayout {
|
content: RowLayout {
|
||||||
|
|
@ -301,7 +295,7 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
visible: UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress)
|
visible: mainItem.selectedConference && UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress)
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.pencil
|
icon.source: AppIcons.pencil
|
||||||
|
|
@ -530,7 +524,7 @@ AbstractMainPage {
|
||||||
UtilsCpp.setupConference(mainItem.selectedConference)
|
UtilsCpp.setupConference(mainItem.selectedConference)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
Item { Layout.fillHeight: true}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue