diff --git a/Linphone/model/account/AccountManager.cpp b/Linphone/model/account/AccountManager.cpp index 06c5d8d42..a520bb2cc 100644 --- a/Linphone/model/account/AccountManager.cpp +++ b/Linphone/model/account/AccountManager.cpp @@ -74,6 +74,7 @@ bool AccountManager::login(QString username, QString password) { "", // Realm. identity->getDomain() // Domain. )); + account->setParams(params); mAccountModel = Utils::makeQObject_ptr(account); mAccountModel->setSelf(mAccountModel); connect(mAccountModel.get(), &AccountModel::registrationStateChanged, this, diff --git a/Linphone/view/CMakeLists.txt b/Linphone/view/CMakeLists.txt index c7ce3b2c5..1f5c1121f 100644 --- a/Linphone/view/CMakeLists.txt +++ b/Linphone/view/CMakeLists.txt @@ -28,6 +28,7 @@ list(APPEND _LINPHONEAPP_QML_FILES view/Item/Test/ItemsTest.qml + view/Page/Login/ChooseModePage.qml view/Page/Login/LoginPage.qml view/Page/Login/RegisterPage.qml view/Page/Login/RegisterCheckingPage.qml diff --git a/Linphone/view/Page/Login/ChooseModePage.qml b/Linphone/view/Page/Login/ChooseModePage.qml new file mode 100644 index 000000000..fae66de0e --- /dev/null +++ b/Linphone/view/Page/Login/ChooseModePage.qml @@ -0,0 +1,70 @@ +import QtQuick 2.15 +import QtQuick.Layouts 1.0 +import QtQuick.Controls as Control +import Linphone + +LoginLayout { + id: mainItem + signal modeChosen(int index) + + titleContent: RowLayout { + Image { + fillMode: Image.PreserveAspectFit + source: AppIcons.profile + } + ColumnLayout { + Text { + text: qsTr("Choisir votre mode") + font.pointSize: DefaultStyle.title2FontPointSize + font.bold: true + scaleLettersFactor: 1.1 + } + Text { + text: qsTr("Vous pourrez changer de mode plus tard.") + font.bold: true + scaleLettersFactor: 1.1 + } + } + } + + centerContent: ColumnLayout { + spacing: 80 + Layout.topMargin: 70 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + RowLayout { + id: radioButtonsLayout + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter + spacing: 70 + Repeater { + model: [ + {checked: true, title: qsTr("Chiffrement de bout en bout"), text: qsTr("Ce mode vous garanti la confidentialité de tous vos échanges. Notre technologie de chiffrement de bout en bout assure un niveau de sécurité maximal pour tous vos échanges."), imgUrl: AppIcons.chiffrement}, + {checked: false, title: qsTr("Interoperable"), text: qsTr("Ce mode vous permet de profiter de toute les fonctionnalités de Linphone, toute en restant interopérable avec n’importe qu’elle autre service SIP."), imgUrl: AppIcons.interoperable} + ] + RadioButton { + title: modelData.title + contentText: modelData.text + imgUrl: modelData.imgUrl + checked: modelData.checked + onCheckedChanged: { + if (checked) continueButton.chosenIndex = index + } + } + } + } + Button { + id: continueButton + property int chosenIndex: 0 + Layout.alignment: Qt.AlignHCenter + leftPadding: 100 + rightPadding: 100 + text: qsTr("Continuer") + onClicked: mainItem.modeChosen(chosenIndex) + } + Item { + Layout.fillWidth: true + Layout.fillHeight: true + } + } +} +