Commit b23b651f authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Main/Home): `Invite friends` and `Assistant` windows are now...

feat(ui/views/App/Main/Home): `Invite friends` and `Assistant` windows are now directly in this view
parent f0654e12
...@@ -28,6 +28,13 @@ ...@@ -28,6 +28,13 @@
<translation>Start in the system tray, do not show the main interface.</translation> <translation>Start in the system tray, do not show the main interface.</translation>
</message> </message>
</context> </context>
<context>
<name>Assistant</name>
<message>
<source>assistantTitle</source>
<translation type="obsolete">Linphone - Assistant</translation>
</message>
</context>
<context> <context>
<name>AssistantAbstractView</name> <name>AssistantAbstractView</name>
<message> <message>
...@@ -86,7 +93,7 @@ ...@@ -86,7 +93,7 @@
<name>AssistantFetchRemoteConfiguration</name> <name>AssistantFetchRemoteConfiguration</name>
<message> <message>
<source>fetchRemoteConfigurationTitle</source> <source>fetchRemoteConfigurationTitle</source>
<translation>Fetch remote configuration</translation> <translation>FETCH REMOTE CONFIGURATION</translation>
</message> </message>
<message> <message>
<source>urlLabel</source> <source>urlLabel</source>
...@@ -190,7 +197,7 @@ ...@@ -190,7 +197,7 @@
<name>AssistantWindow</name> <name>AssistantWindow</name>
<message> <message>
<source>assistantTitle</source> <source>assistantTitle</source>
<translation>Linphone - Assistant</translation> <translation type="vanished">Linphone - Assistant</translation>
</message> </message>
</context> </context>
<context> <context>
...@@ -607,54 +614,54 @@ Server url not configured.</translation> ...@@ -607,54 +614,54 @@ Server url not configured.</translation>
<name>InviteFriends</name> <name>InviteFriends</name>
<message> <message>
<source>enterEmailLabel</source> <source>enterEmailLabel</source>
<translation type="vanished">Enter your friend&apos;s email address</translation> <translation>Enter your friend&apos;s email address</translation>
</message> </message>
<message> <message>
<source>messageLabel</source> <source>messageLabel</source>
<translation type="vanished">You can modify the invitation that will be sent</translation> <translation>You can modify the invitation that will be sent</translation>
</message> </message>
<message> <message>
<source>cancel</source> <source>cancel</source>
<translation type="vanished">CANCEL</translation> <translation>CANCEL</translation>
</message> </message>
<message> <message>
<source>confirm</source> <source>confirm</source>
<translation type="vanished">CONFIRM</translation> <translation>CONFIRM</translation>
</message> </message>
<message> <message>
<source>inviteFriendsTitle</source> <source>inviteFriendsTitle</source>
<translation type="vanished">Linphone - Invite Friends</translation> <translation>Invite Friends</translation>
</message>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>defaultSubject</source>
<translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context> <context>
<name>InviteFriendsWindow</name> <name>InviteFriendsWindow</name>
<message> <message>
<source>cancel</source> <source>cancel</source>
<translation type="unfinished">CANCEL</translation> <translation type="obsolete">CANCEL</translation>
</message> </message>
<message> <message>
<source>confirm</source> <source>confirm</source>
<translation type="unfinished">CONFIRM</translation> <translation type="obsolete">CONFIRM</translation>
</message>
<message>
<source>defaultSubject</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>inviteFriendsTitle</source> <source>inviteFriendsTitle</source>
<translation type="unfinished">Linphone - Invite Friends</translation> <translation type="obsolete">Linphone - Invite Friends</translation>
</message> </message>
<message> <message>
<source>enterEmailLabel</source> <source>enterEmailLabel</source>
<translation type="unfinished">Enter your friend&apos;s email address</translation> <translation type="obsolete">Enter your friend&apos;s email address</translation>
</message> </message>
<message> <message>
<source>messageLabel</source> <source>messageLabel</source>
<translation type="unfinished">You can modify the invitation that will be sent</translation> <translation type="obsolete">You can modify the invitation that will be sent</translation>
</message>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context> <context>
......
...@@ -28,6 +28,13 @@ ...@@ -28,6 +28,13 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>Assistant</name>
<message>
<source>assistantTitle</source>
<translation type="obsolete">Linphone - Assistant</translation>
</message>
</context>
<context> <context>
<name>AssistantAbstractView</name> <name>AssistantAbstractView</name>
<message> <message>
...@@ -86,7 +93,7 @@ ...@@ -86,7 +93,7 @@
<name>AssistantFetchRemoteConfiguration</name> <name>AssistantFetchRemoteConfiguration</name>
<message> <message>
<source>fetchRemoteConfigurationTitle</source> <source>fetchRemoteConfigurationTitle</source>
<translation>Télécharger une configuration</translation> <translation>TÉLÉCHARGER UNE CONFIGURATION</translation>
</message> </message>
<message> <message>
<source>urlLabel</source> <source>urlLabel</source>
...@@ -190,7 +197,7 @@ ...@@ -190,7 +197,7 @@
<name>AssistantWindow</name> <name>AssistantWindow</name>
<message> <message>
<source>assistantTitle</source> <source>assistantTitle</source>
<translation>Linphone - Assistant</translation> <translation type="vanished">Linphone - Assistant</translation>
</message> </message>
</context> </context>
<context> <context>
...@@ -606,54 +613,54 @@ Url du serveur non configurée.</translation> ...@@ -606,54 +613,54 @@ Url du serveur non configurée.</translation>
<name>InviteFriends</name> <name>InviteFriends</name>
<message> <message>
<source>enterEmailLabel</source> <source>enterEmailLabel</source>
<translation type="vanished">Entrer l&apos;adresse email de votre ami</translation> <translation>Entrer l&apos;adresse email de votre ami</translation>
</message> </message>
<message> <message>
<source>messageLabel</source> <source>messageLabel</source>
<translation type="vanished">Modifier l&apos;invitation qui sera envoyée</translation> <translation>Modifier l&apos;invitation qui sera envoyée</translation>
</message> </message>
<message> <message>
<source>cancel</source> <source>cancel</source>
<translation type="vanished">ANNULER</translation> <translation>ANNULER</translation>
</message> </message>
<message> <message>
<source>confirm</source> <source>confirm</source>
<translation type="vanished">CONFIRMER</translation> <translation>CONFIRMER</translation>
</message> </message>
<message> <message>
<source>inviteFriendsTitle</source> <source>inviteFriendsTitle</source>
<translation type="vanished">Linphone - Inviter des amis</translation> <translation>Inviter des amis</translation>
</message>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>defaultSubject</source>
<translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context> <context>
<name>InviteFriendsWindow</name> <name>InviteFriendsWindow</name>
<message> <message>
<source>cancel</source> <source>cancel</source>
<translation type="unfinished">ANNULER</translation> <translation type="obsolete">ANNULER</translation>
</message> </message>
<message> <message>
<source>confirm</source> <source>confirm</source>
<translation type="unfinished">CONFIRMER</translation> <translation type="obsolete">CONFIRMER</translation>
</message>
<message>
<source>defaultSubject</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>inviteFriendsTitle</source> <source>inviteFriendsTitle</source>
<translation type="unfinished">Linphone - Inviter des amis</translation> <translation type="obsolete">Linphone - Inviter des amis</translation>
</message> </message>
<message> <message>
<source>enterEmailLabel</source> <source>enterEmailLabel</source>
<translation type="unfinished">Entrer l&apos;adresse email de votre ami</translation> <translation type="obsolete">Entrer l&apos;adresse email de votre ami</translation>
</message> </message>
<message> <message>
<source>messageLabel</source> <source>messageLabel</source>
<translation type="unfinished">Modifier l&apos;invitation qui sera envoyée</translation> <translation type="obsolete">Modifier l&apos;invitation qui sera envoyée</translation>
</message>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context> <context>
......
...@@ -311,24 +311,24 @@ ...@@ -311,24 +311,24 @@
<file>ui/scripts/Utils/qmldir</file> <file>ui/scripts/Utils/qmldir</file>
<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/AssistantCreateLinphoneSipAccount.qml</file>
<file>ui/views/App/Assistant/AssistantFetchRemoteConfiguration.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/AssistantWindow.qml</file>
<file>ui/views/App/Calls/AbstractStartingCall.qml</file> <file>ui/views/App/Calls/AbstractStartingCall.qml</file>
<file>ui/views/App/Calls/CallsWindow.qml</file> <file>ui/views/App/Calls/CallsWindow.qml</file>
<file>ui/views/App/Calls/Incall.qml</file> <file>ui/views/App/Calls/Incall.qml</file>
<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/IncallFullscreenWindow.qml</file> <file>ui/views/App/IncallFullscreenWindow.qml</file>
<file>ui/views/App/InviteFriendsWindow.qml</file> <file>ui/views/App/Main/Assistant/AssistantAbstractView.qml</file>
<file>ui/views/App/Main/Assistant/AssistantCreateLinphoneSipAccount.qml</file>
<file>ui/views/App/Main/Assistant/AssistantFetchRemoteConfiguration.qml</file>
<file>ui/views/App/Main/Assistant/AssistantHome.qml</file>
<file>ui/views/App/Main/Assistant/AssistantUseLinphoneSipAccount.qml</file>
<file>ui/views/App/Main/Assistant/AssistantUseOtherSipAccount.qml</file>
<file>ui/views/App/Main/Assistant.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>
<file>ui/views/App/Main/Home.qml</file> <file>ui/views/App/Main/Home.qml</file>
<file>ui/views/App/Main/InviteFriends.qml</file>
<file>ui/views/App/Main/MainWindowMenuBar.qml</file> <file>ui/views/App/Main/MainWindowMenuBar.qml</file>
<file>ui/views/App/Main/MainWindow.qml</file> <file>ui/views/App/Main/MainWindow.qml</file>
<file>ui/views/App/ManageAccountsWindow.qml</file> <file>ui/views/App/ManageAccountsWindow.qml</file>
...@@ -340,18 +340,18 @@ ...@@ -340,18 +340,18 @@
<file>ui/views/App/Settings/SettingsUi.qml</file> <file>ui/views/App/Settings/SettingsUi.qml</file>
<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/AssistantCreateLinphoneSipAccountStyle.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/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/InviteFriendsWindowStyle.qml</file> <file>ui/views/App/Styles/Main/Assistant/AssistantAbstractViewStyle.qml</file>
<file>ui/views/App/Styles/Main/Assistant/AssistantCreateLinphoneSipAccountStyle.qml</file>
<file>ui/views/App/Styles/Main/Assistant/AssistantHomeStyle.qml</file>
<file>ui/views/App/Styles/Main/Assistant/AssistantUseLinphoneSipAccountStyle.qml</file>
<file>ui/views/App/Styles/Main/AssistantStyle.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>
<file>ui/views/App/Styles/Main/HomeStyle.qml</file> <file>ui/views/App/Styles/Main/HomeStyle.qml</file>
<file>ui/views/App/Styles/Main/InviteFriendsStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowMenuBarStyle.qml</file> <file>ui/views/App/Styles/Main/MainWindowMenuBarStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowStyle.qml</file> <file>ui/views/App/Styles/Main/MainWindowStyle.qml</file>
<file>ui/views/App/Styles/ManageAccountsWindowStyle.qml</file> <file>ui/views/App/Styles/ManageAccountsWindowStyle.qml</file>
......
import QtQuick 2.7
import Common 1.0
import App.Styles 1.0
// =============================================================================
DialogPlus {
buttons: [
TextButtonA {
text: qsTr('cancel')
onClicked: exit(-1)
},
TextButtonB {
enabled: email.length && message.length
text: qsTr('confirm')
onClicked: {
Qt.openUrlExternally(
'mailto:' + encodeURIComponent(email.text) +
'?subject=' + encodeURIComponent(qsTr('defaultSubject')) +
'&body=' + encodeURIComponent(message.text)
)
exit(0)
}
}
]
centeredButtons: true
title: qsTr('inviteFriendsTitle')
height: InviteFriendsWindowStyle.height
width: InviteFriendsWindowStyle.width
maximumHeight: InviteFriendsWindowStyle.height
maximumWidth: InviteFriendsWindowStyle.width
minimumHeight: InviteFriendsWindowStyle.height
minimumWidth: InviteFriendsWindowStyle.width
// ---------------------------------------------------------------------------
Form {
anchors {
fill: parent
leftMargin: InviteFriendsWindowStyle.leftMargin
rightMargin: InviteFriendsWindowStyle.rightMargin
}
orientation: Qt.Vertical
FormLine {
FormGroup {
label: qsTr('enterEmailLabel')
TextField {
id: email
inputMethodHints: Qt.ImhEmailCharactersOnly
width: parent.width
}
}
}
FormLine {
FormGroup {
label: qsTr('messageLabel')
TextAreaField {
id: message
height: InviteFriendsWindowStyle.message.height
text: qsTr('defaultMessage')
}
}
}
}
}
...@@ -8,20 +8,16 @@ import App.Styles 1.0 ...@@ -8,20 +8,16 @@ import App.Styles 1.0
// ============================================================================= // =============================================================================
Window { Item {
id: window id: assistant
// --------------------------------------------------------------------------- readonly property string viewsPath: 'qrc:/ui/views/App/Main/Assistant/'
readonly property string viewsPath: 'qrc:/ui/views/App/Assistant/'
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
function pushView (view) { function pushView (view) {
stack.push( stack.push(
Utils.isString(view) Utils.isString(view) ? viewsPath + view + '.qml' : view
? viewsPath + view + '.qml'
: view
) )
} }
...@@ -31,31 +27,9 @@ Window { ...@@ -31,31 +27,9 @@ Window {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
modality: Qt.WindowModal
title: qsTr('assistantTitle')
visible: true
height: AssistantWindowStyle.height
width: AssistantWindowStyle.width
maximumHeight: AssistantWindowStyle.height
maximumWidth: AssistantWindowStyle.width
minimumHeight: AssistantWindowStyle.height
minimumWidth: AssistantWindowStyle.width
// ---------------------------------------------------------------------------
Shortcut {
sequence: StandardKey.Close
onActivated: close()
}
// ---------------------------------------------------------------------------
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: AssistantWindowStyle.color color: AssistantStyle.color
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -66,50 +40,50 @@ Window { ...@@ -66,50 +40,50 @@ Window {
anchors { anchors {
fill: parent fill: parent
bottomMargin: AssistantWindowStyle.bottomMargin bottomMargin: AssistantStyle.bottomMargin
leftMargin: AssistantWindowStyle.leftMargin leftMargin: AssistantStyle.leftMargin
rightMargin: AssistantWindowStyle.rightMargin rightMargin: AssistantStyle.rightMargin
topMargin: AssistantWindowStyle.topMargin topMargin: AssistantStyle.topMargin
} }
initialItem: window.viewsPath + 'AssistantHome.qml' initialItem: assistant.viewsPath + 'AssistantHome.qml'
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
popEnter: Transition { popEnter: Transition {
XAnimator { YAnimator {
duration: AssistantWindowStyle.stackAnimation.duration duration: AssistantStyle.stackAnimation.duration
easing.type: Easing.OutBack easing.type: Easing.OutBack
from: -stack.width - AssistantWindowStyle.leftMargin from: stack.height + AssistantStyle.bottomMargin
to: 0 to: 0
} }
} }
popExit: Transition { popExit: Transition {
XAnimator { XAnimator {
duration: AssistantWindowStyle.stackAnimation.duration duration: AssistantStyle.stackAnimation.duration
easing.type: Easing.OutBack easing.type: Easing.OutBack
from: 0 from: 0
to: stack.width + AssistantWindowStyle.rightMargin to: stack.width + AssistantStyle.rightMargin
} }
} }
pushEnter: Transition { pushEnter: Transition {
XAnimator { XAnimator {
duration: AssistantWindowStyle.stackAnimation.duration duration: AssistantStyle.stackAnimation.duration
easing.type: Easing.OutBack easing.type: Easing.OutBack
from: stack.width + AssistantWindowStyle.rightMargin from: stack.width + AssistantStyle.rightMargin
to: 0 to: 0
} }
} }
pushExit: Transition { pushExit: Transition {
XAnimator { YAnimator {
duration: AssistantWindowStyle.stackAnimation.duration duration: AssistantStyle.stackAnimation.duration
easing.type: Easing.OutBack easing.type: Easing.OutBack
from: 0 from: 0
to: -stack.width - AssistantWindowStyle.leftMargin to: stack.height + AssistantStyle.bottomMargin
} }
} }
} }
} }
...@@ -7,7 +7,7 @@ import App.Styles 1.0 ...@@ -7,7 +7,7 @@ import App.Styles 1.0
// ============================================================================= // =============================================================================
ColumnLayout { Item {
id: view id: view
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -26,15 +26,15 @@ ColumnLayout { ...@@ -26,15 +26,15 @@ ColumnLayout {
height: stack.height height: stack.height
width: stack.width width: stack.width
spacing: AssistantAbstractViewStyle.spacing // ---------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Info. // Info.
// -------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Column { Column {
Layout.fillWidth: true anchors.centerIn: parent
spacing: AssistantAbstractViewStyle.info.spacing spacing: AssistantAbstractViewStyle.info.spacing
width: parent.width
Text { Text {
id: title id: title
...@@ -60,34 +60,39 @@ ColumnLayout { ...@@ -60,34 +60,39 @@ ColumnLayout {
font.pointSize: AssistantAbstractViewStyle.info.description.fontSize font.pointSize: AssistantAbstractViewStyle.info.description.fontSize
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
visible: text.length > 0
width: parent.width width: parent.width
} }
}
// -------------------------------------------------------------------------- // -------------------------------------------------------------------------
// Content. // Content.
// -------------------------------------------------------------------------- // -------------------------------------------------------------------------
Item { Item {
id: content id: content
Layout.alignment: Qt.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter
Layout.fillHeight: true height: AssistantAbstractViewStyle.content.height
Layout.preferredWidth: AssistantAbstractViewStyle.content.width width: AssistantAbstractViewStyle.content.width
}
} }
// -------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Nav buttons. // Nav buttons.
// -------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Row { Row {
Layout.alignment: Qt.AlignHCenter id: buttons
anchors {
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
}
spacing: AssistantAbstractViewStyle.buttons.spacing spacing: AssistantAbstractViewStyle.buttons.spacing
TextButtonA { TextButtonA {
text: qsTr('back') text: qsTr('back')
onClicked: window.popView() onClicked: assistant.popView()
} }
TextButtonB { TextButtonB {
......
...@@ -147,7 +147,7 @@ AssistantAbstractView { ...@@ -147,7 +147,7 @@ AssistantAbstractView {
height: AssistantCreateLinphoneSipAccountStyle.buttons.button.height height: AssistantCreateLinphoneSipAccountStyle.buttons.button.height
width: parent.width width: parent.width
onClicked: window.pushView(phoneNumberView) onClicked: assistant.pushView(phoneNumberView)
} }
TextButtonA { TextButtonA {
...@@ -156,7 +156,7 @@ AssistantAbstractView { ...@@ -156,7 +156,7 @@ AssistantAbstractView {
height: AssistantCreateLinphoneSipAccountStyle.buttons.button.height height: AssistantCreateLinphoneSipAccountStyle.buttons.button.height
width: parent.width width: parent.width
onClicked: window.pushView(emailAddressView) onClicked: assistant.pushView(emailAddressView)
} }
} }
} }
...@@ -14,41 +14,54 @@ ColumnLayout { ...@@ -14,41 +14,54 @@ ColumnLayout {
// Info. // Info.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Icon { Item {
Layout.alignment: Qt.AlignHCenter Layout.fillHeight: true
Layout.fillWidth: true
icon: 'home_account_assistant' Column {
iconSize: AssistantHomeStyle.info.iconSize anchors.verticalCenter: parent.verticalCenter
} spacing: 0
Text { height: AssistantHomeStyle.info.height
Layout.fillWidth: true width: parent.width
Layout.preferredHeight: AssistantHomeStyle.info.title.height
color: AssistantHomeStyle.info.title.color Icon {
elide: Text.ElideRight anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font { icon: 'home_account_assistant'
bold: true iconSize: AssistantHomeStyle.info.iconSize
pointSize: AssistantHomeStyle.info.title.fontSize }
}
text: qsTr('homeTitle') Text {
} height: AssistantHomeStyle.info.title.height
width: parent.width
Text { color: AssistantHomeStyle.info.title.color
Layout.fillWidth: true elide: Text.ElideRight
Layout.preferredHeight: AssistantHomeStyle.info.description.height horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: AssistantHomeStyle.info.description.color font {
elide: Text.ElideRight bold: true
font.pointSize: AssistantHomeStyle.info.description.fontSize pointSize: AssistantHomeStyle.info.title.fontSize
horizontalAlignment: Text.AlignHCenter }
verticalAlignment: Text.AlignVCenter
text: qsTr('homeTitle')
}
Text {
height: AssistantHomeStyle.info.description.height
width: parent.width
text: qsTr('homeDescription') color: AssistantHomeStyle.info.description.color
elide: Text.ElideRight
font.pointSize: AssistantHomeStyle.info.description.fontSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: qsTr('homeDescription')
}
}
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -58,7 +71,9 @@ ColumnLayout { ...@@ -58,7 +71,9 @@ ColumnLayout {
GridView { GridView {
id: buttons id: buttons
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true Layout.fillWidth: true
Layout.maximumWidth: AssistantHomeStyle.buttons.maxWidth
Layout.preferredHeight: AssistantHomeStyle.buttons.height Layout.preferredHeight: AssistantHomeStyle.buttons.height
cellHeight: height / 2 cellHeight: height / 2
...@@ -76,7 +91,7 @@ ColumnLayout { ...@@ -76,7 +91,7 @@ ColumnLayout {
text: $text text: $text
onClicked: window.pushView($view) onClicked: assistant.pushView($view)
} }
} }
......
...@@ -36,7 +36,7 @@ Rectangle { ...@@ -36,7 +36,7 @@ Rectangle {
$component: 'button' $component: 'button'
$componentText: qsTr('inviteButton') $componentText: qsTr('inviteButton')
$description: qsTr('inviteDescription') $description: qsTr('inviteDescription')
$window: 'InviteFriendsWindow' $view: 'InviteFriends'
$icon: 'home_invite_friends' $icon: 'home_invite_friends'
$title: qsTr('inviteTitle') $title: qsTr('inviteTitle')
} }
...@@ -47,7 +47,7 @@ Rectangle { ...@@ -47,7 +47,7 @@ Rectangle {
$description: qsTr('accountAssistantDescription') $description: qsTr('accountAssistantDescription')
$icon: 'home_account_assistant' $icon: 'home_account_assistant'
$title: qsTr('accountAssistantTitle') $title: qsTr('accountAssistantTitle')
$window: 'AssistantWindow' $view: 'Assistant'
} }
} }
...@@ -64,7 +64,7 @@ Rectangle { ...@@ -64,7 +64,7 @@ Rectangle {
TextButtonB { TextButtonB {
text: $componentText text: $componentText
onClicked: Utils.openWindow($window, window) onClicked: window.setView($view)
} }
} }
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
import App.Styles 1.0
// =============================================================================
Rectangle {
color: InviteFriendsStyle.color
ColumnLayout {
anchors.fill: parent
spacing: 0
Item {
id: content
Layout.fillHeight: true
Layout.fillWidth: true
Form {
anchors.centerIn: parent
orientation: Qt.Vertical
title: qsTr('inviteFriendsTitle')
width: InviteFriendsStyle.width
FormLine {
FormGroup {
label: qsTr('enterEmailLabel')
TextField {
id: email
inputMethodHints: Qt.ImhEmailCharactersOnly
width: parent.width
}
}
}
FormLine {
FormGroup {
label: qsTr('messageLabel')
TextAreaField {
id: message
height: InviteFriendsStyle.message.height
text: qsTr('defaultMessage')
}
}
}
}
}
// -------------------------------------------------------------------------
// Buttons.
// -------------------------------------------------------------------------
Row {
id: buttons
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: InviteFriendsStyle.buttons.bottomMargin
spacing: InviteFriendsStyle.buttons.spacing
TextButtonA {
text: qsTr('cancel')
onClicked: window.setView('Home')
}
TextButtonB {
enabled: email.length && message.length
text: qsTr('confirm')
onClicked: {
Qt.openUrlExternally(
'mailto:' + encodeURIComponent(email.text) +
'?subject=' + encodeURIComponent(qsTr('defaultSubject')) +
'&body=' + encodeURIComponent(message.text)
)
window.setView('Home')
}
}
}
}
}
...@@ -6,14 +6,13 @@ import Common 1.0 ...@@ -6,14 +6,13 @@ import Common 1.0
// ============================================================================= // =============================================================================
QtObject { QtObject {
property int spacing: 30
property QtObject buttons: QtObject { property QtObject buttons: QtObject {
property int spacing: 10 property int spacing: 10
} }
property QtObject content: QtObject { property QtObject content: QtObject {
property int width: 340 property int height: 375
property int width: 400
} }
property QtObject info: QtObject { property QtObject info: QtObject {
......
...@@ -7,6 +7,7 @@ import Common 1.0 ...@@ -7,6 +7,7 @@ import Common 1.0
QtObject { QtObject {
property QtObject info: QtObject { property QtObject info: QtObject {
property int height: 245
property int iconSize: 150 property int iconSize: 150
property QtObject description: QtObject { property QtObject description: QtObject {
...@@ -23,6 +24,7 @@ QtObject { ...@@ -23,6 +24,7 @@ QtObject {
} }
property QtObject buttons: QtObject { property QtObject buttons: QtObject {
property int maxWidth: 690
property int height: 90 property int height: 90
property int spacing: 5 property int spacing: 5
} }
......
...@@ -10,9 +10,7 @@ QtObject { ...@@ -10,9 +10,7 @@ QtObject {
property int bottomMargin: 35 property int bottomMargin: 35
property int leftMargin: 90 property int leftMargin: 90
property int rightMargin: 90 property int rightMargin: 90
property int topMargin: 35 property int topMargin: 50
property int height: 480
property int width: 700
property QtObject stackAnimation: QtObject { property QtObject stackAnimation: QtObject {
property int duration: 400 property int duration: 400
......
...@@ -6,12 +6,15 @@ import Common 1.0 ...@@ -6,12 +6,15 @@ import Common 1.0
// ============================================================================= // =============================================================================
QtObject { QtObject {
property int height: 316 property color color: Colors.k
property int leftMargin: 35 property int width: 400
property int rightMargin: 35
property int width: 480
property QtObject message: QtObject { property QtObject message: QtObject {
property int height: 140 property int height: 140
} }
property QtObject buttons: QtObject {
property int bottomMargin: 35
property int spacing: 10
}
} }
...@@ -7,8 +7,8 @@ import Linphone.Styles 1.0 ...@@ -7,8 +7,8 @@ import Linphone.Styles 1.0
// ============================================================================= // =============================================================================
QtObject { QtObject {
property int minimumHeight: 480 property int minimumHeight: 610
property int minimumWidth: 680 property int minimumWidth: 950
property int width: 950 property int width: 950
property string title: 'Linphone' property string title: 'Linphone'
......
...@@ -4,22 +4,22 @@ module App.Styles ...@@ -4,22 +4,22 @@ module App.Styles
# Views styles ----------------------------------------------------------------- # Views styles -----------------------------------------------------------------
singleton AssistantWindowStyle 1.0 AssistantWindowStyle.qml
singleton InviteFriendsWindowStyle 1.0 InviteFriendsWindowStyle.qml
singleton ManageAccountsWindowStyle 1.0 ManageAccountsWindowStyle.qml singleton ManageAccountsWindowStyle 1.0 ManageAccountsWindowStyle.qml
singleton AssistantAbstractViewStyle 1.0 Assistant/AssistantAbstractViewStyle.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
singleton AssistantAbstractViewStyle 1.0 Main/Assistant/AssistantAbstractViewStyle.qml
singleton AssistantCreateLinphoneSipAccountStyle 1.0 Main/Assistant/AssistantCreateLinphoneSipAccountStyle.qml
singleton AssistantHomeStyle 1.0 Main/Assistant/AssistantHomeStyle.qml
singleton AssistantUseLinphoneSipAccountStyle 1.0 Main/Assistant/AssistantUseLinphoneSipAccountStyle.qml
singleton AssistantStyle 1.0 Main/AssistantStyle.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 InviteFriendsStyle 1.0 Main/InviteFriendsStyle.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
......
...@@ -6,7 +6,5 @@ module App ...@@ -6,7 +6,5 @@ module App
# Views ------------------------------------------------------------------------ # Views ------------------------------------------------------------------------
Assistant 1.0 AssistantWindow.qml
IncallFullscreenWindow 1.0 IncallFullscreenWindow.qml IncallFullscreenWindow 1.0 IncallFullscreenWindow.qml
InviteFriendsWindow 1.0 InviteFriendsWindow.qml
ManageAccountsWindow 1.0 ManageAccountsWindow.qml ManageAccountsWindow 1.0 ManageAccountsWindow.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