fix merge call ui

This commit is contained in:
Gaelle Braud 2024-07-11 16:02:42 +02:00
parent 80a9c6d969
commit a18d86a74c
4 changed files with 22 additions and 16 deletions

View file

@ -194,9 +194,6 @@ AppWindow {
}
Popup {
id: waitingPopup
visible: mainWindow.transferState === LinphoneEnums.CallState.OutgoingInit
|| mainWindow.transferState === LinphoneEnums.CallState.OutgoingProgress
|| mainWindow.transferState === LinphoneEnums.CallState.OutgoingRinging || false
modal: true
closePolicy: Control.Popup.NoAutoClose
anchors.centerIn: parent
@ -205,6 +202,16 @@ AppWindow {
radius: 15 * DefaultStyle.dp
width: 278 * DefaultStyle.dp
height: 115 * DefaultStyle.dp
Connections {
target: mainWindow
function ontransferStateChanged() {
if (mainWindow.transferState === LinphoneEnums.CallState.Error
|| mainWindow.transferState === LinphoneEnums.CallState.End
|| mainWindow.transferState === LinphoneEnums.CallState.Released
|| mainWindow.transferState === LinphoneEnums.CallState.Connected)
waitingPopup.close()
}
}
contentItem: ColumnLayout {
spacing: 0
BusyIndicator{
@ -501,6 +508,7 @@ AppWindow {
searchBarBorderColor: DefaultStyle.grey_200
onSelectedContactChanged: {
if (selectedContact) mainWindow.transferCallToContact(mainWindow.call, selectedContact, callcontactslist)
waitingPopup.open()
}
}
}

View file

@ -133,7 +133,7 @@ RightPanelLayout {
contentItem: TextField {
id: givenNameEdit
initialText: contact.core.givenName
onEditingFinished: contact.core.givenName = text
onTextEdited: contact.core.givenName = text
backgroundColor: DefaultStyle.grey_0
backgroundBorderColor: givenName.errorTextItem.opacity != 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
}
@ -142,7 +142,7 @@ RightPanelLayout {
label: qsTr("Nom")
contentItem: TextField {
initialText: contact.core.familyName
onEditingFinished: contact.core.familyName = text
onTextEdited: contact.core.familyName = text
backgroundColor: DefaultStyle.grey_0
}
}
@ -150,7 +150,7 @@ RightPanelLayout {
label: qsTr("Entreprise")
contentItem: TextField {
initialText: contact.core.organization
onEditingFinished: contact.core.organization = text
onTextEdited: contact.core.organization = text
backgroundColor: DefaultStyle.grey_0
}
}
@ -158,7 +158,7 @@ RightPanelLayout {
label: qsTr("Fonction")
contentItem: TextField {
initialText: contact.core.job
onEditingFinished: contact.core.job = text
onTextEdited: contact.core.job = text
backgroundColor: DefaultStyle.grey_0
}
}
@ -180,7 +180,7 @@ RightPanelLayout {
label: modelData.label
contentItem: RowLayout {
TextField {
onEditingFinished: {
onTextEdited: {
if (text.length != 0) mainItem.contact.core.setAddressAt(index, qsTr("Adresse SIP"), text)
}
property string _initialText: modelData.address
@ -213,10 +213,6 @@ RightPanelLayout {
if (text.length != 0) mainItem.contact.core.appendAddress(text)
text = ""
}
onFocusChanged: if (!focus && text.length != 0) {
mainItem.contact.core.appendAddress(text)
text = ""
}
}
}
Item {
@ -234,7 +230,7 @@ RightPanelLayout {
label: modelData.label
contentItem: TextField {
initialText: modelData.address
onEditingFinished: {
onTextEdited: {
if (text.length != 0) mainItem.contact.core.setPhoneNumberAt(index, qsTr("Téléphone"), text)
}
backgroundColor: DefaultStyle.grey_0

View file

@ -42,6 +42,7 @@ ListView {
property FriendGui selectedContact: model.getAt(currentIndex) || null
onCurrentIndexChanged: selectedContact = model.getAt(currentIndex) || null
onCountChanged: selectedContact = model.getAt(currentIndex) || null
signal contactStarredChanged()
signal contactDeletionRequested(FriendGui contact)

View file

@ -34,7 +34,8 @@ AbstractMainPage {
friendGui.core.givenName = UtilsCpp.getGivenNameFromFullName(name)
friendGui.core.familyName = UtilsCpp.getFamilyNameFromFullName(name)
friendGui.core.defaultAddress = address
rightPanelStackView.push(contactEdition, {"contact": friendGui, "title": qsTr("Nouveau contact"), "saveButtonText": qsTr("Créer")})
if (rightPanelStackView.currentItem && rightPanelStackView.currentItem.objectName != "contactEdition")
rightPanelStackView.push(contactEdition, {"contact": friendGui, "title": qsTr("Nouveau contact"), "saveButtonText": qsTr("Créer")})
}
function editContact(friendGui) {
@ -787,11 +788,11 @@ AbstractMainPage {
Component {
id: contactEdition
ContactEdition {
Control.StackView.onActivated: console.log("edit/create contact")
property string objectName: "contactEdition"
onCloseEdition: {
if (rightPanelStackView.depth <= 1) rightPanelStackView.clear()
else rightPanelStackView.pop(Control.StackView.Immediate)
}
}
}
}
}