return to meeting list if cancel scheduling of a conf

This commit is contained in:
Gaelle Braud 2024-11-28 16:10:10 +01:00
parent 586ad1a69d
commit 84cc47e7dc
4 changed files with 71 additions and 62 deletions

View file

@ -17,20 +17,7 @@ ColumnLayout {
property alias bannerContent: bannerLayout.data property alias bannerContent: bannerLayout.data
property alias secondLineContent: verticalLayoutSecondLine.data property alias secondLineContent: verticalLayoutSecondLine.data
property int minimumWidthForSwitchintToRowLayout: 756 * DefaultStyle.dp property int minimumWidthForSwitchintToRowLayout: 756 * DefaultStyle.dp
property var useVerticalLayout property var useVerticalLayout: width < minimumWidthForSwitchintToRowLayout * DefaultStyle.dp
function setResponsivityFlags() {
var mainWin = UtilsCpp.getMainWindow()
var newValue = width < minimumWidthForSwitchintToRowLayout * DefaultStyle.dp
if (useVerticalLayout != newValue) {
useVerticalLayout = newValue
}
}
onWidthChanged: {
setResponsivityFlags()
}
Component.onCompleted: {
setResponsivityFlags()
}
GridLayout { GridLayout {
Layout.leftMargin: 64 * DefaultStyle.dp Layout.leftMargin: 64 * DefaultStyle.dp

View file

@ -7,6 +7,7 @@ Popup {
id: mainItem id: mainItem
property string text property string text
property bool cancelButtonVisible: false property bool cancelButtonVisible: false
property var callback
modal: true modal: true
closePolicy: Control.Popup.NoAutoClose closePolicy: Control.Popup.NoAutoClose
anchors.centerIn: parent anchors.centerIn: parent
@ -35,7 +36,10 @@ Popup {
visible: mainItem.cancelButtonVisible visible: mainItem.cancelButtonVisible
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: qsTr("Annuler") text: qsTr("Annuler")
onClicked: mainItem.close() onClicked: {
if (callback) mainItem.callback()
mainItem.close()
}
} }
} }
} }

View file

