69 lines
3 KiB
QML
69 lines
3 KiB
QML
import bb.cascades 1.4
|
|
import org.labsquare 1.0
|
|
|
|
Container {
|
|
id: useritem
|
|
|
|
property variant theme : Application.themeSupport.theme.colorTheme.style
|
|
property string lorem: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse non enim tellus. Donec vestibulum enim urna, eget faucibus diam commodo a. Donec eget hendrerit metus. Pellentesque vehicula nisi nec vehicula ullamcorper. Aliquam a elit eget mi fringilla porta fermentum eget eros. Phasellus vestibulum nulla sed elit congue adipiscing. Cras imperdiet urna ac ipsum volutpat lobortis. Maecenas vehicula tortor at viverra convallis. Curabitur nibh massa, tristique id felis ut, venenatis faucibus dui. Donec fringilla, mi nec tincidunt dignissim, neque nunc semper mi, quis rutrum diam turpis sit amet erat. Cras a sodales nisi. Nunc sit amet diam sed lectus molestie cursus convallis et erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Duis vitae varius leo. Mauris eu leo a nunc bibendum rutrum euismod et ipsum. "
|
|
|
|
leftPadding: ui.sdu(3.0)
|
|
rightPadding: ui.sdu(3.0)
|
|
topPadding: ui.sdu(2.0)
|
|
Container {
|
|
layout: DockLayout {
|
|
}
|
|
Container {
|
|
layout: StackLayout {
|
|
orientation: LayoutOrientation.LeftToRight
|
|
}
|
|
Container {
|
|
minWidth: ui.du(12)
|
|
background: (theme === VisualStyle.Bright) ? Color.create("#e9e9e9") : Color.create("#282828")
|
|
WebImageView {
|
|
id: avatar
|
|
url: ListItemData.content.avatar_image.link
|
|
maxWidth: ui.du(12)
|
|
maxHeight: ui.du(12)
|
|
//imageSource: "asset:///icons/laughing_man.png"
|
|
}
|
|
}
|
|
Container {
|
|
preferredWidth: 1440
|
|
leftMargin: ui.sdu(3.0)
|
|
Container {
|
|
Label {
|
|
id: username
|
|
text: ListItemData.username
|
|
textStyle.fontWeight: FontWeight.Bold
|
|
}
|
|
}
|
|
Container {
|
|
Label {
|
|
id: description
|
|
text: ListItemData.content.html
|
|
multiline: true
|
|
textFormat: TextFormat.Html
|
|
}
|
|
}
|
|
}
|
|
Container {
|
|
minWidth: ui.du(24)
|
|
verticalAlignment: VerticalAlignment.Center
|
|
Button {
|
|
text: (ListItemData.you_follow) ? qsTr("Unfollow") : qsTr("Follow")
|
|
onClicked: {
|
|
if (ListItemData.you_follow) {
|
|
useritem.ListItem.view.unfollow(ListItemData)
|
|
} else {
|
|
useritem.ListItem.view.follow(ListItemData)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Divider {
|
|
|
|
}
|
|
}
|