mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-27 19:06:22 +00:00
feat(ui/views/App/Assistant/AssistantUseLinphoneSipAccount): view done
This commit is contained in:
parent
e4bbfc820d
commit
ebd960a4a8
8 changed files with 220 additions and 16 deletions
|
|
@ -78,8 +78,8 @@
|
||||||
<translation>Password confirmation</translation>
|
<translation>Password confirmation</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>createAction</source>
|
<source>confirmAction</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>CREATE</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
@ -124,6 +124,37 @@
|
||||||
<translation>CREATE A LINPHONE ACCOUNT</translation>
|
<translation>CREATE A LINPHONE ACCOUNT</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>AssistantUseLinphoneSipAccount</name>
|
||||||
|
<message>
|
||||||
|
<source>confirmAction</source>
|
||||||
|
<translation>LOGIN</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>useLinphoneSipAccountTitle</source>
|
||||||
|
<translation>USE A LINPHONE ACCOUNT</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>countryLabel</source>
|
||||||
|
<translation>Your country</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>phoneNumberLabel</source>
|
||||||
|
<translation>Phone number</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>useUsernameToLogin</source>
|
||||||
|
<translation>Use username and password rather than your phone number.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>usernameLabel</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>passwordLabel</source>
|
||||||
|
<translation type="unfinished">Password</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>AssistantUseOtherSipAccount</name>
|
<name>AssistantUseOtherSipAccount</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,8 @@
|
||||||
<translation>Confirmation du mot de passe</translation>
|
<translation>Confirmation du mot de passe</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>createAction</source>
|
<source>confirmAction</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>CREATE</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
@ -124,6 +124,37 @@
|
||||||
<translation>CRÉER UN COMPTE LINPHONE</translation>
|
<translation>CRÉER UN COMPTE LINPHONE</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>AssistantUseLinphoneSipAccount</name>
|
||||||
|
<message>
|
||||||
|
<source>confirmAction</source>
|
||||||
|
<translation>CONNEXION</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>useLinphoneSipAccountTitle</source>
|
||||||
|
<translation>UTILISER UN COMPTE LINPHONE</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>countryLabel</source>
|
||||||
|
<translation>Votre pays</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>phoneNumberLabel</source>
|
||||||
|
<translation>Numéro de téléphone</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>useUsernameToLogin</source>
|
||||||
|
<translation>Utiliser un nom et mot de passe plutôt que votre numéro de téléphone.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>usernameLabel</source>
|
||||||
|
<translation type="unfinished">Nom d'utilisateur</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>passwordLabel</source>
|
||||||
|
<translation type="unfinished">Mot de passe</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>AssistantUseOtherSipAccount</name>
|
<name>AssistantUseOtherSipAccount</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
||||||
|
|
@ -313,6 +313,7 @@
|
||||||
<file>ui/views/App/Assistant/AssistantCreateLinphoneSipAccount.qml</file>
|
<file>ui/views/App/Assistant/AssistantCreateLinphoneSipAccount.qml</file>
|
||||||
<file>ui/views/App/Assistant/AssistantFetchRemoteConfiguration.qml</file>
|
<file>ui/views/App/Assistant/AssistantFetchRemoteConfiguration.qml</file>
|
||||||
<file>ui/views/App/Assistant/AssistantHome.qml</file>
|
<file>ui/views/App/Assistant/AssistantHome.qml</file>
|
||||||
|
<file>ui/views/App/Assistant/AssistantUseLinphoneSipAccount.qml</file>
|
||||||
<file>ui/views/App/Assistant/AssistantUseOtherSipAccount.qml</file>
|
<file>ui/views/App/Assistant/AssistantUseOtherSipAccount.qml</file>
|
||||||
<file>ui/views/App/AssistantWindow.qml</file>
|
<file>ui/views/App/AssistantWindow.qml</file>
|
||||||
<file>ui/views/App/Calls/AbstractStartingCall.qml</file>
|
<file>ui/views/App/Calls/AbstractStartingCall.qml</file>
|
||||||
|
|
@ -340,6 +341,7 @@
|
||||||
<file>ui/views/App/Styles/Assistant/AssistantAbstractViewStyle.qml</file>
|
<file>ui/views/App/Styles/Assistant/AssistantAbstractViewStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Assistant/AssistantCreateLinphoneSipAccountStyle.qml</file>
|
<file>ui/views/App/Styles/Assistant/AssistantCreateLinphoneSipAccountStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Assistant/AssistantHomeStyle.qml</file>
|
<file>ui/views/App/Styles/Assistant/AssistantHomeStyle.qml</file>
|
||||||
|
<file>ui/views/App/Styles/Assistant/AssistantUseLinphoneSipAccountStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/AssistantWindowStyle.qml</file>
|
<file>ui/views/App/Styles/AssistantWindowStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Calls/CallStyle.qml</file>
|
<file>ui/views/App/Styles/Calls/CallStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Calls/CallsWindowStyle.qml</file>
|
<file>ui/views/App/Styles/Calls/CallsWindowStyle.qml</file>
|
||||||
|
|
|
||||||
|
|
@ -13,26 +13,39 @@ CheckBox {
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
color: checkBox.down
|
color: checkBox.down
|
||||||
? CheckBoxTextStyle.color.pressed
|
? CheckBoxTextStyle.color.pressed
|
||||||
: (checkBox.hovered
|
: (
|
||||||
? CheckBoxTextStyle.color.hovered
|
checkBox.hovered
|
||||||
: CheckBoxTextStyle.color.normal
|
? CheckBoxTextStyle.color.hovered
|
||||||
)
|
: CheckBoxTextStyle.color.normal
|
||||||
|
)
|
||||||
|
|
||||||
|
elide: Text.ElideRight
|
||||||
font: checkBox.font
|
font: checkBox.font
|
||||||
leftPadding: checkBox.indicator.width + checkBox.spacing
|
leftPadding: checkBox.indicator.width + checkBox.spacing
|
||||||
text: checkBox.text
|
text: checkBox.text
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
indicator: Rectangle {
|
indicator: Rectangle {
|
||||||
border.color: checkBox.down
|
border.color: checkBox.down
|
||||||
? CheckBoxTextStyle.color.pressed
|
? CheckBoxTextStyle.color.pressed
|
||||||
: (checkBox.hovered
|
: (
|
||||||
? CheckBoxTextStyle.color.hovered
|
checkBox.hovered
|
||||||
: CheckBoxTextStyle.color.normal
|
? CheckBoxTextStyle.color.hovered
|
||||||
)
|
: CheckBoxTextStyle.color.normal
|
||||||
|
)
|
||||||
|
|
||||||
implicitHeight: CheckBoxTextStyle.size
|
implicitHeight: CheckBoxTextStyle.size
|
||||||
implicitWidth: CheckBoxTextStyle.size
|
implicitWidth: CheckBoxTextStyle.size
|
||||||
|
|
||||||
radius: CheckBoxTextStyle.radius
|
radius: CheckBoxTextStyle.radius
|
||||||
|
|
||||||
x: checkBox.leftPadding
|
x: checkBox.leftPadding
|
||||||
y: parent.height / 2 - height / 2
|
y: parent.height / 2 - height / 2
|
||||||
|
|
||||||
|
|
@ -43,10 +56,13 @@ CheckBox {
|
||||||
? CheckBoxTextStyle.color.hovered
|
? CheckBoxTextStyle.color.hovered
|
||||||
: CheckBoxTextStyle.color.normal
|
: CheckBoxTextStyle.color.normal
|
||||||
)
|
)
|
||||||
|
|
||||||
height: parent.height - y * 2
|
height: parent.height - y * 2
|
||||||
|
width: parent.width - x * 2
|
||||||
|
|
||||||
radius: CheckBoxTextStyle.radius
|
radius: CheckBoxTextStyle.radius
|
||||||
visible: checkBox.checked
|
visible: checkBox.checked
|
||||||
width: parent.width - x * 2
|
|
||||||
x: 4 // Fixed, no needed to use style file.
|
x: 4 // Fixed, no needed to use style file.
|
||||||
y: 4 // Same thing.
|
y: 4 // Same thing.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ AssistantAbstractView {
|
||||||
mainActionEnabled: country.currentIndex !== -1 &&
|
mainActionEnabled: country.currentIndex !== -1 &&
|
||||||
phoneNumber.text.length
|
phoneNumber.text.length
|
||||||
|
|
||||||
mainActionLabel: qsTr('createAction')
|
mainActionLabel: qsTr('confirmAction')
|
||||||
|
|
||||||
title: view.title
|
title: view.title
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ AssistantAbstractView {
|
||||||
&& password.text.length
|
&& password.text.length
|
||||||
&& passwordConfirmation.text === password.text
|
&& passwordConfirmation.text === password.text
|
||||||
|
|
||||||
mainActionLabel: qsTr('createAction')
|
mainActionLabel: qsTr('confirmAction')
|
||||||
|
|
||||||
title: view.title
|
title: view.title
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
import QtQuick 2.7
|
||||||
|
|
||||||
|
import Common 1.0
|
||||||
|
|
||||||
|
import App.Styles 1.0
|
||||||
|
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
AssistantAbstractView {
|
||||||
|
mainAction: (function () {
|
||||||
|
console.log('TODO')
|
||||||
|
})
|
||||||
|
|
||||||
|
mainActionEnabled: {
|
||||||
|
var item = loader.item
|
||||||
|
return item && item.mainActionEnabled
|
||||||
|
}
|
||||||
|
|
||||||
|
mainActionLabel: qsTr('confirmAction')
|
||||||
|
|
||||||
|
title: qsTr('useLinphoneSipAccountTitle')
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Login with phone number.
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: phoneNumberForm
|
||||||
|
|
||||||
|
Form {
|
||||||
|
property bool mainActionEnabled: country.currentIndex !== -1 && phoneNumber.text
|
||||||
|
|
||||||
|
orientation: Qt.Vertical
|
||||||
|
|
||||||
|
FormLine {
|
||||||
|
FormGroup {
|
||||||
|
label: qsTr('countryLabel')
|
||||||
|
|
||||||
|
ComboBox {
|
||||||
|
id: country
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FormLine {
|
||||||
|
FormGroup {
|
||||||
|
label: qsTr('phoneNumberLabel')
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: phoneNumber
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Login with email address.
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: emailAddressForm
|
||||||
|
|
||||||
|
Form {
|
||||||
|
property bool mainActionEnabled: username.length && password.text
|
||||||
|
|
||||||
|
orientation: Qt.Vertical
|
||||||
|
|
||||||
|
FormLine {
|
||||||
|
FormGroup {
|
||||||
|
label: qsTr('usernameLabel')
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: username
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FormLine {
|
||||||
|
FormGroup {
|
||||||
|
label: qsTr('passwordLabel')
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: AssistantUseLinphoneSipAccountStyle.spacing
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: loader
|
||||||
|
|
||||||
|
sourceComponent: checkBox.checked ? emailAddressForm : phoneNumberForm
|
||||||
|
width: parent.width
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBoxText {
|
||||||
|
id: checkBox
|
||||||
|
|
||||||
|
text: qsTr('useUsernameToLogin')
|
||||||
|
width: AssistantUseLinphoneSipAccountStyle.checkBox.width
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
pragma Singleton
|
||||||
|
import QtQuick 2.7
|
||||||
|
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
QtObject {
|
||||||
|
property int spacing: 20
|
||||||
|
|
||||||
|
property QtObject checkBox: QtObject {
|
||||||
|
property int width: 300
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -8,9 +8,10 @@ singleton AssistantWindowStyle 1.0 AssistantWindowStyle.qml
|
||||||
singleton InviteFriendsWindowStyle 1.0 InviteFriendsWindowStyle.qml
|
singleton InviteFriendsWindowStyle 1.0 InviteFriendsWindowStyle.qml
|
||||||
singleton ManageAccountsWindowStyle 1.0 ManageAccountsWindowStyle.qml
|
singleton ManageAccountsWindowStyle 1.0 ManageAccountsWindowStyle.qml
|
||||||
|
|
||||||
singleton AssistantHomeStyle 1.0 Assistant/AssistantHomeStyle.qml
|
|
||||||
singleton AssistantAbstractViewStyle 1.0 Assistant/AssistantAbstractViewStyle.qml
|
singleton AssistantAbstractViewStyle 1.0 Assistant/AssistantAbstractViewStyle.qml
|
||||||
singleton AssistantCreateLinphoneSipAccountStyle 1.0 Assistant/AssistantCreateLinphoneSipAccountStyle.qml
|
singleton AssistantCreateLinphoneSipAccountStyle 1.0 Assistant/AssistantCreateLinphoneSipAccountStyle.qml
|
||||||
|
singleton AssistantHomeStyle 1.0 Assistant/AssistantHomeStyle.qml
|
||||||
|
singleton AssistantUseLinphoneSipAccountStyle 1.0 Assistant/AssistantUseLinphoneSipAccountStyle.qml
|
||||||
|
|
||||||
singleton CallStyle 1.0 Calls/CallStyle.qml
|
singleton CallStyle 1.0 Calls/CallStyle.qml
|
||||||
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
|
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue