Commit eafc4be0 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Assistant/AssistantCreateLinphoneSipAccount): view done

parent 9a3aa8e3
...@@ -35,6 +35,25 @@ ...@@ -35,6 +35,25 @@
<translation>BACK</translation> <translation>BACK</translation>
</message> </message>
</context> </context>
<context>
<name>AssistantCreateLinphoneSipAccount</name>
<message>
<source>createLinphoneSipAccountDescription</source>
<translation>How would you like to create your account?</translation>
</message>
<message>
<source>createLinphoneSipAccountTitle</source>
<translation>CREATE A LINPHONE ACCOUNT</translation>
</message>
<message>
<source>withPhoneNumber</source>
<translation>WITH A PHONE NUMBER</translation>
</message>
<message>
<source>withEmailAddress</source>
<translation>WITH AN EMAIL ADDRESS</translation>
</message>
</context>
<context> <context>
<name>AssistantFetchRemoteConfiguration</name> <name>AssistantFetchRemoteConfiguration</name>
<message> <message>
...@@ -52,10 +71,6 @@ ...@@ -52,10 +71,6 @@
</context> </context>
<context> <context>
<name>AssistantHome</name> <name>AssistantHome</name>
<message>
<source>createSipAccount</source>
<translation>CREATE A LINPHONE ACCOUNT</translation>
</message>
<message> <message>
<source>useLinphoneSipAccount</source> <source>useLinphoneSipAccount</source>
<translation>USE A LINPHONE ACCOUNT</translation> <translation>USE A LINPHONE ACCOUNT</translation>
...@@ -76,6 +91,10 @@ ...@@ -76,6 +91,10 @@
<source>homeDescription</source> <source>homeDescription</source>
<translation>This assistant will help you to configure and use your linphone account.</translation> <translation>This assistant will help you to configure and use your linphone account.</translation>
</message> </message>
<message>
<source>createLinphoneSipAccount</source>
<translation>CREATE A LINPHONE ACCOUNT</translation>
</message>
</context> </context>
<context> <context>
<name>AssistantUseOtherSipAccount</name> <name>AssistantUseOtherSipAccount</name>
......
...@@ -35,6 +35,25 @@ ...@@ -35,6 +35,25 @@
<translation>RETOUR</translation> <translation>RETOUR</translation>
</message> </message>
</context> </context>
<context>
<name>AssistantCreateLinphoneSipAccount</name>
<message>
<source>createLinphoneSipAccountDescription</source>
<translation>Comment souhaitez-vous créer votre compte ?</translation>
</message>
<message>
<source>createLinphoneSipAccountTitle</source>
<translation>CRÉER UN COMPTE LINPHONE</translation>
</message>
<message>
<source>withPhoneNumber</source>
<translation>AVEC UN NUMÉRO DE TÉLÉPHONE</translation>
</message>
<message>
<source>withEmailAddress</source>
<translation>AVER UNE ADRESSE E-MAIL</translation>
</message>
</context>
<context> <context>
<name>AssistantFetchRemoteConfiguration</name> <name>AssistantFetchRemoteConfiguration</name>
<message> <message>
...@@ -52,10 +71,6 @@ ...@@ -52,10 +71,6 @@
</context> </context>
<context> <context>
<name>AssistantHome</name> <name>AssistantHome</name>
<message>
<source>createSipAccount</source>
<translation>CRÉER UN COMPTE LINPHONE</translation>
</message>
<message> <message>
<source>useLinphoneSipAccount</source> <source>useLinphoneSipAccount</source>
<translation>UTILISER UN COMPTE LINPHONE</translation> <translation>UTILISER UN COMPTE LINPHONE</translation>
...@@ -76,6 +91,10 @@ ...@@ -76,6 +91,10 @@
<source>homeDescription</source> <source>homeDescription</source>
<translation>Cet assistant va vous aider à configurer et utiliser votre compte SIP.</translation> <translation>Cet assistant va vous aider à configurer et utiliser votre compte SIP.</translation>
</message> </message>
<message>
<source>createLinphoneSipAccount</source>
<translation>CRÉER UN COMPTE LINPHONE</translation>
</message>
</context> </context>
<context> <context>
<name>AssistantUseOtherSipAccount</name> <name>AssistantUseOtherSipAccount</name>
......
...@@ -310,6 +310,7 @@ ...@@ -310,6 +310,7 @@
<file>ui/scripts/Utils/uri-tools.js</file> <file>ui/scripts/Utils/uri-tools.js</file>
<file>ui/scripts/Utils/utils.js</file> <file>ui/scripts/Utils/utils.js</file>
<file>ui/views/App/Assistant/AssistantAbstractView.qml</file> <file>ui/views/App/Assistant/AssistantAbstractView.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/AssistantUseOtherSipAccount.qml</file> <file>ui/views/App/Assistant/AssistantUseOtherSipAccount.qml</file>
...@@ -337,6 +338,7 @@ ...@@ -337,6 +338,7 @@
<file>ui/views/App/Settings/SettingsVideo.qml</file> <file>ui/views/App/Settings/SettingsVideo.qml</file>
<file>ui/views/App/Settings/SettingsWindow.qml</file> <file>ui/views/App/Settings/SettingsWindow.qml</file>
<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/AssistantHomeStyle.qml</file> <file>ui/views/App/Styles/Assistant/AssistantHomeStyle.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>
......
...@@ -16,17 +16,71 @@ ColumnLayout { ...@@ -16,17 +16,71 @@ ColumnLayout {
property alias mainActionLabel: mainActionButton.text property alias mainActionLabel: mainActionButton.text
property var mainAction property var mainAction
property alias description: description.text
property alias title: title.text
default property alias _content: content.data default property alias _content: content.data
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
height: stack.height
width: stack.width
spacing: AssistantAbstractViewStyle.spacing
// --------------------------------------------------------------------------
// Info.
// --------------------------------------------------------------------------
Column {
Layout.fillWidth: true
spacing: AssistantAbstractViewStyle.info.spacing
Text {
id: title
color: AssistantAbstractViewStyle.info.title.color
elide: Text.ElideRight
font {
pointSize: AssistantAbstractViewStyle.info.title.fontSize
bold: true
}
horizontalAlignment: Text.AlignHCenter
width: parent.width
}
Text {
id: description
color: AssistantAbstractViewStyle.info.description.color
elide: Text.ElideRight
font.pointSize: AssistantAbstractViewStyle.info.description.fontSize
horizontalAlignment: Text.AlignHCenter
visible: text.length > 0
width: parent.width
}
}
// --------------------------------------------------------------------------
// Content.
// --------------------------------------------------------------------------
Item { Item {
id: content id: content
Layout.alignment: Qt.AlignHCenter
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.preferredWidth: AssistantAbstractViewStyle.content.width
} }
// --------------------------------------------------------------------------
// Nav buttons.
// --------------------------------------------------------------------------
Row { Row {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
spacing: AssistantAbstractViewStyle.buttons.spacing spacing: AssistantAbstractViewStyle.buttons.spacing
...@@ -39,6 +93,8 @@ ColumnLayout { ...@@ -39,6 +93,8 @@ ColumnLayout {
TextButtonB { TextButtonB {
id: mainActionButton id: mainActionButton
visible: !!view.mainAction
onClicked: view.mainAction() onClicked: view.mainAction()
} }
} }
......
import QtQuick 2.7
import Common 1.0
import App.Styles 1.0
// =============================================================================
AssistantAbstractView {
description: qsTr('createLinphoneSipAccountDescription')
title: qsTr('createLinphoneSipAccountTitle')
Column {
anchors.centerIn: parent
spacing: AssistantCreateLinphoneSipAccountStyle.buttons.spacing
width: AssistantCreateLinphoneSipAccountStyle.buttons.button.width
TextButtonA {
height: AssistantCreateLinphoneSipAccountStyle.buttons.button.height
width: parent.width
text: qsTr('withPhoneNumber')
}
TextButtonA {
height: AssistantCreateLinphoneSipAccountStyle.buttons.button.height
width: parent.width
text: qsTr('withEmailAddress')
}
}
}
...@@ -10,10 +10,13 @@ AssistantAbstractView { ...@@ -10,10 +10,13 @@ AssistantAbstractView {
mainActionEnabled: url.text.length > 0 mainActionEnabled: url.text.length > 0
mainActionLabel: qsTr('confirmAction') mainActionLabel: qsTr('confirmAction')
title: qsTr('fetchRemoteConfigurationTitle')
// ---------------------------------------------------------------------------
Form { Form {
anchors.fill: parent anchors.fill: parent
orientation: Qt.Vertical orientation: Qt.Vertical
title: qsTr('fetchRemoteConfigurationTitle')
FormLine { FormLine {
FormGroup { FormGroup {
......
...@@ -82,8 +82,8 @@ ColumnLayout { ...@@ -82,8 +82,8 @@ ColumnLayout {
model: ListModel { model: ListModel {
ListElement { ListElement {
$text: qsTr('createSipAccount') $text: qsTr('createLinphoneSipAccount')
$view: 'AssistantCreateSipAccount' $view: 'AssistantCreateLinphoneSipAccount'
} }
ListElement { ListElement {
......
...@@ -8,62 +8,65 @@ AssistantAbstractView { ...@@ -8,62 +8,65 @@ AssistantAbstractView {
}) })
mainActionEnabled: username.text.length && mainActionEnabled: username.text.length &&
sipDomain.text.length && sipDomain.text.length &&
password.text.length password.text.length
mainActionLabel: qsTr('confirmAction') mainActionLabel: qsTr('confirmAction')
title: qsTr('useOtherSipAccountTitle')
// ---------------------------------------------------------------------------
Form { Form {
anchors.fill: parent anchors.fill: parent
orientation: Qt.Vertical orientation: Qt.Vertical
title: qsTr('useOtherSipAccountTitle')
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('usernameLabel') label: qsTr('usernameLabel')
TextField { TextField {
id: username id: username
} }
} }
} }
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('displayNameLabel') label: qsTr('displayNameLabel')
TextField {} TextField {}
} }
} }
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('sipDomainLabel') label: qsTr('sipDomainLabel')
TextField { TextField {
id: sipDomain id: sipDomain
} }
} }
} }
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('passwordLabel') label: qsTr('passwordLabel')
TextField { TextField {
id: password id: password
} }
} }
} }
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('transportLabel') label: qsTr('transportLabel')
ExclusiveButtons { ExclusiveButtons {
texts: [ 'UDP', 'TCP', 'TLS' ] texts: [ 'UDP', 'TCP', 'TLS' ]
} }
} }
} }
} }
} }
pragma Singleton pragma Singleton
import QtQuick 2.7 import QtQuick 2.7
import Common 1.0
// ============================================================================= // =============================================================================
QtObject { QtObject {
property int spacing: 20
property QtObject buttons: QtObject { property QtObject buttons: QtObject {
property int spacing: 10 property int spacing: 10
} }
property QtObject content: QtObject {
property int width: 340
}
property QtObject info: QtObject {
property int spacing: 20
property QtObject description: QtObject {
property color color: Colors.g
property int fontSize: 10
}
property QtObject title: QtObject {
property color color: Colors.g
property int fontSize: 11
}
}
} }
pragma Singleton
import QtQuick 2.7
// =============================================================================
QtObject {
property QtObject buttons: QtObject {
property int spacing: 10
property QtObject button: QtObject {
property int height: 40
property int width: 258
}
}
}
...@@ -4,21 +4,22 @@ module App.Styles ...@@ -4,21 +4,22 @@ module App.Styles
# Views styles ----------------------------------------------------------------- # Views styles -----------------------------------------------------------------
singleton AssistantWindowStyle 1.0 AssistantWindowStyle.qml 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 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 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
singleton ContactEditStyle 1.0 Main/ContactEditStyle.qml singleton ContactEditStyle 1.0 Main/ContactEditStyle.qml
singleton ContactsStyle 1.0 Main/ContactsStyle.qml singleton ContactsStyle 1.0 Main/ContactsStyle.qml
singleton ConversationStyle 1.0 Main/ConversationStyle.qml singleton ConversationStyle 1.0 Main/ConversationStyle.qml
singleton HomeStyle 1.0 Main/HomeStyle.qml singleton HomeStyle 1.0 Main/HomeStyle.qml
singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
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