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

View file

@ -91,7 +91,6 @@ Control.Button {
TextMetrics {
id: textMetrics
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
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 button: rightButton
property alias content: detailLayout.data
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 {
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()
spacing: 49 * DefaultStyle.dp
Layout.leftMargin: 64 * DefaultStyle.dp
Layout.rightMargin: 64 * DefaultStyle.dp
Layout.topMargin: 56 * DefaultStyle.dp
Control.Control {
// Layout.preferredWidth: 734 * DefaultStyle.dp
Layout.fillWidth: true
width: 734 * DefaultStyle.dp
height: 100 * DefaultStyle.dp
rightPadding: 21 * DefaultStyle.dp
background: GradientRectangle {
anchors.fill: parent
anchors.leftMargin: avatar.width / 2
radius: 15 * DefaultStyle.dp
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 {
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})
}
Button {
id: rightButton
width: childrenRect.width
height: childrenRect.height
}
}
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.fillHeight: true
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 30 * DefaultStyle.dp
}
}

View file

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

View file

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

View file

@ -2,9 +2,8 @@ import QtQuick
import Linphone
Flickable {
width: contentWidth
width: parent.width
contentWidth: contentItem.childrenRect.width
contentHeight: contentItem.childrenRect.height
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 saveButtonText: qsTr("Enregistrer")
property string oldPictureUri
property int addressCount: 0
signal closeEdition()
Dialog {
@ -64,19 +66,21 @@ MainRightPanel {
}
]
content: ColumnLayout {
content: ContactLayout {
anchors.fill: parent
spacing : 0
ColumnLayout {
spacing: 8 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 69 * DefaultStyle.dp
Avatar {
contact: mainItem.contact
Layout.preferredWidth: 72 * DefaultStyle.dp
Layout.preferredHeight: 72 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter
contact: mainItem.contact
button.text: mainItem.saveButtonText
button.onClicked: {
if (contact.core.givenName.length === 0 || (addressesList.count === 0 && phoneNumberList.count === 0)) {
if (contact.core.givenName.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()
}
bannerContent: [
IconLabelButton {
id: addPictureButton
visible: !mainItem.contact || mainItem.contact.core.pictureUri.length === 0
@ -88,7 +92,7 @@ MainRightPanel {
text: qsTr("Ajouter une image")
KeyNavigation.down: editButton.visible ? editButton : givenNameEdit
onClicked: fileDialog.open()
}
},
RowLayout {
visible: mainItem.contact && mainItem.contact.core.pictureUri.length != 0
Layout.alignment: Qt.AlignHCenter
@ -100,7 +104,7 @@ MainRightPanel {
iconSize: 17 * DefaultStyle.dp
backgroundColor: "transparent"
text: qsTr("Modifier")
KeyNavigation.down: givenNameEdit
KeyNavigation.right: removeButton
onClicked: fileDialog.open()
}
FileDialog {
@ -122,35 +126,47 @@ MainRightPanel {
iconSource: AppIcons.trashCan
backgroundColor: "transparent"
text: qsTr("Supprimer")
KeyNavigation.down: givenNameEdit
KeyNavigation.left: editButton
onClicked: mainItem.contact.core.pictureUri = ""
}
}
}
RowLayout {
},
Item{Layout.fillWidth: true}
]
content: Flickable {
id: editFlicakble
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 63 * DefaultStyle.dp
Layout.bottomMargin: 78 * DefaultStyle.dp
spacing: 100 * DefaultStyle.dp
Flickable {
Layout.preferredWidth: contentWidth
Layout.fillHeight: true
Layout.leftMargin: 100 * DefaultStyle.dp
contentWidth: content.implicitWidth
contentHeight: content.height
clip: true
// width: parent.width
// height: parent.height
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;
}
ScrollBar.vertical: Control.ScrollBar {
}
ScrollBar.horizontal: Control.ScrollBar {
}
RowLayout {
spacing: 100 * DefaultStyle.dp
// anchors.left: parent.left
// anchors.right: parent.right
ColumnLayout {
spacing: 20 * DefaultStyle.dp
anchors.fill: parent
Layout.fillWidth: true
Layout.fillHeight: true
FormItemLayout {
id: givenName
enableErrorText: true
label: qsTr("Prénom")
Layout.fillWidth: true
contentItem: TextField {
id: givenNameEdit
Layout.fillWidth: true
initialText: contact.core.givenName
onTextEdited: contact.core.givenName = text
backgroundColor: DefaultStyle.grey_0
@ -202,44 +218,14 @@ MainRightPanel {
}
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 {
id: content
anchors.fill: parent
spacing: 20 * DefaultStyle.dp
Layout.fillWidth: true
Layout.fillHeight: true
Repeater {
id: addressesList
Layout.fillWidth: true
onCountChanged: mainItem.addressCount = count
model: VariantList {
model: mainItem.contact && mainItem.contact.core.addresses || []
}
@ -296,7 +282,7 @@ MainRightPanel {
}
}
RowLayout {
onYChanged: addressesFlickable.ensureVisible(this)
onYChanged: editFlicakble.ensureVisible(this)
spacing: 10 * DefaultStyle.dp
FormItemLayout {
label: qsTr("Adresse SIP")
@ -387,7 +373,7 @@ MainRightPanel {
}
}
RowLayout {
onYChanged: addressesFlickable.ensureVisible(this)
onYChanged: editFlicakble.ensureVisible(this)
spacing: 10 * DefaultStyle.dp
FormItemLayout {
id: phoneNumberInput
@ -431,29 +417,8 @@ 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 {
text: qsTr("Send invitation to participants")
text: qsTr("Envoyerune invitation aux participants")
checked: mainItem.conferenceInfoGui.core.inviteEnabled
onToggled: mainItem.conferenceInfoGui.core.inviteEnabled = checked
}

View file

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

View file

@ -73,83 +73,91 @@ AbstractMainPage {
)
}
Popup {
Dialog {
id: verifyDevicePopup
property string deviceName
property string deviceAddress
padding: 30 * DefaultStyle.dp
width: 637 * DefaultStyle.dp
anchors.centerIn: parent
closePolicy: Control.Popup.CloseOnEscape
modal: true
onAboutToHide: neverDisplayAgainCheckbox.checked = false
contentItem: ColumnLayout {
spacing: 45 * DefaultStyle.dp
ColumnLayout {
spacing: 10 * DefaultStyle.dp
Text {
text: qsTr("Augmenter la confiance")
font {
pixelSize: 22 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
}
title: qsTr("Augmenter la confiance")
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)
buttons: RowLayout {
RowLayout {
spacing: 7 * DefaultStyle.dp
CheckBox{
id: neverDisplayAgainCheckbox
}
ColumnLayout {
spacing: 24 * DefaultStyle.dp
Text {
Layout.preferredWidth: 529 * DefaultStyle.dp
text: qsTr("Pour augmenter le niveau de confiance vous devez appeler les différents appareils de votre contact et valider un code.")
font.pixelSize: 14 * DefaultStyle.dp
}
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
Text {
text: qsTr("Ne plus afficher")
font.pixelSize: 14 * DefaultStyle.dp
MouseArea {
anchors.fill: parent
onClicked: neverDisplayAgainCheckbox.toggle()
}
}
}
Item{Layout.fillWidth: true}
RowLayout {
RowLayout {
spacing: 7 * DefaultStyle.dp
CheckBox{
id: neverDisplayAgainCheckbox
}
Text {
text: qsTr("Ne plus afficher")
font.pixelSize: 14 * DefaultStyle.dp
MouseArea {
anchors.fill: parent
onClicked: neverDisplayAgainCheckbox.toggle()
}
}
spacing: 15 * DefaultStyle.dp
Button {
inversedColors: true
text: qsTr("Annuler")
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
topPadding: 11 * DefaultStyle.dp
bottomPadding: 11 * DefaultStyle.dp
onClicked: verifyDevicePopup.close()
}
Item{Layout.fillWidth: true}
RowLayout {
spacing: 15 * DefaultStyle.dp
Button {
inversedColors: true
text: qsTr("Annuler")
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
topPadding: 11 * DefaultStyle.dp
bottomPadding: 11 * DefaultStyle.dp
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()
}
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 {
id: leftPanel
@ -178,6 +186,7 @@ AbstractMainPage {
}
Button {
id: createContactButton
visible: !rightPanelStackView.currentItem || rightPanelStackView.currentItem.objectName !== "contactEdition"
background: Item {
}
icon.source: AppIcons.plusCircle
@ -372,56 +381,193 @@ AbstractMainPage {
width: parent?.width
height: parent?.height
property string objectName: "contactDetail"
Control.StackView.onActivated: mainItem.leftPanelEnabled = true
Control.StackView.onDeactivated: mainItem.leftPanelEnabled = false
RowLayout {
visible: mainItem.selectedContact != undefined
anchors.fill: parent
anchors.topMargin: 45 * DefaultStyle.dp
anchors.bottomMargin: 23 * DefaultStyle.dp
ContactLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
contact: mainItem.selectedContact
Layout.preferredWidth: 360 * DefaultStyle.dp
buttonContent: Button {
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
component ContactDetailLayout: ColumnLayout {
id: contactDetailLayout
spacing: 15 * DefaultStyle.dp
property string label
property var icon
property alias content: contentControl.contentItem
signal titleIconClicked()
RowLayout {
spacing: 10 * DefaultStyle.dp
Text {
text: contactDetailLayout.label
color: DefaultStyle.main1_500_main
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * 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.height: 24 * DefaultStyle.dp
background: Item{}
onClicked: mainItem.editContact(mainItem.selectedContact)
icon.source: AppIcons.pencil
visible: !mainItem.selectedContact?.core.readOnly
contentImageColor: DefaultStyle.main2_600
KeyNavigation.down: contentControl
}
detailContent: ColumnLayout {
Layout.fillWidth: false
Layout.preferredWidth: 360 * DefaultStyle.dp
spacing: 32 * DefaultStyle.dp
ColumnLayout {
spacing: 9 * DefaultStyle.dp
Text {
Layout.leftMargin: 10 * DefaultStyle.dp
text: qsTr("Informations")
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
}
}
RoundedPane {
id: contentControl
visible: expandButton.checked
Layout.fillWidth: true
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
topPadding: 17 * DefaultStyle.dp
bottomPadding: 17 * 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 {
Layout.preferredHeight: Math.min(226 * DefaultStyle.dp, addrList.contentHeight + topPadding + bottomPadding)
height: Math.min(226 * DefaultStyle.dp, addrList.contentHeight)
}
Text {
visible: contactDetail.contact
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
topPadding: 12 * DefaultStyle.dp
bottomPadding: 12 * DefaultStyle.dp
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
contentItem: ListView {
label: qsTr("Informations")
content: ListView {
id: addrList
width: 360 * DefaultStyle.dp
height: contentHeight
implicitHeight: contentHeight
width: parent.width
clip: true
spacing: 9 * DefaultStyle.dp
model: VariantList {
@ -491,108 +637,96 @@ AbstractMainPage {
}
}
}
}
RoundedPane {
visible: companyText.text.length != 0 || jobText.text.length != 0
Layout.fillWidth: true
topPadding: 17 * DefaultStyle.dp
bottomPadding: 17 * DefaultStyle.dp
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
// Layout.fillHeight: true
RoundedPane {
visible: infoLayout.visible && companyText.text.length != 0 || jobText.text.length != 0
Layout.fillWidth: true
topPadding: 17 * DefaultStyle.dp
bottomPadding: 17 * DefaultStyle.dp
leftPadding: 20 * DefaultStyle.dp
rightPadding: 20 * DefaultStyle.dp
contentItem: ColumnLayout {
// height: 100 * DefaultStyle.dp
RowLayout {
height: 50 * DefaultStyle.dp
Text {
text: qsTr("Company :")
font {
pixelSize: 13 * 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
contentItem: ColumnLayout {
RowLayout {
height: 50 * DefaultStyle.dp
visible: companyText.text.length != 0
Text {
text: qsTr("Company :")
font {
pixelSize: 13 * DefaultStyle.dp
weight: 700 * DefaultStyle.dp
}
}
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 {
pixelSize: 14 * DefaultStyle.dp
weight: 400 * DefaultStyle.dp
}
}
}
onClicked: console.debug("TODO : go to shared media")
}
}
}
}
}
ColumnLayout {
spacing: 10 * DefaultStyle.dp
Layout.rightMargin: 90 * DefaultStyle.dp
ColumnLayout {
RowLayout {
Text {
text: qsTr("Confiance")
Layout.leftMargin: 10 * DefaultStyle.dp
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
ContactDetailLayout {
visible: !SettingsCpp.disableChatFeature
label: qsTr("Medias")
Layout.fillWidth: true
content: Button {
background: 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: 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 {
Layout.preferredWidth: 360 * DefaultStyle.dp
bottomPadding: 21 * DefaultStyle.dp
contentItem: ColumnLayout {
ContactDetailLayout {
Layout.fillWidth: true
label: qsTr("Confiance")
icon: AppIcons.question
onTitleIconClicked: trustInfoDialog.open()
content: ColumnLayout {
spacing: 13 * DefaultStyle.dp
Text {
text: qsTr("Niveau de confiance - Appareils vérifiés")
@ -607,7 +741,7 @@ AbstractMainPage {
}
ProgressBar {
visible: deviceList.count > 0
Layout.preferredWidth: 320 * DefaultStyle.dp
Layout.fillWidth: true
Layout.preferredHeight: 28 * DefaultStyle.dp
value: mainItem.selectedContact ? mainItem.selectedContact.core.verifiedDeviceCount / deviceList.count : 0
}
@ -648,10 +782,10 @@ AbstractMainPage {
textColor: DefaultStyle.main1_500_main
textSize: 13 * DefaultStyle.dp
text: qsTr("Vérifier")
leftPadding: 12 * DefaultStyle.dp
rightPadding: 12 * DefaultStyle.dp
topPadding: 6 * DefaultStyle.dp
bottomPadding: 6 * DefaultStyle.dp
// leftPadding: 12 * DefaultStyle.dp
// rightPadding: 12 * DefaultStyle.dp
// topPadding: 6 * DefaultStyle.dp
// bottomPadding: 6 * DefaultStyle.dp
onClicked: {
if (SettingsCpp.getDisplayDeviceCheckConfirmation()) {
verifyDevicePopup.deviceName = deviceDelegate.deviceName
@ -668,62 +802,40 @@ AbstractMainPage {
}
}
}
}
ColumnLayout {
spacing: 9 * DefaultStyle.dp
Text {
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 {
ContactDetailLayout {
Layout.fillWidth: true
label: qsTr("Autres actions")
content: ColumnLayout {
width: parent.width
IconLabelButton {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.pencil
text: qsTr("Edit")
text: qsTr("Éditer")
onClicked: mainItem.editContact(mainItem.selectedContact)
visible: !mainItem.selectedContact?.core.readOnly
}
Rectangle {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200
}
IconLabelButton {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp
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)
}
Rectangle {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200
}
IconLabelButton {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.shareNetwork
@ -741,60 +853,52 @@ AbstractMainPage {
}
Rectangle {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200
}
IconLabelButton {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.bellSlash
text: qsTr("Mute")
text: qsTr("Mettre en sourdine")
onClicked: console.log("TODO : mute contact")
}
Rectangle {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200
}
IconLabelButton {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.empty
text: qsTr("Block")
text: qsTr("Bloquer")
onClicked: console.log("TODO : block contact")
}
Rectangle {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 1 * DefaultStyle.dp
color: DefaultStyle.main2_200
}
IconLabelButton {
Layout.fillWidth: true
Layout.leftMargin: 15 * DefaultStyle.dp
Layout.rightMargin: 15 * DefaultStyle.dp
Layout.preferredHeight: 50 * DefaultStyle.dp
iconSize: 24 * DefaultStyle.dp
iconSource: AppIcons.trashCan
color: DefaultStyle.danger_500main
text: qsTr("Delete this contact")
text: qsTr("Supprimer ce contact")
visible: !mainItem.selectedContact?.core.readOnly
onClicked: {
mainItem.deleteContact(contact)
}
}
}
}
Item{
Layout.fillHeight: true
}
}
}
@ -805,9 +909,9 @@ AbstractMainPage {
Component {
id: contactEdition
ContactEdition {
width: rightPanelStackView.width
height: rightPanelStackView.height
property string objectName: "contactEdition"
Control.StackView.onActivated: mainItem.leftPanelEnabled = false
Control.StackView.onDeactivated: mainItem.leftPanelEnabled = true
onCloseEdition: {
if (rightPanelStackView.depth <= 1) rightPanelStackView.clear()
else rightPanelStackView.pop(Control.StackView.Immediate)

View file

@ -62,15 +62,17 @@ ApplicationWindow {
contentItem: ColumnLayout {
spacing: 16 * DefaultStyle.dp
RowLayout {
spacing: 0
spacing: 5 * DefaultStyle.dp
width: startCallPopup.width
Text {
text: qsTr("Which channel do you choose?")
text: qsTr("Quelle addresse souhaitez-vous appeler ?")
wrapMode: Text.Wrap
Layout.fillWidth: true
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
}
}
Item{Layout.fillWidth: true}
Button {
Layout.preferredWidth: 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 closeX: "image://internal/x.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 arrowElbow: "image://internal/arrow-elbow-left.svg"
property string microphone: "image://internal/microphone.svg"