bugfixes and ts-files
This commit is contained in:
parent
8391b028f4
commit
ec102d8d66
|
@ -1,11 +0,0 @@
|
||||||
--- source-linux/qml/friendiqa.qml
|
|
||||||
+++ source-linux/qml/friendiqa.qml
|
|
||||||
@@ -193,7 +193,7 @@
|
|
||||||
color: Material.backgroundColor
|
|
||||||
}
|
|
||||||
|
|
||||||
- header: ToolBar{
|
|
||||||
+ footer: ToolBar{
|
|
||||||
background: Rectangle{
|
|
||||||
anchors.fill: parent
|
|
||||||
color: Material.backgroundDimColor
|
|
|
@ -73,7 +73,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
//qDebug()<< "argv Friendiqa"<< (qstrcmp(argv[1],"-service")==0) <<" argv2" <<argv[1];
|
//qDebug()<< "argv Friendiqa"<< (qstrcmp(argv[1],"-service")==0) <<" argv2" <<argv[1];
|
||||||
QCoreApplication::setApplicationName("Friendiqa");
|
QCoreApplication::setApplicationName("Friendiqa");
|
||||||
QCoreApplication::setOrganizationName("Friendiqa");
|
//QCoreApplication::setOrganizationName("Friendiqa");
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
if (qstrcmp(argv[1],"-service")==0){
|
if (qstrcmp(argv[1],"-service")==0){
|
||||||
|
@ -91,7 +91,7 @@ int main(int argc, char *argv[]) {
|
||||||
else{
|
else{
|
||||||
QQmlApplicationEngine view;
|
QQmlApplicationEngine view;
|
||||||
//view.setResizeMode(QQuickView::SizeRootObjectToView);
|
//view.setResizeMode(QQuickView::SizeRootObjectToView);
|
||||||
app.setWindowIcon(QIcon(":/assets/Friendiqa.ico"));
|
app.setWindowIcon(QIcon("qrc:/assets/Friendiqa.ico"));
|
||||||
QTranslator qtTranslator;
|
QTranslator qtTranslator;
|
||||||
if(qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations"))
|
if(qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations"))
|
||||||
{app.installTranslator(&qtTranslator);}
|
{app.installTranslator(&qtTranslator);}
|
||||||
|
|
|
@ -180,7 +180,7 @@ function updateData(database,table, username, key, value, callback,filter,filter
|
||||||
function showMessage(header,message,rootwindow){//print(message);
|
function showMessage(header,message,rootwindow){//print(message);
|
||||||
var cleanmessage=message.replace(/"/g,"-");
|
var cleanmessage=message.replace(/"/g,"-");
|
||||||
if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'}
|
if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'}
|
||||||
var messageString='import QtQuick 6.3; import QtQuick.Controls 2.15; Dialog{ visible: true; title:"'+header+'";standardButtons: Dialog.Ok;anchors.centerIn: parent;Label{text:" '+cleanmessage+'"}}';
|
var messageString='import QtQuick 6.3; import QtQuick.Controls 6.3; Dialog{ visible: true; title:"'+header+'";standardButtons: Dialog.Ok;anchors.centerIn: parent;Label{text:" '+cleanmessage+'"}}';
|
||||||
var messageObject=Qt.createQmlObject(messageString,rootwindow,"messageOutput");
|
var messageObject=Qt.createQmlObject(messageString,rootwindow,"messageOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,33 +74,33 @@ function beautify(newsitemobject,msg){
|
||||||
}
|
}
|
||||||
}catch(e){print("attachment "+e)}
|
}catch(e){print("attachment "+e)}
|
||||||
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(/class=\"attachment-image\"/g,"width=\"600\" ");
|
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(/class=\"attachment-image\"/g,"width=\"600\" ");
|
||||||
|
try{
|
||||||
for (var format in videoformats){
|
for (var format in videoformats){
|
||||||
if (newsitemobject.text.indexOf("."+videoformats[format])>-1){
|
if (newsitemobject.text.indexOf("."+videoformats[format])>-1){
|
||||||
var videohelper={mimetype:"video/"+videoformats[format]}
|
var videohelper={mimetype:"video/"+videoformats[format]}
|
||||||
var videotext=newsitemobject.text;
|
var videotext=newsitemobject.text;
|
||||||
while (videotext.indexOf("."+videoformats[format])>-1){
|
while (videotext.indexOf("."+videoformats[format])>-1){
|
||||||
var videohelperstringposition=videotext.indexOf("."+videoformats[format]);
|
var videohelperstringposition=videotext.indexOf("."+videoformats[format]);
|
||||||
videohelper.url=videotext.substring(videotext.lastIndexOf("http",videohelperstringposition),videohelperstringposition+4);
|
videohelper.url=videotext.substring(videotext.lastIndexOf("http",videohelperstringposition),videohelperstringposition+4);
|
||||||
videotext=videotext.substring(videohelperstringposition+4,videotext.length)
|
videotext=videotext.substring(videohelperstringposition+4,videotext.length)
|
||||||
if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=videohelper.url)){videoAttachmentList.push(videohelper)}
|
if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=videohelper.url)){videoAttachmentList.push(videohelper)}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (newsitemobject.text.indexOf("/videos/watch/")>-1){
|
||||||
if (newsitemobject.text.indexOf("/videos/watch/")>-1){
|
var ptvideohelper={mimetype:"video/mp4"}
|
||||||
var ptvideohelper={mimetype:"video/mp4"}
|
var ptvideotext=newsitemobject.text;
|
||||||
var ptvideotext=newsitemobject.text;
|
while (ptvideotext.indexOf("/videos/watch/")>-1){
|
||||||
while (ptvideotext.indexOf("/videos/watch/")>-1){
|
var ptvideohelperstringposition=ptvideotext.indexOf("/videos/watch/");
|
||||||
var ptvideohelperstringposition=ptvideotext.indexOf("/videos/watch/");
|
var ptposend=findend(ptvideotext,ptvideohelperstringposition);
|
||||||
var ptposend=findend(ptvideotext,ptvideohelperstringposition);
|
if(ptposend==-1){ptposend=ptvideotext.length};
|
||||||
if(ptposend==-1){ptposend=ptvideotext.length};
|
ptvideohelper.url=ptvideotext.substring(ptvideotext.lastIndexOf("http",ptvideohelperstringposition),ptposend)+"-480.mp4";
|
||||||
ptvideohelper.url=ptvideotext.substring(ptvideotext.lastIndexOf("http",ptvideohelperstringposition),ptposend)+"-480.mp4";
|
ptvideohelper.url=ptvideohelper.url.replace("/videos/watch","/static/webseed");
|
||||||
ptvideohelper.url=ptvideohelper.url.replace("/videos/watch","/static/webseed");
|
ptvideotext=ptvideotext.substring(ptposend,ptvideotext.length)
|
||||||
ptvideotext=ptvideotext.substring(ptposend,ptvideotext.length)
|
if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=ptvideohelper.url)){videoAttachmentList.push(ptvideohelper)}
|
||||||
if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=ptvideohelper.url)){videoAttachmentList.push(ptvideohelper)}
|
}
|
||||||
}
|
}
|
||||||
}
|
}catch(e){print(e)}
|
||||||
|
|
||||||
newsitemobject.videoAttachmentList=videoAttachmentList;
|
newsitemobject.videoAttachmentList=videoAttachmentList;
|
||||||
newsitemobject.imageAttachmentList=imageAttachmentList;
|
newsitemobject.imageAttachmentList=imageAttachmentList;
|
||||||
if ((msg.options.hasOwnProperty("hide_nsfw"))&&(msg.options.hide_nsfw==1)&&(newsitemobject.text.indexOf("#nsfw")>-1)){
|
if ((msg.options.hasOwnProperty("hide_nsfw"))&&(msg.options.hide_nsfw==1)&&(newsitemobject.text.indexOf("#nsfw")>-1)){
|
||||||
|
@ -129,7 +129,7 @@ WorkerScript.onMessage = function(msg) {
|
||||||
if (!(typeof(newsitemobject.currentconversation)=='undefined') && (newsitemobject.currentconversation.length>0)){
|
if (!(typeof(newsitemobject.currentconversation)=='undefined') && (newsitemobject.currentconversation.length>0)){
|
||||||
let n=1;
|
let n=1;
|
||||||
while ((n<newsitemobject.currentconversation.length)&&(newsitemobject.currentconversation[newsitemobject.currentconversation.length-n].user.statusnet_blocking==true)) {
|
while ((n<newsitemobject.currentconversation.length)&&(newsitemobject.currentconversation[newsitemobject.currentconversation.length-n].user.statusnet_blocking==true)) {
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
if (n<newsitemobject.currentconversation.length){
|
if (n<newsitemobject.currentconversation.length){
|
||||||
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-n],msg);
|
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-n],msg);
|
||||||
|
@ -143,7 +143,7 @@ WorkerScript.onMessage = function(msg) {
|
||||||
var count=0;
|
var count=0;
|
||||||
var firstReply=0;
|
var firstReply=0;
|
||||||
for (var k=msg.model.count-1;k>-1;k--){
|
for (var k=msg.model.count-1;k>-1;k--){
|
||||||
if (newsitemobject.in_reply_to_status_id==msg.model.get(k).newsitemobject.id){
|
if (newsitemobject.in_reply_to_status_id==msg.model.get(k).newsitemobject.id){
|
||||||
newsitemobject.indent=(msg.model.get(k).newsitemobject.indent||0)+1;
|
newsitemobject.indent=(msg.model.get(k).newsitemobject.indent||0)+1;
|
||||||
if (newsitemobject.indent>6){newsitemobject.indent=6};
|
if (newsitemobject.indent>6){newsitemobject.indent=6};
|
||||||
firstReply=k;
|
firstReply=k;
|
||||||
|
@ -152,7 +152,7 @@ WorkerScript.onMessage = function(msg) {
|
||||||
count+=1
|
count+=1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
data=({"newsitemobject": newsitemobject})
|
data=({"newsitemobject": newsitemobject})
|
||||||
}
|
}
|
||||||
if(data.newsitemobject.user.statusnet_blocking==true){break}
|
if(data.newsitemobject.user.statusnet_blocking==true){break}
|
||||||
|
|
|
@ -318,7 +318,7 @@ function processNews(api,data){
|
||||||
usermessages.push(newslist.status);
|
usermessages.push(newslist.status);
|
||||||
newslist=usermessages;
|
newslist=usermessages;
|
||||||
}
|
}
|
||||||
if (data=="" || api=="/api/v1/statuses"){newsBusy.running=false}
|
if (data=="" || api=="/api/v1/statuses"){showNews("")}//newsBusy.running=false}
|
||||||
else if (typeof(newslist)=='undefined'){
|
else if (typeof(newslist)=='undefined'){
|
||||||
Helperjs.showMessage(qsTr("Undefined Array Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
|
Helperjs.showMessage(qsTr("Undefined Array Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ Rectangle {
|
||||||
width: 2*root.fontFactor*osSettings.bigFontSize;
|
width: 2*root.fontFactor*osSettings.bigFontSize;
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
text: qsTr("add")
|
text: qsTr("add")
|
||||||
icon.name: "list-add"
|
icon.name: "list-add-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/plus.svg"
|
icon.source: "qrc:/assets/icons/plus.svg"
|
||||||
// background: Rectangle{color: osSettings.dialogColor;
|
// background: Rectangle{color: osSettings.dialogColor;
|
||||||
// radius: 0.5*mm}
|
// radius: 0.5*mm}
|
||||||
|
|
|
@ -65,7 +65,7 @@ Rectangle{
|
||||||
anchors.rightMargin:mm
|
anchors.rightMargin:mm
|
||||||
width: 2*root.fontFactor*osSettings.bigFontSize;
|
width: 2*root.fontFactor*osSettings.bigFontSize;
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
icon.name: "list-add"
|
icon.name: "list-add-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/plus.svg"
|
icon.source: "qrc:/assets/icons/plus.svg"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
rootstackView.push("qrc:/qml/calendarqml/EventCreate.qml",{"startDate": new Date(dayint*86400000)})
|
rootstackView.push("qrc:/qml/calendarqml/EventCreate.qml",{"startDate": new Date(dayint*86400000)})
|
||||||
|
|
|
@ -90,8 +90,8 @@ Page{
|
||||||
login=userconfig;
|
login=userconfig;
|
||||||
news=[];
|
news=[];
|
||||||
contactlist=[];
|
contactlist=[];
|
||||||
if(rootstackView.depth>1){rootstackSignal(0)}
|
if(rootstackView.depth>1){rootstackSignal(0);newstypeSignal("refresh");}
|
||||||
newstypeSignal("refresh");
|
else {rootstackView.replace("qrc:/qml/genericqml/RootStack.qml",StackView.PopTransition)};
|
||||||
},"isActive",0);
|
},"isActive",0);
|
||||||
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.display_name+"\nScreen Name: "+credentials.username,root)
|
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.display_name+"\nScreen Name: "+credentials.username,root)
|
||||||
rootstackView.pop()
|
rootstackView.pop()
|
||||||
|
@ -259,7 +259,7 @@ Page{
|
||||||
MouseArea{
|
MouseArea{
|
||||||
anchors.fill:parent
|
anchors.fill:parent
|
||||||
onClicked:{
|
onClicked:{
|
||||||
let serverConfigString="import QtQuick 2.0; import QtQuick.Dialogs 6.3; MessageDialog{ visible: true; title:'Server';buttons: MessageDialog.Ok;text: 'Name: "+
|
let serverConfigString="import QtQuick 6.3; import QtQuick.Dialogs 6.3; MessageDialog{ visible: true; title:'Server';buttons: MessageDialog.Ok;text: 'Name: "+
|
||||||
servericon.serverconfig.site.name+"\nLanguage: "+servericon.serverconfig.site.language+
|
servericon.serverconfig.site.name+"\nLanguage: "+servericon.serverconfig.site.language+
|
||||||
"\nEmail: "+servericon.serverconfig.site.email+"\nTimezone: "+servericon.serverconfig.site.timezone+"\nClosed: "+servericon.serverconfig.site.closed+
|
"\nEmail: "+servericon.serverconfig.site.email+"\nTimezone: "+servericon.serverconfig.site.timezone+"\nClosed: "+servericon.serverconfig.site.closed+
|
||||||
"\nText limit: "+servericon.serverconfig.site.textlimit+"\nShort Url length: "+servericon.serverconfig.site.shorturllength+
|
"\nText limit: "+servericon.serverconfig.site.textlimit+"\nShort Url length: "+servericon.serverconfig.site.shorturllength+
|
||||||
|
@ -275,7 +275,7 @@ Page{
|
||||||
id:serverSearchButton
|
id:serverSearchButton
|
||||||
width: 3*root.fontFactor*osSettings.bigFontSize; height: 2.5*root.fontFactor*osSettings.bigFontSize
|
width: 3*root.fontFactor*osSettings.bigFontSize; height: 2.5*root.fontFactor*osSettings.bigFontSize
|
||||||
//text:"\uf002"
|
//text:"\uf002"
|
||||||
icon.name: "search"
|
icon.name: "system-search"
|
||||||
font.pointSize: osSettings.bigFontSize
|
font.pointSize: osSettings.bigFontSize
|
||||||
visible: servericon.visible?false:true
|
visible: servericon.visible?false:true
|
||||||
onClicked:{Qt.openUrlExternally(Qt.resolvedUrl("https://dir.friendica.social/servers"))}
|
onClicked:{Qt.openUrlExternally(Qt.resolvedUrl("https://dir.friendica.social/servers"))}
|
||||||
|
|
|
@ -61,13 +61,13 @@ Page{
|
||||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||||
width:10*root.fontFactor*osSettings.bigFontSize
|
width:10*root.fontFactor*osSettings.bigFontSize
|
||||||
}
|
}
|
||||||
TabButton {
|
// TabButton {
|
||||||
text: qsTr("Start")
|
// text: qsTr("Start")
|
||||||
visible:osSettings.osType=="Linux"
|
// visible:osSettings.osType=="Linux"
|
||||||
font.pointSize: osSettings.systemFontSize
|
// font.pointSize: osSettings.systemFontSize
|
||||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
// height: 2*root.fontFactor*osSettings.bigFontSize
|
||||||
width:10*root.fontFactor*osSettings.bigFontSize
|
// width:10*root.fontFactor*osSettings.bigFontSize
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
LeftDrawerLinux{
|
LeftDrawerLinux{
|
||||||
|
@ -108,10 +108,10 @@ Page{
|
||||||
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
|
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader{
|
// Loader{
|
||||||
id: startLoader
|
// id: startLoader
|
||||||
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
|
// source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
MButton{
|
MButton{
|
||||||
id:closeButton
|
id:closeButton
|
||||||
|
|
|
@ -100,7 +100,7 @@ ScrollView{
|
||||||
y:4*root.fontFactor*osSettings.bigFontSize
|
y:4*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
text: qsTr("Quit")
|
text: qsTr("Quit")
|
||||||
icon.name: "system-log-out"
|
icon.name: "system-log-out-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/sign-out.svg"
|
icon.source: "qrc:/assets/icons/sign-out.svg"
|
||||||
icon.height: root.fontFactor*osSettings.systemFontSize
|
icon.height: root.fontFactor*osSettings.systemFontSize
|
||||||
icon.width: root.fontFactor*osSettings.systemFontSize
|
icon.width: root.fontFactor*osSettings.systemFontSize
|
||||||
|
|
|
@ -128,7 +128,7 @@ Item{
|
||||||
anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize
|
anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize
|
||||||
anchors.left: searchBox.right
|
anchors.left: searchBox.right
|
||||||
anchors.leftMargin: 0.5*root.fontFactor*osSettings.bigFontSize
|
anchors.leftMargin: 0.5*root.fontFactor*osSettings.bigFontSize
|
||||||
icon.name: "search"
|
icon.name: "system-search"
|
||||||
icon.source: "qrc:/assets/icons/search.svg"
|
icon.source: "qrc:/assets/icons/search.svg"
|
||||||
text: qsTr("Close")
|
text: qsTr("Close")
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
|
|
|
@ -217,7 +217,7 @@ Item{
|
||||||
ToolButton{
|
ToolButton{
|
||||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||||
width:friendsView.width
|
width:friendsView.width
|
||||||
icon.name:"list-add-user"
|
icon.name:"list-add-user-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/user-plus.svg"
|
icon.source: "qrc:/assets/icons/user-plus.svg"
|
||||||
icon.width: 2*root.fontFactor*osSettings.bigFontSize
|
icon.width: 2*root.fontFactor*osSettings.bigFontSize
|
||||||
icon.height: 2*root.fontFactor*osSettings.bigFontSize
|
icon.height: 2*root.fontFactor*osSettings.bigFontSize
|
||||||
|
|
|
@ -85,20 +85,20 @@ Item{
|
||||||
Newsjs.requestGroups(root.login,root.db,root,function(){
|
Newsjs.requestGroups(root.login,root.db,root,function(){
|
||||||
groupsGridTab.showGroups(root.login.username)})}
|
groupsGridTab.showGroups(root.login.username)})}
|
||||||
}
|
}
|
||||||
MButton {
|
// MButton {
|
||||||
id: newGroupButton
|
// id: newGroupButton
|
||||||
text: "\uf234"
|
// text: "\uf234"
|
||||||
display: AbstractButton.IconOnly
|
// display: AbstractButton.IconOnly
|
||||||
icon.name:"list-add-user"
|
// icon.name:"list-add-user"
|
||||||
icon.source: "qrc:/assets/icons/user-plus.svg"
|
// icon.source: "qrc:/assets/icons/user-plus.svg"
|
||||||
anchors.top: parent.top
|
// anchors.top: parent.top
|
||||||
anchors.topMargin: mm
|
// anchors.topMargin: mm
|
||||||
anchors.right: updateGroupsButton.left
|
// anchors.right: updateGroupsButton.left
|
||||||
anchors.rightMargin: mm
|
// anchors.rightMargin: mm
|
||||||
onClicked: {
|
// onClicked: {
|
||||||
groupsModel.append({"group": {"new":true}});
|
// groupsModel.append({"group": {"new":true}});
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
ListView {
|
ListView {
|
||||||
id: groupsView
|
id: groupsView
|
||||||
x:mm
|
x:mm
|
||||||
|
|
|
@ -57,7 +57,7 @@ ApplicationWindow{
|
||||||
property bool wideScreen : width>height
|
property bool wideScreen : width>height
|
||||||
signal rootstackSignal(int pageindex)
|
signal rootstackSignal(int pageindex)
|
||||||
signal fotoSignal(var username, var friend)
|
signal fotoSignal(var username, var friend)
|
||||||
signal directmessageSignal(var friend)
|
signal sendmessageSignal(string type, var newsitemobject)
|
||||||
signal newsSignal(var news)
|
signal newsSignal(var news)
|
||||||
signal newstypeSignal(var type)
|
signal newstypeSignal(var type)
|
||||||
signal friendsSignal(var username)
|
signal friendsSignal(var username)
|
||||||
|
@ -161,20 +161,20 @@ ApplicationWindow{
|
||||||
// close.accepted=false
|
// close.accepted=false
|
||||||
// }
|
// }
|
||||||
|
|
||||||
Service.cleanNews(root.db,function(){
|
Service.cleanNews(root.db,function(){
|
||||||
Service.cleanHashtags(root.db,function(){
|
Service.cleanHashtags(root.db,function(){
|
||||||
Service.cleanContacts(root.login,root.db,function(){
|
Service.cleanContacts(root.login,root.db,function(){
|
||||||
if (osSettings.osType=="Android" || !iconTrayAvailable){
|
//if (osSettings.osType=="Android" || !iconTrayAvailable){
|
||||||
Qt.quit()
|
Qt.quit()
|
||||||
}
|
//}
|
||||||
else{
|
// else{
|
||||||
systemTray.show();
|
// systemTray.show();
|
||||||
systemTray.showMessage("",qsTr("Background Sync\n Rightclick or Middleclick to Quit"),"",5000)
|
// systemTray.showMessage("",qsTr("Background Sync\n Rightclick or Middleclick to Quit"),"",5000)
|
||||||
root.hide()
|
// root.hide()
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
})})
|
})})
|
||||||
close.accepted=true
|
close.accepted=true
|
||||||
}
|
}
|
||||||
//else if (bar.currentIndex==2){fotoSignal(login.username,"backButton");close.accepted=false}
|
//else if (bar.currentIndex==2){fotoSignal(login.username,"backButton");close.accepted=false}
|
||||||
else {rootstackSignal(0);bar.currentIndex=0;close.accepted=false}
|
else {rootstackSignal(0);bar.currentIndex=0;close.accepted=false}
|
||||||
|
@ -192,112 +192,112 @@ ApplicationWindow{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: osSettings.backgroundDimColor
|
color: osSettings.backgroundDimColor
|
||||||
}
|
}
|
||||||
RowLayout{
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
TabBar {
|
TabBar {
|
||||||
id: bar
|
id: bar
|
||||||
Layout.fillWidth: true
|
width: parent.width
|
||||||
onCurrentIndexChanged: {
|
//Layout.fillWidth: true
|
||||||
rootstackSignal(bar.currentIndex);
|
onCurrentIndexChanged: {
|
||||||
try{while(rootstackView.depth>1){rootstackView.pop()}}catch(e){}
|
rootstackSignal(bar.currentIndex);
|
||||||
}
|
try{while(rootstackView.depth>1){rootstackView.pop()}}catch(e){}
|
||||||
TabButton {
|
}
|
||||||
width: bar.width/4
|
TabButton {
|
||||||
icon.name: "format-list-unordered"
|
width: bar.width/4
|
||||||
text: qsTr("Posts")
|
height: bar.height
|
||||||
display: AbstractButton.IconOnly
|
icon.name: "format-list-unordered"
|
||||||
icon.source: "qrc:/assets/icons/list.svg"
|
text: qsTr("Posts")
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
display: AbstractButton.IconOnly
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
icon.source: "qrc:/assets/icons/list.svg"
|
||||||
// background:Rectangle{
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
// anchors.fill: parent
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
// color: osSettings.backgroundDimColor
|
// background:Rectangle{
|
||||||
// }
|
// anchors.fill: parent
|
||||||
ToolTip.delay: 800
|
// color: osSettings.backgroundDimColor
|
||||||
ToolTip.visible: pressed || hovered
|
// }
|
||||||
ToolTip.text: qsTr("Posts")
|
ToolTip.delay: 800
|
||||||
onDoubleClicked: {newstypeSignal("refresh")}
|
ToolTip.visible: pressed || hovered
|
||||||
}
|
ToolTip.text: qsTr("Posts")
|
||||||
TabButton {
|
onDoubleClicked: {newstypeSignal("refresh")}
|
||||||
width: bar.width/4
|
}
|
||||||
icon.name: "group"
|
TabButton {
|
||||||
text: qsTr("Contacts")
|
width: bar.width/4
|
||||||
display: AbstractButton.IconOnly
|
height: bar.height
|
||||||
icon.source: "qrc:/assets/icons/users.svg"
|
icon.name: "group"
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
text: qsTr("Contacts")
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
display: AbstractButton.IconOnly
|
||||||
// background:Rectangle{
|
icon.source: "qrc:/assets/icons/users.svg"
|
||||||
// anchors.fill: parent
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
// color: osSettings.backgroundDimColor
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
// }
|
// background:Rectangle{
|
||||||
ToolTip.delay: 800
|
// anchors.fill: parent
|
||||||
ToolTip.visible: pressed || hovered
|
// color: osSettings.backgroundDimColor
|
||||||
ToolTip.text: qsTr("Contacts")
|
// }
|
||||||
}
|
ToolTip.delay: 800
|
||||||
TabButton {
|
ToolTip.visible: pressed || hovered
|
||||||
width: bar.width/4
|
ToolTip.text: qsTr("Contacts")
|
||||||
icon.name: "viewimage"
|
}
|
||||||
text: qsTr("Images")
|
TabButton {
|
||||||
display: AbstractButton.IconOnly
|
width: bar.width/4
|
||||||
icon.source: "qrc:/assets/icons/picture-o.svg"
|
height: bar.height
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
icon.name: "viewimage"
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
text: qsTr("Images")
|
||||||
// background:Rectangle{
|
display: AbstractButton.IconOnly
|
||||||
// anchors.fill: parent
|
icon.source: "qrc:/assets/icons/picture-o.svg"
|
||||||
// color: osSettings.backgroundDimColor
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
// }
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
ToolTip.delay: 800
|
// background:Rectangle{
|
||||||
ToolTip.visible: pressed || hovered
|
// anchors.fill: parent
|
||||||
ToolTip.text: qsTr("Photos")
|
// color: osSettings.backgroundDimColor
|
||||||
}
|
// }
|
||||||
TabButton {
|
ToolTip.delay: 800
|
||||||
width: bar.width/4
|
ToolTip.visible: pressed || hovered
|
||||||
icon.name: "view-calendar"
|
ToolTip.text: qsTr("Photos")
|
||||||
text: qsTr("Calendar")
|
}
|
||||||
display: AbstractButton.IconOnly
|
TabButton {
|
||||||
icon.source: "qrc:/assets/icons/calendar.svg"
|
width: bar.width/4
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
height: bar.height
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
icon.name: "view-calendar"
|
||||||
// background:Rectangle{
|
text: qsTr("Calendar")
|
||||||
// anchors.fill: parent
|
display: AbstractButton.IconOnly
|
||||||
// color: osSettings.backgroundDimColor
|
icon.source: "qrc:/assets/icons/calendar.svg"
|
||||||
// }
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
ToolTip.delay: 800
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
ToolTip.visible: pressed || hovered
|
// background:Rectangle{
|
||||||
ToolTip.text: qsTr("Calendar")
|
// anchors.fill: parent
|
||||||
}
|
// color: osSettings.backgroundDimColor
|
||||||
|
// }
|
||||||
|
ToolTip.delay: 800
|
||||||
|
ToolTip.visible: pressed || hovered
|
||||||
|
ToolTip.text: qsTr("Calendar")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StackView{id:rootstackView
|
StackView{id:rootstackView
|
||||||
//y:roottoolbar.height
|
|
||||||
//anchors.fill: parent
|
|
||||||
width:root.width
|
width:root.width
|
||||||
height: root.height-roottoolbar.contentHeight
|
height: root.height-roottoolbar.contentHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
QSystemTrayIcon {
|
// QSystemTrayIcon {
|
||||||
id: systemTray
|
// id: systemTray
|
||||||
visible: false
|
// visible: false
|
||||||
onActivated: {
|
// onActivated: {
|
||||||
if(reason === 3){
|
// if(reason === 3){
|
||||||
root.show();
|
// root.show();
|
||||||
bar.currentIndex=0;
|
// bar.currentIndex=0;
|
||||||
root.globaloptions.hasOwnProperty("newsViewType")?newstab.newstabstatus=root.globaloptions.newsViewType:newstab.newstabstatus="Conversations";
|
// root.globaloptions.hasOwnProperty("newsViewType")?newstab.newstabstatus=root.globaloptions.newsViewType:newstab.newstabstatus="Conversations";
|
||||||
newstypeSignal(newstab.newstabstatus)
|
// newstypeSignal(newstab.newstabstatus)
|
||||||
systemTray.hide()
|
// systemTray.hide()
|
||||||
} else {
|
// } else {
|
||||||
Qt.quit()
|
// Qt.quit()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
Component.onCompleted: {
|
// Component.onCompleted: {
|
||||||
icon = root.color<palette.text?iconTrayWhite:iconTrayBlack//iconTray
|
// icon = root.color<palette.text?iconTrayWhite:iconTrayBlack//iconTray
|
||||||
toolTip = qsTr("Click to open Friendiqa")
|
// toolTip = qsTr("Click to open Friendiqa")
|
||||||
//&hide()
|
// //&hide()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
onLoginChanged(login);
|
onLoginChanged(login);
|
||||||
|
|
|
@ -69,7 +69,7 @@ Item {
|
||||||
y:2*root.fontFactor*osSettings.bigFontSize
|
y:2*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
text: qsTr("Refresh")
|
text: qsTr("Refresh")
|
||||||
icon.name: "view-refresh"
|
icon.name: "view-refresh-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/refresh.svg"
|
icon.source: "qrc:/assets/icons/refresh.svg"
|
||||||
icon.height: root.fontFactor*osSettings.systemFontSize
|
icon.height: root.fontFactor*osSettings.systemFontSize
|
||||||
icon.width: root.fontFactor*osSettings.systemFontSize
|
icon.width: root.fontFactor*osSettings.systemFontSize
|
||||||
|
@ -83,7 +83,7 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y:3.5*root.fontFactor*osSettings.bigFontSize
|
y:3.5*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="Home" && newstab.newstabstatus=="Timeline"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="Home" && newstab.newstabstatus=="Timeline"
|
||||||
text: qsTr("Timeline")
|
text: qsTr("Timeline")
|
||||||
icon.name: "chronometer"
|
icon.name: "chronometer"
|
||||||
icon.source: "qrc:/assets/icons/history.svg"
|
icon.source: "qrc:/assets/icons/history.svg"
|
||||||
|
@ -101,7 +101,7 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y: 5*root.fontFactor*osSettings.bigFontSize
|
y: 5*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="Home" && newstab.newstabstatus=="Conversations"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="Home" && newstab.newstabstatus=="Conversations"
|
||||||
text: qsTr("Conversations")
|
text: qsTr("Conversations")
|
||||||
icon.name: "view-conversation-balloon"
|
icon.name: "view-conversation-balloon"
|
||||||
icon.source: "qrc:/assets/icons/comments.svg"
|
icon.source: "qrc:/assets/icons/comments.svg"
|
||||||
|
@ -119,9 +119,9 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y:6.5*root.fontFactor*osSettings.bigFontSize
|
y:6.5*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="Replies"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="Replies"
|
||||||
text: qsTr("Replies")
|
text: qsTr("Replies")
|
||||||
icon.name: "mail-reply-all"
|
icon.name: "mail-reply-all-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/exchange.svg"
|
icon.source: "qrc:/assets/icons/exchange.svg"
|
||||||
icon.height: root.fontFactor*osSettings.systemFontSize
|
icon.height: root.fontFactor*osSettings.systemFontSize
|
||||||
icon.width: root.fontFactor*osSettings.systemFontSize
|
icon.width: root.fontFactor*osSettings.systemFontSize
|
||||||
|
@ -137,7 +137,7 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y: 8*root.fontFactor*osSettings.bigFontSize
|
y: 8*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="DirectMessages"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="DirectMessages"
|
||||||
text: qsTr("Direct Messages")
|
text: qsTr("Direct Messages")
|
||||||
icon.name: "mail-message"
|
icon.name: "mail-message"
|
||||||
icon.source: "qrc:/assets/icons/envelope.svg"
|
icon.source: "qrc:/assets/icons/envelope.svg"
|
||||||
|
@ -153,7 +153,7 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y: 9.5*root.fontFactor*osSettings.bigFontSize
|
y: 9.5*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="Favorites"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="Favorites"
|
||||||
text: qsTr("Favorites")
|
text: qsTr("Favorites")
|
||||||
icon.name: "starred-symbolic"
|
icon.name: "starred-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/star.svg"
|
icon.source: "qrc:/assets/icons/star.svg"
|
||||||
|
@ -170,7 +170,7 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y: 11*root.fontFactor*osSettings.bigFontSize
|
y: 11*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="Public Timeline"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="Public Timeline"
|
||||||
text: qsTr("Public Timeline")
|
text: qsTr("Public Timeline")
|
||||||
icon.name: "globe"
|
icon.name: "globe"
|
||||||
icon.source: "qrc:/assets/icons/globe.svg"
|
icon.source: "qrc:/assets/icons/globe.svg"
|
||||||
|
@ -188,7 +188,7 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y: 12.5*root.fontFactor*osSettings.bigFontSize
|
y: 12.5*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="Groupnews"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="Groupnews"
|
||||||
text: qsTr("Group news")
|
text: qsTr("Group news")
|
||||||
icon.name: "group"
|
icon.name: "group"
|
||||||
icon.source: "qrc:/assets/icons/users.svg"
|
icon.source: "qrc:/assets/icons/users.svg"
|
||||||
|
@ -207,9 +207,9 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y: 14*root.fontFactor*osSettings.bigFontSize
|
y: 14*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="Search"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="Search"
|
||||||
text: qsTr("Search")
|
text: qsTr("Search")
|
||||||
icon.name: "search"
|
icon.name: "system-search"
|
||||||
icon.source: "qrc:/assets/icons/search.svg"
|
icon.source: "qrc:/assets/icons/search.svg"
|
||||||
icon.height: root.fontFactor*osSettings.systemFontSize
|
icon.height: root.fontFactor*osSettings.systemFontSize
|
||||||
icon.width: root.fontFactor*osSettings.systemFontSize
|
icon.width: root.fontFactor*osSettings.systemFontSize
|
||||||
|
@ -226,7 +226,7 @@ Item {
|
||||||
ToolButton{
|
ToolButton{
|
||||||
y: 15.5*root.fontFactor*osSettings.bigFontSize
|
y: 15.5*root.fontFactor*osSettings.bigFontSize
|
||||||
font.pointSize: osSettings.systemFontSize
|
font.pointSize: osSettings.systemFontSize
|
||||||
font.bold: account.username==login.username && newsSwipeview.stacktype=="Notifications"
|
font.bold: account.username==root.login.username && newsSwipeview.stacktype=="Notifications"
|
||||||
text: qsTr("Notifications")
|
text: qsTr("Notifications")
|
||||||
icon.name: "notifications"
|
icon.name: "notifications"
|
||||||
icon.source: "qrc:/assets/icons/bell.svg"
|
icon.source: "qrc:/assets/icons/bell.svg"
|
||||||
|
|
|
@ -38,7 +38,7 @@ StackLayout{
|
||||||
height: rootstackView.height
|
height: rootstackView.height
|
||||||
currentIndex:bar.currentIndex
|
currentIndex:bar.currentIndex
|
||||||
|
|
||||||
function indexchange(pageindex){currentIndex=pageindex}
|
function indexchange(pageindex){currentIndex=pageindex;bar.currentIndex=pageindex}
|
||||||
|
|
||||||
Loader{
|
Loader{
|
||||||
id: newstab
|
id: newstab
|
||||||
|
@ -59,5 +59,7 @@ StackLayout{
|
||||||
property string calendartabstatus:"Events"
|
property string calendartabstatus:"Events"
|
||||||
source: (rootstack.currentIndex==3)?"qrc:/qml/calendarqml/CalendarTab.qml":""
|
source: (rootstack.currentIndex==3)?"qrc:/qml/calendarqml/CalendarTab.qml":""
|
||||||
}
|
}
|
||||||
Component.onCompleted: {root.rootstackSignal.connect(indexchange);}
|
Component.onCompleted: {
|
||||||
|
root.rootstackSignal.connect(indexchange);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,8 +181,8 @@ Page {
|
||||||
|
|
||||||
MButton{
|
MButton{
|
||||||
id:dmbutton
|
id:dmbutton
|
||||||
height: 6*mm
|
// height: 6*mm
|
||||||
width: 8*mm
|
// width: 8*mm
|
||||||
visible: (contact.following=="true")
|
visible: (contact.following=="true")
|
||||||
text: qsTr("Direct Message")
|
text: qsTr("Direct Message")
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
|
@ -190,8 +190,7 @@ Page {
|
||||||
icon.source: "qrc:/assets/icons/envelope.svg"
|
icon.source: "qrc:/assets/icons/envelope.svg"
|
||||||
onClicked:{
|
onClicked:{
|
||||||
rootstackSignal(0);
|
rootstackSignal(0);
|
||||||
newsSwipeview.currentIndex=2;
|
sendmessageSignal("directmessage",{id:"",user:{screen_name:contact.screen_name}})
|
||||||
directmessageSignal(contact)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +211,7 @@ Page {
|
||||||
MButton{
|
MButton{
|
||||||
id:approvebutton
|
id:approvebutton
|
||||||
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
||||||
height: 6*mm
|
//height: 6*mm
|
||||||
text:qsTr("Approve")
|
text:qsTr("Approve")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
xhr.setAccount(login);
|
xhr.setAccount(login);
|
||||||
|
@ -226,7 +225,7 @@ Page {
|
||||||
MButton{
|
MButton{
|
||||||
id:rejectbutton
|
id:rejectbutton
|
||||||
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
||||||
height: 6*mm
|
//height: 6*mm
|
||||||
text:qsTr("Reject")
|
text:qsTr("Reject")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
xhr.setAccount(login);
|
xhr.setAccount(login);
|
||||||
|
@ -240,7 +239,7 @@ Page {
|
||||||
MButton{
|
MButton{
|
||||||
id:ignorebutton
|
id:ignorebutton
|
||||||
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
||||||
height: 6*mm
|
//height: 6*mm
|
||||||
text:qsTr("Ignore")
|
text:qsTr("Ignore")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
xhr.setAccount(login);
|
xhr.setAccount(login);
|
||||||
|
@ -254,7 +253,7 @@ Page {
|
||||||
MButton{
|
MButton{
|
||||||
id:followbutton
|
id:followbutton
|
||||||
visible:(contact.isFriend==0 || !contact.hasOwnProperty("isFriend"))
|
visible:(contact.isFriend==0 || !contact.hasOwnProperty("isFriend"))
|
||||||
height: 6*mm
|
//height: 6*mm
|
||||||
text:qsTr("Follow")
|
text:qsTr("Follow")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
contactBusy.running=true;
|
contactBusy.running=true;
|
||||||
|
@ -270,7 +269,7 @@ Page {
|
||||||
MButton{
|
MButton{
|
||||||
id:unfollowbutton
|
id:unfollowbutton
|
||||||
visible:(contact.isFriend==1)
|
visible:(contact.isFriend==1)
|
||||||
height: 6*mm
|
//height: 6*mm
|
||||||
text:qsTr("Unfollow")
|
text:qsTr("Unfollow")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
contactBusy.running=true;
|
contactBusy.running=true;
|
||||||
|
@ -285,7 +284,7 @@ Page {
|
||||||
MButton{
|
MButton{
|
||||||
id: blockbutton
|
id: blockbutton
|
||||||
visible:(contact.statusnet_blocking!=1)
|
visible:(contact.statusnet_blocking!=1)
|
||||||
height: 6*mm
|
//height: 6*mm
|
||||||
text:qsTr("Block")
|
text:qsTr("Block")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
contactBusy.running=true;
|
contactBusy.running=true;
|
||||||
|
@ -301,7 +300,7 @@ Page {
|
||||||
MButton{
|
MButton{
|
||||||
id: unblockbutton
|
id: unblockbutton
|
||||||
visible:(contact.statusnet_blocking==1)
|
visible:(contact.statusnet_blocking==1)
|
||||||
height: 6*mm
|
//height: 6*mm
|
||||||
text:qsTr("Unblock")
|
text:qsTr("Unblock")
|
||||||
onClicked:{
|
onClicked:{
|
||||||
contactBusy.running=true;
|
contactBusy.running=true;
|
||||||
|
|
|
@ -98,11 +98,11 @@ Page {
|
||||||
ListView {
|
ListView {
|
||||||
id: conversationView
|
id: conversationView
|
||||||
property string viewtype: "conversation"
|
property string viewtype: "conversation"
|
||||||
width: conversationList.width//-4*mm
|
width: conversationList.width
|
||||||
height:conversationList.height-2*root.fontFactor*osSettings.bigFontSize//-20*mm
|
height:conversationList.height-2*root.fontFactor*osSettings.bigFontSize
|
||||||
clip: true
|
clip: true
|
||||||
spacing: 0
|
spacing: 0
|
||||||
//footer: MessageSend{conversation:true}
|
ScrollBar.vertical: ScrollBar { }
|
||||||
model: conversationModel
|
model: conversationModel
|
||||||
delegate: Newsitem{}
|
delegate: Newsitem{}
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,7 +275,7 @@ Page{
|
||||||
height:imageUploadView.height-3*root.fontFactor*osSettings.bigFontSize
|
height:imageUploadView.height-3*root.fontFactor*osSettings.bigFontSize
|
||||||
text: qsTr("Add")
|
text: qsTr("Add")
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
icon.name: "list-add"
|
icon.name: "list-add-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/plus.svg"
|
icon.source: "qrc:/assets/icons/plus.svg"
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
|
|
|
@ -48,10 +48,9 @@ Window{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 2/3*parent.height
|
height: 2/3*parent.height
|
||||||
id: messageSend
|
id: messageSend
|
||||||
|
title: (reply_to_user!="")?qsTr("Answer to")+" @"+reply_to_user:qsTr("New message")
|
||||||
property bool wideScreen : width>height
|
property bool wideScreen : width>height
|
||||||
property string parentId: ""
|
property string parentId: ""
|
||||||
//property bool textfocus: false
|
|
||||||
//property bool conversation: false
|
|
||||||
property string reply_to_user:""
|
property string reply_to_user:""
|
||||||
property string windowstate:""
|
property string windowstate:""
|
||||||
property alias bodyMessage: bodyField.text
|
property alias bodyMessage: bodyField.text
|
||||||
|
@ -63,12 +62,6 @@ Window{
|
||||||
property var group_allow:login.hasOwnProperty("permissions")?login.permissions[2]:[]
|
property var group_allow:login.hasOwnProperty("permissions")?login.permissions[2]:[]
|
||||||
property var group_deny:login.hasOwnProperty("permissions")?login.permissions[3]:[]
|
property var group_deny:login.hasOwnProperty("permissions")?login.permissions[3]:[]
|
||||||
|
|
||||||
// function directmessagePrepare(friend){
|
|
||||||
// messageSend.state="active";
|
|
||||||
// reply_to_user=friend.screen_name;
|
|
||||||
// receiverLabel.text=friend.screen_name;
|
|
||||||
// }
|
|
||||||
|
|
||||||
function sendUrls(urls){
|
function sendUrls(urls){
|
||||||
attachImage(urls);
|
attachImage(urls);
|
||||||
messageSend.state="active";
|
messageSend.state="active";
|
||||||
|
@ -123,19 +116,6 @@ Window{
|
||||||
messageSend.close()
|
messageSend.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// function setParent(newsitemobject){
|
|
||||||
// if (newsitemobject!=""){
|
|
||||||
// messageSend.state="conversation"
|
|
||||||
// messageSend.reply_to_user=newsitemobject.user.screen_name;
|
|
||||||
// messageSend.parentId=newsitemobject.id
|
|
||||||
// } else {
|
|
||||||
// messageSend.state=null;
|
|
||||||
// messageSend.reply_to_user="";
|
|
||||||
// messageSend.parentId="";
|
|
||||||
// bodyField.text="";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
function contactmenu(letter){
|
function contactmenu(letter){
|
||||||
Newsjs.listFriends(login,db,function(contacts){
|
Newsjs.listFriends(login,db,function(contacts){
|
||||||
contactModel.clear();
|
contactModel.clear();
|
||||||
|
@ -226,7 +206,7 @@ Window{
|
||||||
width: parent.width-2*mm
|
width: parent.width-2*mm
|
||||||
font.pointSize: osSettings.bigFontSize
|
font.pointSize: osSettings.bigFontSize
|
||||||
placeholderText:qsTr("to:")
|
placeholderText:qsTr("to:")
|
||||||
text: ""
|
text: reply_to_user
|
||||||
visible:false
|
visible:false
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (text!=""){contactmenu(text)} else {var receiver=getText(0,cursorPosition);contactmenu(receiver+preeditText)}}
|
if (text!=""){contactmenu(text)} else {var receiver=getText(0,cursorPosition);contactmenu(receiver+preeditText)}}
|
||||||
|
@ -257,7 +237,6 @@ Window{
|
||||||
id: bodyField
|
id: bodyField
|
||||||
property string contactprefix:""
|
property string contactprefix:""
|
||||||
property string placeholder: osSettings.osType=="Linux"? qsTr(" Drop your Content here."):""
|
property string placeholder: osSettings.osType=="Linux"? qsTr(" Drop your Content here."):""
|
||||||
//anchors.fill: parent
|
|
||||||
x:mm
|
x:mm
|
||||||
height:Math.max(bodyField.contentHeight+4*mm,2.5*root.fontFactor*osSettings.bigFontSize)
|
height:Math.max(bodyField.contentHeight+4*mm,2.5*root.fontFactor*osSettings.bigFontSize)
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
@ -302,19 +281,16 @@ Window{
|
||||||
text: qsTr("Copy")
|
text: qsTr("Copy")
|
||||||
enabled: bodyField.selectedText
|
enabled: bodyField.selectedText
|
||||||
action: copyAction
|
action: copyAction
|
||||||
//onTriggered: bodyField.copy()
|
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Cut")
|
text: qsTr("Cut")
|
||||||
enabled: bodyField.selectedText
|
enabled: bodyField.selectedText
|
||||||
action: cutAction
|
action: cutAction
|
||||||
//onTriggered: bodyField.cut()
|
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Paste")
|
text: qsTr("Paste")
|
||||||
enabled: bodyField.canPaste
|
enabled: bodyField.canPaste
|
||||||
action: pasteAction
|
action: pasteAction
|
||||||
//onTriggered: bodyField.paste()
|
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Text")
|
text: qsTr("Text")
|
||||||
|
@ -346,7 +322,7 @@ Window{
|
||||||
if(Helperjs.getCount(db,login,"contacts","screen_name",contact.screen_name)>1){
|
if(Helperjs.getCount(db,login,"contacts","screen_name",contact.screen_name)>1){
|
||||||
contact.screen_name=contact.screen_name+"+"+contacts.cid
|
contact.screen_name=contact.screen_name+"+"+contacts.cid
|
||||||
}
|
}
|
||||||
if (newsSwipeview.stacktype=='DirectMessages'){
|
if (windowstate=='directmessage'){
|
||||||
receiverLabel.text=contact.screen_name;
|
receiverLabel.text=contact.screen_name;
|
||||||
reply_to_user=contact.screen_name
|
reply_to_user=contact.screen_name
|
||||||
} else {
|
} else {
|
||||||
|
@ -354,7 +330,7 @@ Window{
|
||||||
bodyField.insert(bodyField.cursorPosition, bodyField.contactprefix+contact.screen_name+" ");
|
bodyField.insert(bodyField.cursorPosition, bodyField.contactprefix+contact.screen_name+" ");
|
||||||
bodyField.cursorPosition=bodyField.cursorPosition+contact.screen_name.length+1
|
bodyField.cursorPosition=bodyField.cursorPosition+contact.screen_name.length+1
|
||||||
}
|
}
|
||||||
//receiverLabel.text=contact.screen_name;
|
|
||||||
contactSelector.visible=false
|
contactSelector.visible=false
|
||||||
}
|
}
|
||||||
delegate: ContactComponent { }
|
delegate: ContactComponent { }
|
||||||
|
@ -457,7 +433,7 @@ Window{
|
||||||
//text: "\uf044"
|
//text: "\uf044"
|
||||||
text: qsTr("Format")
|
text: qsTr("Format")
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
icon.name: "overflow-menu"
|
icon.name: "view-more-symbolic"//"overflow-menu"
|
||||||
icon.source: "qrc:/assets/icons/ellipsis-v.svg"
|
icon.source: "qrc:/assets/icons/ellipsis-v.svg"
|
||||||
ToolTip.delay: 800
|
ToolTip.delay: 800
|
||||||
ToolTip.visible: pressed || hovered
|
ToolTip.visible: pressed || hovered
|
||||||
|
@ -498,11 +474,11 @@ Window{
|
||||||
MButton{
|
MButton{
|
||||||
id:hastagButton
|
id:hastagButton
|
||||||
text: "#"
|
text: "#"
|
||||||
// display: AbstractButton.IconOnly
|
// display: AbstractButton.IconOnly
|
||||||
// icon.name: "tag-symbolic"
|
// icon.name: "tag-symbolic"
|
||||||
// icon.source: "qrc:/assets/icons/hashtag.svg"
|
// icon.source: "qrc:/assets/icons/hashtag.svg"
|
||||||
// icon.width: root.fontFactor*osSettings.bigFontSize
|
// icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
// icon.height: root.fontFactor*osSettings.bigFontSize
|
// icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
ToolTip.delay: 800
|
ToolTip.delay: 800
|
||||||
ToolTip.visible: pressed || hovered
|
ToolTip.visible: pressed || hovered
|
||||||
ToolTip.text: qsTr("Insert previous hashtag")
|
ToolTip.text: qsTr("Insert previous hashtag")
|
||||||
|
@ -585,7 +561,7 @@ Window{
|
||||||
// root.directmessageSignal.connect(directmessagePrepare);
|
// root.directmessageSignal.connect(directmessagePrepare);
|
||||||
root.uploadSignal.connect(sendUrls);
|
root.uploadSignal.connect(sendUrls);
|
||||||
root.sendtextSignal.connect(sendtext);
|
root.sendtextSignal.connect(sendtext);
|
||||||
// if (textfocus==true){bodyField.forceActiveFocus()}
|
bodyField.forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
StateGroup{
|
StateGroup{
|
||||||
|
|
|
@ -45,6 +45,7 @@ Rectangle{
|
||||||
property string newstabstatus: ""
|
property string newstabstatus: ""
|
||||||
|
|
||||||
function newstypeHandling(newstype){
|
function newstypeHandling(newstype){
|
||||||
|
newsModel.clear();
|
||||||
//if (!newsBusy.running) {
|
//if (!newsBusy.running) {
|
||||||
try{newsBusy.running=true}catch(e){print("newsBusy.running=true " + e)};
|
try{newsBusy.running=true}catch(e){print("newsBusy.running=true " + e)};
|
||||||
//root.replySignal("");
|
//root.replySignal("");
|
||||||
|
@ -173,7 +174,7 @@ Rectangle{
|
||||||
newsView.anchors.topMargin=mm
|
newsView.anchors.topMargin=mm
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOldNews(){print("getoldnews")
|
function getOldNews(){
|
||||||
var currentTime= new Date();
|
var currentTime= new Date();
|
||||||
|
|
||||||
try{var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
|
try{var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
|
||||||
|
@ -238,7 +239,12 @@ Rectangle{
|
||||||
if((newstabstatus=="Conversations")&&(newsSwipeview.stacktype=="Home")){
|
if((newstabstatus=="Conversations")&&(newsSwipeview.stacktype=="Home")){
|
||||||
Newsjs.chatsfromdb(db,login,messagetype,[],function(dbnews,lastid){
|
Newsjs.chatsfromdb(db,login,messagetype,[],function(dbnews,lastid){
|
||||||
lastnewsid=lastid;
|
lastnewsid=lastid;
|
||||||
showNews(dbnews);
|
if (dbnews.length==0){
|
||||||
|
newstypeHandling()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
showNews(dbnews);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else if (messagetype==99){
|
else if (messagetype==99){
|
||||||
|
@ -247,7 +253,12 @@ Rectangle{
|
||||||
else{
|
else{
|
||||||
Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
|
Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
|
||||||
lastnewsid=lastid;
|
lastnewsid=lastid;
|
||||||
showNews(dbnews)
|
if (dbnews.length==0){
|
||||||
|
newstypeHandling()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
showNews(dbnews);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,7 +269,7 @@ Rectangle{
|
||||||
newsBusy.running=false;
|
newsBusy.running=false;
|
||||||
expectScreenUpdate=false;
|
expectScreenUpdate=false;
|
||||||
}
|
}
|
||||||
function onSuccess(data,api){print("newsstack api "+api);
|
function onSuccess(data,api){
|
||||||
const newsApiArray=["/api/statuses/friends_timeline",
|
const newsApiArray=["/api/statuses/friends_timeline",
|
||||||
"/api/direct_messages/all",
|
"/api/direct_messages/all",
|
||||||
"/api/direct_messages/conversation",
|
"/api/direct_messages/conversation",
|
||||||
|
@ -327,7 +338,8 @@ Rectangle{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component { id:footerComponent
|
Component {
|
||||||
|
id:footerComponent
|
||||||
Rectangle{
|
Rectangle{
|
||||||
border.color: "#EEEEEE"
|
border.color: "#EEEEEE"
|
||||||
color: osSettings.dialogColor
|
color: osSettings.dialogColor
|
||||||
|
|
|
@ -145,11 +145,11 @@ Page{
|
||||||
switch (typerequest){
|
switch (typerequest){
|
||||||
case "Home": return {iconName:"user-home-symbolic",iconUrl:"qrc:/assets/icons/home.svg"};
|
case "Home": return {iconName:"user-home-symbolic",iconUrl:"qrc:/assets/icons/home.svg"};
|
||||||
case "Favorites": return {iconName:"starred-symbolic",iconUrl:"qrc:/assets/icons/star.svg"};
|
case "Favorites": return {iconName:"starred-symbolic",iconUrl:"qrc:/assets/icons/star.svg"};
|
||||||
case "Replies": return {iconName:"mail-reply-all",iconUrl:"qrc:/assets/icons/exchange.svg"};
|
case "Replies": return {iconName:"mail-reply-all-symbolic",iconUrl:"qrc:/assets/icons/exchange.svg"};
|
||||||
case "DirectMessages": return {iconName:"mail-message",iconUrl:"qrc:/assets/icons/envelope.svg"};
|
case "DirectMessages": return {iconName:"mail-message",iconUrl:"qrc:/assets/icons/envelope.svg"};
|
||||||
case "Public Timeline": return {iconName:"globe",iconUrl:"qrc:/assets/icons/globe.svg"};
|
case "Public Timeline": return {iconName:"globe",iconUrl:"qrc:/assets/icons/globe.svg"};
|
||||||
case "Group News": return {iconName:"group",iconUrl:"qrc:/assets/icons/users.svg"};
|
case "Group News": return {iconName:"group",iconUrl:"qrc:/assets/icons/users.svg"};
|
||||||
case "Search": return {iconName:"search",iconUrl:"qrc:/assets/icons/search.svg"};
|
case "Search": return {iconName:"system-search",iconUrl:"qrc:/assets/icons/search.svg"};
|
||||||
case "Notifications": return {iconName:"notifications",iconUrl:"qrc:/assets/icons/bell.svg"};
|
case "Notifications": return {iconName:"notifications",iconUrl:"qrc:/assets/icons/bell.svg"};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ Page{
|
||||||
anchors.bottom: newsSwipeview.bottom
|
anchors.bottom: newsSwipeview.bottom
|
||||||
// fontColor: "grey"
|
// fontColor: "grey"
|
||||||
// border.color: "transparent"
|
// border.color: "transparent"
|
||||||
icon.name: "open-for-editing"
|
icon.name: "document-edit-symbolic" //"open-for-editing"
|
||||||
//text: "o \uf040"
|
//text: "o \uf040"
|
||||||
//implicitHeight: root.fontFactor*osSettings.bigFontSize
|
//implicitHeight: root.fontFactor*osSettings.bigFontSize
|
||||||
onClicked:{
|
onClicked:{
|
||||||
|
@ -225,11 +225,12 @@ Page{
|
||||||
height: newstabitem.height-(newstabbar.height+root.fontFactor*osSettings.systemFontSize)
|
height: newstabitem.height-(newstabbar.height+root.fontFactor*osSettings.systemFontSize)
|
||||||
x: leftDrawer.width
|
x: leftDrawer.width
|
||||||
y: newstabbar.height
|
y: newstabbar.height
|
||||||
function onDirectMessage(friend){currentIndex=2}
|
//function onDirectMessage(friend){currentIndex=2}
|
||||||
|
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
if(newstypes[currentIndex]){stacktype=newstypes[currentIndex]}
|
if(newstypes[currentIndex]){stacktype=newstypes[currentIndex]}
|
||||||
else{stacktype="Home"}
|
else{stacktype="Home"}
|
||||||
|
newstabbar.currentIndex=newsSwipeview.currentIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader{
|
Loader{
|
||||||
|
@ -239,7 +240,6 @@ Page{
|
||||||
source:(newsSwipeview.currentIndex==1)? "qrc:/qml/newsqml/NewsStack.qml":""
|
source:(newsSwipeview.currentIndex==1)? "qrc:/qml/newsqml/NewsStack.qml":""
|
||||||
}
|
}
|
||||||
Loader{
|
Loader{
|
||||||
//property var friend:({})
|
|
||||||
source:(newsSwipeview.currentIndex==2)? "qrc:/qml/newsqml/NewsStack.qml":""
|
source:(newsSwipeview.currentIndex==2)? "qrc:/qml/newsqml/NewsStack.qml":""
|
||||||
}
|
}
|
||||||
Loader{
|
Loader{
|
||||||
|
@ -286,7 +286,7 @@ Page{
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
root.directmessageSignal.connect(newsSwipeview.onDirectMessage);
|
root.sendmessageSignal.connect(openMessageSend);
|
||||||
root.globaloptionsChanged();
|
root.globaloptionsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,11 @@ Page{
|
||||||
id:video;
|
id:video;
|
||||||
anchors.fill:parent
|
anchors.fill:parent
|
||||||
|
|
||||||
onErrorChanged:{noticeText.font.pointSize=osSettings.bigFontSize;noticeText.text=errorString;}
|
onErrorChanged:{
|
||||||
|
noticeText.font.pointSize=osSettings.bigFontSize;
|
||||||
|
noticeText.text=errorString;
|
||||||
|
Qt.openUrlExternally(source)
|
||||||
|
}
|
||||||
fillMode: Image.PreserveAspectFit;
|
fillMode: Image.PreserveAspectFit;
|
||||||
// autoLoad: true
|
// autoLoad: true
|
||||||
// autoPlay: true
|
// autoPlay: true
|
||||||
|
|
|
@ -202,15 +202,19 @@ Item {
|
||||||
icon.source: "qrc:/assets/icons/chevron-down.svg"
|
icon.source: "qrc:/assets/icons/chevron-down.svg"
|
||||||
icon.width: 2*root.fontFactor*osSettings.bigFontSize
|
icon.width: 2*root.fontFactor*osSettings.bigFontSize
|
||||||
icon.height: 2*root.fontFactor*osSettings.bigFontSize
|
icon.height: 2*root.fontFactor*osSettings.bigFontSize
|
||||||
background: Rectangle{color: "transparent";
|
background: Rectangle{
|
||||||
radius: 0.5*mm}
|
gradient: Gradient {
|
||||||
|
GradientStop { position: 0.0; color: "transparent" }
|
||||||
|
GradientStop { position: 0.7; color: osSettings.backgroundColor}
|
||||||
|
}
|
||||||
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (icon.name=="arrow-down"){
|
if (icon.name=="arrow-down"){
|
||||||
toprow.height=toprow.implicitHeight+6*mm;
|
toprow.height=toprow.implicitHeight+5*mm;
|
||||||
icon.name=="arrow-up";icon.source="qrc:/assets/icons/chevron-up.svg";
|
icon.name="arrow-up";icon.source="qrc:/assets/icons/chevron-up.svg";
|
||||||
} else {
|
} else {
|
||||||
toprow.height=Math.min(toprow.implicitHeight,3/4*root.height);
|
toprow.height=Math.min(toprow.implicitHeight,3/4*root.height);
|
||||||
icon.name=="arrow-down";icon.source="qrc:/assets/icons/chevron-down.svg";
|
icon.name="arrow-down";icon.source="qrc:/assets/icons/chevron-down.svg";
|
||||||
newsView.positionViewAtIndex(index,ListView.Beginning);
|
newsView.positionViewAtIndex(index,ListView.Beginning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,6 +295,9 @@ Item {
|
||||||
icon.source: "qrc:/assets/icons/smile-o.svg"
|
icon.source: "qrc:/assets/icons/smile-o.svg"
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
|
ToolTip.delay: 800
|
||||||
|
ToolTip.visible: pressed || hovered
|
||||||
|
ToolTip.text: qsTr("Like")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false;
|
if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false;
|
||||||
|
@ -312,6 +319,9 @@ Item {
|
||||||
icon.source: favoritedCheckbox.checked?"qrc:/assets/icons/star.svg":"qrc:/assets/icons/frown-o.svg"
|
icon.source: favoritedCheckbox.checked?"qrc:/assets/icons/star.svg":"qrc:/assets/icons/frown-o.svg"
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
|
ToolTip.delay: 800
|
||||||
|
ToolTip.visible: pressed || hovered
|
||||||
|
ToolTip.text: qsTr("Dislike")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false;
|
if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false;
|
||||||
|
@ -335,6 +345,10 @@ Item {
|
||||||
icon.width: root.fontFactor*osSettings.systemFontSize
|
icon.width: root.fontFactor*osSettings.systemFontSize
|
||||||
icon.height: root.fontFactor*osSettings.systemFontSize
|
icon.height: root.fontFactor*osSettings.systemFontSize
|
||||||
icon.color: favoritedCheckbox.checked?osSettings.primaryTextColor: osSettings.secondaryTextColor
|
icon.color: favoritedCheckbox.checked?osSettings.primaryTextColor: osSettings.secondaryTextColor
|
||||||
|
ToolTip.delay: 800
|
||||||
|
ToolTip.visible: pressed || hovered
|
||||||
|
ToolTip.text: qsTr("Favorite")
|
||||||
|
|
||||||
checked:(newsitemobject.favorited>0)
|
checked:(newsitemobject.favorited>0)
|
||||||
onClicked:{
|
onClicked:{
|
||||||
if(!checked){
|
if(!checked){
|
||||||
|
@ -353,10 +367,14 @@ Item {
|
||||||
visible: (newsitemobject.messagetype!==2)
|
visible: (newsitemobject.messagetype!==2)
|
||||||
width: newsitem.width/5
|
width: newsitem.width/5
|
||||||
height: parent.height
|
height: parent.height
|
||||||
icon.name: "comment-symbolic"
|
icon.name: "mail-reply-sender-symbolic"
|
||||||
icon.source: "qrc:/assets/icons/reply.svg"
|
icon.source: "qrc:/assets/icons/reply.svg"
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
|
ToolTip.delay: 800
|
||||||
|
ToolTip.visible: pressed || hovered
|
||||||
|
ToolTip.text: qsTr("Reply")
|
||||||
|
|
||||||
onClicked:{
|
onClicked:{
|
||||||
openMessageSend("reply",newsitemobject)
|
openMessageSend("reply",newsitemobject)
|
||||||
}
|
}
|
||||||
|
@ -367,11 +385,16 @@ Item {
|
||||||
visible: (newsitemobject.messagetype!==2)
|
visible: (newsitemobject.messagetype!==2)
|
||||||
width: newsitem.width/5
|
width: newsitem.width/5
|
||||||
height: parent.height
|
height: parent.height
|
||||||
icon.name: "overflow-menu"
|
icon.name: "view-more-symbolic"//"overflow-menu"
|
||||||
icon.source: "qrc:/assets/icons/ellipsis-v.svg"
|
icon.source: "qrc:/assets/icons/ellipsis-v.svg"
|
||||||
icon.width: root.fontFactor*osSettings.bigFontSize
|
icon.width: root.fontFactor*osSettings.bigFontSize
|
||||||
icon.height: root.fontFactor*osSettings.bigFontSize
|
icon.height: root.fontFactor*osSettings.bigFontSize
|
||||||
onClicked:{newsmenu.popup()}
|
ToolTip.delay: 800
|
||||||
|
ToolTip.visible: pressed || hovered
|
||||||
|
ToolTip.text: qsTr("Menu")
|
||||||
|
|
||||||
|
onClicked:{
|
||||||
|
newsmenu.popup()}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,7 +444,7 @@ Item {
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("DM")
|
text: qsTr("DM")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.directmessageSignal(newsitemobject.user.screen_name);
|
root.sendmessageSignal("directmessage",newsitemobject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action {
|
Action {
|
||||||
|
@ -489,4 +512,5 @@ Item {
|
||||||
text: qsTr("External")
|
text: qsTr("External")
|
||||||
onTriggered: {Qt.openUrlExternally(newsitemobject.external_url)}
|
onTriggered: {Qt.openUrlExternally(newsitemobject.external_url)}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue