version v0.6.7 with moderation
This commit is contained in:
parent
5f8edccdfe
commit
48a70b8395
46 changed files with 2106 additions and 1026 deletions
|
@ -59,7 +59,7 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
|
|||
//print(api+JSON.stringify(login)+Qt.atob(login.password));
|
||||
if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
|
||||
} else if(xhrequest.readyState === XMLHttpRequest.DONE) {
|
||||
try{ if (xhrequest.responseText!=""){print (xhrequest.responseText)
|
||||
try{ if (xhrequest.responseText!=""){//print (xhrequest.responseText)
|
||||
callback(xhrequest.responseText)
|
||||
}else{//print("API:\n" +api+" NO RESPONSE");
|
||||
//showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow)
|
||||
|
@ -68,7 +68,8 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
|
|||
}
|
||||
catch (e){
|
||||
print("API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText);
|
||||
showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)}
|
||||
//showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)
|
||||
}
|
||||
}
|
||||
}
|
||||
xhrequest.open(method, login.server+api,true,login.username,Qt.atob(login.password));
|
||||
|
@ -199,7 +200,7 @@ function updateData(database,table, username, key, value, callback,filter,filter
|
|||
function showMessage(header,message,rootwindow){//print(message);
|
||||
var cleanmessage=message.replace(/"/g,"-");
|
||||
if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'}
|
||||
var messageString='import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:"'+header+'";standardButtons: StandardButton.Ok; text:" '+cleanmessage+'"}';
|
||||
var messageString='import QtQuick 2.0; import QtQuick.Controls 2.15; import QtQuick.Controls.Material 2.12; Dialog{ visible: true; title:"'+header+'";standardButtons: Dialog.Ok;anchors.centerIn: parent;Label{text:" '+cleanmessage+'"}}';
|
||||
var messageObject=Qt.createQmlObject(messageString,rootwindow,"messageOutput");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue