Add display name for "using an account" on assistant.

This commit is contained in:
Julien Wadel 2022-06-09 14:26:43 +02:00
parent a76695cb97
commit cc9099752f
18 changed files with 214 additions and 76 deletions

View file

@ -3170,6 +3170,10 @@ Klik her: <a href="%1">%1</a>
<source>phoneNumberLabel</source>
<translation>Telefonnummer</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Navn til visning (valgfrit)</translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3181,6 +3185,10 @@ Klik her: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Kodeord</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Navn til visning (valgfrit)</translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3170,6 +3170,10 @@ Klicken Sie hier: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Telefonnummer</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3181,6 +3185,10 @@ Klicken Sie hier: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Passwort</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3193,6 +3193,10 @@ Click here: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Phone number</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation>Display name (optional)</translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3204,6 +3208,10 @@ Click here: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Password</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation>Display name (optional)</translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3170,6 +3170,10 @@ Haga clic aquí: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Número de teléfono</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Nombre mostrado (opcional)</translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3181,6 +3185,10 @@ Haga clic aquí: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<source>passwordLabel</source>
<translation>Contraseña</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Nombre mostrado (opcional)</translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3170,6 +3170,10 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Numéro de téléphone</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3181,6 +3185,10 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Mot de passe</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3158,6 +3158,10 @@ Kattintson ide: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Telefonszám</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3169,6 +3173,10 @@ Kattintson ide: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Jelszó</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3170,6 +3170,10 @@ Clicca: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Numero di telefono</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Nome visualizzato (facoltativo)</translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3181,6 +3185,10 @@ Clicca: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Password</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Nome visualizzato (facoltativo)</translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3158,6 +3158,10 @@
<source>phoneNumberLabel</source>
<translation></translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">()</translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3169,6 +3173,10 @@
<source>passwordLabel</source>
<translation></translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">()</translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3182,6 +3182,10 @@ Spustelėkite čia: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Telefono numeris</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Rodomas vardas (nebūtina)</translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3193,6 +3197,10 @@ Spustelėkite čia: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Slaptažodis</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Rodomas vardas (nebūtina)</translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3170,6 +3170,10 @@ Clique aqui: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Número de telefone</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3181,6 +3185,10 @@ Clique aqui: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<source>passwordLabel</source>
<translation>Senha</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3182,6 +3182,10 @@
<source>phoneNumberLabel</source>
<translation>Номер телефона</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3193,6 +3197,10 @@
<source>passwordLabel</source>
<translation>Пароль</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3170,6 +3170,10 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Telefonnummer</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Visningsnamn (valfritt)</translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3181,6 +3185,10 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Lösenord</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Visningsnamn (valfritt)</translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3158,6 +3158,10 @@ Buraya tıklayın: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>phoneNumberLabel</source>
<translation>Telefon numarası</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3169,6 +3173,10 @@ Buraya tıklayın: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>passwordLabel</source>
<translation>Parola</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3182,6 +3182,10 @@
<source>phoneNumberLabel</source>
<translation>Номер телефону</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Показуване ім&apos;я (не обов&apos;язково)</translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3193,6 +3197,10 @@
<source>passwordLabel</source>
<translation>Пароль</translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished">Показуване ім&apos;я (не обов&apos;язково)</translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -3158,6 +3158,10 @@
<source>phoneNumberLabel</source>
<translation></translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseAppSipAccountWithUsername</name>
@ -3169,6 +3173,10 @@
<source>passwordLabel</source>
<translation></translation>
</message>
<message>
<source>displayNameLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UseOtherSipAccount</name>

View file

@ -88,7 +88,7 @@ AssistantAbstractView {
function setCountryCode (index) {
var model = telephoneNumbersModel
assistantModel.countryCode = index !== -1 ? model.data(model.index(index, 0)).countryCode : ''
assistantModel.countryCode = index !== -1 ? model.data(model.index(index, 0)).countryCode || '' : ''
}
configFilename: 'use-app-sip-account.rc'

View file

@ -4,46 +4,55 @@ import Linphone 1.0
// =============================================================================
Form {
property alias phoneNumberError: phoneNumber.error
property bool mainActionEnabled: phoneNumber.text.length &&
!phoneNumberError.length
orientation: Qt.Vertical
FormLine {
FormGroup {
label: qsTr('countryLabel')
ComboBox {
id: country
currentIndex: model.defaultIndex
model: telephoneNumbersModel
textRole: 'countryName'
onActivated: {
assistantModel.setCountryCode(index)
var text = phoneNumber.text
if (text.length > 0) {
assistantModel.phoneNumber = text
}
}
}
}
}
FormLine {
FormGroup {
label: qsTr('phoneNumberLabel')
TextField {
id: phoneNumber
inputMethodHints: Qt.ImhDialableCharactersOnly
onTextChanged: assistantModel.phoneNumber = text
}
}
}
property alias phoneNumberError: phoneNumber.error
property bool mainActionEnabled: phoneNumber.text.length &&
!phoneNumberError.length
orientation: Qt.Vertical
FormLine{
FormGroup {
label: qsTr('displayNameLabel')
TextField {
onTextChanged: assistantModel.displayName = text
}
}
}
FormLine {
FormGroup {
label: qsTr('countryLabel')
ComboBox {
id: country
currentIndex: model.defaultIndex
model: telephoneNumbersModel
textRole: 'countryName'
onActivated: {
assistantModel.setCountryCode(index)
var text = phoneNumber.text
if (text.length > 0) {
assistantModel.phoneNumber = text
}
}
}
}
}
FormLine {
FormGroup {
label: qsTr('phoneNumberLabel')
TextField {
id: phoneNumber
inputMethodHints: Qt.ImhDialableCharactersOnly
onTextChanged: assistantModel.phoneNumber = text
}
}
}
}

View file

@ -3,37 +3,46 @@ import Common 1.0
// =============================================================================
Form {
property alias passwordError: password.error
property alias usernameError: username.error
property bool mainActionEnabled: password.text &&
username.length &&
!passwordError.length &&
!usernameError.length
orientation: Qt.Vertical
FormLine {
FormGroup {
label: qsTr('usernameLabel')
TextField {
id: username
onTextChanged: assistantModel.username = text
}
}
}
FormLine {
FormGroup {
label: qsTr('passwordLabel')
PasswordField {
id: password
onTextChanged: assistantModel.password = text
}
}
}
property alias passwordError: password.error
property alias usernameError: username.error
property bool mainActionEnabled: password.text &&
username.length &&
!passwordError.length &&
!usernameError.length
orientation: Qt.Vertical
FormLine{
FormGroup {
label: qsTr('displayNameLabel')
TextField {
onTextChanged: assistantModel.displayName = text
}
}
}
FormLine {
FormGroup {
label: qsTr('usernameLabel')
TextField {
id: username
onTextChanged: assistantModel.username = text
}
}
}
FormLine {
FormGroup {
label: qsTr('passwordLabel')
PasswordField {
id: password
onTextChanged: assistantModel.password = text
}
}
}
}