@ -275,7 +275,9 @@ AbstractMainPage {
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false) UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false)
} else { } else {
meetingSetup.conferenceInfoGui.core.save() meetingSetup.conferenceInfoGui.core.save()
mainWindow.showLoadingPopup(qsTr("Création de la réunion en cours ..."), true) mainWindow.showLoadingPopup(qsTr("Création de la réunion en cours ..."), true, function () {
leftPanelStackView.pop()
})
} }
} }
} }
@ -293,7 +295,9 @@ AbstractMainPage {
var mainWin = UtilsCpp.getMainWindow() var mainWin = UtilsCpp.getMainWindow()
if (meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.AllocationPending if (meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.AllocationPending
|| meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Updating) { || meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Updating) {
mainWin.showLoadingPopup(qsTr("Création de la réunion en cours...")) mainWin.showLoadingPopup(qsTr("Création de la réunion en cours..."), true, function () {
leftPanelStackView.pop()
})
} else { } else {
if (meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Error) { if (meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Error) {
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La création de la conférence a échoué"), false) UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La création de la conférence a échoué"), false)
@ -339,14 +343,14 @@ AbstractMainPage {
id: editLayout id: editLayout
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 58 * DefaultStyle.dp anchors.topMargin: 58 * DefaultStyle.dp
spacing: 0 spacing: 0
Section { Section {
Layout.preferredWidth: 393 * DefaultStyle.dp Layout.preferredWidth: 393 * DefaultStyle.dp
content: RowLayout { content: RowLayout {
spacing: 8 * DefaultStyle.dp spacing: 16 * DefaultStyle.dp
Layout.preferredWidth: overridenRightPanelStackView.width Layout.preferredWidth: overridenRightPanelStackView.width
Layout.preferredHeight: childrenRect.height
Button { Button {
id: backButton id: backButton
Layout.preferredWidth: 24 * DefaultStyle.dp Layout.preferredWidth: 24 * DefaultStyle.dp
@ -364,47 +368,56 @@ AbstractMainPage {
} }
background: Item{} background: Item{}
} }
TextInput { RowLayout {
id: titleText spacing: 8 * DefaultStyle.dp
Layout.fillWidth: true EffectImage{
color: DefaultStyle.main2_600 imageSource: AppIcons.usersThree
clip: true colorizationColor: DefaultStyle.main2_600
font { Layout.preferredWidth: 24 * DefaultStyle.dp
pixelSize: 20 * DefaultStyle.dp Layout.preferredHeight: 24 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
} }
KeyNavigation.left: backButton TextInput {
KeyNavigation.right: saveButton id: titleText
KeyNavigation.down: conferenceEdit Layout.fillWidth: true
KeyNavigation.up: conferenceEdit color: DefaultStyle.main2_600
onActiveFocusChanged: if(activeFocus==true) selectAll() clip: true
onEditingFinished: mainItem.selectedConference.core.subject = text font {
Component.onCompleted: { pixelSize: 20 * DefaultStyle.dp
text = mainItem.selectedConference.core.subject weight: 800 * DefaultStyle.dp
}
KeyNavigation.left: backButton
KeyNavigation.right: saveButton
KeyNavigation.down: conferenceEdit
KeyNavigation.up: conferenceEdit
onActiveFocusChanged: if(activeFocus==true) selectAll()
onEditingFinished: mainItem.selectedConference.core.subject = text
Component.onCompleted: {
text = mainItem.selectedConference.core.subject
}
} }
} Button {
Button { id: saveButton
id: saveButton topPadding: 6 * DefaultStyle.dp
topPadding: 6 * DefaultStyle.dp bottomPadding: 6 * DefaultStyle.dp
bottomPadding: 6 * DefaultStyle.dp leftPadding: 12 * DefaultStyle.dp
leftPadding: 12 * DefaultStyle.dp rightPadding: 12 * DefaultStyle.dp
rightPadding: 12 * DefaultStyle.dp focus: true
focus: true text: qsTr("Save")
text: qsTr("Save") textSize: 13 * DefaultStyle.dp
textSize: 13 * DefaultStyle.dp KeyNavigation.left: titleText
KeyNavigation.left: titleText KeyNavigation.right: backButton
KeyNavigation.right: backButton KeyNavigation.down: conferenceEdit
KeyNavigation.down: conferenceEdit KeyNavigation.up: conferenceEdit
KeyNavigation.up: conferenceEdit onClicked: {
onClicked: { if (mainItem.selectedConference.core.subject.length === 0) {
if (mainItem.selectedConference.core.subject.length === 0) { UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false) } else if (mainItem.selectedConference.core.duration <= 0) {
} else if (mainItem.selectedConference.core.duration <= 0) { UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La fin de la conférence doit être plus récente que son début"), false)
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La fin de la conférence doit être plus récente que son début"), false) } else if (mainItem.selectedConference.core.participantCount === 0) {
} else if (mainItem.selectedConference.core.participantCount === 0) { UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false)
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false) } else {
} else { mainItem.selectedConference.core.save()
mainItem.selectedConference.core.save() }
} }
} }
} }
@ -547,7 +560,9 @@ AbstractMainPage {
height: meetingDetailsLayout.implicitHeight height: meetingDetailsLayout.implicitHeight
ColumnLayout { ColumnLayout {
id: meetingDetailsLayout id: meetingDetailsLayout
anchors.fill: parent anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 58 * DefaultStyle.dp anchors.topMargin: 58 * DefaultStyle.dp
visible: mainItem.selectedConference visible: mainItem.selectedConference
spacing: 25 * DefaultStyle.dp spacing: 25 * DefaultStyle.dp
@ -556,8 +571,9 @@ AbstractMainPage {
Layout.fillWidth: true Layout.fillWidth: true
content: RowLayout { content: RowLayout {
spacing: 8 * DefaultStyle.dp spacing: 8 * DefaultStyle.dp
Image { EffectImage {
source: AppIcons.usersThree imageSource: AppIcons.usersThree
colorizationColor: DefaultStyle.main2_600
Layout.preferredWidth: 24 * DefaultStyle.dp Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp Layout.preferredHeight: 24 * DefaultStyle.dp
} }
@ -803,6 +819,7 @@ AbstractMainPage {
} }
Text { Text {
text: modelData.displayName text: modelData.displayName
maximumLineCount: 1
Layout.fillWidth: true Layout.fillWidth: true
font { font {
pixelSize: 14 * DefaultStyle.dp pixelSize: 14 * DefaultStyle.dp

View file

@ -199,9 +199,10 @@ ApplicationWindow {
infoPopup.open() infoPopup.open()
infoPopup.closePopup.connect(removeFromPopupLayout) infoPopup.closePopup.connect(removeFromPopupLayout)
} }
function showLoadingPopup(text, cancelButtonVisible) { function showLoadingPopup(text, cancelButtonVisible, callback) {
if (cancelButtonVisible == undefined) cancelButtonVisible = false if (cancelButtonVisible == undefined) cancelButtonVisible = false
loadingPopup.text = text loadingPopup.text = text
loadingPopup.callback = callback
loadingPopup.cancelButtonVisible = cancelButtonVisible loadingPopup.cancelButtonVisible = cancelButtonVisible
loadingPopup.open() loadingPopup.open()
} }