new version with hashtags

This commit is contained in:
LubuWest 2020-11-25 21:40:17 +01:00
commit 56bdb80ea0
47 changed files with 1424 additions and 825 deletions

View file

@ -48,6 +48,7 @@ Rectangle {
height:root.height-20*mm// friendsTabView.height-15*mm
border.color: "grey"
color:"white"
radius: 0.5*mm
Image {
id: photoImage
x:mm
@ -71,31 +72,31 @@ Rectangle {
font.pixelSize: 4*mm
anchors.top: photoImage.bottom
}
Rectangle{
id: detailsrectangle
anchors.top: namelabel.bottom
anchors.topMargin: 2*mm
Rectangle{
id: detailsrectangle
anchors.top: namelabel.bottom
anchors.topMargin: 2*mm
ScrollView{
horizontalScrollBarPolicy:Qt.ScrollBarAlwaysOff
ScrollView{
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
//frameVisible: true
id:namelabelflickable
width: root.width-10*mm
height:root.height-50*mm
x: mm
clip:true
Text{
id:namelabeltext
width: namelabelflickable.width
height: implicitHeight
font.pixelSize: 3*mm
textFormat:Text.RichText
wrapMode: Text.Wrap
text:"<b>"+qsTr("Description")+": </b> "+contact.description+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+
id:namelabelflickable
width: root.width-10*mm
height:root.height-50*mm
x: mm
clip:true
Text{
id:namelabeltext
width: namelabelflickable.width
height: implicitHeight
font.pixelSize: 3*mm
textFormat:Text.RichText
wrapMode: Text.Wrap
text:"<b>"+qsTr("Description")+": </b> "+contact.description+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+
"<br> <b>"+qsTr("URL")+":</b> <a href='"+ contact.url+"'>"+contact.url+"</a><br>"+
connectUrl+ "<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())
onLinkActivated: {
Qt.openUrlExternally(link)}
Qt.openUrlExternally(link)}
}
}
@ -147,7 +148,7 @@ Rectangle{
}
Button{
MButton{
id:eventbutton
visible:(contact.network=="dfrn")
height: 6*mm
@ -162,7 +163,7 @@ Rectangle{
}
}
Button{
MButton{
id: closeButton
height: 6*mm
width: 8*mm

View file

@ -44,17 +44,6 @@ Rectangle {
y:1
color: "white"
// function showContactdetails(contact){
// var component = Qt.createComponent("qrc:/qml/contactqml/ContactDetailsComponent.qml");
// if(contact.isFriend){
// friendsTabView.currentIndex=1;
// var contactDetails = component.createObject(friendstab,{"contact": contact})
// }
// else{friendsTabView.currentIndex=2;
// var contactDetails = component.createObject(friendstab,{"contact": contact})
// }
// }
function showContactdetails(contact){
rootstack.currentIndex=0;
bar.currentIndex=0;
@ -85,18 +74,22 @@ Rectangle {
TabButton {
text: qsTr("Me")
font.pixelSize: 2*mm
height: 7*mm
}
TabButton {
text: qsTr("Friends")
font.pixelSize: 2*mm
height: 7*mm
}
TabButton {
text: qsTr("Contacts")
font.pixelSize: 2*mm
height: 7*mm
}
TabButton {
text: qsTr("Groups")
font.pixelSize: 2*mm
height: 7*mm
}
}
StackLayout{
@ -119,23 +112,7 @@ Rectangle {
}
else if (currentIndex==3){groupsSignal(root.login.username)}
}
// style: TabViewStyle {
// frameOverlap: 1
// tab: Rectangle {
// color: "white"
// implicitWidth: root.width/4-2*mm
// implicitHeight: 4*mm
// Text { id: text
// anchors.centerIn: parent
// text: styleData.title
// color: "dark grey"
// font.pixelSize:2.5*mm
// font.bold: styleData.selected
// }
// }
// frame: Rectangle { color: "light grey" }
// tabsAlignment:Qt.AlignHCenter
// }
Item{
id:profileGridTab
@ -170,7 +147,7 @@ Rectangle {
}
Connections{
target:xhr
onDownloaded:{
function onDownloaded(type,url,filename,i){
if(type=="contactlist"){
//print(url+" "+filename+" "+i)
friendsGridTab.currentContact=i+1;
@ -277,6 +254,7 @@ Rectangle {
y:cleanButton.height+2*mm
width:contactsGridTab.width-2*mm
height:contactsGridTab.height-cleanButton.height-2*mm
spacing: 2
clip: true
function processContactSelection(contactobject){showContactdetails(contactobject)}
//add: Transition {
@ -324,8 +302,8 @@ Rectangle {
Connections{
target:xhr
onError:{print(data)}//if (data=="image"){Helperjs.showMessage()}}
onSuccess:{
function onError(data,url,api,code){print(data)}//if (data=="image"){Helperjs.showMessage()}}
function onSuccess(data,api){
Newsjs.requestGroups(root.login,root.db,root,function(){
showGroups(root.login.username)});
}

View file

@ -49,7 +49,8 @@ Item {
id: wrapper
width: 16*mm
height: 15*mm
border.color: "grey"
radius: 0.5*mm
border.color: "grey"
color:"white"
Image {

View file

@ -55,7 +55,7 @@ Rectangle {
var profileobject={};
var profiletext="";
for (var key in pobject){//print(key+obj[key])
if(pobject[key]!=""&&key!="users"&&key!="profile_id"){
if(pobject[key]!=""&&pobject[key]!=null&&key!="users"&&key!="profile_id"){
var keytext="";
switch(key){
case "profile_name":keytext=qsTr("profile name");break;
@ -178,7 +178,7 @@ Rectangle {
MButton{
id:updatebutton
height: 6*mm
width:8*mm
width: 12*mm
visible: "file://"+profile.friendica_owner.profile_image!= photoImage.source
text:qsTr("Update")
font.pixelSize: 3*mm
@ -245,10 +245,6 @@ Rectangle {
}
}
// Rectangle{
// id: detailsrectangle
ScrollView{
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
id:namelabelflickable
@ -262,15 +258,12 @@ Rectangle {
ListView {
id: profileView
header:textcomponent
// width:parent.width
// height: root.height
// clip: true
spacing: 0
model: profileModel
delegate: profileItem
}
}
// }
Component.onCompleted: {
profile.profiles.sort(function(obj1, obj2) {