Commit 46e9c13b authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Main/Home): add tooltips, disable `how to use linphone` component

parent 70631b9d
......@@ -698,6 +698,21 @@ Server url not configured.</translation>
<source>autoAnswerStatus</source>
<translation>auto</translation>
</message>
<message>
<source>menuTooltip</source>
<translation>Access to your contact list and add new contacts.</translation>
</message>
<message>
<source>smartSearchBarTooltip</source>
<translation>Use the search bar to directly start audio and video
calls, start a chat or add a new contact. Just enter
your friend&apos;s SIP address or username.</translation>
</message>
<message>
<source>timelineTooltip</source>
<translation>Click on one of your last exchange
to chat or see the conversation history.</translation>
</message>
</context>
<context>
<name>MainWindowMenuBar</name>
......
......@@ -698,6 +698,20 @@ Url du serveur non configurée.</translation>
<source>autoAnswerStatus</source>
<translation>auto</translation>
</message>
<message>
<source>menuTooltip</source>
<translation>Accéder à votre liste de contacts, en ajouter...</translation>
</message>
<message>
<source>smartSearchBarTooltip</source>
<translation>Utiliser la barre de recherche intelligente pour lancer des appels audio et vidéo,
un chat ou ajouter un contact.</translation>
</message>
<message>
<source>timelineTooltip</source>
<translation>Cliquer sur une entrée pour voir vos derniers échanges,
chatter ou voir l&apos;historique de conversation.</translation>
</message>
</context>
<context>
<name>MainWindowMenuBar</name>
......
......@@ -15,6 +15,7 @@ Item {
// ---------------------------------------------------------------------------
readonly property alias filter: searchField.text
readonly property alias isOpen: searchBox._isOpen
property alias delegate: list.delegate
property alias header: list.header
......
......@@ -4,7 +4,8 @@ import QtQuick 2.7
MouseArea {
property alias text: tooltip.text
property var tooltipParent: this
property bool force: false
property var tooltipParent: parent
property bool _visible: false
......@@ -23,6 +24,16 @@ MouseArea {
id: tooltip
parent: tooltipParent
visible: _visible
visible: _visible || force
delay: -1
timeout: -1
// Workaround to always display tooltip.
onVisibleChanged: {
if (!visible && force) {
tooltip.visible = true
}
}
}
}
......@@ -16,6 +16,8 @@ SearchBox {
searchBox.filter
)
readonly property alias isOpen: searchBox._isOpen
// ---------------------------------------------------------------------------
signal addContact (string sipAddress)
......
......@@ -12,6 +12,17 @@ import App.Styles 1.0
Rectangle {
color: HomeStyle.color
// TODO: Remove me when smart tooltip will be available.
Component {
Item {
property var i18n: [
QT_TR_NOOP('showTooltips'),
QT_TR_NOOP('howToDescription'),
QT_TR_NOOP('howToTitle')
]
}
}
ListView {
anchors.horizontalCenter: parent.horizontalCenter
boundsBehavior: Flickable.StopAtBounds
......@@ -26,13 +37,14 @@ Rectangle {
}
model: ListModel {
ListElement {
$component: 'checkBox'
$componentText: qsTr('showTooltips')
$description: qsTr('howToDescription')
$icon: 'home_use_linphone'
$title: qsTr('howToTitle')
}
// TODO: Uncomment me when smart tooltip will be available.
// ListElement {
// $component: 'checkBox'
// $componentText: qsTr('showTooltips')
// $description: qsTr('howToDescription')
// $icon: 'home_use_linphone'
// $title: qsTr('howToTitle')
// }
ListElement {
$component: 'button'
......
......@@ -177,6 +177,11 @@ ApplicationWindow {
})
onLaunchVideoCall: CallsListModel.launchVideoCall(sipAddress)
TooltipArea {
text: qsTr('smartSearchBarTooltip')
visible: !smartSearchBar.isOpen
}
}
}
}
......@@ -213,6 +218,10 @@ ApplicationWindow {
}]
onEntrySelected: !entry ? setView('Home') : setView('Contacts')
TooltipArea {
text: qsTr('menuTooltip')
}
}
// History.
......@@ -224,6 +233,10 @@ ApplicationWindow {
model: TimelineModel
onEntrySelected: setView('Conversation', { sipAddress: entry })
TooltipArea {
text: qsTr('timelineTooltip')
}
}
}
......
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