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> ...@@ -411,6 +411,25 @@ Server url not configured.</translation>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </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> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
......
...@@ -410,6 +410,25 @@ Url du serveur non configurée.</translation> ...@@ -410,6 +410,25 @@ Url du serveur non configurée.</translation>
<translation type="vanished">APPEL AUDIO ENTRANT</translation> <translation type="vanished">APPEL AUDIO ENTRANT</translation>
</message> </message>
</context> </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> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
......
...@@ -183,6 +183,7 @@ ...@@ -183,6 +183,7 @@
<file>ui/modules/Common/Form/CheckBoxText.qml</file> <file>ui/modules/Common/Form/CheckBoxText.qml</file>
<file>ui/modules/Common/Form/ExclusiveButtons.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/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/Fields/TextField.qml</file>
<file>ui/modules/Common/Form/ListForm.qml</file> <file>ui/modules/Common/Form/ListForm.qml</file>
<file>ui/modules/Common/Form/Placements/FormEmptyLine.qml</file> <file>ui/modules/Common/Form/Placements/FormEmptyLine.qml</file>
...@@ -228,6 +229,7 @@ ...@@ -228,6 +229,7 @@
<file>ui/modules/Common/Styles/Form/CheckBoxTextStyle.qml</file> <file>ui/modules/Common/Styles/Form/CheckBoxTextStyle.qml</file>
<file>ui/modules/Common/Styles/Form/ExclusiveButtonsStyle.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/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/Fields/TextFieldStyle.qml</file>
<file>ui/modules/Common/Styles/Form/ListFormStyle.qml</file> <file>ui/modules/Common/Styles/Form/ListFormStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Placements/FormGroupStyle.qml</file> <file>ui/modules/Common/Styles/Form/Placements/FormGroupStyle.qml</file>
...@@ -304,6 +306,7 @@ ...@@ -304,6 +306,7 @@
<file>ui/views/App/Calls/IncomingCall.qml</file> <file>ui/views/App/Calls/IncomingCall.qml</file>
<file>ui/views/App/Calls/OutgoingCall.qml</file> <file>ui/views/App/Calls/OutgoingCall.qml</file>
<file>ui/views/App/IncallFullscreen.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/ContactEdit.qml</file>
<file>ui/views/App/Main/Contacts.qml</file> <file>ui/views/App/Main/Contacts.qml</file>
<file>ui/views/App/Main/Conversation.qml</file> <file>ui/views/App/Main/Conversation.qml</file>
...@@ -321,6 +324,7 @@ ...@@ -321,6 +324,7 @@
<file>ui/views/App/Settings/SettingsWindow.qml</file> <file>ui/views/App/Settings/SettingsWindow.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>
<file>ui/views/App/Styles/InviteFriendsStyle.qml</file>
<file>ui/views/App/Styles/Main/ContactEditStyle.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/ContactsStyle.qml</file>
<file>ui/views/App/Styles/Main/ConversationStyle.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 ...@@ -15,6 +15,7 @@ singleton DroppableTextAreaStyle 1.0 DroppableTextAreaStyle.qml
singleton ForceScrollBarStyle 1.0 ForceScrollBarStyle.qml singleton ForceScrollBarStyle 1.0 ForceScrollBarStyle.qml
singleton NumericFieldStyle 1.0 Form/Fields/NumericFieldStyle.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 TextFieldStyle 1.0 Form/Fields/TextFieldStyle.qml
singleton FormGroupStyle 1.0 Form/Placements/FormGroupStyle.qml singleton FormGroupStyle 1.0 Form/Placements/FormGroupStyle.qml
......
...@@ -22,8 +22,7 @@ ListView { ...@@ -22,8 +22,7 @@ ListView {
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
clip: true clip: true
contentWidth: vScrollBar.visible ? width - vScrollBar.width : width
contentHeight: hScrollBar.visible ? height - hScrollBar.height : height contentHeight: hScrollBar.visible ? height - hScrollBar.height : height
contentWidth: vScrollBar.visible ? width - vScrollBar.width : width
spacing: 0 spacing: 0
} }
...@@ -32,6 +32,7 @@ ForceScrollBar 1.0 ForceScrollBar.qml ...@@ -32,6 +32,7 @@ ForceScrollBar 1.0 ForceScrollBar.qml
# Form # Form
NumericField 1.0 Form/Fields/NumericField.qml NumericField 1.0 Form/Fields/NumericField.qml
TextAreaField 1.0 Form/Fields/TextAreaField.qml
TextField 1.0 Form/Fields/TextField.qml TextField 1.0 Form/Fields/TextField.qml
Form 1.0 Form/Placements/Form.qml Form 1.0 Form/Placements/Form.qml
......
...@@ -25,8 +25,8 @@ Column { ...@@ -25,8 +25,8 @@ Column {
} }
Column { Column {
width: parent.width
spacing: CardBlockStyle.title.bottomMargin spacing: CardBlockStyle.title.bottomMargin
width: parent.width
Text { Text {
id: title 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 ...@@ -3,6 +3,7 @@ import QtQuick 2.7
import Common 1.0 import Common 1.0
import Linphone 1.0 import Linphone 1.0
import Linphone.Styles 1.0 import Linphone.Styles 1.0
import Utils 1.0
import App.Styles 1.0 import App.Styles 1.0
...@@ -35,6 +36,7 @@ Rectangle { ...@@ -35,6 +36,7 @@ Rectangle {
$component: 'button' $component: 'button'
$componentText: qsTr('inviteButton') $componentText: qsTr('inviteButton')
$description: qsTr('inviteDescription') $description: qsTr('inviteDescription')
$window: 'InviteFriends'
$icon: 'home_invite_friends' $icon: 'home_invite_friends'
$title: qsTr('inviteTitle') $title: qsTr('inviteTitle')
} }
...@@ -45,6 +47,7 @@ Rectangle { ...@@ -45,6 +47,7 @@ Rectangle {
$description: qsTr('accountAssistantDescription') $description: qsTr('accountAssistantDescription')
$icon: 'home_account_assistant' $icon: 'home_account_assistant'
$title: qsTr('accountAssistantTitle') $title: qsTr('accountAssistantTitle')
$window: 'Assistant'
} }
} }
...@@ -61,6 +64,7 @@ Rectangle { ...@@ -61,6 +64,7 @@ Rectangle {
TextButtonB { TextButtonB {
text: $componentText 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 ...@@ -4,8 +4,10 @@ module App.Styles
# Views styles ----------------------------------------------------------------- # Views styles -----------------------------------------------------------------
singleton CallStyle 1.0 Calls/CallStyle.qml singleton InviteFriendsStyle 1.0 InviteFriendsStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton CallStyle 1.0 Calls/CallStyle.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
...@@ -14,4 +16,4 @@ singleton HomeStyle 1.0 Main/HomeStyle.qml ...@@ -14,4 +16,4 @@ 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
...@@ -7,4 +7,5 @@ module App ...@@ -7,4 +7,5 @@ module App
# Views ------------------------------------------------------------------------ # Views ------------------------------------------------------------------------
IncallFullscreen 1.0 IncallFullscreen.qml 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