mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-25 07:38:11 +00:00
feat(ui/views/App/Main/Home): Invite friends and Assistant windows are now directly in this view
This commit is contained in:
parent
f0654e12ae
commit
b23b651f34
23 changed files with 349 additions and 331 deletions
|
|
@ -28,6 +28,13 @@
|
|||
<translation>Start in the system tray, do not show the main interface.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Assistant</name>
|
||||
<message>
|
||||
<source>assistantTitle</source>
|
||||
<translation type="obsolete">Linphone - Assistant</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AssistantAbstractView</name>
|
||||
<message>
|
||||
|
|
@ -86,7 +93,7 @@
|
|||
<name>AssistantFetchRemoteConfiguration</name>
|
||||
<message>
|
||||
<source>fetchRemoteConfigurationTitle</source>
|
||||
<translation>Fetch remote configuration</translation>
|
||||
<translation>FETCH REMOTE CONFIGURATION</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>urlLabel</source>
|
||||
|
|
@ -190,7 +197,7 @@
|
|||
<name>AssistantWindow</name>
|
||||
<message>
|
||||
<source>assistantTitle</source>
|
||||
<translation>Linphone - Assistant</translation>
|
||||
<translation type="vanished">Linphone - Assistant</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
@ -607,54 +614,54 @@ Server url not configured.</translation>
|
|||
<name>InviteFriends</name>
|
||||
<message>
|
||||
<source>enterEmailLabel</source>
|
||||
<translation type="vanished">Enter your friend's email address</translation>
|
||||
<translation>Enter your friend's email address</translation>
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
<source>cancel</source>
|
||||
<translation type="vanished">CANCEL</translation>
|
||||
<translation>CANCEL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>confirm</source>
|
||||
<translation type="vanished">CONFIRM</translation>
|
||||
<translation>CONFIRM</translation>
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
</context>
|
||||
<context>
|
||||
<name>InviteFriendsWindow</name>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
<translation type="unfinished">CANCEL</translation>
|
||||
<translation type="obsolete">CANCEL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>confirm</source>
|
||||
<translation type="unfinished">CONFIRM</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>defaultSubject</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">CONFIRM</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>inviteFriendsTitle</source>
|
||||
<translation type="unfinished">Linphone - Invite Friends</translation>
|
||||
<translation type="obsolete">Linphone - Invite Friends</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>enterEmailLabel</source>
|
||||
<translation type="unfinished">Enter your friend's email address</translation>
|
||||
<translation type="obsolete">Enter your friend's email address</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>messageLabel</source>
|
||||
<translation type="unfinished">You can modify the invitation that will be sent</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>defaultMessage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">You can modify the invitation that will be sent</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,13 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Assistant</name>
|
||||
<message>
|
||||
<source>assistantTitle</source>
|
||||
<translation type="obsolete">Linphone - Assistant</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AssistantAbstractView</name>
|
||||
<message>
|
||||
|
|
@ -86,7 +93,7 @@
|
|||
<name>AssistantFetchRemoteConfiguration</name>
|
||||
<message>
|
||||
<source>fetchRemoteConfigurationTitle</source>
|
||||
<translation>Télécharger une configuration</translation>
|
||||
<translation>TÉLÉCHARGER UNE CONFIGURATION</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>urlLabel</source>
|
||||
|
|
@ -190,7 +197,7 @@
|
|||
<name>AssistantWindow</name>
|
||||
<message>
|
||||
<source>assistantTitle</source>
|
||||
<translation>Linphone - Assistant</translation>
|
||||
<translation type="vanished">Linphone - Assistant</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
@ -606,54 +613,54 @@ Url du serveur non configurée.</translation>
|
|||
<name>InviteFriends</name>
|
||||
<message>
|
||||
<source>enterEmailLabel</source>
|
||||
<translation type="vanished">Entrer l'adresse email de votre ami</translation>
|
||||
<translation>Entrer l'adresse email de votre ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>messageLabel</source>
|
||||
<translation type="vanished">Modifier l'invitation qui sera envoyée</translation>
|
||||
<translation>Modifier l'invitation qui sera envoyée</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
<translation type="vanished">ANNULER</translation>
|
||||
<translation>ANNULER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>confirm</source>
|
||||
<translation type="vanished">CONFIRMER</translation>
|
||||
<translation>CONFIRMER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
</context>
|
||||
<context>
|
||||
<name>InviteFriendsWindow</name>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
<translation type="unfinished">ANNULER</translation>
|
||||
<translation type="obsolete">ANNULER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>confirm</source>
|
||||
<translation type="unfinished">CONFIRMER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>defaultSubject</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">CONFIRMER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>inviteFriendsTitle</source>
|
||||
<translation type="unfinished">Linphone - Inviter des amis</translation>
|
||||
<translation type="obsolete">Linphone - Inviter des amis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>enterEmailLabel</source>
|
||||
<translation type="unfinished">Entrer l'adresse email de votre ami</translation>
|
||||
<translation type="obsolete">Entrer l'adresse email de votre ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>messageLabel</source>
|
||||
<translation type="unfinished">Modifier l'invitation qui sera envoyée</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>defaultMessage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">Modifier l'invitation qui sera envoyée</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
|||
|
|
@ -311,24 +311,24 @@
|
|||
<file>ui/scripts/Utils/qmldir</file>
|
||||
<file>ui/scripts/Utils/uri-tools.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/CallsWindow.qml</file>
|
||||
<file>ui/views/App/Calls/Incall.qml</file>
|
||||
<file>ui/views/App/Calls/IncomingCall.qml</file>
|
||||
<file>ui/views/App/Calls/OutgoingCall.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/Contacts.qml</file>
|
||||
<file>ui/views/App/Main/Conversation.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/MainWindow.qml</file>
|
||||
<file>ui/views/App/ManageAccountsWindow.qml</file>
|
||||
|
|
@ -340,18 +340,18 @@
|
|||
<file>ui/views/App/Settings/SettingsUi.qml</file>
|
||||
<file>ui/views/App/Settings/SettingsVideo.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/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/ContactsStyle.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/InviteFriendsStyle.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/ManageAccountsWindowStyle.qml</file>
|
||||
|
|
|
|||
|
|
@ -1,115 +0,0 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
import Utils 1.0
|
||||
|
||||
import App.Styles 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Window {
|
||||
id: window
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
readonly property string viewsPath: 'qrc:/ui/views/App/Assistant/'
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function pushView (view) {
|
||||
stack.push(
|
||||
Utils.isString(view)
|
||||
? viewsPath + view + '.qml'
|
||||
: view
|
||||
)
|
||||
}
|
||||
|
||||
function popView () {
|
||||
stack.pop()
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
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 {
|
||||
anchors.fill: parent
|
||||
color: AssistantWindowStyle.color
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
StackView {
|
||||
id: stack
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
|
||||
bottomMargin: AssistantWindowStyle.bottomMargin
|
||||
leftMargin: AssistantWindowStyle.leftMargin
|
||||
rightMargin: AssistantWindowStyle.rightMargin
|
||||
topMargin: AssistantWindowStyle.topMargin
|
||||
}
|
||||
|
||||
initialItem: window.viewsPath + 'AssistantHome.qml'
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
popEnter: Transition {
|
||||
XAnimator {
|
||||
duration: AssistantWindowStyle.stackAnimation.duration
|
||||
easing.type: Easing.OutBack
|
||||
from: -stack.width - AssistantWindowStyle.leftMargin
|
||||
to: 0
|
||||
}
|
||||
}
|
||||
|
||||
popExit: Transition {
|
||||
XAnimator {
|
||||
duration: AssistantWindowStyle.stackAnimation.duration
|
||||
easing.type: Easing.OutBack
|
||||
from: 0
|
||||
to: stack.width + AssistantWindowStyle.rightMargin
|
||||
}
|
||||
}
|
||||
|
||||
pushEnter: Transition {
|
||||
XAnimator {
|
||||
duration: AssistantWindowStyle.stackAnimation.duration
|
||||
easing.type: Easing.OutBack
|
||||
from: stack.width + AssistantWindowStyle.rightMargin
|
||||
to: 0
|
||||
}
|
||||
}
|
||||
|
||||
pushExit: Transition {
|
||||
XAnimator {
|
||||
duration: AssistantWindowStyle.stackAnimation.duration
|
||||
easing.type: Easing.OutBack
|
||||
from: 0
|
||||
to: -stack.width - AssistantWindowStyle.leftMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
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')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
89
linphone-desktop/ui/views/App/Main/Assistant.qml
Normal file
89
linphone-desktop/ui/views/App/Main/Assistant.qml
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
import Utils 1.0
|
||||
|
||||
import App.Styles 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Item {
|
||||
id: assistant
|
||||
|
||||
readonly property string viewsPath: 'qrc:/ui/views/App/Main/Assistant/'
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function pushView (view) {
|
||||
stack.push(
|
||||
Utils.isString(view) ? viewsPath + view + '.qml' : view
|
||||
)
|
||||
}
|
||||
|
||||
function popView () {
|
||||
stack.pop()
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: AssistantStyle.color
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
StackView {
|
||||
id: stack
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
|
||||
bottomMargin: AssistantStyle.bottomMargin
|
||||
leftMargin: AssistantStyle.leftMargin
|
||||
rightMargin: AssistantStyle.rightMargin
|
||||
topMargin: AssistantStyle.topMargin
|
||||
}
|
||||
|
||||
initialItem: assistant.viewsPath + 'AssistantHome.qml'
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
popEnter: Transition {
|
||||
YAnimator {
|
||||
duration: AssistantStyle.stackAnimation.duration
|
||||
easing.type: Easing.OutBack
|
||||
from: stack.height + AssistantStyle.bottomMargin
|
||||
to: 0
|
||||
}
|
||||
}
|
||||
|
||||
popExit: Transition {
|
||||
XAnimator {
|
||||
duration: AssistantStyle.stackAnimation.duration
|
||||
easing.type: Easing.OutBack
|
||||
from: 0
|
||||
to: stack.width + AssistantStyle.rightMargin
|
||||
}
|
||||
}
|
||||
|
||||
pushEnter: Transition {
|
||||
XAnimator {
|
||||
duration: AssistantStyle.stackAnimation.duration
|
||||
easing.type: Easing.OutBack
|
||||
from: stack.width + AssistantStyle.rightMargin
|
||||
to: 0
|
||||
}
|
||||
}
|
||||
|
||||
pushExit: Transition {
|
||||
YAnimator {
|
||||
duration: AssistantStyle.stackAnimation.duration
|
||||
easing.type: Easing.OutBack
|
||||
from: 0
|
||||
to: stack.height + AssistantStyle.bottomMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ import App.Styles 1.0
|
|||
|
||||
// =============================================================================
|
||||
|
||||
ColumnLayout {
|
||||
Item {
|
||||
id: view
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
@ -26,15 +26,15 @@ ColumnLayout {
|
|||
height: stack.height
|
||||
width: stack.width
|
||||
|
||||
spacing: AssistantAbstractViewStyle.spacing
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
// Info.
|
||||
// --------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Column {
|
||||
Layout.fillWidth: true
|
||||
anchors.centerIn: parent
|
||||
|
||||
spacing: AssistantAbstractViewStyle.info.spacing
|
||||
width: parent.width
|
||||
|
||||
Text {
|
||||
id: title
|
||||
|
|
@ -60,34 +60,39 @@ ColumnLayout {
|
|||
font.pointSize: AssistantAbstractViewStyle.info.description.fontSize
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
visible: text.length > 0
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Content.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Item {
|
||||
id: content
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: AssistantAbstractViewStyle.content.height
|
||||
width: AssistantAbstractViewStyle.content.width
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Content.
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
Item {
|
||||
id: content
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: AssistantAbstractViewStyle.content.width
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
// Nav buttons.
|
||||
// --------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Row {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
id: buttons
|
||||
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
spacing: AssistantAbstractViewStyle.buttons.spacing
|
||||
|
||||
TextButtonA {
|
||||
text: qsTr('back')
|
||||
onClicked: window.popView()
|
||||
onClicked: assistant.popView()
|
||||
}
|
||||
|
||||
TextButtonB {
|
||||
|
|
@ -147,7 +147,7 @@ AssistantAbstractView {
|
|||
height: AssistantCreateLinphoneSipAccountStyle.buttons.button.height
|
||||
width: parent.width
|
||||
|
||||
onClicked: window.pushView(phoneNumberView)
|
||||
onClicked: assistant.pushView(phoneNumberView)
|
||||
}
|
||||
|
||||
TextButtonA {
|
||||
|
|
@ -156,7 +156,7 @@ AssistantAbstractView {
|
|||
height: AssistantCreateLinphoneSipAccountStyle.buttons.button.height
|
||||
width: parent.width
|
||||
|
||||
onClicked: window.pushView(emailAddressView)
|
||||
onClicked: assistant.pushView(emailAddressView)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,41 +14,54 @@ ColumnLayout {
|
|||
// Info.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Icon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
icon: 'home_account_assistant'
|
||||
iconSize: AssistantHomeStyle.info.iconSize
|
||||
}
|
||||
|
||||
Text {
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: AssistantHomeStyle.info.title.height
|
||||
|
||||
color: AssistantHomeStyle.info.title.color
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 0
|
||||
|
||||
font {
|
||||
bold: true
|
||||
pointSize: AssistantHomeStyle.info.title.fontSize
|
||||
height: AssistantHomeStyle.info.height
|
||||
width: parent.width
|
||||
|
||||
Icon {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
icon: 'home_account_assistant'
|
||||
iconSize: AssistantHomeStyle.info.iconSize
|
||||
}
|
||||
|
||||
Text {
|
||||
height: AssistantHomeStyle.info.title.height
|
||||
width: parent.width
|
||||
|
||||
color: AssistantHomeStyle.info.title.color
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
font {
|
||||
bold: true
|
||||
pointSize: AssistantHomeStyle.info.title.fontSize
|
||||
}
|
||||
|
||||
text: qsTr('homeTitle')
|
||||
}
|
||||
|
||||
Text {
|
||||
height: AssistantHomeStyle.info.description.height
|
||||
width: parent.width
|
||||
|
||||
color: AssistantHomeStyle.info.description.color
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: AssistantHomeStyle.info.description.fontSize
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
text: qsTr('homeDescription')
|
||||
}
|
||||
}
|
||||
|
||||
text: qsTr('homeTitle')
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: AssistantHomeStyle.info.description.height
|
||||
|
||||
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 {
|
|||
GridView {
|
||||
id: buttons
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: AssistantHomeStyle.buttons.maxWidth
|
||||
Layout.preferredHeight: AssistantHomeStyle.buttons.height
|
||||
|
||||
cellHeight: height / 2
|
||||
|
|
@ -76,7 +91,7 @@ ColumnLayout {
|
|||
|
||||
text: $text
|
||||
|
||||
onClicked: window.pushView($view)
|
||||
onClicked: assistant.pushView($view)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ Rectangle {
|
|||
$component: 'button'
|
||||
$componentText: qsTr('inviteButton')
|
||||
$description: qsTr('inviteDescription')
|
||||
$window: 'InviteFriendsWindow'
|
||||
$view: 'InviteFriends'
|
||||
$icon: 'home_invite_friends'
|
||||
$title: qsTr('inviteTitle')
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ Rectangle {
|
|||
$description: qsTr('accountAssistantDescription')
|
||||
$icon: 'home_account_assistant'
|
||||
$title: qsTr('accountAssistantTitle')
|
||||
$window: 'AssistantWindow'
|
||||
$view: 'Assistant'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ Rectangle {
|
|||
|
||||
TextButtonB {
|
||||
text: $componentText
|
||||
onClicked: Utils.openWindow($window, window)
|
||||
onClicked: window.setView($view)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
91
linphone-desktop/ui/views/App/Main/InviteFriends.qml
Normal file
91
linphone-desktop/ui/views/App/Main/InviteFriends.qml
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
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
|
|||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int spacing: 30
|
||||
|
||||
property QtObject buttons: QtObject {
|
||||
property int spacing: 10
|
||||
}
|
||||
|
||||
property QtObject content: QtObject {
|
||||
property int width: 340
|
||||
property int height: 375
|
||||
property int width: 400
|
||||
}
|
||||
|
||||
property QtObject info: QtObject {
|
||||
|
|
@ -7,6 +7,7 @@ import Common 1.0
|
|||
|
||||
QtObject {
|
||||
property QtObject info: QtObject {
|
||||
property int height: 245
|
||||
property int iconSize: 150
|
||||
|
||||
property QtObject description: QtObject {
|
||||
|
|
@ -23,6 +24,7 @@ QtObject {
|
|||
}
|
||||
|
||||
property QtObject buttons: QtObject {
|
||||
property int maxWidth: 690
|
||||
property int height: 90
|
||||
property int spacing: 5
|
||||
}
|
||||
|
|
@ -10,9 +10,7 @@ QtObject {
|
|||
property int bottomMargin: 35
|
||||
property int leftMargin: 90
|
||||
property int rightMargin: 90
|
||||
property int topMargin: 35
|
||||
property int height: 480
|
||||
property int width: 700
|
||||
property int topMargin: 50
|
||||
|
||||
property QtObject stackAnimation: QtObject {
|
||||
property int duration: 400
|
||||
|
|
@ -6,12 +6,15 @@ import Common 1.0
|
|||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int height: 316
|
||||
property int leftMargin: 35
|
||||
property int rightMargin: 35
|
||||
property int width: 480
|
||||
property color color: Colors.k
|
||||
property int width: 400
|
||||
|
||||
property QtObject message: QtObject {
|
||||
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
|
|||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int minimumHeight: 480
|
||||
property int minimumWidth: 680
|
||||
property int minimumHeight: 610
|
||||
property int minimumWidth: 950
|
||||
property int width: 950
|
||||
property string title: 'Linphone'
|
||||
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@ module App.Styles
|
|||
|
||||
# Views styles -----------------------------------------------------------------
|
||||
|
||||
singleton AssistantWindowStyle 1.0 AssistantWindowStyle.qml
|
||||
singleton InviteFriendsWindowStyle 1.0 InviteFriendsWindowStyle.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 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 ContactsStyle 1.0 Main/ContactsStyle.qml
|
||||
singleton ConversationStyle 1.0 Main/ConversationStyle.qml
|
||||
singleton HomeStyle 1.0 Main/HomeStyle.qml
|
||||
singleton InviteFriendsStyle 1.0 Main/InviteFriendsStyle.qml
|
||||
singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml
|
||||
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,5 @@ module App
|
|||
|
||||
# Views ------------------------------------------------------------------------
|
||||
|
||||
Assistant 1.0 AssistantWindow.qml
|
||||
IncallFullscreenWindow 1.0 IncallFullscreenWindow.qml
|
||||
InviteFriendsWindow 1.0 InviteFriendsWindow.qml
|
||||
ManageAccountsWindow 1.0 ManageAccountsWindow.qml
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue