Commit cf547ff6 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Main/AuthenticationRequest): display realm

parent fc9fcc19
......@@ -170,6 +170,10 @@
<source>userIdLabel</source>
<translation>User ID (optional)</translation>
</message>
<message>
<source>realmLabel</source>
<translation>Realm</translation>
</message>
</context>
<context>
<name>Calls</name>
......
......@@ -170,6 +170,10 @@
<source>userIdLabel</source>
<translation>ID utilisateur (optionnel)</translation>
</message>
<message>
<source>realmLabel</source>
<translation>Realm</translation>
</message>
</context>
<context>
<name>Calls</name>
......
......@@ -39,6 +39,7 @@ Authentication::Authentication (QObject *parent) : QObject(parent) {
void Authentication::handleAuthenticationRequested (const shared_ptr<linphone::AuthInfo> &authInfo) {
emit authenticationRequested(
QVariant::fromValue(authInfo),
::Utils::linphoneStringToQString(authInfo->getRealm()),
QStringLiteral("%1@%2").arg(
::Utils::linphoneStringToQString(authInfo->getUsername())
).arg(
......
......@@ -37,7 +37,7 @@ public:
~Authentication () = default;
signals:
void authenticationRequested (const QVariant &authInfo, const QString &sipAddress, const QString &userId);
void authenticationRequested (const QVariant &authInfo, const QString &realm, const QString &sipAddress, const QString &userId);
private:
void handleAuthenticationRequested (const std::shared_ptr<linphone::AuthInfo> &authInfo);
......
......@@ -11,6 +11,7 @@ import 'AuthenticationRequest.js' as Logic
DialogPlus {
id: dialog
property alias realm: realm.text
property alias sipAddress: identity.text
property alias userId: userId.text
......@@ -63,6 +64,18 @@ DialogPlus {
}
}
FormLine {
FormGroup {
label: qsTr('realmLabel')
TextField {
id: realm
readOnly: true
}
}
}
FormLine {
FormGroup {
label: qsTr('userIdLabel')
......
......@@ -88,9 +88,10 @@ function updateSelectedEntry (view, props) {
// -----------------------------------------------------------------------------
function handleAuthenticationRequested (authInfo, sipAddress, userId) {
function handleAuthenticationRequested (authInfo, realm, sipAddress, userId) {
window.attachVirtualWindow(Qt.resolvedUrl('AuthenticationRequest.qml'), {
authInfo: authInfo,
realm: realm,
sipAddress: sipAddress,
userId: userId
})
......
......@@ -87,7 +87,7 @@ ApplicationWindow {
// -----------------------------------------------------------------------
Authentication {
onAuthenticationRequested: Logic.handleAuthenticationRequested(authInfo, sipAddress, userId)
onAuthenticationRequested: Logic.handleAuthenticationRequested(authInfo, realm, sipAddress, userId)
}
// -----------------------------------------------------------------------
......
......@@ -4,7 +4,7 @@ import QtQuick 2.7
// =============================================================================
QtObject {
property int height: 366
property int height: 416
property int leftMargin: 35
property int rightMargin: 35
property int width: 480
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment