Commit a67cc3b8 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app):

  - remove `SelectContact` component
  - remove `NewCall` view
  - fix styles & coding style if views
parent 178eb0f2
......@@ -418,11 +418,11 @@
<name>NewCall</name>
<message>
<source>newCallTitle</source>
<translation>New call</translation>
<translation type="vanished">New call</translation>
</message>
<message>
<source>cancel</source>
<translation>CANCEL</translation>
<translation type="vanished">CANCEL</translation>
</message>
</context>
<context>
......@@ -483,7 +483,7 @@
<name>SelectContact</name>
<message>
<source>contactSearch</source>
<translation>Search contact or enter SIP address</translation>
<translation type="vanished">Search contact or enter SIP address</translation>
</message>
</context>
<context>
......
......@@ -406,11 +406,11 @@
<name>NewCall</name>
<message>
<source>newCallTitle</source>
<translation>Nouvel appel</translation>
<translation type="vanished">Nouvel appel</translation>
</message>
<message>
<source>cancel</source>
<translation>ANNULER</translation>
<translation type="vanished">ANNULER</translation>
</message>
</context>
<context>
......@@ -471,7 +471,7 @@
<name>SelectContact</name>
<message>
<source>contactSearch</source>
<translation>Rechercher un contact ou entrer une adresse SIP</translation>
<translation type="vanished">Rechercher un contact ou entrer une adresse SIP</translation>
</message>
</context>
<context>
......
......@@ -213,7 +213,6 @@
<file>ui/modules/Linphone/Presence/PresenceLevel.qml</file>
<file>ui/modules/Linphone/Presence/PresenceString.qml</file>
<file>ui/modules/Linphone/qmldir</file>
<file>ui/modules/Linphone/Select/SelectContact.qml</file>
<file>ui/modules/Linphone/SmartSearchBar.qml</file>
<file>ui/modules/Linphone/Styles/Account/AccountStatusStyle.qml</file>
<file>ui/modules/Linphone/Styles/ChatStyle.qml</file>
......@@ -242,7 +241,6 @@
<file>ui/views/App/MainWindow/Home.qml</file>
<file>ui/views/App/MainWindow/MainWindow.qml</file>
<file>ui/views/App/ManageAccounts.qml</file>
<file>ui/views/App/NewCall.qml</file>
<file>ui/views/App/qmldir</file>
<file>ui/views/App/Styles/Calls/StartingCallStyle.qml</file>
<file>ui/views/App/Styles/MainWindow/ContactEditStyle.qml</file>
......
import QtGraphicalEffects 1.0
import QtQuick 2.7
import QtQuick.Controls 2.0
import Common 1.0
import Linphone 1.0
// TODO: Contacts list.
Item {
function setPopupVisibility (visibility) {
popup.visible = true
}
function filterContacts (text) {
console.log(text)
}
TextField {
placeholderText: qsTr('contactSearch')
background: Rectangle {
implicitHeight: 40
border.color: '#CBCBCB'
border.width: 2
color: '#FFFFFF'
}
id: textField
width: parent.width
onFocusChanged: setPopupVisibility(focus)
onTextChanged: filterContacts(text)
}
Rectangle {
anchors.top: textField.bottom
anchors.topMargin: 2
border.color: '#9B9B9B'
color: '#EAEAEA'
height: parent.height - textField.height // Avoid overflow.
id: popup
visible: false
width: parent.width
ScrollableListView {
anchors.fill: parent
id: contactsList
// TODO: Remove, use C++ model instead.
model: ListModel {
ListElement {
$presence: 'connected'
$sipAddress: 'jim.williams.zzzz.yyyy.kkkk.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'connected'
$sipAddress: 'toto.lala.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'disconnected'
$sipAddress: 'machin.truc.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'absent'
$sipAddress: 'hey.listen.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'do_not_disturb'
$sipAddress: 'valentin.cognito.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'do_not_disturb'
$sipAddress: 'charles.henri.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'disconnected'
$sipAddress: 'yesyes.nono.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'connected'
$sipAddress: 'nsa.sip.linphone.org'
$username: 'Toto'
}
}
delegate: Contact {
presenceLevel: $presence
sipAddress: $sipAddress
username: $username
width: parent.width
actions: [
ActionButton {
icon: 'call'
onClicked: console.log('clicked')
},
ActionButton {
icon: 'cam'
onClicked: console.log('cam clicked')
}
]
}
}
}
DropShadow {
anchors.fill: popup
color: "#80000000"
horizontalOffset: 0
id: popupShadow
radius: 8.0
samples: 15
source: popup
verticalOffset: 2
visible: false
}
}
# ====================================================================
# ==============================================================================
# Linphone's components to export.
# ====================================================================
# ==============================================================================
module Linphone
# Components ---------------------------------------------------------
# Components -------------------------------------------------------------------
# Account
AccountStatus 1.0 Account/AccountStatus.qml
......@@ -24,9 +24,6 @@ ContactDescription 1.0 Contact/ContactDescription.qml
PresenceLevel 1.0 Presence/PresenceLevel.qml
PresenceString 1.0 Presence/PresenceString.qml
# Select
SelectContact 1.0 Select/SelectContact.qml
# SmartSearchBar
SmartSearchBar 1.0 SmartSearchBar.qml
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Common 1.0
import Linphone 1.0
DialogPlus {
centeredButtons: true
minimumHeight: 300
minimumWidth: 420
title: qsTr('newCallTitle')
buttons: TextButtonA {
text: qsTr('cancel')
}
Item {
anchors.fill: parent
anchors.leftMargin: 25
anchors.rightMargin: 25
SelectContact {
anchors.fill: parent
}
}
}
......@@ -3,7 +3,7 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
// =============================================================================
QtObject {
property color backgroundColor: Colors.f
......
......@@ -7,7 +7,7 @@ import Common 1.0
QtObject {
property QtObject infoBar: QtObject {
property color color: '#F4F4F4'
property color color: Colors.e
property int avatarSize: 60
property int height: 80
property int leftMargin: 40
......@@ -20,7 +20,7 @@ QtObject {
}
property QtObject username: QtObject {
property color color: '#4B5964'
property color color: Colors.j
property int fontSize: 13
}
}
......@@ -37,7 +37,7 @@ QtObject {
property int topMargin: 20
property QtObject separator: QtObject {
property color color: '#E8E8E8'
property color color: Colors.f
property int height: 1
}
}
......
......@@ -3,7 +3,7 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
// =============================================================================
QtObject {
property color backgroundColor: Colors.k
......
......@@ -3,7 +3,7 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
// =============================================================================
QtObject {
property QtObject bar: QtObject {
......
# ====================================================================
# ==============================================================================
# Linphone's views.
# ====================================================================
# ==============================================================================
module App
# Views --------------------------------------------------------------
# Views ------------------------------------------------------------------------
ManageAccounts 1.0 ManageAccounts.qml
NewCall 1.0 NewCall.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