mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 05:13:05 +00:00
feat(ui/views/App/Main/AuthenticationRequest): display realm
This commit is contained in:
parent
fc9fcc1967
commit
cf547ff60b
8 changed files with 27 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue