new contact ui

This commit is contained in:
Gaelle Braud 2024-10-28 15:55:42 +01:00
parent 81b4d256b8
commit 8a6c9b9182
16 changed files with 695 additions and 525 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"></path></svg>

After

Width:  |  Height:  |  Size: 269 B

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#4e6074" viewBox="0 0 256 256"><path d="M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"></path></svg>

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 466 B

View file

@ -26,6 +26,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
view/Control/Container/TabBar.qml view/Control/Container/TabBar.qml
view/Control/Container/VerticalTabBar.qml view/Control/Container/VerticalTabBar.qml
view/Control/Container/Call/ActiveSpeakerLayout.qml view/Control/Container/Call/ActiveSpeakerLayout.qml
view/Control/Container/Call/CallHistoryLayout.qml
view/Control/Container/Call/CallLayout.qml view/Control/Container/Call/CallLayout.qml
view/Control/Container/Call/GridLayout.qml view/Control/Container/Call/GridLayout.qml
view/Control/Container/Call/Mosaic.qml view/Control/Container/Call/Mosaic.qml
@ -35,6 +36,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
view/Control/Display/BusyIndicator.qml view/Control/Display/BusyIndicator.qml
view/Control/Display/EffectImage.qml view/Control/Display/EffectImage.qml
view/Control/Display/Flickable.qml view/Control/Display/Flickable.qml
view/Control/Display/GradientRectangle.qml
view/Control/Display/TemporaryText.qml view/Control/Display/TemporaryText.qml
view/Control/Display/ProgressBar.qml view/Control/Display/ProgressBar.qml
view/Control/Display/RoundedPane.qml view/Control/Display/RoundedPane.qml

View file

@ -91,7 +91,6 @@ Control.Button {
TextMetrics { TextMetrics {
id: textMetrics id: textMetrics
text: mainItem.text text: mainItem.text
font: buttonText.font
} }
} }

View file

@ -0,0 +1,211 @@
import QtQuick
import QtQuick.Effects
import QtQuick.Layouts
import QtQuick.Controls.Basic as Control
import Linphone
import UtilsCpp
import SettingsCpp
ColumnLayout {
id: mainItem
spacing: 30 * DefaultStyle.dp
property FriendGui contact
property ConferenceInfoGui conferenceInfo
property bool isConference: conferenceInfo != undefined && conferenceInfo != null
property string contactAddress: specificAddress != "" ? specificAddress : contact && contact.core.defaultAddress || ""
property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress)
property string computedContactName: computedContactNameObj ? computedContactNameObj.value: ""
property string contactName: contact
? contact.core.displayName
: conferenceInfo
? conferenceInfo.core.subject
: computedContactName
// Set this property to get the security informations
// for a specific address and not for the entire contact
property string specificAddress: ""
property alias buttonContent: rightButton.data
property alias detailContent: detailControl.data
component LabelButton: ColumnLayout {
id: labelButton
// property alias image: buttonImg
property alias button: button
property string label
spacing: 8 * DefaultStyle.dp
Button {
id: button
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 56 * DefaultStyle.dp
Layout.preferredHeight: 56 * DefaultStyle.dp
topPadding: 16 * DefaultStyle.dp
bottomPadding: 16 * DefaultStyle.dp
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
contentImageColor: DefaultStyle.main2_600
background: Rectangle {
anchors.fill: parent
radius: 40 * DefaultStyle.dp
color: DefaultStyle.main2_200
}
}
Text {
Layout.alignment: Qt.AlignHCenter
text: labelButton.label
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
}
}
}
ColumnLayout {
spacing: 13 * DefaultStyle.dp
Item {
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredHeight: detailAvatar.height
Layout.alignment: Qt.AlignHCenter
Avatar {
id: detailAvatar
anchors.horizontalCenter: parent.horizontalCenter
width: 100 * DefaultStyle.dp
height: 100 * DefaultStyle.dp
contact: mainItem.contact || null
_address: mainItem.conferenceInfo
? mainItem.conferenceInfo.core.subject
: mainItem.contactAddress || mainItem.contactName
}
Item {
id: rightButton
anchors.right: parent.right
anchors.verticalCenter: detailAvatar.verticalCenter
anchors.rightMargin: 20 * DefaultStyle.dp
width: 30 * DefaultStyle.dp
height: 30 * DefaultStyle.dp
}
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 360 * DefaultStyle.dp
spacing: 2 * DefaultStyle.dp
Text {
Layout.preferredWidth: implicitWidth
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
text: mainItem.contactName
maximumLineCount: 1
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
capitalization: Font.Capitalize
}
}
Text {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
visible: mainItem.specificAddress != ""
text: mainItem.specificAddress
elide: Text.ElideMiddle
maximumLineCount: 1
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
}
}
Text {
property var mode : contact ? contact.core.consolidatedPresence : -1
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
Layout.fillWidth: true
visible: mainItem.contact
text: mode === LinphoneEnums.ConsolidatedPresence.Online
? qsTr("En ligne")
: mode === LinphoneEnums.ConsolidatedPresence.Busy
? qsTr("Occupé")
: mode === LinphoneEnums.ConsolidatedPresence.DoNotDisturb
? qsTr("Ne pas déranger")
: qsTr("Hors ligne")
color: mode === LinphoneEnums.ConsolidatedPresence.Online
? DefaultStyle.success_500main
: mode === LinphoneEnums.ConsolidatedPresence.Busy
? DefaultStyle.warning_600
: mode === LinphoneEnums.ConsolidatedPresence.DoNotDisturb
? DefaultStyle.danger_500main
: DefaultStyle.main2_500main
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
}
}
}
}
RowLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 72 * DefaultStyle.dp
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
Button {
visible: mainItem.isConference && !SettingsCpp.disableMeetingsFeature
Layout.alignment: Qt.AlignHCenter
text: qsTr("Rejoindre la réunion")
color: DefaultStyle.main2_200
textColor: DefaultStyle.main2_600
onClicked: {
if (mainItem.conferenceInfo) {
var callsWindow = UtilsCpp.getCallsWindow()
callsWindow.setupConference(mainItem.conferenceInfo)
callsWindow.show()
}
}
}
LabelButton {
visible: !mainItem.isConference
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.icon.source: AppIcons.phone
label: qsTr("Appel")
button.onClicked: {
if (mainItem.specificAddress === "") mainWindow.startCallWithContact(mainItem.contact, false, mainItem)
else UtilsCpp.createCall(mainItem.specificAddress)
}
}
LabelButton {
visible: !mainItem.isConference && !SettingsCpp.disableChatFeature
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.icon.source: AppIcons.chatTeardropText
label: qsTr("Message")
button.onClicked: console.debug("[ContactLayout.qml] TODO : open conversation")
}
LabelButton {
visible: !mainItem.isConference
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.icon.source: AppIcons.videoCamera
label: qsTr("Appel Video")
button.onClicked: {
if (mainItem.specificAddress === "") mainWindow.startCallWithContact(mainItem.contact, true, mainItem)
else UtilsCpp.createCall(mainItem.specificAddress, {'localVideoEnabled': true})
}
}
}
ColumnLayout {
id: detailControl
Layout.fillWidth: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 30 * DefaultStyle.dp
}
}

View file

@ -11,201 +11,62 @@ ColumnLayout {
spacing: 30 * DefaultStyle.dp spacing: 30 * DefaultStyle.dp
property FriendGui contact property FriendGui contact
property ConferenceInfoGui conferenceInfo
property bool isConference: conferenceInfo != undefined && conferenceInfo != null
property string contactAddress: specificAddress != "" ? specificAddress : contact && contact.core.defaultAddress || ""
property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress)
property string computedContactName: computedContactNameObj ? computedContactNameObj.value: ""
property string contactName: contact
? contact.core.displayName
: conferenceInfo
? conferenceInfo.core.subject
: computedContactName
// Set this property to get the security informations property alias button: rightButton
// for a specific address and not for the entire contact property alias content: detailLayout.data
property string specificAddress: "" property alias bannerContent: bannerLayout.data
property alias buttonContent: rightButton.data
property alias detailContent: detailControl.data
component LabelButton: ColumnLayout {
id: labelButton
// property alias image: buttonImg
property alias button: button
property string label
spacing: 8 * DefaultStyle.dp
Button {
id: button
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 56 * DefaultStyle.dp
Layout.preferredHeight: 56 * DefaultStyle.dp
topPadding: 16 * DefaultStyle.dp
bottomPadding: 16 * DefaultStyle.dp
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
contentImageColor: DefaultStyle.main2_600
background: Rectangle {
anchors.fill: parent
radius: 40 * DefaultStyle.dp
color: DefaultStyle.main2_200
}
}
Text {
Layout.alignment: Qt.AlignHCenter
text: labelButton.label
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
}
}
}
ColumnLayout {
spacing: 13 * DefaultStyle.dp
Item {
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.preferredHeight: detailAvatar.height
Layout.alignment: Qt.AlignHCenter
Avatar {
id: detailAvatar
anchors.horizontalCenter: parent.horizontalCenter
width: 100 * DefaultStyle.dp
height: 100 * DefaultStyle.dp
contact: mainItem.contact || null
_address: mainItem.conferenceInfo
? mainItem.conferenceInfo.core.subject
: mainItem.contactAddress || mainItem.contactName
}
Item {
id: rightButton
anchors.right: parent.right
anchors.verticalCenter: detailAvatar.verticalCenter
anchors.rightMargin: 20 * DefaultStyle.dp
width: 30 * DefaultStyle.dp
height: 30 * DefaultStyle.dp
}
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 360 * DefaultStyle.dp
spacing: 2 * DefaultStyle.dp
Text {
Layout.preferredWidth: implicitWidth
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
text: mainItem.contactName
maximumLineCount: 1
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
capitalization: Font.Capitalize
}
}
Text {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
visible: mainItem.specificAddress != ""
text: mainItem.specificAddress
elide: Text.ElideMiddle
maximumLineCount: 1
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
}
}
Text {
property var mode : contact ? contact.core.consolidatedPresence : -1
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
Layout.fillWidth: true
visible: mainItem.contact
text: mode === LinphoneEnums.ConsolidatedPresence.Online
? qsTr("En ligne")
: mode === LinphoneEnums.ConsolidatedPresence.Busy
? qsTr("Occupé")
: mode === LinphoneEnums.ConsolidatedPresence.DoNotDisturb
? qsTr("Ne pas déranger")
: qsTr("Hors ligne")
color: mode === LinphoneEnums.ConsolidatedPresence.Online
? DefaultStyle.success_500main
: mode === LinphoneEnums.ConsolidatedPresence.Busy
? DefaultStyle.warning_600
: mode === LinphoneEnums.ConsolidatedPresence.DoNotDisturb
? DefaultStyle.danger_500main
: DefaultStyle.main2_500main
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
}
}
}
}
RowLayout { RowLayout {
Layout.alignment: Qt.AlignHCenter spacing: 49 * DefaultStyle.dp
spacing: 72 * DefaultStyle.dp Layout.leftMargin: 64 * DefaultStyle.dp
Layout.fillWidth: true Layout.rightMargin: 64 * DefaultStyle.dp
Layout.preferredHeight: childrenRect.height Layout.topMargin: 56 * DefaultStyle.dp
Button { Control.Control {
visible: mainItem.isConference && !SettingsCpp.disableMeetingsFeature // Layout.preferredWidth: 734 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter Layout.fillWidth: true
text: qsTr("Rejoindre la réunion") width: 734 * DefaultStyle.dp
color: DefaultStyle.main2_200 height: 100 * DefaultStyle.dp
textColor: DefaultStyle.main2_600 rightPadding: 21 * DefaultStyle.dp
onClicked: { background: GradientRectangle {
if (mainItem.conferenceInfo) { anchors.fill: parent
var callsWindow = UtilsCpp.getCallsWindow() anchors.leftMargin: avatar.width / 2
callsWindow.setupConference(mainItem.conferenceInfo) radius: 15 * DefaultStyle.dp
callsWindow.show() borderGradient: Gradient {
orientation: Gradient.Horizontal
GradientStop { position: 0.0; color: DefaultStyle.grey_100 }
GradientStop { position: 1.0; color: DefaultStyle.main2_200 }
}
gradient: Gradient {
orientation: Gradient.Horizontal
GradientStop { position: 0.0; color: DefaultStyle.grey_0 }
GradientStop { position: 1.0; color: DefaultStyle.grey_100 }
}
}
contentItem: RowLayout {
id: bannerLayout
spacing: 32 * DefaultStyle.dp
Avatar {
id: avatar
contact: mainItem.contact
Layout.preferredWidth: 100 * DefaultStyle.dp
Layout.preferredHeight: 100 * DefaultStyle.dp
} }
} }
} }
LabelButton { Button {
visible: !mainItem.isConference id: rightButton
width: 56 * DefaultStyle.dp width: childrenRect.width
height: 56 * DefaultStyle.dp height: childrenRect.height
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.icon.source: AppIcons.phone
label: qsTr("Appel")
button.onClicked: {
if (mainItem.specificAddress === "") mainWindow.startCallWithContact(mainItem.contact, false, mainItem)
else UtilsCpp.createCall(mainItem.specificAddress)
}
}
LabelButton {
visible: !mainItem.isConference && !SettingsCpp.disableChatFeature
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.icon.source: AppIcons.chatTeardropText
label: qsTr("Message")
button.onClicked: console.debug("[ContactLayout.qml] TODO : open conversation")
}
LabelButton {
visible: !mainItem.isConference
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.icon.source: AppIcons.videoCamera
label: qsTr("Appel Video")
button.onClicked: {
if (mainItem.specificAddress === "") mainWindow.startCallWithContact(mainItem.contact, true, mainItem)
else UtilsCpp.createCall(mainItem.specificAddress, {'localVideoEnabled': true})
}
} }
} }
ColumnLayout { ColumnLayout {
id: detailControl id: detailLayout
Layout.alignment: Qt.AlignCenter
Layout.topMargin: 30 * DefaultStyle.dp
Layout.leftMargin: 64 * DefaultStyle.dp
Layout.rightMargin: 64 * DefaultStyle.dp
Layout.bottomMargin: 53 * DefaultStyle.dp
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 30 * DefaultStyle.dp
} }
} }

View file

@ -7,11 +7,9 @@ import Linphone
Control.ScrollBar { Control.ScrollBar {
id: mainItem id: mainItem
padding: 0 padding: 0
background: Item{}
contentItem: Rectangle { contentItem: Rectangle {
implicitWidth: 6 * DefaultStyle.dp implicitWidth: 6 * DefaultStyle.dp
radius: 32 * DefaultStyle.dp radius: 32 * DefaultStyle.dp
// TODO : ask for color names color: DefaultStyle.grey_850
color: "#D9D9D9"
} }
} }

View file

@ -87,9 +87,9 @@ Loader{
color: mainItem.secured ? DefaultStyle.info_500_main : DefaultStyle.danger_500main color: mainItem.secured ? DefaultStyle.info_500_main : DefaultStyle.danger_500main
} }
Image { Image {
x: stackView.width / 7 x: parent.width / 7
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: stackView.width / 4.5 width: parent.width / 4.5
height: width height: width
asynchronous: true asynchronous: true
source: mainItem.secured ? AppIcons.trusted : AppIcons.notTrusted source: mainItem.secured ? AppIcons.trusted : AppIcons.notTrusted

View file

@ -2,9 +2,8 @@ import QtQuick
import Linphone import Linphone
Flickable { Flickable {
width: contentWidth width: parent.width
contentWidth: contentItem.childrenRect.width contentWidth: contentItem.childrenRect.width
contentHeight: contentItem.childrenRect.height contentHeight: contentItem.childrenRect.height
clip: true clip: true
flickableDirection: Flickable.VerticalFlick
} }

View file

@ -0,0 +1,27 @@
import QtQuick
import Linphone
Item {
id: mainItem
property int borderWidth: 1 * DefaultStyle.dp
property alias borderGradient: border.gradient
property alias gradient: fill.gradient
property alias color: fill.color
property int radius
Rectangle {
id: border
radius: mainItem.radius
anchors.fill: parent
gradient: Gradient {
orientation: Gradient.Horizontal
GradientStop { position: 0.0; color: DefaultStyle.grey_0 }
GradientStop { position: 1.0; color: DefaultStyle.grey_100 }
}
Rectangle {
id: fill
anchors.fill: parent
anchors.margins: mainItem.borderWidth
radius: mainItem.radius
}
}
}

View file

@ -25,6 +25,8 @@ MainRightPanel {
property string title: qsTr("Modifier contact") property string title: qsTr("Modifier contact")
property string saveButtonText: qsTr("Enregistrer") property string saveButtonText: qsTr("Enregistrer")
property string oldPictureUri property string oldPictureUri
property int addressCount: 0
signal closeEdition() signal closeEdition()
Dialog { Dialog {
@ -64,19 +66,21 @@ MainRightPanel {
} }
] ]
content: ColumnLayout { content: ContactLayout {
anchors.fill: parent anchors.fill: parent
spacing : 0 contact: mainItem.contact
ColumnLayout { button.text: mainItem.saveButtonText
spacing: 8 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter button.onClicked: {
Layout.topMargin: 69 * DefaultStyle.dp if (contact.core.givenName.length === 0 || (addressesList.count === 0 && phoneNumberList.count === 0)) {
Avatar { if (contact.core.givenName.length === 0) givenName.errorMessage = qsTr("Veuillez saisir un prénom")
contact: mainItem.contact if (addressesList.count === 0 && phoneNumberList.count === 0) addressesErrorText.text = qsTr("Veuillez saisir une adresse ou un numéro de téléphone")
Layout.preferredWidth: 72 * DefaultStyle.dp return
Layout.preferredHeight: 72 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter
} }
mainItem.contact.core.save()
mainItem.closeEdition()
}
bannerContent: [
IconLabelButton { IconLabelButton {
id: addPictureButton id: addPictureButton
visible: !mainItem.contact || mainItem.contact.core.pictureUri.length === 0 visible: !mainItem.contact || mainItem.contact.core.pictureUri.length === 0
@ -88,7 +92,7 @@ MainRightPanel {
text: qsTr("Ajouter une image") text: qsTr("Ajouter une image")
KeyNavigation.down: editButton.visible ? editButton : givenNameEdit KeyNavigation.down: editButton.visible ? editButton : givenNameEdit
onClicked: fileDialog.open() onClicked: fileDialog.open()
} },
RowLayout { RowLayout {
visible: mainItem.contact && mainItem.contact.core.pictureUri.length != 0 visible: mainItem.contact && mainItem.contact.core.pictureUri.length != 0
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
@ -100,7 +104,7 @@ MainRightPanel {
iconSize: 17 * DefaultStyle.dp iconSize: 17 * DefaultStyle.dp
backgroundColor: "transparent" backgroundColor: "transparent"
text: qsTr("Modifier") text: qsTr("Modifier")
KeyNavigation.down: givenNameEdit KeyNavigation.right: removeButton
onClicked: fileDialog.open() onClicked: fileDialog.open()
} }
FileDialog { FileDialog {
@ -122,35 +126,47 @@ MainRightPanel {
iconSource: AppIcons.trashCan iconSource: AppIcons.trashCan
backgroundColor: "transparent" backgroundColor: "transparent"
text: qsTr("Supprimer") text: qsTr("Supprimer")
KeyNavigation.down: givenNameEdit KeyNavigation.left: editButton
onClicked: mainItem.contact.core.pictureUri = "" onClicked: mainItem.contact.core.pictureUri = ""
} }
} },
} Item{Layout.fillWidth: true}
RowLayout { ]
content: Flickable {
id: editFlicakble
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter // width: parent.width
Layout.topMargin: 63 * DefaultStyle.dp // height: parent.height
Layout.bottomMargin: 78 * DefaultStyle.dp function ensureVisible(r) {
spacing: 100 * DefaultStyle.dp if (contentY >= r.y)
Flickable { contentY = r.y;
Layout.preferredWidth: contentWidth else if (contentY+height <= r.y+r.height+content.spacing)
Layout.fillHeight: true contentY = r.y+r.height-height;
Layout.leftMargin: 100 * DefaultStyle.dp }
contentWidth: content.implicitWidth
contentHeight: content.height
clip: true
ScrollBar.vertical: Control.ScrollBar {
}
ScrollBar.horizontal: Control.ScrollBar {
}
RowLayout {
spacing: 100 * DefaultStyle.dp
// anchors.left: parent.left
// anchors.right: parent.right
ColumnLayout { ColumnLayout {
spacing: 20 * DefaultStyle.dp spacing: 20 * DefaultStyle.dp
anchors.fill: parent Layout.fillWidth: true
Layout.fillHeight: true
FormItemLayout { FormItemLayout {
id: givenName id: givenName
enableErrorText: true enableErrorText: true
label: qsTr("Prénom") label: qsTr("Prénom")
Layout.fillWidth: true
contentItem: TextField { contentItem: TextField {
id: givenNameEdit id: givenNameEdit
Layout.fillWidth: true
initialText: contact.core.givenName initialText: contact.core.givenName
onTextEdited: contact.core.givenName = text onTextEdited: contact.core.givenName = text
backgroundColor: DefaultStyle.grey_0 backgroundColor: DefaultStyle.grey_0
@ -202,44 +218,14 @@ MainRightPanel {
} }
Item{Layout.fillHeight: true} Item{Layout.fillHeight: true}
} }
}
Flickable {
id: addressesFlickable
Layout.preferredWidth: contentWidth
Layout.fillHeight: true
Layout.rightMargin: 76 * DefaultStyle.dp
contentWidth: content.implicitWidth
contentHeight: content.implicitHeight
clip: true
flickableDirection: Flickable.VerticalFlick
function ensureVisible(r)
{
if (contentY >= r.y)
contentY = r.y;
else if (contentY+height <= r.y+r.height+content.spacing)
contentY = r.y+r.height-height;
}
Control.ScrollBar.vertical: Control.ScrollBar{
id: scrollbar
active: true
interactive: true
policy: Control.ScrollBar.AlwaysOff
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.leftMargin: 15 * DefaultStyle.dp
}
Control.ScrollBar.horizontal: Control.ScrollBar{
visible: false
}
ColumnLayout { ColumnLayout {
id: content
anchors.fill: parent
spacing: 20 * DefaultStyle.dp spacing: 20 * DefaultStyle.dp
Layout.fillWidth: true
Layout.fillHeight: true
Repeater { Repeater {
id: addressesList id: addressesList
Layout.fillWidth: true
onCountChanged: mainItem.addressCount = count
model: VariantList { model: VariantList {
model: mainItem.contact && mainItem.contact.core.addresses || [] model: mainItem.contact && mainItem.contact.core.addresses || []
} }
@ -296,7 +282,7 @@ MainRightPanel {
} }
} }
RowLayout { RowLayout {
onYChanged: addressesFlickable.ensureVisible(this) onYChanged: editFlicakble.ensureVisible(this)
spacing: 10 * DefaultStyle.dp spacing: 10 * DefaultStyle.dp
FormItemLayout { FormItemLayout {
label: qsTr("Adresse SIP") label: qsTr("Adresse SIP")
@ -387,7 +373,7 @@ MainRightPanel {
} }
} }
RowLayout { RowLayout {
onYChanged: addressesFlickable.ensureVisible(this) onYChanged: editFlicakble.ensureVisible(this)
spacing: 10 * DefaultStyle.dp spacing: 10 * DefaultStyle.dp
FormItemLayout { FormItemLayout {
id: phoneNumberInput id: phoneNumberInput
@ -432,28 +418,7 @@ MainRightPanel {
} }
} }
Button {
id: saveButton
Layout.bottomMargin: 100 * DefaultStyle.dp
Layout.preferredWidth: 165 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter
enabled: mainItem.contact && mainItem.contact.core.allAddresses.length > 0
text: mainItem.saveButtonText
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
topPadding: 11 * DefaultStyle.dp
bottomPadding: 11 * DefaultStyle.dp
KeyNavigation.up: phoneNumberInputTextField
KeyNavigation.down: givenNameEdit
onClicked: {
if (givenNameEdit.text.length === 0 || (addressesList.count === 0 && phoneNumberList.count === 0)) {
if (givenNameEdit.text.length === 0) givenName.errorMessage = qsTr("Veuillez saisir un prénom")
if (addressesList.count === 0 && phoneNumberList.count === 0) addressesErrorText.text = qsTr("Veuillez saisir une adresse ou un numéro de téléphone")
return
}
mainItem.contact.core.save()
mainItem.closeEdition()
}
}
} }
} }

View file

@ -328,7 +328,7 @@ FocusScope {
] ]
} }
Switch { Switch {
text: qsTr("Send invitation to participants") text: qsTr("Envoyerune invitation aux participants")
checked: mainItem.conferenceInfoGui.core.inviteEnabled checked: mainItem.conferenceInfoGui.core.inviteEnabled
onToggled: mainItem.conferenceInfoGui.core.inviteEnabled = checked onToggled: mainItem.conferenceInfoGui.core.inviteEnabled = checked
} }

View file

@ -645,7 +645,7 @@ AbstractMainPage {
objectName: "contactDetailComp" objectName: "contactDetailComp"
width: parent?.width width: parent?.width
height: parent?.height height: parent?.height
ContactLayout { CallHistoryLayout {
id: contactDetail id: contactDetail
anchors.fill: parent anchors.fill: parent
anchors.topMargin: 45 * DefaultStyle.dp anchors.topMargin: 45 * DefaultStyle.dp

View file

@ -73,83 +73,91 @@ AbstractMainPage {
) )
} }
Popup { Dialog {
id: verifyDevicePopup id: verifyDevicePopup
property string deviceName property string deviceName
property string deviceAddress property string deviceAddress
padding: 30 * DefaultStyle.dp padding: 30 * DefaultStyle.dp
width: 637 * DefaultStyle.dp
anchors.centerIn: parent anchors.centerIn: parent
closePolicy: Control.Popup.CloseOnEscape closePolicy: Control.Popup.CloseOnEscape
modal: true modal: true
onAboutToHide: neverDisplayAgainCheckbox.checked = false onAboutToHide: neverDisplayAgainCheckbox.checked = false
contentItem: ColumnLayout { title: qsTr("Augmenter la confiance")
spacing: 45 * DefaultStyle.dp text: qsTr("Pour augmenter le niveau de confiance vous devez appeler les différents appareils de votre contact et valider un code.<br><br>Vous êtes sur le point dappeler “%1” voulez vous continuer ?").arg(verifyDevicePopup.deviceName)
ColumnLayout { buttons: RowLayout {
spacing: 10 * DefaultStyle.dp RowLayout {
Text { spacing: 7 * DefaultStyle.dp
text: qsTr("Augmenter la confiance") CheckBox{
font { id: neverDisplayAgainCheckbox
pixelSize: 22 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
}
} }
ColumnLayout { Text {
spacing: 24 * DefaultStyle.dp text: qsTr("Ne plus afficher")
Text { font.pixelSize: 14 * DefaultStyle.dp
Layout.preferredWidth: 529 * DefaultStyle.dp MouseArea {
text: qsTr("Pour augmenter le niveau de confiance vous devez appeler les différents appareils de votre contact et valider un code.") anchors.fill: parent
font.pixelSize: 14 * DefaultStyle.dp onClicked: neverDisplayAgainCheckbox.toggle()
}
Text {
Layout.preferredWidth: 529 * DefaultStyle.dp
text: qsTr("Vous êtes sur le point dappeler “%1” voulez vous continuer ?").arg(verifyDevicePopup.deviceName)
font.pixelSize: 14 * DefaultStyle.dp
} }
} }
} }
Item{Layout.fillWidth: true}
RowLayout { RowLayout {
RowLayout { spacing: 15 * DefaultStyle.dp
spacing: 7 * DefaultStyle.dp Button {
CheckBox{ inversedColors: true
id: neverDisplayAgainCheckbox text: qsTr("Annuler")
} leftPadding: 20 * DefaultStyle.dp
Text { rightPadding: 20 * DefaultStyle.dp
text: qsTr("Ne plus afficher") topPadding: 11 * DefaultStyle.dp
font.pixelSize: 14 * DefaultStyle.dp bottomPadding: 11 * DefaultStyle.dp
MouseArea { onClicked: verifyDevicePopup.close()
anchors.fill: parent
onClicked: neverDisplayAgainCheckbox.toggle()
}
}
} }
Item{Layout.fillWidth: true} Button {
RowLayout { text: qsTr("Appeler")
spacing: 15 * DefaultStyle.dp leftPadding: 20 * DefaultStyle.dp
Button { rightPadding: 20 * DefaultStyle.dp
inversedColors: true topPadding: 11 * DefaultStyle.dp
text: qsTr("Annuler") bottomPadding: 11 * DefaultStyle.dp
leftPadding: 20 * DefaultStyle.dp onClicked: {
rightPadding: 20 * DefaultStyle.dp SettingsCpp.setDisplayDeviceCheckConfirmation(!neverDisplayAgainCheckbox.checked)
topPadding: 11 * DefaultStyle.dp UtilsCpp.createCall(verifyDevicePopup.deviceAddress, {}, LinphoneEnums.MediaEncryption.Zrtp)
bottomPadding: 11 * DefaultStyle.dp
onClicked: verifyDevicePopup.close() onClicked: verifyDevicePopup.close()
} }
Button {
text: qsTr("Appeler")
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
topPadding: 11 * DefaultStyle.dp
bottomPadding: 11 * DefaultStyle.dp
onClicked: {
SettingsCpp.setDisplayDeviceCheckConfirmation(!neverDisplayAgainCheckbox.checked)
UtilsCpp.createCall(verifyDevicePopup.deviceAddress, {}, LinphoneEnums.MediaEncryption.Zrtp)
onClicked: verifyDevicePopup.close()
}
}
} }
} }
} }
} }
Dialog {
id: trustInfoDialog
width: 637 * DefaultStyle.dp
title: qsTr("Niveau de confiance")
text: qsTr("Vérifiez les appareils de votre contact pour confirmer que vos communications seront sécurisées et sans compromission. <br>Quand tous seront vérifiés, vous atteindrez le niveau de confiance maximal.")
content: RowLayout {
spacing: 50 * DefaultStyle.dp
Avatar {
_address: "sip:a.c@sip.linphone.org"
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
}
EffectImage {
imageSource: AppIcons.arrowRight
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
}
Avatar {
_address: "sip:a.c@sip.linphone.org"
secured: true
Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp
}
}
buttons: Button {
text: qsTr("Ok")
leftPadding: 30 * DefaultStyle.dp
rightPadding: 30 * DefaultStyle.dp
onClicked: trustInfoDialog.close()
}
}
leftPanelContent: FocusScope { leftPanelContent: FocusScope {
id: leftPanel id: leftPanel
@ -178,6 +186,7 @@ AbstractMainPage {
} }
Button { Button {
id: createContactButton id: createContactButton
visible: !rightPanelStackView.currentItem || rightPanelStackView.currentItem.objectName !== "contactEdition"
background: Item { background: Item {
} }
icon.source: AppIcons.plusCircle icon.source: AppIcons.plusCircle
@ -372,56 +381,193 @@ AbstractMainPage {
width: parent?.width width: parent?.width
height: parent?.height height: parent?.height
property string objectName: "contactDetail" property string objectName: "contactDetail"
Control.StackView.onActivated: mainItem.leftPanelEnabled = true component ContactDetailLayout: ColumnLayout {
Control.StackView.onDeactivated: mainItem.leftPanelEnabled = false id: contactDetailLayout
RowLayout { spacing: 15 * DefaultStyle.dp
visible: mainItem.selectedContact != undefined property string label
anchors.fill: parent property var icon
anchors.topMargin: 45 * DefaultStyle.dp property alias content: contentControl.contentItem
anchors.bottomMargin: 23 * DefaultStyle.dp signal titleIconClicked()
ContactLayout { RowLayout {
Layout.fillWidth: true spacing: 10 * DefaultStyle.dp
Layout.fillHeight: true Text {
Layout.alignment: Qt.AlignLeft | Qt.AlignTop text: contactDetailLayout.label
contact: mainItem.selectedContact color: DefaultStyle.main1_500_main
Layout.preferredWidth: 360 * DefaultStyle.dp font {
buttonContent: Button { pixelSize: 16 * DefaultStyle.dp
width: 24 * DefaultStyle.dp weight: 800 * DefaultStyle.dp
height: 24 * DefaultStyle.dp }
}
Button {
visible: contactDetailLayout.icon != undefined
icon.source: contactDetailLayout.icon
contentImageColor: DefaultStyle.main1_500_main
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
background: Item{}
onClicked: contactDetailLayout.titleIconClicked()
}
Item{Layout.fillWidth: true}
Button {
id: expandButton
background: Item{}
checkable: true
checked: true
icon.source: checked ? AppIcons.upArrow : AppIcons.downArrow
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
icon.width: 24 * DefaultStyle.dp icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp icon.height: 24 * DefaultStyle.dp
background: Item{} contentImageColor: DefaultStyle.main2_600
onClicked: mainItem.editContact(mainItem.selectedContact) KeyNavigation.down: contentControl
icon.source: AppIcons.pencil
visible: !mainItem.selectedContact?.core.readOnly
} }
detailContent: ColumnLayout { }
Layout.fillWidth: false RoundedPane {
Layout.preferredWidth: 360 * DefaultStyle.dp id: contentControl
spacing: 32 * DefaultStyle.dp visible: expandButton.checked
ColumnLayout { Layout.fillWidth: true
spacing: 9 * DefaultStyle.dp leftPadding: 20 * DefaultStyle.dp
Text { rightPadding: 20 * DefaultStyle.dp
Layout.leftMargin: 10 * DefaultStyle.dp topPadding: 17 * DefaultStyle.dp
text: qsTr("Informations") bottomPadding: 17 * DefaultStyle.dp
font { }
pixelSize: 16 * DefaultStyle.dp }
weight: 800 * DefaultStyle.dp ContactLayout {
} id: contactDetail
anchors.fill: parent
contact: mainItem.selectedContact
button.color: DefaultStyle.main1_100
button.text: qsTr("Modifier")
button.icon.source: AppIcons.pencil
button.textColor: DefaultStyle.main1_500_main
button.contentImageColor: DefaultStyle.main1_500_main
button.leftPadding: 16 * DefaultStyle.dp
button.rightPadding: 16 * DefaultStyle.dp
button.topPadding: 10 * DefaultStyle.dp
button.bottomPadding: 10 * DefaultStyle.dp
button.onClicked: mainItem.editContact(mainItem.selectedContact)
property string contactAddress: contact ? contact.core.defaultAddress : ""
property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress)
property string computedContactName: computedContactNameObj ? computedContactNameObj.value : ""
property string contactName: contact
? contact.core.displayName
: computedContactName
component LabelButton: ColumnLayout {
id: labelButton
// property alias image: buttonImg
property alias button: button
property string label
spacing: 8 * DefaultStyle.dp
Button {
id: button
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 56 * DefaultStyle.dp
Layout.preferredHeight: 56 * DefaultStyle.dp
topPadding: 16 * DefaultStyle.dp
bottomPadding: 16 * DefaultStyle.dp
leftPadding: 16 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp
contentImageColor: DefaultStyle.main2_600
background: Rectangle {
anchors.fill: parent
radius: 40 * DefaultStyle.dp
color: DefaultStyle.main2_200
}
}
Text {
Layout.alignment: Qt.AlignHCenter
text: labelButton.label
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
}
}
}
bannerContent: [
ColumnLayout {
spacing: 0
Text {
text: contactDetail.contactName
font {
pixelSize: 29 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
} }
}
RoundedPane { Text {
Layout.preferredHeight: Math.min(226 * DefaultStyle.dp, addrList.contentHeight + topPadding + bottomPadding) visible: contactDetail.contact
height: Math.min(226 * DefaultStyle.dp, addrList.contentHeight) property var mode : contactDetail.contact ? contactDetail.contact.core.consolidatedPresence : -1
horizontalAlignment: Text.AlignLeft
Layout.fillWidth: true
text: mode === LinphoneEnums.ConsolidatedPresence.Online
? qsTr("En ligne")
: mode === LinphoneEnums.ConsolidatedPresence.Busy
? qsTr("Occupé")
: mode === LinphoneEnums.ConsolidatedPresence.DoNotDisturb
? qsTr("Ne pas déranger")
: qsTr("Hors ligne")
color: mode === LinphoneEnums.ConsolidatedPresence.Online
? DefaultStyle.success_500main
: mode === LinphoneEnums.ConsolidatedPresence.Busy
? DefaultStyle.warning_600
: mode === LinphoneEnums.ConsolidatedPresence.DoNotDisturb
? DefaultStyle.danger_500main
: DefaultStyle.main2_500main
font.pixelSize: 14 * DefaultStyle.dp
}
},
Item{Layout.fillWidth: true},
RowLayout {
spacing: 58 * DefaultStyle.dp
LabelButton {
button.icon.source: AppIcons.phone
label: qsTr("Appel")
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.onClicked: mainWindow.startCallWithContact(contactDetail.contact, false, mainItem)
}
LabelButton {
button.icon.source: AppIcons.chatTeardropText
visible: !SettingsCpp.disableChatFeature
label: qsTr("Message")
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.onClicked: console.debug("[ContactLayout.qml] TODO : open conversation")
}
LabelButton {
button.icon.source: AppIcons.videoCamera
label: qsTr("Appel vidéo")
width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp
button.icon.height: 24 * DefaultStyle.dp
button.onClicked: mainWindow.startCallWithContact(contactDetail.contact, true, mainItem)
}
}
]
content: Flickable {
Layout.fillWidth: true
Layout.fillHeight: true
contentWidth: parent.width
ColumnLayout {
spacing: 32 * DefaultStyle.dp
anchors.left: parent.left
anchors.right: parent.right
ColumnLayout {
spacing: 15 * DefaultStyle.dp
Layout.fillWidth: true
ContactDetailLayout {
id: infoLayout
Layout.fillWidth: true Layout.fillWidth: true
topPadding: 12 * DefaultStyle.dp label: qsTr("Informations")
bottomPadding: 12 * DefaultStyle.dp content: ListView {
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
contentItem: ListView {
id: addrList id: addrList
width: 360 * DefaultStyle.dp
height: contentHeight height: contentHeight
implicitHeight: contentHeight
width: parent.width
clip: true clip: true
spacing: 9 * DefaultStyle.dp spacing: 9 * DefaultStyle.dp
model: VariantList { model: VariantList {
@ -491,108 +637,96 @@ AbstractMainPage {
} }
} }
} }
} RoundedPane {
RoundedPane { visible: infoLayout.visible && companyText.text.length != 0 || jobText.text.length != 0
visible: companyText.text.length != 0 || jobText.text.length != 0 Layout.fillWidth: true
Layout.fillWidth: true topPadding: 17 * DefaultStyle.dp
topPadding: 17 * DefaultStyle.dp bottomPadding: 17 * DefaultStyle.dp
bottomPadding: 17 * DefaultStyle.dp leftPadding: 20 * DefaultStyle.dp
leftPadding: 20 * DefaultStyle.dp rightPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
// Layout.fillHeight: true
contentItem: ColumnLayout { contentItem: ColumnLayout {
// height: 100 * DefaultStyle.dp RowLayout {
RowLayout { height: 50 * DefaultStyle.dp
height: 50 * DefaultStyle.dp visible: companyText.text.length != 0
Text { Text {
text: qsTr("Company :") text: qsTr("Company :")
font { font {
pixelSize: 13 * DefaultStyle.dp pixelSize: 13 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp weight: 700 * DefaultStyle.dp
} }
}
Text {
id: companyText
text: mainItem.selectedContact && mainItem.selectedContact.core.organization
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
}
}
}
RowLayout {
height: 50 * DefaultStyle.dp
Text {
text: qsTr("Job :")
font {
pixelSize: 13 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
}
}
Text {
id: jobText
text: mainItem.selectedContact && mainItem.selectedContact.core.job
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
}
}
}
}
ColumnLayout {
visible: false
Text {
text: qsTr("Medias")
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
}
}
Button {
Rectangle {
anchors.fill: parent
color: DefaultStyle.grey_0
radius: 15 * DefaultStyle.dp
}
contentItem: RowLayout {
Image {
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
source: AppIcons.shareNetwork
} }
Text { Text {
text: qsTr("Show media shared") id: companyText
text: mainItem.selectedContact && mainItem.selectedContact.core.organization
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
}
}
}
RowLayout {
height: 50 * DefaultStyle.dp
visible: jobText.text.length != 0
Text {
text: qsTr("Job :")
font {
pixelSize: 13 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
}
}
Text {
id: jobText
text: mainItem.selectedContact && mainItem.selectedContact.core.job
font { font {
pixelSize: 14 * DefaultStyle.dp pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp weight: 400 * DefaultStyle.dp
} }
} }
} }
onClicked: console.debug("TODO : go to shared media")
} }
} }
} }
} ContactDetailLayout {
} visible: !SettingsCpp.disableChatFeature
ColumnLayout { label: qsTr("Medias")
spacing: 10 * DefaultStyle.dp Layout.fillWidth: true
Layout.rightMargin: 90 * DefaultStyle.dp content: Button {
ColumnLayout { background: Rectangle {
RowLayout { anchors.fill: parent
Text { color: DefaultStyle.grey_0
text: qsTr("Confiance") radius: 15 * DefaultStyle.dp
Layout.leftMargin: 10 * DefaultStyle.dp
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
} }
contentItem: RowLayout {
Image {
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
source: AppIcons.shareNetwork
}
Text {
text: qsTr("Show media shared")
font {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
}
}
Item{Layout.fillWidth: true}
EffectImage {
Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp
imageSource: AppIcons.rightArrow
colorizationColor: DefaultStyle.main2_600
}
}
onClicked: console.debug("TODO : go to shared media")
} }
} }
RoundedPane { ContactDetailLayout {
Layout.preferredWidth: 360 * DefaultStyle.dp Layout.fillWidth: true
bottomPadding: 21 * DefaultStyle.dp label: qsTr("Confiance")
contentItem: ColumnLayout { icon: AppIcons.question
onTitleIconClicked: trustInfoDialog.open()
content: ColumnLayout {
spacing: 13 * DefaultStyle.dp spacing: 13 * DefaultStyle.dp
Text { Text {
text: qsTr("Niveau de confiance - Appareils vérifiés") text: qsTr("Niveau de confiance - Appareils vérifiés")
@ -607,7 +741,7 @@ AbstractMainPage {
} }
ProgressBar { ProgressBar {
visible: deviceList.count > 0 visible: deviceList.count > 0
Layout.preferredWidth: 320 * DefaultStyle.dp Layout.fillWidth: true
Layout.preferredHeight: 28 * DefaultStyle.dp Layout.preferredHeight: 28 * DefaultStyle.dp
value: mainItem.selectedContact ? mainItem.selectedContact.core.verifiedDeviceCount / deviceList.count : 0 value: mainItem.selectedContact ? mainItem.selectedContact.core.verifiedDeviceCount / deviceList.count : 0
} }
@ -648,10 +782,10 @@ AbstractMainPage {
textColor: DefaultStyle.main1_500_main textColor: DefaultStyle.main1_500_main
textSize: 13 * DefaultStyle.dp textSize: 13 * DefaultStyle.dp
text: qsTr("Vérifier") text: qsTr("Vérifier")
leftPadding: 12 * DefaultStyle.dp // leftPadding: 12 * DefaultStyle.dp
rightPadding: 12 * DefaultStyle.dp // rightPadding: 12 * DefaultStyle.dp
topPadding: 6 * DefaultStyle.dp // topPadding: 6 * DefaultStyle.dp
bottomPadding: 6 * DefaultStyle.dp // bottomPadding: 6 * DefaultStyle.dp
onClicked: { onClicked: {
if (SettingsCpp.getDisplayDeviceCheckConfirmation()) { if (SettingsCpp.getDisplayDeviceCheckConfirmation()) {
verifyDevicePopup.deviceName = deviceDelegate.deviceName verifyDevicePopup.deviceName = deviceDelegate.deviceName
@ -668,62 +802,40 @@ AbstractMainPage {
} }
} }
} }
} ContactDetailLayout {
ColumnLayout { Layout.fillWidth: true
spacing: 9 * DefaultStyle.dp label: qsTr("Autres actions")
Text { content: ColumnLayout {
Layout.preferredHeight: 22 * DefaultStyle.dp
Layout.leftMargin: 10 * DefaultStyle.dp
text: qsTr("Other actions")
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
}
}
RoundedPane {
Layout.preferredWidth: 360 * DefaultStyle.dp
contentItem: ColumnLayout {
width: parent.width width: parent.width
IconLabelButton { IconLabelButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.pencil iconSource: AppIcons.pencil
text: qsTr("Edit") text: qsTr("Éditer")
onClicked: mainItem.editContact(mainItem.selectedContact) onClicked: mainItem.editContact(mainItem.selectedContact)
visible: !mainItem.selectedContact?.core.readOnly visible: !mainItem.selectedContact?.core.readOnly
} }
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200 color: DefaultStyle.main2_200
} }
IconLabelButton { IconLabelButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp iconSize: 24 * DefaultStyle.dp
iconSource: mainItem.selectedContact && mainItem.selectedContact.core.starred ? AppIcons.heartFill : AppIcons.heart iconSource: mainItem.selectedContact && mainItem.selectedContact.core.starred ? AppIcons.heartFill : AppIcons.heart
text: mainItem.selectedContact && mainItem.selectedContact.core.starred ? qsTr("Remove from favorites") : qsTr("Add to favorites") text: mainItem.selectedContact && mainItem.selectedContact.core.starred ? qsTr("Retirer des favoris") : qsTr("Ajouter aux favoris")
onClicked: if (mainItem.selectedContact) mainItem.selectedContact.core.lSetStarred(!mainItem.selectedContact.core.starred) onClicked: if (mainItem.selectedContact) mainItem.selectedContact.core.lSetStarred(!mainItem.selectedContact.core.starred)
} }
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200 color: DefaultStyle.main2_200
} }
IconLabelButton { IconLabelButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.shareNetwork iconSource: AppIcons.shareNetwork
@ -741,60 +853,52 @@ AbstractMainPage {
} }
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200 color: DefaultStyle.main2_200
} }
IconLabelButton { IconLabelButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.bellSlash iconSource: AppIcons.bellSlash
text: qsTr("Mute") text: qsTr("Mettre en sourdine")
onClicked: console.log("TODO : mute contact") onClicked: console.log("TODO : mute contact")
} }
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200 color: DefaultStyle.main2_200
} }
IconLabelButton { IconLabelButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.empty iconSource: AppIcons.empty
text: qsTr("Block") text: qsTr("Bloquer")
onClicked: console.log("TODO : block contact") onClicked: console.log("TODO : block contact")
} }
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200 color: DefaultStyle.main2_200
} }
IconLabelButton { IconLabelButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.trashCan iconSource: AppIcons.trashCan
color: DefaultStyle.danger_500main color: DefaultStyle.danger_500main
text: qsTr("Delete this contact") text: qsTr("Supprimer ce contact")
visible: !mainItem.selectedContact?.core.readOnly visible: !mainItem.selectedContact?.core.readOnly
onClicked: { onClicked: {
mainItem.deleteContact(contact) mainItem.deleteContact(contact)
} }
} }
} }
}
Item{
Layout.fillHeight: true
} }
} }
} }
@ -805,9 +909,9 @@ AbstractMainPage {
Component { Component {
id: contactEdition id: contactEdition
ContactEdition { ContactEdition {
width: rightPanelStackView.width
height: rightPanelStackView.height
property string objectName: "contactEdition" property string objectName: "contactEdition"
Control.StackView.onActivated: mainItem.leftPanelEnabled = false
Control.StackView.onDeactivated: mainItem.leftPanelEnabled = true
onCloseEdition: { onCloseEdition: {
if (rightPanelStackView.depth <= 1) rightPanelStackView.clear() if (rightPanelStackView.depth <= 1) rightPanelStackView.clear()
else rightPanelStackView.pop(Control.StackView.Immediate) else rightPanelStackView.pop(Control.StackView.Immediate)

View file

@ -62,15 +62,17 @@ ApplicationWindow {
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: 16 * DefaultStyle.dp spacing: 16 * DefaultStyle.dp
RowLayout { RowLayout {
spacing: 0 spacing: 5 * DefaultStyle.dp
width: startCallPopup.width
Text { Text {
text: qsTr("Which channel do you choose?") text: qsTr("Quelle addresse souhaitez-vous appeler ?")
wrapMode: Text.Wrap
Layout.fillWidth: true
font { font {
pixelSize: 16 * DefaultStyle.dp pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp weight: 800 * DefaultStyle.dp
} }
} }
Item{Layout.fillWidth: true}
Button { Button {
Layout.preferredWidth: 24 * DefaultStyle.dp Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp Layout.preferredHeight: 24 * DefaultStyle.dp

View file

@ -57,6 +57,7 @@ QtObject {
property string backspaceFill: "image://internal/backspace-fill.svg" property string backspaceFill: "image://internal/backspace-fill.svg"
property string closeX: "image://internal/x.svg" property string closeX: "image://internal/x.svg"
property string arrowDownLeft: "image://internal/arrow-down-left.svg" property string arrowDownLeft: "image://internal/arrow-down-left.svg"
property string arrowRight: "image://internal/arrow-right.svg"
property string arrowUpRight: "image://internal/arrow-up-right.svg" property string arrowUpRight: "image://internal/arrow-up-right.svg"
property string arrowElbow: "image://internal/arrow-elbow-left.svg" property string arrowElbow: "image://internal/arrow-elbow-left.svg"
property string microphone: "image://internal/microphone.svg" property string microphone: "image://internal/microphone.svg"