Commit 854bddd8 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Main/Home): handle invite (open window)

parent d241d73c
......@@ -411,6 +411,25 @@ Server url not configured.</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>InviteFriends</name>
<message>
<source>enterEmailLabel</source>
<translation>Enter your friend&apos;s email address</translation>
</message>
<message>
<source>messageLabel</source>
<translation>You can modify the invitation that will be sent</translation>
</message>
<message>
<source>cancel</source>
<translation>CANCEL</translation>
</message>
<message>
<source>confirm</source>
<translation>CONFIRM</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
......
......@@ -410,6 +410,25 @@ Url du serveur non configurée.</translation>
<translation type="vanished">APPEL AUDIO ENTRANT</translation>
</message>
</context>
<context>
<name>InviteFriends</name>
<message>
<source>enterEmailLabel</source>
<translation>Entrer l&apos;adresse email de votre ami</translation>
</message>
<message>
<source>messageLabel</source>
<translation>Modifier l&apos;invitation qui sera envoyée</translation>
</message>
<message>
<source>cancel</source>
<translation>ANNULER</translation>
</message>
<message>
<source>confirm</source>
<translation>CONFIRMER</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
......
......@@ -183,6 +183,7 @@
<file>ui/modules/Common/Form/CheckBoxText.qml</file>
<file>ui/modules/Common/Form/ExclusiveButtons.qml</file>
<file>ui/modules/Common/Form/Fields/NumericField.qml</file>
<file>ui/modules/Common/Form/Fields/TextAreaField.qml</file>
<file>ui/modules/Common/Form/Fields/TextField.qml</file>
<file>ui/modules/Common/Form/ListForm.qml</file>
<file>ui/modules/Common/Form/Placements/FormEmptyLine.qml</file>
......@@ -228,6 +229,7 @@
<file>ui/modules/Common/Styles/Form/CheckBoxTextStyle.qml</file>
<file>ui/modules/Common/Styles/Form/ExclusiveButtonsStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Fields/NumericFieldStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Fields/TextAreaFieldStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml</file>
<file>ui/modules/Common/Styles/Form/ListFormStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Placements/FormGroupStyle.qml</file>
......@@ -304,6 +306,7 @@
<file>ui/views/App/Calls/IncomingCall.qml</file>
<file>ui/views/App/Calls/OutgoingCall.qml</file>
<file>ui/views/App/IncallFullscreen.qml</file>
<file>ui/views/App/InviteFriends.qml</file>
<file>ui/views/App/Main/ContactEdit.qml</file>
<file>ui/views/App/Main/Contacts.qml</file>
<file>ui/views/App/Main/Conversation.qml</file>
......@@ -321,6 +324,7 @@
<file>ui/views/App/Settings/SettingsWindow.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/InviteFriendsStyle.qml</file>
<file>ui/views/App/Styles/Main/ContactEditStyle.qml</file>
<file>ui/views/App/Styles/Main/ContactsStyle.qml</file>
<file>ui/views/App/Styles/Main/ConversationStyle.qml</file>
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Common 1.0
import Common.Styles 1.0
// =============================================================================
Flickable {
property alias text: textArea.text
readonly property alias length: textArea.length
height: TextAreaFieldStyle.background.height
width: TextAreaFieldStyle.background.width
TextArea.flickable: TextArea {
id: textArea
background: Rectangle {
border {
color: TextAreaFieldStyle.background.border.color
width: TextAreaFieldStyle.background.border.width
}
color: textArea.readOnly
? TextAreaFieldStyle.background.color.readOnly
: TextAreaFieldStyle.background.color.normal
radius: TextAreaFieldStyle.background.radius
}
color: TextAreaFieldStyle.text.color
font.pointSize: TextAreaFieldStyle.text.fontSize
selectByMouse: true
wrapMode: TextArea.Wrap
bottomPadding: TextAreaFieldStyle.text.padding
leftPadding: TextAreaFieldStyle.text.padding
rightPadding: TextAreaFieldStyle.text.padding + Number(scrollBar.visible) * scrollBar.width
topPadding: TextAreaFieldStyle.text.padding
}
ScrollBar.vertical: ForceScrollBar {
id: scrollBar
}
}
pragma Singleton
import QtQuick 2.7
import Common 1.0
// =============================================================================
QtObject {
property QtObject background: QtObject {
property int height: 36
property int width: 200
property int radius: 4
property QtObject border: QtObject {
property color color: Colors.c
property int width: 1
}
property QtObject color: QtObject {
property color normal: Colors.k
property color readOnly: Colors.e
}
}
property QtObject text: QtObject {
property color color: Colors.d
property int fontSize: 10
property int padding: 8
}
}
......@@ -15,6 +15,7 @@ singleton DroppableTextAreaStyle 1.0 DroppableTextAreaStyle.qml
singleton ForceScrollBarStyle 1.0 ForceScrollBarStyle.qml
singleton NumericFieldStyle 1.0 Form/Fields/NumericFieldStyle.qml
singleton TextAreaFieldStyle 1.0 Form/Fields/TextAreaFieldStyle.qml
singleton TextFieldStyle 1.0 Form/Fields/TextFieldStyle.qml
singleton FormGroupStyle 1.0 Form/Placements/FormGroupStyle.qml
......
......@@ -22,8 +22,7 @@ ListView {
boundsBehavior: Flickable.StopAtBounds
clip: true
contentWidth: vScrollBar.visible ? width - vScrollBar.width : width
contentHeight: hScrollBar.visible ? height - hScrollBar.height : height
contentWidth: vScrollBar.visible ? width - vScrollBar.width : width
spacing: 0
}
......@@ -32,6 +32,7 @@ ForceScrollBar 1.0 ForceScrollBar.qml
# Form
NumericField 1.0 Form/Fields/NumericField.qml
TextAreaField 1.0 Form/Fields/TextAreaField.qml
TextField 1.0 Form/Fields/TextField.qml
Form 1.0 Form/Placements/Form.qml
......
......@@ -25,8 +25,8 @@ Column {
}
Column {
width: parent.width
spacing: CardBlockStyle.title.bottomMargin
width: parent.width
Text {
id: title
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
import App.Styles 1.0
// =============================================================================
DialogPlus {
buttons: [
TextButtonA {
text: qsTr('cancel')
onClicked: exit(0)
},
TextButtonB {
enabled: email.length && message.length
text: qsTr('confirm')
onClicked: exit(-1)
}
]
centeredButtons: true
height: InviteFriendsStyle.height
width: InviteFriendsStyle.width
minimumHeight: InviteFriendsStyle.height
minimumWidth: InviteFriendsStyle.width
// ---------------------------------------------------------------------------
ColumnLayout {
anchors {
fill: parent
leftMargin: InviteFriendsStyle.leftMargin
rightMargin: InviteFriendsStyle.rightMargin
}
spacing: InviteFriendsStyle.spacing
Column {
Layout.fillWidth: true
spacing: InviteFriendsStyle.input.spacing
Text {
color: InviteFriendsStyle.input.legend.color
elide: Text.ElideRight
font {
bold: true
pointSize: InviteFriendsStyle.input.legend.fontSize
}
text: qsTr('enterEmailLabel')
}
TextField {
id: email
width: parent.width
}
}
ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
spacing: InviteFriendsStyle.input.spacing
Text {
color: InviteFriendsStyle.input.legend.color
elide: Text.ElideRight
font {
bold: true
pointSize: InviteFriendsStyle.input.legend.fontSize
}
text: qsTr('messageLabel')
}
TextAreaField {
id: message
Layout.fillHeight: true
Layout.fillWidth: true
}
}
}
}
......@@ -3,6 +3,7 @@ import QtQuick 2.7
import Common 1.0
import Linphone 1.0
import Linphone.Styles 1.0
import Utils 1.0
import App.Styles 1.0
......@@ -35,6 +36,7 @@ Rectangle {
$component: 'button'
$componentText: qsTr('inviteButton')
$description: qsTr('inviteDescription')
$window: 'InviteFriends'
$icon: 'home_invite_friends'
$title: qsTr('inviteTitle')
}
......@@ -45,6 +47,7 @@ Rectangle {
$description: qsTr('accountAssistantDescription')
$icon: 'home_account_assistant'
$title: qsTr('accountAssistantTitle')
$window: 'Assistant'
}
}
......@@ -61,6 +64,7 @@ Rectangle {
TextButtonB {
text: $componentText
onClicked: Utils.openWindow($window, window)
}
}
......
pragma Singleton
import QtQuick 2.7
import Common 1.0
// =============================================================================
QtObject {
property int height: 316
property int leftMargin: 35
property int rightMargin: 35
property int spacing: 15
property int width: 480
property QtObject input: QtObject {
property int spacing: 6
property QtObject legend: QtObject {
property color color: Colors.j
property int fontSize: 10
}
}
}
......@@ -4,8 +4,10 @@ module App.Styles
# Views styles -----------------------------------------------------------------
singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton InviteFriendsStyle 1.0 InviteFriendsStyle.qml
singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton ContactEditStyle 1.0 Main/ContactEditStyle.qml
singleton ContactsStyle 1.0 Main/ContactsStyle.qml
......@@ -14,4 +16,4 @@ singleton HomeStyle 1.0 Main/HomeStyle.qml
singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
......@@ -7,4 +7,5 @@ module App
# Views ------------------------------------------------------------------------
IncallFullscreen 1.0 IncallFullscreen.qml
ManageAccounts 1.0 ManageAccounts.qml
InviteFriends 1.0 InviteFriends.qml
ManageAccounts 1.0 ManageAccounts.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