v0.6.4 contact search

This commit is contained in:
LubuWest 2022-03-01 21:59:21 +01:00
commit 5032c78de1
57 changed files with 2218 additions and 2252 deletions

View file

@ -36,60 +36,60 @@ import "qrc:/qml/genericqml"
Item {
id: contactComponent
height: 4.5*root.fontFactor*osSettings.systemFontSize//8*mm
width: contactComponent.ListView.view.width//parent.width
height: 5*root.fontFactor*osSettings.systemFontSize
width: contactComponent.ListView.view.width
property var createdAtDate: new Date(contact.created_at)
property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend==1)?"":( "<a href='"+contact.url.replace("profile","dfrn_request") +"'>"+qsTr("Connect")+"</a><br>")
Rectangle {
id: wrapper
width:parent.width
height: parent.height//8*mm
height: parent.height
radius: 0.5*mm
border.color: Material.backgroundDimColor// "grey"
color: Material.backgroundColor//"white"
border.color: Material.backgroundDimColor
color: Material.backgroundColor
Image {
id: photoImage
x:0.5*mm
y:0.5*mm
width: 4*root.fontFactor*osSettings.systemFontSize//7*mm
height:4*root.fontFactor*osSettings.systemFontSize//7*mm
width: 4*root.fontFactor*osSettings.systemFontSize
height:4*root.fontFactor*osSettings.systemFontSize
source:((contact.profile_image!="") && (typeof(contact.profile_image)=="string"))? "file://"+contact.profile_image : contact.profile_image_url
onStatusChanged: {if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}}
}
Flow{
width: wrapper.width-4*root.fontFactor*osSettings.systemFontSize//8*mm
width: wrapper.width-4*root.fontFactor*osSettings.systemFontSize
height: wrapper.height-mm
anchors.left: photoImage.right
anchors.margins: 1*mm
//spacing: mm
anchors.margins: 0.5*mm
clip: true
Label {
id: namelabel
width: Math.min(wrapper.width-(photoImage.width+mm),contentWidth)//wrapper.width-4
height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm
width: Math.min(wrapper.width-(photoImage.width+mm),contentWidth)
height: 1.1*root.fontFactor*osSettings.bigFontSize
text: contact.name
elide: contentWidth>wrapper.width-4*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
color: Material.secondaryTextColor//"#303030"
color: Material.secondaryTextColor
font.pointSize: osSettings.bigFontSize
}
Label {
id: screennamelabel
width: Math.min(wrapper.width-4*root.fontFactor*osSettings.systemFontSize,contentWidth)//contentWidth+2*mm//wrapper.width-8*mm
height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm
width: Math.min(wrapper.width-4*root.fontFactor*osSettings.systemFontSize,contentWidth)
height: 1.1*root.fontFactor*osSettings.bigFontSize
text: "(@"+contact.screen_name+")"
elide: contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
color: Material.secondaryTextColor//"#303030"
color: Material.secondaryTextColor
font.pointSize: osSettings.bigFontSize
}
Label {
id: descriptionlabel
width: Math.min(wrapper.width-4*root.fontFactor*osSettings.systemFontSize,contentWidth)//contentWidth+2*mm//wrapper.width-8*mm
height: 2*root.fontFactor*osSettings.systemFontSize//2.5*mm
width: wrapper.width-5*root.fontFactor*osSettings.systemFontSize
height: wrapper.height-mm-1.1*root.fontFactor*osSettings.bigFontSize
maximumLineCount:2
text: Qt.atob(contact.description)!=""?contact.description:""
elide:contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
color: Material.secondaryTextColor//"#303030"
elide:Text.ElideRight
color: Material.secondaryTextColor
font.pointSize: osSettings.systemFontSize
}
}