new version with hashtags
This commit is contained in:
parent
d81ad52031
commit
56bdb80ea0
47 changed files with 1424 additions and 825 deletions
|
@ -41,6 +41,7 @@ Item {
|
|||
id: placeHolder
|
||||
color: 'lightblue'; antialiasing: true
|
||||
anchors.fill:parent
|
||||
radius: 0.5*mm
|
||||
}
|
||||
Text {
|
||||
id:daytext
|
||||
|
|
|
@ -106,7 +106,7 @@ Rectangle {
|
|||
Connections{
|
||||
target: updatenews
|
||||
|
||||
onSuccess:{
|
||||
function onSuccess(api){
|
||||
calBusy.running=false;
|
||||
showEvents("")
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ Rectangle{
|
|||
height:parent.height-12*mm
|
||||
x:mm
|
||||
y:mm
|
||||
radius: 0.5*mm
|
||||
property var daylist:[]
|
||||
property int dayint: 0
|
||||
MButton{
|
||||
|
@ -88,6 +89,7 @@ Rectangle{
|
|||
height:eventNameText.height+eventDetailsText.height+mm
|
||||
border.color: "light grey"
|
||||
border.width: 1
|
||||
radius: 0.5*mm
|
||||
Image {
|
||||
id:profileImage
|
||||
source: ((event.eventOwner.profile_image!="") && (typeof(event.eventOwner.profile_image)=="string"))? "file://"+event.eventOwner.profile_image : event.eventOwner.profile_image_url
|
||||
|
|
|
@ -45,6 +45,8 @@ Page{
|
|||
height: root.height
|
||||
property var users:[]
|
||||
property var userdata: ({})
|
||||
property string imagestoredir: ""
|
||||
|
||||
|
||||
function setServericon(server){
|
||||
try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){
|
||||
|
@ -57,7 +59,8 @@ Page{
|
|||
id:userButton
|
||||
height: 8*mm
|
||||
text:qsTr("User")
|
||||
font.pixelSize: 3*mm
|
||||
//font.pixelSize: 3*mm
|
||||
font.pointSize: 16
|
||||
x: mm
|
||||
y: mm
|
||||
width: root.width/2
|
||||
|
@ -75,6 +78,7 @@ Page{
|
|||
username.text= obj.username;
|
||||
password.text=Qt.atob(obj.password);
|
||||
imagestore.text=obj.imagestore;
|
||||
imagestoredir=obj.imagestore;
|
||||
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
|
||||
},'username','"+ accountPage.users[i].username+"')}}"
|
||||
}
|
||||
|
@ -85,43 +89,32 @@ Page{
|
|||
|
||||
Text {
|
||||
text: qsTr("Server")
|
||||
font.pixelSize:3*mm
|
||||
//font.pixelSize:3*mm
|
||||
font.pointSize: 16
|
||||
x: 4*mm; y: 10*mm
|
||||
}
|
||||
Text {
|
||||
text: qsTr("Nickname")
|
||||
font.pixelSize:3*mm
|
||||
//font.pixelSize:3*mm
|
||||
font.pointSize: 16
|
||||
x: 4*mm; y: 20*mm
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Password")
|
||||
font.pixelSize:3*mm
|
||||
//font.pixelSize:3*mm
|
||||
font.pointSize: 16
|
||||
x: 4*mm; y: 30*mm
|
||||
}
|
||||
Text {
|
||||
id: imagedirlabel
|
||||
visible: imagestore.text!=""
|
||||
text: qsTr("Image dir.")
|
||||
font.pixelSize:3*mm
|
||||
//font.pixelSize:3*mm
|
||||
font.pointSize: 16
|
||||
x: 4*mm; y: 40*mm
|
||||
}
|
||||
|
||||
// Text {
|
||||
// text: qsTr("Max. News")
|
||||
// font.pixelSize:3*mm
|
||||
// x: 4*mm; y: 50*mm
|
||||
// }
|
||||
// Text {
|
||||
// text: qsTr("News as")
|
||||
// font.pixelSize:3*mm
|
||||
// x: 4*mm; y: 50*mm
|
||||
// }
|
||||
|
||||
|
||||
// Text {
|
||||
// text: qsTr("Show Website")
|
||||
// x: 4*mm; y:80*mm; width: 20*mm
|
||||
// }
|
||||
|
||||
Image{
|
||||
id:servericon
|
||||
x:4*mm;y:13.5*mm
|
||||
|
@ -141,6 +134,7 @@ Page{
|
|||
id:serverSearchButton
|
||||
text:"\uf002"
|
||||
font.pixelSize: 3*mm
|
||||
font.pointSize: 16
|
||||
x:4*mm
|
||||
y:13.5*mm
|
||||
width: 5*mm; height:5*mm
|
||||
|
@ -160,7 +154,8 @@ Page{
|
|||
width: servernameFlickable.width
|
||||
height: servernameFlickable.height
|
||||
focus: true
|
||||
font.pixelSize:3*mm
|
||||
//font.pixelSize:3*mm
|
||||
font.pointSize: 16
|
||||
text:"https://"
|
||||
onEditingFinished:{
|
||||
if((servername.text).substring(0,11) =="https://http"){
|
||||
|
@ -178,12 +173,15 @@ Page{
|
|||
TextInput {
|
||||
id: username
|
||||
anchors.fill: parent
|
||||
font.pixelSize:3*mm
|
||||
//font.pixelSize:3*mm
|
||||
font.pointSize: 16
|
||||
selectByMouse: true
|
||||
onEditingFinished:{
|
||||
if (username.text.indexOf('@')>-1){
|
||||
Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),accountPage)
|
||||
}
|
||||
imagestoredir=filesystem.homePath+"/"+username.text+"/"
|
||||
//if (imagestore.text==filesystem.homePath+"/.friendiqa/"){imagestore.text=filesystem.homePath+"/.friendiqa/"+username.text+"/"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -202,25 +200,29 @@ Page{
|
|||
TextInput {
|
||||
id: password
|
||||
anchors.fill: parent
|
||||
font.pixelSize:3*mm
|
||||
//font.pixelSize:3*mm
|
||||
font.pointSize: 16
|
||||
selectByMouse: true
|
||||
echoMode: TextInput.PasswordEchoOnEdit
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle{color: "light grey"; x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;}
|
||||
Rectangle{color: "light grey"; x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;visible:imagestore.text!=""}
|
||||
Flickable {
|
||||
id: imagestoreFlickable
|
||||
visible:imagestore.text!="" //filesystem.homePath+"/"+username.text+"/""
|
||||
x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;
|
||||
clip: true
|
||||
TextInput {
|
||||
id: imagestore
|
||||
width: imagestoreFlickable.width
|
||||
height: imagestoreFlickable.height
|
||||
font.pixelSize:3*mm
|
||||
text: (osSettings.osType=="Android") && (filesystem.fileexist("/storage/emulated/0/Pictures/"))?"/storage/emulated/0/Pictures/":""
|
||||
//font.pixelSize:3*mm
|
||||
font.pointSize: 16
|
||||
text: "" //filesystem.homePath+"/.friendiqa/"+username.text+"/" //(osSettings.osType=="Android") && (filesystem.fileexist("/storage/emulated/0/Pictures/"))?"/storage/emulated/0/Pictures/":""
|
||||
wrapMode: TextEdit.NoWrap
|
||||
onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
|
||||
onTextChanged: imagestoredir=imagestore.text
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,81 +240,39 @@ Page{
|
|||
|
||||
Button {
|
||||
x: root.width-9*mm; y: 43.5*mm; width: 5*mm; height: 5*mm;
|
||||
visible:imagestore.text!=""
|
||||
text: "..."
|
||||
font.pixelSize: 3*mm
|
||||
onClicked:
|
||||
{imagestoreDialog.open()}
|
||||
//font.pixelSize: 3*mm
|
||||
font.pointSize: 16
|
||||
onClicked:{imagestoreDialog.open()}
|
||||
}
|
||||
|
||||
|
||||
// Slider{ id: maxNews
|
||||
// x:19*mm; y: 53.5*mm;width: root.width/2;height:5*mm
|
||||
// from: 0;to:2000; stepSize: 100
|
||||
// }
|
||||
|
||||
|
||||
// Rectangle{color: "light grey"; x: 4*mm; y: 53.5*mm; width: 9*mm; height: 5*mm;
|
||||
// TextEdit{id:maxNewsText;
|
||||
// anchors.fill: parent
|
||||
// font.pixelSize:3*mm
|
||||
// verticalAlignment:TextEdit.AlignRight
|
||||
// text:maxNews.value
|
||||
// focus: true
|
||||
// selectByMouse: true
|
||||
// }
|
||||
// }
|
||||
|
||||
// Rectangle{
|
||||
// x: 4*mm; y: 53.5*mm; width: newsTypeField.contentWidth+2*mm; height: 5*mm;
|
||||
// color:"light grey"
|
||||
// Text{
|
||||
// id: newsTypeField
|
||||
// anchors.fill: parent
|
||||
// font.pixelSize:3*mm
|
||||
// text:"Conversations"
|
||||
// }
|
||||
// MouseArea{
|
||||
// anchors.fill:parent
|
||||
// onClicked:newstypemenu.popup()
|
||||
// }
|
||||
// }
|
||||
|
||||
BusyIndicator{
|
||||
id: accountBusy
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 63.5*mm
|
||||
y: 53.5*mm
|
||||
width:10*mm
|
||||
height: 10*mm
|
||||
running: false
|
||||
}
|
||||
// CheckBox{
|
||||
// id:showwebsiteCheckbox
|
||||
// x:35*mm;y:80*mm
|
||||
// onClicked:{
|
||||
// if (checked==true){
|
||||
// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
|
||||
// root.globaloptions.showWebsiteForLinks="true"
|
||||
// }
|
||||
// else {
|
||||
// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
|
||||
// root.globaloptions.showWebsiteForLinks="false"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
Button {
|
||||
x: 4*mm; y: 63.5*mm
|
||||
x: 4*mm; y: 53.5*mm
|
||||
height: 8*mm
|
||||
text: qsTr("Confirm")
|
||||
font.pixelSize: 3*mm
|
||||
//font.pixelSize: 3*mm
|
||||
font.pointSize: 16
|
||||
onClicked:{
|
||||
accountBusy.running=true;
|
||||
var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestore.text, maxnews:"",interval: ""};
|
||||
var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""};
|
||||
var errormessage="";
|
||||
if (servername.text==""){errormessage=qsTr("No server given! ")}
|
||||
else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
|
||||
else if (password.text=="") {errormessage+=qsTr("No password given! ")}
|
||||
else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")}
|
||||
else if (imagestoredir=="") {errormessage+=qsTr("No image directory given!")}
|
||||
//else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")}
|
||||
|
||||
//else if (maxNewsText.text=="") {errormessage+=qsTr("No maximum news number given!")}
|
||||
else {errormessage=""}
|
||||
if (errormessage=="") {
|
||||
|
@ -324,7 +284,12 @@ Page{
|
|||
}
|
||||
else{
|
||||
if (users.length==0){Service.setDefaultOptions(db);}
|
||||
filesystem.Directory=userconfig.imagestore;
|
||||
print("imagestore" + userconfig.imagestore + " path "+ filesystem.homePath+"/"+username.text)
|
||||
if(userconfig.imagestore == filesystem.homePath+"/"+username.text+"/")
|
||||
{//filesystem.Directory=filesystem.homePath;
|
||||
filesystem.makePath(filesystem.homePath+"/"+username.text);
|
||||
}
|
||||
filesystem.Directory=imagestoredir //userconfig.imagestore;
|
||||
filesystem.makeDir("contacts");
|
||||
filesystem.makeDir("albums");
|
||||
Service.storeConfig(db,userconfig);
|
||||
|
@ -356,7 +321,8 @@ Page{
|
|||
x: parent.width/2+2*mm; y: mm; width: 5*mm; height: 8*mm;
|
||||
visible: users.length>0
|
||||
text: "-"
|
||||
font.pixelSize: 3*mm
|
||||
//font.pixelSize: 3*mm
|
||||
font.pointSize: 16
|
||||
onClicked:{
|
||||
var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
|
||||
Service.deleteConfig(db,userconfig,function(){
|
||||
|
@ -386,17 +352,15 @@ Page{
|
|||
x: parent.width/2+8*mm; y: mm; width: 5*mm; height: 8*mm;
|
||||
visible: users.length>0
|
||||
text: "+"
|
||||
font.pixelSize: 3*mm
|
||||
//font.pixelSize: 3*mm
|
||||
font.pointSize: 16
|
||||
onClicked:{
|
||||
servername.text="https://"
|
||||
servericon.visible=false;
|
||||
servericon.source="";
|
||||
username.text=""
|
||||
password.text=""
|
||||
imagestore.text=""
|
||||
//maxNews.value=0
|
||||
//newsTypeField.text="Conversations"
|
||||
//messageIntervalSlider.value=30
|
||||
imagestore.text="" //filesystem.homePath+"/.friendiqa/"+username.text//""
|
||||
userButton.text=qsTr("User")
|
||||
}
|
||||
}
|
||||
|
@ -404,7 +368,8 @@ Page{
|
|||
Button {
|
||||
x: parent.width/2+14*mm; y: mm; width: 5*mm; height: 8*mm;
|
||||
text: "?"
|
||||
font.pixelSize: 3*mm
|
||||
//font.pixelSize: 3*mm
|
||||
font.pointSize: 16
|
||||
onClicked:{
|
||||
root.push("qrc:/qml/configqml/InfoBox.qml");
|
||||
}
|
||||
|
@ -419,22 +384,11 @@ Page{
|
|||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
text: "\uf057"
|
||||
font.pixelSize: 3*mm
|
||||
//font.pixelSize: 3*mm
|
||||
font.pointSize: 16
|
||||
onClicked:{root.pop()}
|
||||
}
|
||||
// Menu {
|
||||
// id:newstypemenu
|
||||
// MenuItem {
|
||||
// font.pixelSize: 3*mm
|
||||
// text: qsTr("Timeline")
|
||||
// onTriggered: {newsTypeField.text="Timeline"}
|
||||
// }
|
||||
// MenuItem {
|
||||
// font.pixelSize: 3*mm
|
||||
// text: qsTr("Conversations")
|
||||
// onTriggered: {newsTypeField.text="Conversations"}
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
try{Helperjs.readData(db,"config","",function(storedUsers){
|
||||
|
@ -449,19 +403,11 @@ Page{
|
|||
username.text= obj.username;
|
||||
password.text=Qt.atob(obj.password);
|
||||
imagestore.text=obj.imagestore;
|
||||
//maxNews.value=obj.maxnews;
|
||||
//newsTypeField.text=obj.newsViewType;
|
||||
//messageIntervalSlider.value=obj.timerInterval;
|
||||
imagestoredir=obj.imagestore;
|
||||
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
|
||||
},"isActive",0)
|
||||
})}
|
||||
catch (e){//print("onCompleted" +users.count +e)
|
||||
// Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",accountPage,function(html){
|
||||
// print(html);
|
||||
// var bpos=html.indexOf("base ");
|
||||
// var baseurl=html.substring(html.indexOf("http",bpos),html.indexOf('"',html.indexOf("http",bpos)));
|
||||
// servername.text=baseurl
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ Rectangle{
|
|||
textFormat: Text.RichText
|
||||
width: root.width-mm
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
text: "<b>Friendiqa v0.5.3 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
|
||||
text: "<b>Friendiqa v0.5.4 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
|
||||
"Website <a href='https://friendiqa.ma-nic.de'>https://friendiqa.ma-nic.de</a><br>"+
|
||||
"Sourcecode: <a href='https://git.friendi.ca/LubuWest/Friendiqa'>https://git.friendi.ca/LubuWest/Friendiqa</a><br>"+
|
||||
"Privacy Policy: <a href='https://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md'>http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md</a><br>"+
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)});
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -93,7 +93,7 @@ StackView{
|
|||
|
||||
Connections{
|
||||
target:xhr
|
||||
onDownloaded:{
|
||||
function onDownloaded(type,url,filename,i){
|
||||
if(type=="contactlist"){
|
||||
var database=LocalStorage.openDatabaseSync(root.db[0],root.db[1],root.db[2],root.db[3]);
|
||||
var result;
|
||||
|
@ -123,10 +123,13 @@ StackView{
|
|||
|
||||
else if (newstab.conversation.length>0){newstab.conversation=[]}
|
||||
else if (root.depth>1){root.pop()}
|
||||
else{Service.cleanNews(root.db,function(){
|
||||
Service.cleanContacts(root.login,root.db,function(){
|
||||
Qt.quit()})
|
||||
})}
|
||||
else{
|
||||
Service.cleanNews(root.db,function(){
|
||||
Service.cleanHashtags(root.db,function(){
|
||||
Service.cleanContacts(root.login,root.db,function(){
|
||||
Qt.quit()})
|
||||
})})
|
||||
}
|
||||
}
|
||||
else if (rootstack.currentIndex==2){fotoSignal("backButton")}
|
||||
else {rootstack.currentIndex=0}
|
||||
|
@ -144,7 +147,8 @@ StackView{
|
|||
width:parent.width-mm
|
||||
Label{
|
||||
text: login.hasOwnProperty("username")?login.username:""
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
height: 6*mm
|
||||
}
|
||||
|
@ -156,7 +160,8 @@ StackView{
|
|||
|
||||
Label{
|
||||
text: "\uf021 " + qsTr("Refresh")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -173,7 +178,8 @@ StackView{
|
|||
|
||||
Label{
|
||||
text: "\uf1da " + qsTr("Timeline")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -187,7 +193,8 @@ StackView{
|
|||
Label{
|
||||
text: "\uf086 " + qsTr("Conversations")
|
||||
width: parent.width
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked:{
|
||||
|
@ -199,7 +206,8 @@ StackView{
|
|||
|
||||
Label{
|
||||
text: "\uf005 " + qsTr("Favorites")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -211,7 +219,8 @@ StackView{
|
|||
}
|
||||
Label{
|
||||
text: "\uf0ec " + qsTr("Replies")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -225,7 +234,8 @@ StackView{
|
|||
|
||||
Label{
|
||||
text: "\uf0ac " + qsTr("Public Timeline")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -238,7 +248,8 @@ StackView{
|
|||
|
||||
Label{
|
||||
text: "\uf0c0 " + qsTr("Group news")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -251,7 +262,8 @@ StackView{
|
|||
|
||||
Label{
|
||||
text: "\uf002 " + qsTr("Search")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -264,7 +276,8 @@ StackView{
|
|||
|
||||
Label{
|
||||
text: "\uf085 "+ qsTr("Settings")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -275,7 +288,8 @@ StackView{
|
|||
}
|
||||
Label{
|
||||
text: "\uf2bb " + qsTr("Accounts")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -287,15 +301,17 @@ StackView{
|
|||
|
||||
Label{
|
||||
text: "\uf08b " +qsTr("Quit")
|
||||
font.pixelSize: 4*mm
|
||||
//font.pixelSize: 4*mm
|
||||
font.pointSize: 16
|
||||
width: parent.width
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked:{
|
||||
Service.cleanNews(root.db,function(){
|
||||
Service.cleanContacts(root.login,root.db,function(){
|
||||
Qt.quit()})
|
||||
})
|
||||
Service.cleanHashtags(root.db,function(){
|
||||
Service.cleanContacts(root.login,root.db,function(){
|
||||
Qt.quit()})
|
||||
})})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ Item {
|
|||
id: wrapper
|
||||
width:parent.width
|
||||
height: 8*mm
|
||||
radius: 0.5*mm
|
||||
border.color: "grey"
|
||||
color:"white"
|
||||
Image {
|
||||
|
|
|
@ -39,13 +39,7 @@ import "qrc:/qml/genericqml"
|
|||
|
||||
Rectangle {
|
||||
id:searchComponent
|
||||
//onActiveFocusChanged: searchText.forceActiveFocus()
|
||||
//onVisibleChanged: if (visible) searchText.forceActiveFocus()
|
||||
// border.color: "#EEEEEE"
|
||||
// border.width: 1
|
||||
color:"lightgrey"
|
||||
// width:conversationView.width
|
||||
// height:Math.max(replyText.contentHeight+2*mm,6*mm)
|
||||
|
||||
Rectangle{
|
||||
color: "white"
|
||||
radius:0.5*mm
|
||||
|
@ -69,19 +63,7 @@ Rectangle {
|
|||
|
||||
}
|
||||
Component.onCompleted: searchText.forceActiveFocus()
|
||||
// BlueButton {
|
||||
// id: sendButton
|
||||
// text: "\uf002"
|
||||
// anchors.left: parent.right
|
||||
// anchors.leftMargin:mm
|
||||
// anchors.top:parent.top
|
||||
// //anchors.topMargin: 0.5*mm
|
||||
// color:"white"
|
||||
// onClicked: {
|
||||
// var body=searchText.getText(0,searchText.length);
|
||||
// search(body)
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ Rectangle {
|
|||
}//Component end
|
||||
Connections{
|
||||
target:newstab
|
||||
onContactpostsChanged:{
|
||||
function onContactpostsChanged(){
|
||||
if (newstab.contactposts.length>0){profileimagesource=newstab.contactposts[0].user.profile_image_url_large}
|
||||
contactBusy.running=false;
|
||||
contactModel.clear();
|
||||
|
|
|
@ -38,15 +38,9 @@ import "qrc:/qml/newsqml"
|
|||
|
||||
Rectangle {
|
||||
id:conversationList
|
||||
// width:root.width-5*mm
|
||||
// height:root.height-12*mm
|
||||
property var news:[]
|
||||
// y:1
|
||||
// z:2
|
||||
color: "white"
|
||||
// border.color: "grey"
|
||||
// width:root.width-5*mm
|
||||
// height: conversationView.height+10*mm
|
||||
|
||||
|
||||
ListView {
|
||||
id: conversationView
|
||||
|
@ -54,11 +48,10 @@ Rectangle {
|
|||
x:3*mm
|
||||
y:8*mm
|
||||
width: conversationList.width-4*mm
|
||||
//height: contentHeight
|
||||
height:conversationList.height-10*mm
|
||||
clip: true
|
||||
spacing: 0
|
||||
footer: MessageSend{conversation:true}//footerReply
|
||||
footer: MessageSend{conversation:true}
|
||||
model: conversationModel
|
||||
delegate: Newsitem{}
|
||||
}
|
||||
|
@ -75,89 +68,17 @@ Rectangle {
|
|||
Connections{
|
||||
target:newstab
|
||||
onConversationChanged:{
|
||||
//if(newsitem.itemindex==newsStack.conversationIndex){
|
||||
if(newstab.conversation.length==0){
|
||||
newsStack.pop()
|
||||
//newsView.positionViewAtIndex(newsStack.conversationIndex,ListView.Beginning);
|
||||
//conversationList.destroy(); conversationsymbol.color="grey"
|
||||
} else { conversationBusy.running=false;
|
||||
conversationModel.clear();
|
||||
var currentTime= new Date();
|
||||
var msg = {'currentTime': currentTime, 'model': conversationModel,'news':newstab.conversation, 'method':'conversation', 'options':globaloptions};
|
||||
conversationWorker.sendMessage(msg)
|
||||
//conversationsymbol.color="grey"
|
||||
}
|
||||
//}
|
||||
if(newstab.conversation.length==0){
|
||||
newsStack.pop()
|
||||
} else { conversationBusy.running=false;
|
||||
conversationModel.clear();
|
||||
var currentTime= new Date();
|
||||
var msg = {'currentTime': currentTime, 'model': conversationModel,'news':newstab.conversation, 'method':'conversation', 'options':globaloptions};
|
||||
conversationWorker.sendMessage(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Component { id:footerReply
|
||||
// Rectangle{
|
||||
// border.color: "#EEEEEE"
|
||||
// border.width: 1
|
||||
// color:"lightgrey"
|
||||
// width:conversationView.width
|
||||
// height:Math.max(replyText.contentHeight+2*mm,6*mm)
|
||||
// Rectangle{
|
||||
// color: "white"
|
||||
// radius:0.5*mm
|
||||
// anchors.left: parent.left
|
||||
// anchors.leftMargin:mm
|
||||
// anchors.top:parent.top
|
||||
// anchors.topMargin: 0.5*mm
|
||||
// width:parent.width-12*mm
|
||||
// height:Math.max( replyText.contentHeight,5*mm)
|
||||
|
||||
// TextInput {
|
||||
// id: replyText
|
||||
// font.pixelSize: 3*mm
|
||||
// wrapMode: Text.Wrap
|
||||
// anchors.fill: parent
|
||||
// selectByMouse: true
|
||||
// onHeightChanged: conversationView.contentY+=4.5*mm
|
||||
// }
|
||||
// }
|
||||
|
||||
// Button {
|
||||
// id: sendButton
|
||||
// height: 8*mm
|
||||
// width:8*mm
|
||||
// text: "\uf1d9"
|
||||
// anchors.right: parent.right
|
||||
// anchors.rightMargin:mm
|
||||
// anchors.top:parent.top
|
||||
// anchors.topMargin: 0.5*mm
|
||||
// //color:"white"
|
||||
// onClicked: { try{
|
||||
// var body=replyText.getText(0,replyText.length);
|
||||
// newsBusy.running=true;
|
||||
// replyText.text=""
|
||||
// xhr.clearParams();
|
||||
// xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||
// if (conversationModel.get(0).newsitemobject.messagetype==0){
|
||||
|
||||
// //xhr.url= login.server + "/api/statuses/update.json";
|
||||
// xhr.setUrl(login.server);
|
||||
// xhr.setApi("/api/statuses/update");
|
||||
// xhr.setParam("source", "Friendiqa");
|
||||
// xhr.setParam("status", body);
|
||||
// xhr.setParam("in_reply_to_status_id", conversationModel.get(conversationModel.count-1).newsitemobject.id)}
|
||||
// else {//xhr.url= login.server + "/api/direct_messages/new.json";
|
||||
// xhr.setUrl(login.server);
|
||||
// xhr.setApi("/api/direct_messages/new");
|
||||
// xhr.setParam("text", body);
|
||||
// xhr.setParam("screen_name",conversationModel.get(conversationModel.count-1).newsitemobject.screen_name);
|
||||
// xhr.setParam("replyto", conversationModel.get(conversationModel.count-1).newsitemobject.id)
|
||||
// }
|
||||
// xhr.post();
|
||||
// } catch(e){Helperjs.showMessage("Error",e.toString(),root)}
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
ListModel{id: conversationModel}
|
||||
|
||||
WorkerScript {
|
||||
|
@ -176,11 +97,7 @@ Rectangle {
|
|||
text: "\uf057"
|
||||
onClicked: {
|
||||
//newsView.positionViewAtIndex(newsStack.conversationIndex,ListView.Beginning);
|
||||
|
||||
newstab.conversation=[];
|
||||
//newsStack.pop()
|
||||
//conversationList.destroy();
|
||||
//conversationsymbol.color="grey"
|
||||
newstab.conversation=[];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,13 +61,6 @@ Rectangle{
|
|||
property var group_allow:login.hasOwnProperty("permissions")?login.permissions[2]:[]
|
||||
property var group_deny:login.hasOwnProperty("permissions")?login.permissions[3]:[]
|
||||
|
||||
// onReply_to_userChanged: {
|
||||
// if (reply_to_user!=""){
|
||||
// print("reply "+reply_to_user)
|
||||
// //receiverLabel.visible=true
|
||||
// receiverLabel.text=reply_to_user
|
||||
// }
|
||||
// }
|
||||
|
||||
function directmessagePrepare(friend){
|
||||
messageSend.state="active";
|
||||
|
@ -98,9 +91,6 @@ Rectangle{
|
|||
|
||||
function attachImage(url){
|
||||
imageAttachment.source=url.toString();
|
||||
// var imageAttachmentObject=Qt.createQmlObject('import QtQuick 2.0; Image {id:imageAttachment'+attachImageURLs.length+'; source:"'+
|
||||
// url.toString()+'"; x:2*mm; width: 45*mm; height: 45*mm;fillMode: Image.PreserveAspectFit;MouseArea{anchors.fill:parent;onClicked:{attachImageURLs.splice(attachImageURLs.indexOf("'+
|
||||
// url+'"),1); imageAttachment'+attachImageURLs.length+'.destroy()}}}',messageColumn,"attachedImage");
|
||||
}
|
||||
|
||||
function statusUpdate(title,status,in_reply_to_status_id,attachImageURL) {
|
||||
|
@ -125,6 +115,7 @@ Rectangle{
|
|||
}
|
||||
};
|
||||
xhr.post();
|
||||
Newsjs.storeHashtags(login,db,status,root)
|
||||
}
|
||||
|
||||
function dmUpdate(title,text,replyto,screen_name,attachImageURL) {
|
||||
|
@ -166,6 +157,16 @@ Rectangle{
|
|||
contactSelector.visible=true
|
||||
},letter);
|
||||
}
|
||||
|
||||
function hashtagmenu(){//print("letter "+letter)
|
||||
Newsjs.listHashtags(login,db,function(tags){
|
||||
tagModel.clear();
|
||||
for (var i=0;i<tags.length;i++){
|
||||
tagModel.append({"tag":tags[i]})
|
||||
}
|
||||
tagSelector.visible=true
|
||||
});
|
||||
}
|
||||
// Flickable{
|
||||
// anchors.fill: parent
|
||||
// contentHeight: messageColumn.height
|
||||
|
@ -177,46 +178,16 @@ Rectangle{
|
|||
spacing: 0.5*mm
|
||||
width: parent.width
|
||||
height: 10*mm//implicitHeight
|
||||
|
||||
// Row{
|
||||
// x: 0.5*mm
|
||||
// Label{
|
||||
// id:toLabel
|
||||
// width: 7*mm
|
||||
// height: 6*mm
|
||||
// topPadding: 1.5* mm
|
||||
// font.pixelSize: 3*mm
|
||||
// text: newsSwipeview.stacktype=="DirectMessages"?qsTr("to:"):""
|
||||
// visible:false// ((parentId !== "") || (newsStack.parent.stacktype=="DirectMessages"))
|
||||
// }
|
||||
TextArea{
|
||||
id:receiverLabel
|
||||
//x: 8*mm
|
||||
width: messageColumn.width//-8*mm
|
||||
font.pixelSize: 3*mm
|
||||
placeholderText:qsTr("to:")
|
||||
text: ""//newsSwipeview.stacktype=="DirectMessages"?qsTr("to:")+ " "+ reply_to_user:""
|
||||
visible:false// ((parentId !== "") || (newsStack.parent.stacktype=="DirectMessages"))
|
||||
//onLengthChanged: contactmenu(text)
|
||||
//onPreeditTextChanged: contactmenu(text)
|
||||
// onActiveFocusChanged:{
|
||||
// if (activeFocus==true){contactmenu("")}
|
||||
// }
|
||||
onTextChanged: {
|
||||
//print (text)
|
||||
contactmenu(text)}
|
||||
// MouseArea{
|
||||
// anchors.fill: parent
|
||||
// onClicked:{print("receiverlabel")
|
||||
// if(newsSwipeview.stacktype=="DirectMessages"){
|
||||
// contactmenu();
|
||||
|
||||
// }}
|
||||
// }
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
TextArea{
|
||||
id:receiverLabel
|
||||
width: messageColumn.width//-8*mm
|
||||
font.pixelSize: 3*mm
|
||||
placeholderText:qsTr("to:")
|
||||
text: ""
|
||||
visible:false
|
||||
onTextChanged: {
|
||||
if (text!=""){contactmenu(text)} else {var receiver=getText(0,cursorPosition);contactmenu(receiver+preeditText)}}
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: titleField
|
||||
|
@ -309,6 +280,24 @@ Rectangle{
|
|||
}
|
||||
ListModel{id:contactModel}
|
||||
|
||||
ListView{
|
||||
id: tagSelector
|
||||
visible: false
|
||||
z:3
|
||||
x:8*mm
|
||||
width: parent.width-9*mm
|
||||
height: messageSend.height/2
|
||||
model:tagModel
|
||||
clip: true
|
||||
spacing: 0
|
||||
function processTagSelection(hashtag){
|
||||
bodyField.insert(bodyField.cursorPosition, hashtag+" ");
|
||||
bodyField.cursorPosition=bodyField.cursorPosition+hashtag.length+1
|
||||
tagSelector.visible=false
|
||||
}
|
||||
delegate: MButton {text:tag;onClicked: tagSelector.processTagSelection(tag)}
|
||||
}
|
||||
ListModel{id:tagModel}
|
||||
|
||||
Item{
|
||||
id:imageAttachment;
|
||||
|
@ -351,54 +340,6 @@ Rectangle{
|
|||
}
|
||||
}
|
||||
|
||||
// Row{
|
||||
// spacing: 2
|
||||
// width: parent.width
|
||||
// CheckBox{
|
||||
// id:dmCheckbox
|
||||
// text:"DM"
|
||||
// enabled: false
|
||||
// checked: (directmessage==1)?true:false
|
||||
// onClicked:{
|
||||
// if(dmCheckbox.checkedState==Qt.Checked){directmessage=1}
|
||||
// else if(dmCheckbox.checkedState==Qt.Unchecked){directmessage=0}
|
||||
// }
|
||||
// }
|
||||
|
||||
// Button{
|
||||
// text:"\uf0c1"
|
||||
// height:8*mm
|
||||
// onClicked: {
|
||||
// if(bodyField.selectedText==""){Helperjs.showMessage("Error","No text selected",messageSend)}
|
||||
// else{urlTextEdit.text="";
|
||||
// urlRectangle.visible=true}}
|
||||
// }
|
||||
// }
|
||||
// Rectangle{
|
||||
// id:urlRectangle
|
||||
// height: 7*mm //parent.height
|
||||
// width:parent.width-2*mm
|
||||
// visible:false
|
||||
// TextField{
|
||||
// id:urlTextEdit
|
||||
// width:parent.width-7*mm
|
||||
// height:parent.height
|
||||
// }
|
||||
// Button{
|
||||
// anchors.left:urlTextEdit.right
|
||||
// anchors.leftMargin:mm
|
||||
// height:8*mm
|
||||
// text:"\u2713"
|
||||
// onClicked: {if(urlTextEdit.text!=""){
|
||||
// var start = bodyField.selectionStart;
|
||||
// var text=bodyField.selectedText
|
||||
// if(text.lastIndexOf(".jpg")>-1 || text.lastIndexOf(".jpeg")>-1 || text.lastIndexOf(".png")>-1){text="<img src="+text+">"}
|
||||
// text = "[url="+urlTextEdit.text+"]" + text + "[/url]";
|
||||
// bodyField.remove(start,bodyField.selectionEnd);
|
||||
// bodyField.insert(start,text);}
|
||||
// urlRectangle.visible=false}
|
||||
// }
|
||||
// }
|
||||
Row{
|
||||
id:buttonRow
|
||||
visible:false //(bodyField.length>1)||(attachImageURLs.length>0)
|
||||
|
@ -440,6 +381,14 @@ Rectangle{
|
|||
onClicked: {if (smileyDialog.visible==false){smileyDialog.visible=true} else{smileyDialog.visible=false}}
|
||||
}
|
||||
|
||||
MButton{
|
||||
id:hastagButton
|
||||
text: "\uf292"
|
||||
height: 6*mm
|
||||
width: 7*mm
|
||||
onClicked: {if (tagSelector.visible==false){hashtagmenu()} else{tagSelector.visible=false}}
|
||||
}
|
||||
|
||||
MButton {
|
||||
id: cancelButton
|
||||
height: 6*mm
|
||||
|
@ -483,8 +432,6 @@ Rectangle{
|
|||
SmileyDialog{id:smileyDialog;x:mm;visible: false}
|
||||
}
|
||||
Component.onCompleted:{
|
||||
//parentId=conversationModel.get(conversationModel.count-1).newsitemobject.id
|
||||
//if(attachImageURLs.length>0){attachImage(attachImageURLs[0])}
|
||||
newsStack.replySignal.connect(setParent);
|
||||
root.directmessageSignal.connect(directmessagePrepare);
|
||||
root.uploadSignal.connect(sendUrls);
|
||||
|
@ -492,48 +439,34 @@ Rectangle{
|
|||
if (textfocus==true){bodyField.forceActiveFocus()}
|
||||
}
|
||||
|
||||
states: [ State {
|
||||
name: "active"
|
||||
PropertyChanges {
|
||||
target: messageColumn; height: implicitHeight
|
||||
}
|
||||
PropertyChanges {
|
||||
target: buttonRow; visible:true
|
||||
}
|
||||
PropertyChanges {
|
||||
target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages")//true
|
||||
}
|
||||
PropertyChanges {
|
||||
target: receiverLabel; visible:(newsSwipeview.stacktype=="DirectMessages");
|
||||
}
|
||||
// PropertyChanges {
|
||||
// target: toLabel; visible:(newsSwipeview.stacktype=="DirectMessages");
|
||||
// }
|
||||
},
|
||||
State {
|
||||
name: "conversation"
|
||||
PropertyChanges {
|
||||
target: messageColumn; height: implicitHeight
|
||||
}
|
||||
PropertyChanges {
|
||||
target: buttonRow; visible:true
|
||||
}
|
||||
PropertyChanges {
|
||||
target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages")
|
||||
}
|
||||
|
||||
// PropertyChanges {
|
||||
// target: receiverLabel; visible:true; text:qsTr("to")+": "+ conversationModel.get(0).newsitemobject.user.name
|
||||
// }
|
||||
|
||||
// PropertyChanges {
|
||||
// target: messageSend; reply_to_user: conversationModel.get(0).newsitemobject.user.screen_name
|
||||
// }
|
||||
|
||||
// PropertyChanges {
|
||||
// target: messageSend; parentId: conversationModel.get(0).newsitemobject.status_id
|
||||
// }
|
||||
},
|
||||
states: [
|
||||
State {
|
||||
name: "active"
|
||||
PropertyChanges {
|
||||
target: messageColumn; height: implicitHeight
|
||||
}
|
||||
PropertyChanges {
|
||||
target: buttonRow; visible:true
|
||||
}
|
||||
PropertyChanges {
|
||||
target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages")//true
|
||||
}
|
||||
PropertyChanges {
|
||||
target: receiverLabel; visible:(newsSwipeview.stacktype=="DirectMessages");
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "conversation"
|
||||
PropertyChanges {
|
||||
target: messageColumn; height: implicitHeight
|
||||
}
|
||||
PropertyChanges {
|
||||
target: buttonRow; visible:true
|
||||
}
|
||||
PropertyChanges {
|
||||
target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages")
|
||||
}
|
||||
},
|
||||
|
||||
State {
|
||||
name: "reply"
|
||||
|
@ -552,4 +485,3 @@ Rectangle{
|
|||
}
|
||||
]
|
||||
}
|
||||
//}
|
||||
|
|
|
@ -172,11 +172,6 @@ StackView{
|
|||
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions};
|
||||
newsWorker.sendMessage(msg);
|
||||
},lastnews_id)}
|
||||
// else if(newstab.newstabstatus=="Contact"){
|
||||
// Newsjs.newsfromdb(root.db,root.login, function(news){
|
||||
// var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true};
|
||||
// newsWorker.sendMessage(msg);
|
||||
// },newsModel.get(newsModel.count-1).newsitemobject.uid,lastnews_id)}
|
||||
else if (newstab.newstabstatus=="Notifications"){}
|
||||
else{
|
||||
//newsStack.appendNews=true;
|
||||
|
@ -186,11 +181,11 @@ StackView{
|
|||
}
|
||||
Connections{
|
||||
target:xhr
|
||||
onError:{
|
||||
function onError(data,url,api,code){
|
||||
if (data !="contactlist"){Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);}
|
||||
newsBusy.running=false;
|
||||
}
|
||||
onSuccess:{
|
||||
function onSuccess(data,api){
|
||||
// downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
|
||||
Service.processNews(api,data)
|
||||
replySignal("")
|
||||
|
@ -198,7 +193,7 @@ StackView{
|
|||
}
|
||||
|
||||
Timer {id:replytimer; interval: 1000; running: false; repeat: false
|
||||
onTriggered: {
|
||||
onTriggered: {"replytimer triggered";
|
||||
newsBusy.running=true;
|
||||
if(newstab.newstabstatus=="Conversation"){
|
||||
showConversation(newsStack.timelineIndex-1,newsModel.get(0).newsitemobject)}
|
||||
|
@ -360,6 +355,7 @@ StackView{
|
|||
anchors.topMargin: 2*mm
|
||||
width:10*mm
|
||||
height: 10*mm
|
||||
running: false
|
||||
}
|
||||
Rectangle{
|
||||
id:downloadNotice
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//import QtMultimedia 5.8
|
||||
import QtQuick 2.9
|
||||
//import QtQuick.Controls 2.4
|
||||
//import QtQuick.Controls.Styles 1.4
|
||||
|
||||
Rectangle{
|
||||
color:"black"
|
||||
|
@ -48,28 +45,15 @@ Rectangle{
|
|||
font.pixelSize: parent.height/2
|
||||
x: (parent.width-contentWidth)/2
|
||||
y:parent.height/5
|
||||
//visible: video.playbackState!=MediaPlayer.PlayingState
|
||||
}
|
||||
|
||||
MouseArea {anchors.fill:parent;
|
||||
onClicked:{
|
||||
if(attachment.mimetype=="video/youtube"){
|
||||
root.push("qrc:/qml/newsqml/NewsYplayer.qml",{"ytcode":attachment.url,"mimetype":attachment.mimetype});
|
||||
// var component = Qt.createComponent("qrc:/qml/newsqml/NewsYplayer.qml");
|
||||
// var videoQml = component.createObject(root,{"ytcode":attachment.url,"mimetype":attachment.mimetype});
|
||||
} else {
|
||||
root.push("qrc:/qml/newsqml/NewsVideoLarge.qml",{"source": attachment.url,"mimetype": attachment.mimetype});
|
||||
// var component = Qt.createComponent("qrc:/qml/newsqml/NewsVideoLarge.qml");
|
||||
// var videoQml = component.createObject(root,{"source": attachment.url,"mimetype": attachment.mimetype});
|
||||
}
|
||||
}
|
||||
}
|
||||
// Slider{ id: videoSlider
|
||||
// width: parent.width
|
||||
// height: 3*mm
|
||||
// anchors.top: video.bottom
|
||||
// visible:video.playbackState!=MediaPlayer.StoppedState && video.seekable
|
||||
// value: video.position/video.duration
|
||||
// onPressed:video.seek(value*video.duration)
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
import QtMultimedia 5.8
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.12
|
||||
//import QtQuick.Controls.Styles 1.4
|
||||
|
||||
Rectangle{
|
||||
id:newsvideofullscreen
|
||||
|
@ -65,7 +64,6 @@ Rectangle{
|
|||
anchors.fill:parent;
|
||||
onClicked:{
|
||||
root.pop()
|
||||
//newsvideofullscreen.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,11 +93,6 @@ Rectangle{
|
|||
anchors.bottom: video.bottom
|
||||
visible:video.playbackState!=MediaPlayer.StoppedState
|
||||
value: video.bufferProgress
|
||||
// style:ProgressBarStyle{
|
||||
// progress: Rectangle{
|
||||
// color:"light grey"
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// Slider{ id: videoSlider
|
||||
// width: parent.width
|
||||
|
|
|
@ -69,10 +69,7 @@ Rectangle{
|
|||
opacity = 0
|
||||
}
|
||||
onTitleChanged: {
|
||||
if (title==2){
|
||||
root.pop();
|
||||
//newsYplayer.destroy(
|
||||
}
|
||||
if (title==2){root.pop()}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import "qrc:/qml/genericqml"
|
|||
|
||||
Item {
|
||||
id: newsitem
|
||||
width: parent.width
|
||||
width: newsView.width //parent.width
|
||||
height:toprow.height+friendicaActivities.height+controlrow.height+conversationColumn.height+1//Math.max((itemMessage.height+topFlow.height+friendicaActivities.height+4*mm),profileImage.height+user_name.height+mm)
|
||||
property int itemindex: index
|
||||
property var newsitemobject:model.newsitemobject
|
||||
|
@ -54,9 +54,7 @@ Item {
|
|||
var imagedialog = component.createObject(friendicaActivities,{"activitymembers": contacts});
|
||||
}
|
||||
|
||||
function findTags(fulltext){
|
||||
return fulltext.match(/\s+[#]+[A-Za-z0-9-_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+/g)
|
||||
}
|
||||
|
||||
|
||||
function pushConversation(){
|
||||
if (model.newsitemobject.hasOwnProperty("currentconversation")){
|
||||
|
@ -73,17 +71,10 @@ Item {
|
|||
height:newsitem.height-1
|
||||
color: "white"//(newsitemobject.messagetype==1)?"#ffe6e6" : "white"
|
||||
|
||||
// Row{id:toprow
|
||||
// Column {
|
||||
// id: authorcolumn
|
||||
// width: 8*mm
|
||||
|
||||
|
||||
// }
|
||||
Column {
|
||||
id:toprow //newscolumn
|
||||
width: newsitemobject.hasOwnProperty("indent")?newsitem.width-(newsitem.width/20 *newsitemobject.indent):newsitem.width//-8*mm
|
||||
x:newsitemobject.hasOwnProperty("indent")?newsitem.width/20*newsitemobject.indent:0
|
||||
width: newsitemobject.hasOwnProperty("indent")?newsitem.width-(newsitem.width/20 *(newsitemobject.indent+1)):newsitem.width//-8*mm
|
||||
x:newsitemobject.hasOwnProperty("indent")?newsitem.width/20*(newsitemobject.indent):0
|
||||
Item{
|
||||
height: Math.max(profileImage.height+mm,topFlow.implicitHeight+mm)
|
||||
width: parent.width
|
||||
|
@ -100,7 +91,6 @@ Item {
|
|||
width: 7*mm
|
||||
height: 7*mm
|
||||
//radius:mm
|
||||
|
||||
onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
|
||||
}
|
||||
Flow{
|
||||
|
@ -140,140 +130,117 @@ Item {
|
|||
horizontalAlignment: Label.AlignRight
|
||||
text: try {qsTr("In reply to ")+newsitemobject.reply_user.screen_name
|
||||
}catch(e){" "}
|
||||
}
|
||||
|
||||
// Label {
|
||||
// id:newscountLabel
|
||||
// visible:((newstabstatus=="Conversations")&&(newsitemobject.newscount>1))?true:false
|
||||
// color: "grey"
|
||||
// height:3.5*mm
|
||||
// font.pixelSize: 1.5*mm
|
||||
// font.bold: true
|
||||
// horizontalAlignment: Label.AlignRight
|
||||
// text: try {(newsitemobject.newscount-1)+qsTr(" comments") }catch(e){" "}
|
||||
// MouseArea{
|
||||
// anchors.fill:parent
|
||||
// onClicked: {
|
||||
// pushConversation();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Column{ id: messageColumn
|
||||
// //anchors.top:topFlow.bottom
|
||||
// width:parent.width
|
||||
// spacing:mm
|
||||
// clip:true
|
||||
// height: newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height)
|
||||
MouseArea{
|
||||
width: toprow.width-2
|
||||
height: itemMessage.height
|
||||
onPressAndHold: {
|
||||
pushConversation();
|
||||
}
|
||||
Text {
|
||||
color: "#404040"
|
||||
linkColor: "light green"
|
||||
id: itemMessage
|
||||
textFormat: Text.RichText
|
||||
font.family: "Noto Sans"
|
||||
text: newsitemobject.statusnet_html//newsitemobject.attachmentList.length>0?newsitemobject.text : newsitemobject.statusnet_html
|
||||
MouseArea{
|
||||
width: toprow.width-2
|
||||
height:newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height)
|
||||
//height: implicitHeight
|
||||
wrapMode: Text.Wrap
|
||||
clip:true
|
||||
onLinkActivated:{
|
||||
Qt.openUrlExternally(link)}
|
||||
Component.onCompleted:{
|
||||
if (newsitemobject.messagetype==0){
|
||||
var hashtags=[];
|
||||
hashtags=findTags(newsitemobject.text);
|
||||
var component = Qt.createComponent("qrc:/qml/newsqml/Hashtag.qml");
|
||||
for (var tags in hashtags){
|
||||
var hashtagQml = component.createObject(friendicaActivities,{"text":hashtags[tags].trim()});
|
||||
}}
|
||||
height: itemMessage.height
|
||||
onPressAndHold: {
|
||||
pushConversation();
|
||||
}
|
||||
Text {
|
||||
color: "#404040"
|
||||
linkColor: "light green"
|
||||
id: itemMessage
|
||||
textFormat: Text.RichText
|
||||
font.family: "Noto Sans"
|
||||
text: newsitemobject.statusnet_html//newsitemobject.attachmentList.length>0?newsitemobject.text : newsitemobject.statusnet_html
|
||||
width: toprow.width-2
|
||||
height:newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height)
|
||||
//height: implicitHeight
|
||||
wrapMode: Text.Wrap
|
||||
clip:true
|
||||
onLinkActivated:{
|
||||
Qt.openUrlExternally(link)}
|
||||
Component.onCompleted:{
|
||||
if (newsitemobject.messagetype==0){
|
||||
var hashtags=[];
|
||||
hashtags=Newsjs.findTags(newsitemobject.text);
|
||||
var component = Qt.createComponent("qrc:/qml/newsqml/Hashtag.qml");
|
||||
for (var tags in hashtags){
|
||||
var hashtagQml = component.createObject(friendicaActivities,{"text":hashtags[tags].trim()});
|
||||
}}
|
||||
|
||||
if (newsitemobject.attachmentList.length>0){
|
||||
for(var attachments in newsitemobject.attachmentList){// (newsitemobject.attachmentList[attachments].url);
|
||||
if(newsitemobject.attachmentList[attachments].mimetype.substring(0,5)=="image"){
|
||||
var component = Qt.createComponent("qrc:/qml/newsqml/NewsImage.qml");
|
||||
var imageQml = component.createObject(toprow,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype});
|
||||
}
|
||||
else if(newsitemobject.attachmentList[attachments].mimetype=="text/html"){
|
||||
var component = Qt.createComponent("qrc:/qml/newsqml/NewsLink.qml");
|
||||
var linkQml = component.createObject(toprow,{"url":newsitemobject.attachmentList[attachments].url});
|
||||
}
|
||||
else {
|
||||
var component = Qt.createComponent("qrc:/qml/newsqml/NewsVideo.qml");
|
||||
//var videoQml = component.createObject(messageColumn,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype});
|
||||
var videoQml = component.createObject(toprow,{"attachment":newsitemobject.attachmentList[attachments]});
|
||||
if (newsitemobject.attachmentList.length>0){
|
||||
for(var attachments in newsitemobject.attachmentList){// (newsitemobject.attachmentList[attachments].url);
|
||||
if(newsitemobject.attachmentList[attachments].mimetype.substring(0,5)=="image"){
|
||||
var component = Qt.createComponent("qrc:/qml/newsqml/NewsImage.qml");
|
||||
var imageQml = component.createObject(toprow,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype});
|
||||
}
|
||||
else if(newsitemobject.attachmentList[attachments].mimetype=="text/html"){
|
||||
var component = Qt.createComponent("qrc:/qml/newsqml/NewsLink.qml");
|
||||
var linkQml = component.createObject(toprow,{"url":newsitemobject.attachmentList[attachments].url});
|
||||
}
|
||||
else {
|
||||
var component = Qt.createComponent("qrc:/qml/newsqml/NewsVideo.qml");
|
||||
//var videoQml = component.createObject(messageColumn,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype});
|
||||
var videoQml = component.createObject(toprow,{"attachment":newsitemobject.attachmentList[attachments]});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (newsitemobject.hasOwnProperty("lastcomment")){
|
||||
var moreComponent = Qt.createComponent("qrc:/qml/newsqml/MoreComments.qml");
|
||||
var conversationQml = moreComponent.createObject(conversationColumn,{"comments":newsitemobject.newscount-1});
|
||||
if (newsitemobject.hasOwnProperty("lastcomment")){
|
||||
var moreComponent = Qt.createComponent("qrc:/qml/newsqml/MoreComments.qml");
|
||||
var conversationQml = moreComponent.createObject(conversationColumn,{"comments":newsitemobject.newscount-1});
|
||||
|
||||
var commentComponent = Qt.createComponent("qrc:/qml/newsqml/Newsitem.qml");
|
||||
var conversationQml = commentComponent.createObject(conversationColumn,{"newsitemobject":newsitemobject.lastcomment});
|
||||
var commentComponent = Qt.createComponent("qrc:/qml/newsqml/Newsitem.qml");
|
||||
var conversationQml = commentComponent.createObject(conversationColumn,{"newsitemobject":newsitemobject.lastcomment});
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
//}
|
||||
BlueButton{
|
||||
width: newsitem.width-8*mm-2
|
||||
height:5*mm
|
||||
//anchors.bottom: messageColumn.bottom//itemMessage.bottom
|
||||
visible: itemMessage.implicitHeight>3/4*root.height || newsitemobject.nsfw//messageColumn.implicitHeight>3/4*root.height || newsitemobject.nsfw//itemMessage.implicitHeight>3/4*root.height
|
||||
text:"\uf078"
|
||||
fontColor:"grey"
|
||||
border.color: "transparent"
|
||||
color:"white"
|
||||
BlueButton{
|
||||
width: newsitem.width-8*mm-2
|
||||
height:5*mm
|
||||
//anchors.bottom: messageColumn.bottom//itemMessage.bottom
|
||||
visible: itemMessage.implicitHeight>3/4*root.height || newsitemobject.nsfw//messageColumn.implicitHeight>3/4*root.height || newsitemobject.nsfw//itemMessage.implicitHeight>3/4*root.height
|
||||
text:"\uf078"
|
||||
fontColor:"grey"
|
||||
border.color: "transparent"
|
||||
color:"white"
|
||||
// gradient: Gradient {
|
||||
// GradientStop { position: 0.0; color: "transparent" }
|
||||
// GradientStop { position: 0.5; color: "white" }
|
||||
// }
|
||||
radius:0
|
||||
onClicked: {
|
||||
if (text=="\uf078"){
|
||||
itemMessage.height=itemMessage.implicitHeight+10*mm;text="\uf077"
|
||||
} else {
|
||||
itemMessage.height=Math.min(itemMessage.implicitHeight,3/4*root.height);
|
||||
text="\uf078";
|
||||
newsView.positionViewAtIndex(index,ListView.Beginning);
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
radius:0
|
||||
onClicked: {
|
||||
if (text=="\uf078"){
|
||||
itemMessage.height=itemMessage.implicitHeight+10*mm;text="\uf077"
|
||||
} else {
|
||||
itemMessage.height=Math.min(itemMessage.implicitHeight,3/4*root.height);
|
||||
text="\uf078";
|
||||
newsView.positionViewAtIndex(index,ListView.Beginning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Flow{
|
||||
id:friendicaActivities
|
||||
anchors.top:toprow.bottom
|
||||
width:parent.width
|
||||
spacing:mm
|
||||
|
||||
Label{color: "grey"
|
||||
height:3.5*mm
|
||||
font.pixelSize: 1.5*mm
|
||||
text: friendica_activities_view.likeText
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
|
||||
}
|
||||
}
|
||||
Label{color: "grey"
|
||||
height:3.5*mm
|
||||
font.pixelSize: 1.5*mm
|
||||
text: friendica_activities_view.dislikeText
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
|
||||
}
|
||||
}
|
||||
// Bottom row for activities
|
||||
Flow{
|
||||
id:friendicaActivities
|
||||
anchors.top:toprow.bottom
|
||||
width:parent.width
|
||||
spacing:mm
|
||||
|
||||
Label{color: "grey"
|
||||
height:3.5*mm
|
||||
font.pixelSize: 1.5*mm
|
||||
text: friendica_activities_view.likeText
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
|
||||
}
|
||||
}
|
||||
Label{color: "grey"
|
||||
height:3.5*mm
|
||||
font.pixelSize: 1.5*mm
|
||||
text: friendica_activities_view.dislikeText
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
|
||||
}
|
||||
}
|
||||
Label{color: "grey"
|
||||
height:3.5*mm
|
||||
font.pixelSize: 1.5*mm
|
||||
|
@ -309,6 +276,8 @@ Item {
|
|||
text: (newsitemobject.friendica_activities_view.self.attending)?(qsTr("Attending: ")+ qsTr(newsitemobject.friendica_activities_view.self.attending)):""
|
||||
}
|
||||
}
|
||||
|
||||
//Bottom row for buttons
|
||||
Row{id:controlrow
|
||||
anchors.top:friendicaActivities.bottom
|
||||
height: 4*mm
|
||||
|
@ -385,9 +354,9 @@ Item {
|
|||
}
|
||||
checked:(newsitemobject.favorited>0)
|
||||
onClicked:{
|
||||
if(favoritedCheckbox.checkedState==Qt.Checked){
|
||||
if(favoritedCheckbox.checkState==Qt.Checked){
|
||||
Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1}
|
||||
else if(favoritedCheckbox.checkedState==Qt.Unchecked){
|
||||
else if(favoritedCheckbox.checkState==Qt.Unchecked){
|
||||
Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0}
|
||||
}
|
||||
}
|
||||
|
@ -408,29 +377,6 @@ Item {
|
|||
anchors.fill:parent
|
||||
onClicked: {newsmenu.popup()}}
|
||||
}
|
||||
// Rectangle{
|
||||
// width: 10*mm
|
||||
// height: 4*mm
|
||||
// visible:(newsitemobject.messagetype!==2)&&(newstab.newstabstatus!="Conversation")
|
||||
// color:"transparent"
|
||||
// Text{
|
||||
// id:conversationsymbol
|
||||
// color: "grey"
|
||||
// anchors.centerIn: parent
|
||||
// font.pixelSize: 2.5*mm
|
||||
// font.family: fontAwesome.name
|
||||
// text: "\uf086"
|
||||
// }
|
||||
// MouseArea{
|
||||
// anchors.fill:parent
|
||||
// onClicked:{
|
||||
// if (newsitemobject.hasOwnProperty("currentconversation")){newsStack.push("qrc:/qml/newsqml/Conversation.qml",{"news": newsitemobject.currentconversation})}
|
||||
// else{newsStack.push("qrc:/qml/newsqml/Conversation.qml")};
|
||||
// showConversation(index,newsitemobject)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
Menu {
|
||||
|
@ -450,8 +396,6 @@ Item {
|
|||
var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml");
|
||||
var conversation;newsitem.ListView.view.viewtype=="conversation"?true:false;
|
||||
var reply=replycomp.createObject(friendicaActivities,{parentId:newsitemobject.id,reply_to_user:newsitemobject.user.screen_name, state:"reply",conversation:conversation,textfocus:true})
|
||||
//replySignal(newsitemobject)
|
||||
//newsStack.push("qrc:/qml/newsqml/MessageSend.qml",{"reply_to_user": newsitemobject.user.screen_name,"parentId":newsitemobject.id,"login":root.login,"directmessage":directmessage});
|
||||
}
|
||||
}
|
||||
Action {
|
||||
|
@ -511,6 +455,14 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
text: qsTr("Show height")
|
||||
onTriggered: {
|
||||
Helperjs.showMessage("Height",itemMessage.height + "toprow: "+ toprow.height,root)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//MenuItem{
|
||||
// text:qsTr("Show on website")
|
||||
// onTriggered:Qt.openUrlExternally(login.server+"/display/"+newsitemobject
|
||||
|
@ -519,8 +471,8 @@ Item {
|
|||
Column{
|
||||
id:conversationColumn
|
||||
anchors.top:controlrow.bottom
|
||||
anchors.right: parent.right
|
||||
width: newsitem.width-5*mm
|
||||
//anchors.right: parent.right
|
||||
width: newsitem.width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.11
|
||||
//import QtQuick.Controls.Styles 1.4
|
||||
import "qrc:/js/smiley.js" as Smileyjs
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
@ -88,25 +87,7 @@ Rectangle{
|
|||
anchors.topMargin: 1*mm
|
||||
width: smileyDialog.width-2*mm
|
||||
height: smileyDialog.height-7*mm
|
||||
// style: TabViewStyle {
|
||||
// frameOverlap: 1
|
||||
// tab: Rectangle {
|
||||
// color: "white"
|
||||
// implicitWidth: smileyTabView.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
|
||||
// }
|
||||
|
||||
Rectangle{
|
||||
Rectangle{
|
||||
id: htmlGridTab
|
||||
GridView {
|
||||
id:htmlView
|
||||
|
|
|
@ -82,16 +82,16 @@ StackView{
|
|||
|
||||
Connections{
|
||||
target:xhr
|
||||
onDownloadedjson:{
|
||||
function onDownloadedjson(type,url,filename,i,jsonObject){
|
||||
if(type=="picturelist"){
|
||||
fotorectangle.currentimageno=fotorectangle.currentimageno+1
|
||||
Imagejs.storeImagedata(login,db,jsonObject,fotorectangle)
|
||||
}
|
||||
}
|
||||
onDownloaded:{
|
||||
function onDownloaded(type,url,filename,i){
|
||||
if(type=="picture"){fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
||||
}
|
||||
onError:{if(data=="picturelist"){
|
||||
function onError(data,url,api,code){if(data=="picturelist"){
|
||||
var requestid=url.substring(url.lastIndexOf("=")+1);
|
||||
Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle)
|
||||
} else {fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue