From d0461d5ec229cf73dd06e7cc6b118414876e82be Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 25 Aug 2022 18:08:13 +0200 Subject: [PATCH] Add a way to put a custom view in front of a dialog. Conference Creation: - Add a waiting view while creating a conference. - Move to conferences list on success - --- linphone-app/assets/languages/da.ts | 5 ++ linphone-app/assets/languages/de.ts | 5 ++ linphone-app/assets/languages/en.ts | 5 ++ linphone-app/assets/languages/es.ts | 5 ++ linphone-app/assets/languages/fr_FR.ts | 5 ++ linphone-app/assets/languages/hu.ts | 5 ++ linphone-app/assets/languages/it.ts | 5 ++ linphone-app/assets/languages/ja.ts | 5 ++ linphone-app/assets/languages/lt.ts | 5 ++ linphone-app/assets/languages/pt_BR.ts | 5 ++ linphone-app/assets/languages/ru.ts | 5 ++ linphone-app/assets/languages/sv.ts | 5 ++ linphone-app/assets/languages/tr.ts | 5 ++ linphone-app/assets/languages/uk.ts | 5 ++ linphone-app/assets/languages/zh_CN.ts | 5 ++ .../ui/modules/Common/Dialog/DialogPlus.qml | 5 ++ .../ui/views/App/Dialog/NewConference.qml | 51 ++++++++++++++----- linphone-app/ui/views/App/Main/MainWindow.qml | 6 ++- .../App/Styles/Dialog/NewConferenceStyle.qml | 5 ++ 19 files changed, 127 insertions(+), 15 deletions(-) diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index ec2045616..a0585892e 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -1938,6 +1938,11 @@ Klik her: <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index dff29fbd4..ce313d9b1 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -1938,6 +1938,11 @@ Klicken Sie hier: <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index ae9e6989d..21ec8ba24 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -1938,6 +1938,11 @@ Click here: <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. Send invite via Email + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + Operations in progress, please wait + Notice diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index c8f47e42f..dadf886c6 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -1938,6 +1938,11 @@ Haga clic aquí: <a href="%1">%1 </a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index 64a0a4999..f918a11b1 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -1938,6 +1938,11 @@ Cliquez ici : <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index 0c1df3857..8ede3ed7c 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -1926,6 +1926,11 @@ Kattintson ide: <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index 9a7d1599c..5f8a40bd2 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -1938,6 +1938,11 @@ Clicca: <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. Invita tramite Email + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index b5c26fc9e..0320e7c4c 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -1926,6 +1926,11 @@ 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index f0dc45b52..13d2acd68 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -1950,6 +1950,11 @@ Spustelėkite čia: <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index cc012e671..5bdc493df 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -1938,6 +1938,11 @@ Clique aqui: <a href="%1">%1 </a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index fe810bd00..c9b125677 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -1950,6 +1950,11 @@ 'Send invite via Email' : Label for checkbox for sending invitations with mailer. Отправить приглашение через электронную почту + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index 2e7dea96c..15b67ba58 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -1938,6 +1938,11 @@ Klicka här: <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index 5bb65f10e..dc4eb019f 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -1926,6 +1926,11 @@ Buraya tıklayın: <a href="%1">%1</a> 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 93b67dc79..5df47dd74 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -1950,6 +1950,11 @@ 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index 465c8dbc7..6288eb334 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -1926,6 +1926,11 @@ 'Send invite via Email' : Label for checkbox for sending invitations with mailer. + + busyOperations + 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + + Notice diff --git a/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml b/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml index 23b691217..f5174cd58 100644 --- a/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml +++ b/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml @@ -34,6 +34,7 @@ Rectangle { : DialogStyle.buttons.rightMargin default property alias _content: content.data + property alias foregroundItem: foregroundItemData.data readonly property bool contentIsEmpty: { return _content == null || !_content.length @@ -111,4 +112,8 @@ Rectangle { visible: children.length>0 } } + Item{ + id: foregroundItemData + anchors.fill: parent + } } diff --git a/linphone-app/ui/views/App/Dialog/NewConference.qml b/linphone-app/ui/views/App/Dialog/NewConference.qml index 0d10bb244..a8a60b683 100644 --- a/linphone-app/ui/views/App/Dialog/NewConference.qml +++ b/linphone-app/ui/views/App/Dialog/NewConference.qml @@ -21,24 +21,19 @@ DialogPlus { property ConferenceInfoModel conferenceInfoModel: ConferenceInfoModel{} onConferenceInfoModelChanged: selectedParticipants.setAddresses(conferenceInfoModel) property bool forceSchedule : false - property int creationState: 0 - Timer{ - id: closeDelay - interval: 2000 - onTriggered: conferenceManager.exit(1) - } + property int creationState: 0// -1=error, 0=Idle, 1=processing, 2=processed Connections{ target: conferenceInfoModel onConferenceCreated: { if( conferenceInfoModel.inviteMode == 0 ) { - closeDelay.start() conferenceManager.creationState = 2 + conferenceManager.exit(1) } } onConferenceCreationFailed:{ conferenceManager.creationState = -1 } onInvitationsSent: { - closeDelay.start() conferenceManager.creationState = 2 + conferenceManager.exit(1) } } @@ -167,13 +162,10 @@ DialogPlus { } , Icon{ id: creationStatus - height: 15 - width: 15 + height: 10 + width: 10 visible: icon != '' - icon: conferenceManager.creationState==2 ? 'led_green' - : conferenceManager.creationState==-1 ? 'led_red' - : conferenceManager.creationState==1 ? 'led_orange' - : '' + icon:conferenceManager.creationState==-1 ? 'led_red' : '' } ] @@ -600,4 +592,35 @@ DialogPlus { //---------------------------------------------------- } } + foregroundItem: Item{ + id: busyPanel + anchors.fill: parent + visible: conferenceManager.creationState == 1 + MouseArea{// Grabber + anchors.fill: parent + cursorShape: Qt.ArrowCursor + } + Rectangle{ + anchors.fill: parent + opacity: 0.6 + color: 'white' + } + ColumnLayout{ + anchors.centerIn: parent + spacing: 10 + BusyIndicator{ + Layout.preferredHeight: 20 + Layout.preferredWidth: 20 + Layout.alignment: Qt.AlignCenter + color: NewConferenceStyle.busy.color + } + Text{ + Layout.fillWidth: true + color: NewConferenceStyle.busy.color + //: 'Operations in progress, please wait' : Waiting message till the end of operations when creating a conference. + text: qsTr('busyOperations') + font.pointSize: NewConferenceStyle.busy.pointSize + } + } + } } diff --git a/linphone-app/ui/views/App/Main/MainWindow.qml b/linphone-app/ui/views/App/Main/MainWindow.qml index 3c38fe81e..a7862e896 100644 --- a/linphone-app/ui/views/App/Main/MainWindow.qml +++ b/linphone-app/ui/views/App/Main/MainWindow.qml @@ -241,7 +241,11 @@ ApplicationWindow { onClicked: { window.detachVirtualWindow() window.attachVirtualWindow(Utils.buildAppDialogUri('NewConference') - ,{}) + ,{}, function (status) { + if( status){ + setView('Conferences') + } + }) } TooltipArea{ visible: !SettingsModel.videoConferenceEnabled diff --git a/linphone-app/ui/views/App/Styles/Dialog/NewConferenceStyle.qml b/linphone-app/ui/views/App/Styles/Dialog/NewConferenceStyle.qml index 209fef443..c885786bb 100644 --- a/linphone-app/ui/views/App/Styles/Dialog/NewConferenceStyle.qml +++ b/linphone-app/ui/views/App/Styles/Dialog/NewConferenceStyle.qml @@ -17,6 +17,11 @@ QtObject { property color addressesAdminColor: ColorsList.add(sectionName+'_addresses_admin', 'g').color property color requiredColor: ColorsList.add(sectionName+'_required_text', 'g').color + property QtObject busy: QtObject{ + property color color: ColorsList.add(sectionName+'_busy', 'i').color + property real pointSize: Units.dp * 10 + } + property QtObject titles: QtObject{ property color textColor: ColorsList.add(sectionName+'_schedule_titles', 'g').color property int weight: Font.DemiBold