OAuth and bugfixes

This commit is contained in:
LubuWest 2023-05-24 21:40:26 +02:00
parent e58a1f69dc
commit d43c18bb76
65 changed files with 1681 additions and 1494 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
CMakeLists.txt.user*
friendiqa.pro.user*
IJPSvd.json

View file

@ -1,3 +1,9 @@
## v0.6.8
* OAuth
* New translation: netherland
## v0.6.7 ## v0.6.7
* Upload multiple images for post and add image descriptions * Upload multiple images for post and add image descriptions
@ -27,7 +33,6 @@
* Removed permissions for new messages due to buggy Contacts API * Removed permissions for new messages due to buggy Contacts API
* Sync all accounts in background (not only active) * Sync all accounts in background (not only active)
## v0.6.3 ## v0.6.3
* Dark theme * Dark theme
@ -205,4 +210,4 @@
# Translations # Translations
* German, Spanish * German, Spanish

View file

@ -1,6 +1,6 @@
--- source-linux/common/filesystem.cpp --- source-linux/common/filesystem.cpp
+++ source-linux/common/filesystem.cpp +++ source-linux/common/filesystem.cpp
@@ -178,7 +178,7 @@ @@ -165,7 +165,7 @@
QTextStream stream(&file); QTextStream stream(&file);
stream << "[Desktop Entry]" << Qt::endl; stream << "[Desktop Entry]" << Qt::endl;
stream << "Name=Friendiqa" << Qt::endl; stream << "Name=Friendiqa" << Qt::endl;

View file

@ -104,7 +104,6 @@ Currently supported:
* Sync home timeline, replies, DM, Events, friend requests; Notify yes/no * Sync home timeline, replies, DM, Events, friend requests; Notify yes/no
* Hide #nsfw * Hide #nsfw
ToDo
* OAuth * OAuth
@ -121,8 +120,8 @@ ToDo
# Translations # Translations
* German, Spanish, Italian, Hungarian * German, Spanish, Italian, Hungarian, dutch
* To contribute translations: Have a look at linux-sources/translations/friendiqa-de.ts and open it with an editor. It's an xml file. Change values and send me the file to thomasschmidt45 at gmx.net / do pull request. * To contribute translations: <https://translate.codeberg.org/projects/friendiqa/friendiqa/>
# Install # Install
@ -133,4 +132,4 @@ ToDo
## License ## License
Pubished under the [GPL v3](http://gplv3.fsf.org) with the exception of the Openssl library, which is published under OpenSSL License. Pubished under the [GPL v3](http://gplv3.fsf.org) with the exception of the Openssl library, which is published under OpenSSL License.

View file

@ -0,0 +1,96 @@
# TEMPLATE = app
# TARGET = friendiqa
# CONFIG += release
# QT += qml quick gui widgets sql webview dbus webengine
cmake_minimum_required(VERSION 3.1.0)
project(friendiqa VERSION 0.6 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
find_package(Qt5 COMPONENTS Widgets Quick Sql DBus WebView REQUIRED)
#Webview Webengine
set(MOC_SOURCES common/uploadableimage.h
common/xhr.h
common/filesystem.h
common/remoteauthasyncimageprovider.h
common/updatenews.h
common/alarm.h)
set(SOURCES common/friendiqa.cpp
common/uploadableimage.cpp
common/xhr.cpp
common/filesystem.cpp
common/remoteauthasyncimageprovider.cpp
common/updatenews.cpp
common/alarmandroid.cpp)
include_directories(common)
add_executable(friendiqa ${SOURCES} ${MOC_SOURCES} application.qrc)
target_link_libraries(friendiqa Qt::Core)
target_link_libraries(friendiqa Qt::Widgets)
target_link_libraries(friendiqa Qt::Quick)
target_link_libraries(friendiqa Qt::Sql)
target_link_libraries(friendiqa Qt::WebView)
target_link_libraries(friendiqa Qt::DBus)
# target_link_libraries(friendiqa Qt::Webengine)
# qt5_use_modules(friendiqa Core Widgets Quick Sql DBus)
install(TARGETS friendiqa DESTINATION bin)
#RESOURCES = application.qrc
# OTHER_FILES += qml/friendiqa.qml \
# translations/*.ts \
# qml/*.qml
# qml/newsqml/*.qml
# qml/contactqml/*.qml
# qml/photoqml/*.qml
# qml/configqml/*.qml
# js/*.js
#TRANSLATIONS += translations/friendiqa-de.ts \
# translations/friendiqa-es.ts \
# translations/friendiqa-it.ts
# HEADERS += \
# common/uploadableimage.h \
# common/xhr.h \
# common/filesystem.h \
# common/remoteauthasyncimageprovider.h \
# common/updatenews.h \
# common/alarm.h
#DISTFILES += \
# qml/calendarqml/*.qml \
# translations/*.ts \
# translations/*.qm \
# qml/*.qml \
# qml/newsqml/*.qml \
# qml/contactqml/*.qml \
# qml/photoqml/*.qml \
# qml/configqml/*.qml \
# js/*.js \
# target.path=/usr/bin
# desktop.path = /usr/share/applications
# desktop.files = images/de.ma-nic.Friendiqa.desktop
# icon.path = /usr/share/icons/hicolor/scalable/apps
# icon.files = images/Friendiqa.svg
# INSTALLS+=target desktop icon

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.7" android:versionCode="33" android:installLocation="auto"> <manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.8" android:versionCode="34" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31"/> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application. <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.

View file

@ -1,7 +1,4 @@
# androidBuildToolsVersion=25.0.3
# androidCompileSdkVersion=26
buildDir=.build buildDir=.build
# qt5AndroidDir=/home/pankraz/Qt/5.11.1/android_armv7/src/android/java
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
android.enforceUniquePackageName=false android.enforceUniquePackageName=false

View file

@ -16,7 +16,7 @@ public class FriendiqaStopService extends JobService{
@Override @Override
public boolean onStartJob(JobParameters params) { public boolean onStartJob(JobParameters params) {
//Log.d(TAG,"Friendiqa JobServiceStop"); Log.d(TAG,"Friendiqa JobServiceStop");
Context context = this.getApplicationContext(); Context context = this.getApplicationContext();
AndroidNativeService fs = new AndroidNativeService(); AndroidNativeService fs = new AndroidNativeService();
fs.stopQtService(context); fs.stopQtService(context);

View file

@ -36,6 +36,7 @@
#include "xhr.h" #include "xhr.h"
#include "updatenews.h" #include "updatenews.h"
#include "filesystem.h" #include "filesystem.h"
#include "oauth.h"
#include "remoteauthasyncimageprovider.h" #include "remoteauthasyncimageprovider.h"
#include "AndroidNative/systemdispatcher.h" #include "AndroidNative/systemdispatcher.h"
@ -54,9 +55,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
Q_DECL_EXPORT int main(int argc, char *argv[]) { Q_DECL_EXPORT int main(int argc, char *argv[]) {
//if (argc>1){qDebug()<< "argc Friendiqa"<< argc <<" argv1" <<argv[1];}
if ((argc>1) && (qstrcmp(argv[1],"-service")==0)){ if ((argc>1) && (qstrcmp(argv[1],"-service")==0)){
//qDebug()<<"FriendiqaMain Service";
QAndroidService app(argc, argv); QAndroidService app(argc, argv);
UPDATENEWS* updatenews= UPDATENEWS::instance(); UPDATENEWS* updatenews= UPDATENEWS::instance();
updatenews->setDatabase(); updatenews->setDatabase();
@ -69,7 +68,6 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) {
else{ else{
QApplication app(argc, argv); QApplication app(argc, argv);
QQmlApplicationEngine view; QQmlApplicationEngine view;
//qDebug()<<"FriendiqaMain started";
QTranslator qtTranslator; QTranslator qtTranslator;
qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations"); qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
app.installTranslator(&qtTranslator); app.installTranslator(&qtTranslator);
@ -84,6 +82,8 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) {
view.rootContext()->setContextProperty("alarm", alarm); view.rootContext()->setContextProperty("alarm", alarm);
UPDATENEWS* updatenews = UPDATENEWS::instance(); UPDATENEWS* updatenews = UPDATENEWS::instance();
view.rootContext()->setContextProperty("updatenews", updatenews); view.rootContext()->setContextProperty("updatenews", updatenews);
OAuthWrapper* oauth2 = OAuthWrapper::instance();
view.rootContext()->setContextProperty("oauth2", oauth2);
view.load(QUrl("qrc:/qml/friendiqa.qml")); view.load(QUrl("qrc:/qml/friendiqa.qml"));
view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit())); view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit()));

View file

@ -0,0 +1 @@
/home/pankraz/ownCloud/clientsync/Friendiqa/v0.6/source-linux/common/oauth.cpp

View file

@ -0,0 +1 @@
/home/pankraz/ownCloud/clientsync/Friendiqa/v0.6/source-linux/common/oauth.h

View file

@ -13,7 +13,7 @@
TEMPLATE = app TEMPLATE = app
TARGET = friendiqa TARGET = friendiqa
CONFIG += release CONFIG += release
QT += core core-private qml quick gui widgets sql androidextras #webengine webview QT += core core-private qml quick gui widgets sql androidextras network networkauth #webengine webview
include(androidnative.pri/androidnative.pri) include(androidnative.pri/androidnative.pri)
@ -23,7 +23,8 @@ SOURCES += common/friendiqa.cpp \
common/filesystemandroid.cpp \ common/filesystemandroid.cpp \
common/remoteauthasyncimageprovider.cpp \ common/remoteauthasyncimageprovider.cpp \
common/updatenews.cpp \ common/updatenews.cpp \
common/alarmandroid.cpp common/alarmandroid.cpp \
common/oauth.cpp
lupdate_only{ lupdate_only{
SOURCES = qml/friendiqa.qml \ SOURCES = qml/friendiqa.qml \
qml/*.qml qml/*.qml
@ -38,7 +39,6 @@ SOURCES += common/friendiqa.cpp \
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
RESOURCES = application.qrc RESOURCES = application.qrc
OTHER_FILES += qml/friendiqa.qml \ OTHER_FILES += qml/friendiqa.qml \
@ -53,7 +53,8 @@ OTHER_FILES += qml/friendiqa.qml \
TRANSLATIONS += translations/friendiqa-de.ts \ TRANSLATIONS += translations/friendiqa-de.ts \
translations/friendiqa-es.ts \ translations/friendiqa-es.ts \
translations/friendiqa-it.ts \ translations/friendiqa-it.ts \
translations/friendiqa-hu.ts translations/friendiqa-hu.ts \
translations/friendiqa-nl.ts
HEADERS += \ HEADERS += \
common/uploadableimage.h \ common/uploadableimage.h \
@ -61,7 +62,8 @@ HEADERS += \
common/filesystem.h \ common/filesystem.h \
common/remoteauthasyncimageprovider.h \ common/remoteauthasyncimageprovider.h \
common/updatenews.h \ common/updatenews.h \
common/alarm.h common/alarm.h \
common/oauth.h
DISTFILES += \ DISTFILES += \
android/gradle.properties \ android/gradle.properties \

View file

@ -78,7 +78,6 @@ ApplicationWindow{
function onLoginChanged(login){ function onLoginChanged(login){
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")} if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
else{ else{
if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;}
Newsjs.getCurrentContacts(login,db,function(contacts){ Newsjs.getCurrentContacts(login,db,function(contacts){
contactlist=contacts})} contactlist=contacts})}
} }

View file

@ -13,14 +13,15 @@ if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif() endif()
find_package(Qt5 COMPONENTS Widgets Quick Sql DBus REQUIRED) find_package(Qt5 COMPONENTS Widgets Quick Sql DBus NetworkAuth REQUIRED)
set(MOC_SOURCES common/uploadableimage.h set(MOC_SOURCES common/uploadableimage.h
common/xhr.h common/xhr.h
common/filesystem.h common/filesystem.h
common/remoteauthasyncimageprovider.h common/remoteauthasyncimageprovider.h
common/updatenews.h common/updatenews.h
common/alarm.h) common/alarm.h
common/oauth.h)
set(SOURCES common/friendiqa.cpp set(SOURCES common/friendiqa.cpp
common/uploadableimage.cpp common/uploadableimage.cpp
@ -28,7 +29,8 @@ set(SOURCES common/friendiqa.cpp
common/filesystem.cpp common/filesystem.cpp
common/remoteauthasyncimageprovider.cpp common/remoteauthasyncimageprovider.cpp
common/updatenews.cpp common/updatenews.cpp
common/alarmlinux.cpp) common/alarmlinux.cpp
common/oauth.cpp)
include_directories(common) include_directories(common)
@ -39,6 +41,7 @@ target_link_libraries(friendiqa Qt::Widgets)
target_link_libraries(friendiqa Qt::Quick) target_link_libraries(friendiqa Qt::Quick)
target_link_libraries(friendiqa Qt::Sql) target_link_libraries(friendiqa Qt::Sql)
target_link_libraries(friendiqa Qt::DBus) target_link_libraries(friendiqa Qt::DBus)
target_link_libraries(friendiqa Qt::NetworkAuth)
install(TARGETS friendiqa DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS friendiqa DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES images/de.manic.Friendiqa.desktop DESTINATION share/applications) install(FILES images/de.manic.Friendiqa.desktop DESTINATION share/applications)

View file

@ -42,8 +42,6 @@
<file>qml/configqml/OSSettingsAndroid.qml</file> <file>qml/configqml/OSSettingsAndroid.qml</file>
<file>qml/configqml/OSSettingsLinux.qml</file> <file>qml/configqml/OSSettingsLinux.qml</file>
<file>js/image.js</file> <file>js/image.js</file>
<file>js/yplayer.html</file>
<file>js/layout.js</file>
<file>js/photoworker.js</file> <file>js/photoworker.js</file>
<file>js/service.js</file> <file>js/service.js</file>
<file>js/news.js</file> <file>js/news.js</file>
@ -256,5 +254,7 @@
<file>qml/newsqml/ReportUser.qml</file> <file>qml/newsqml/ReportUser.qml</file>
<file>qml/newsqml/MessageImageUploadDialog.qml</file> <file>qml/newsqml/MessageImageUploadDialog.qml</file>
<file>qml/configqml/AcceptRules.qml</file> <file>qml/configqml/AcceptRules.qml</file>
<file>translations/friendiqa-nl.qm</file>
<file>translations/friendiqa-nl.ts</file>
</qresource> </qresource>
</RCC> </RCC>

View file

@ -68,10 +68,7 @@ bool FILESYSTEM::Visibility()
QString FILESYSTEM::homePath() const QString FILESYSTEM::homePath() const
{ {
//QDir dir(m_Directory);
//
QString homeDir=QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);; QString homeDir=QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);;
//qDebug(homeDir);
return homeDir; return homeDir;
} }
@ -96,11 +93,9 @@ void FILESYSTEM::makeDir(QString name)
{ {
QDir dir(m_Directory); QDir dir(m_Directory);
if (dir.mkdir(name)){ if (dir.mkdir(name)){
//qDebug() << "makedir success" <<name;
emit success(name); emit success(name);
} }
else { else {
qDebug() << "makedir error" <<name;
emit error(name,1); emit error(name,1);
} }
} }
@ -109,7 +104,6 @@ void FILESYSTEM::makePath(QString name)
{ {
QDir dir(m_Directory); QDir dir(m_Directory);
if (dir.mkpath(name)){ if (dir.mkpath(name)){
//qDebug() << "makepath success" <<name;
emit success(name); emit success(name);
} }
else { else {
@ -120,7 +114,6 @@ void FILESYSTEM::makePath(QString name)
void FILESYSTEM::rmDir() void FILESYSTEM::rmDir()
{ {
QDir dir(m_Directory); QDir dir(m_Directory);
//qDebug()<<m_Directory;
if (dir.removeRecursively()){ if (dir.removeRecursively()){
emit success(m_Directory); emit success(m_Directory);
} }
@ -130,8 +123,6 @@ void FILESYSTEM::rmDir()
void FILESYSTEM::rmFile(QString name) void FILESYSTEM::rmFile(QString name)
{ {
QDir dir(m_Directory); QDir dir(m_Directory);
//qDebug()<<m_Directory;
//qDebug(name);
if(dir.remove(name)){ if(dir.remove(name)){
emit success(name); emit success(name);
} }
@ -144,8 +135,6 @@ QFileInfoList FILESYSTEM::fileList()
filters << "*.png" <<"*.PNG" << "*.jpg" << "*.JPG" << "*.JPEG"; filters << "*.png" <<"*.PNG" << "*.jpg" << "*.JPG" << "*.JPEG";
dir.setNameFilters(filters); dir.setNameFilters(filters);
dir.setSorting(QDir::Time | QDir::Reversed); dir.setSorting(QDir::Time | QDir::Reversed);
//QStringList m_Filelist=dir.entryInfoList();
//qDebug() << "filelist " << m_Filelist;
return dir.entryInfoList(); return dir.entryInfoList();
} }
@ -185,3 +174,13 @@ void FILESYSTEM::setAutostart(bool autostart) {
} }
} }
} }
QString FILESYSTEM::osType() const
{
return QSysInfo::productType();
}
QString FILESYSTEM::hostname() const
{
return QSysInfo::machineHostName();
}

View file

@ -35,7 +35,7 @@
#include <QDir> #include <QDir>
#include <QObject> #include <QObject>
#include <QStandardPaths> #include <QStandardPaths>
#include <QSysInfo>
//#include <QtAndroidExtras> //#include <QtAndroidExtras>
//#include <QAndroidActivityResultReceiver> //#include <QAndroidActivityResultReceiver>
@ -47,6 +47,8 @@ class FILESYSTEM : public QObject//, public QAndroidActivityResultReceiver
//Q_PROPERTY(bool direxist READ direxist) //Q_PROPERTY(bool direxist READ direxist)
Q_PROPERTY(QString homePath READ homePath) Q_PROPERTY(QString homePath READ homePath)
Q_PROPERTY(bool isAutostart READ isAutostart) Q_PROPERTY(bool isAutostart READ isAutostart)
Q_PROPERTY(QString osType READ osType CONSTANT)
Q_PROPERTY(QString hostname READ hostname CONSTANT)
//Q_PROPERTY(QString cameraPath READ cameraPath) //Q_PROPERTY(QString cameraPath READ cameraPath)
@ -61,7 +63,8 @@ public:
QString homePath() const; QString homePath() const;
bool Visibility(); bool Visibility();
bool isAutostart(); bool isAutostart();
QString osType() const;
QString hostname() const;
//QString cameraPath() const; //QString cameraPath() const;
// virtual void handleActivityResult(int receiverRequestCode, int resultCode, const QAndroidJniObject &data); // virtual void handleActivityResult(int receiverRequestCode, int resultCode, const QAndroidJniObject &data);

View file

@ -158,3 +158,13 @@ void FILESYSTEM::setAutostart(bool autostart) {
} }
} }
} }
QString FILESYSTEM::osType() const
{
return QSysInfo::productType();
}
QString FILESYSTEM::hostname() const
{
return QSysInfo::machineHostName();
}

View file

@ -40,6 +40,7 @@
#include "filesystem.h" #include "filesystem.h"
#include "remoteauthasyncimageprovider.h" #include "remoteauthasyncimageprovider.h"
#include "alarm.h" #include "alarm.h"
#include "oauth.h"
//#include "AndroidNative/systemdispatcher.h" //#include "AndroidNative/systemdispatcher.h"
//#include "AndroidNative/environment.h" //#include "AndroidNative/environment.h"
//#include "AndroidNative/debug.h" //#include "AndroidNative/debug.h"
@ -107,6 +108,9 @@ int main(int argc, char *argv[]) {
UPDATENEWS* updatenews = UPDATENEWS::instance(); UPDATENEWS* updatenews = UPDATENEWS::instance();
view.rootContext()->setContextProperty("updatenews", updatenews); view.rootContext()->setContextProperty("updatenews", updatenews);
OAuthWrapper* oauth2 = OAuthWrapper::instance();
view.rootContext()->setContextProperty("oauth2", oauth2);
qmlRegisterType<QSystemTrayIcon>("QSystemTrayIcon", 1, 0, "QSystemTrayIcon"); qmlRegisterType<QSystemTrayIcon>("QSystemTrayIcon", 1, 0, "QSystemTrayIcon");
qRegisterMetaType<QSystemTrayIcon::ActivationReason>("ActivationReason"); qRegisterMetaType<QSystemTrayIcon::ActivationReason>("ActivationReason");
view.rootContext()->setContextProperty("iconTray", QIcon(":/images/Friendica_monochrome.png")); view.rootContext()->setContextProperty("iconTray", QIcon(":/images/Friendica_monochrome.png"));

View file

@ -0,0 +1,88 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "oauth.h"
#include <QtGui>
#include <QtCore>
#include <QtNetworkAuth>
OAuthWrapper *OAuthWrapper::instance()
{
static OAuthWrapper oa2;
return &oa2;
}
OAuthWrapper::OAuthWrapper(QObject *parent) : QObject(parent)
{
auto replyHandler = new QOAuthHttpServerReplyHandler(1337, this);
oauth2.setReplyHandler(replyHandler);
oauth2.setScope("read+write+follow+push");
connect(&oauth2, &QOAuth2AuthorizationCodeFlow::statusChanged, [=](
QAbstractOAuth::Status status) {
if (status == QAbstractOAuth::Status::Granted){
QMapIterator<QString, QVariant> i(oauth2.extraTokens());
while (i.hasNext()) {
i.next();
//qDebug() << i.key() << ": " << i.value() << Qt::endl;
}
emit success(oauth2.token());
}
});
connect(&oauth2, &QOAuth2AuthorizationCodeFlow::authorizeWithBrowser,
&QDesktopServices::openUrl);
}
void OAuthWrapper::setClientId(QString clientid)
{
m_clientid = clientid;
}
void OAuthWrapper::setServer(QString server)
{
m_server = server;
}
void OAuthWrapper::setClientSecret(QString clientsecret)
{
m_clientsecret = clientsecret;
}
void OAuthWrapper::grant()
{
oauth2.setClientIdentifier(m_clientid);
oauth2.setAuthorizationUrl(QUrl(m_server + "/oauth/authorize"));
oauth2.setAccessTokenUrl(QUrl(m_server + "/oauth/token"));
oauth2.setClientIdentifierSharedKey(m_clientsecret);
oauth2.grant();
}

View file

@ -0,0 +1,71 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef OAUTH_H
#define OAUTH_H
#include <QtCore>
#include <QtNetwork>
#include <QOAuth2AuthorizationCodeFlow>
class OAuthWrapper : public QObject//, public QAndroidActivityResultReceiver
{
Q_OBJECT
public:
OAuthWrapper(QObject *parent = nullptr);;
OAuthWrapper(const QString &clientIdentifier, QObject *parent = nullptr);
static OAuthWrapper *instance();
// bool isPermanent() const;
// void setPermanent(bool value);
signals:
void success(QString token);
void error(QString error);
public slots:
void grant();
void setServer(QString server);
void setClientId(QString clientid);
void setClientSecret(QString clientsecret);
private:
QOAuth2AuthorizationCodeFlow oauth2;
// bool permanent = false;
QString m_clientid;
QString m_clientsecret;
QString m_server;
};
#endif //OAuthWrapper

View file

@ -59,14 +59,14 @@ UPDATENEWS::UPDATENEWS(QObject *parent) : QObject(parent)
} }
void UPDATENEWS::setUrl(QString url) //void UPDATENEWS::setUrl(QString url)
{ //{
if (url!=m_url) { // if (url!=m_url) {
m_url = url; // m_url = url;
xhr.setUrl(url); // xhr.setUrl(url);
emit urlChanged(m_url); // emit urlChanged(m_url);
} // }
} //}
void UPDATENEWS::setSyncAll(bool syncAll) void UPDATENEWS::setSyncAll(bool syncAll)
{ {
@ -77,8 +77,11 @@ void UPDATENEWS::setDatabase()
{ {
static QQmlEngine qe; static QQmlEngine qe;
QString db_url=qe.offlineStorageDatabaseFilePath("Friendiqa"); QString db_url=qe.offlineStorageDatabaseFilePath("Friendiqa");
m_db = QSqlDatabase::addDatabase("QSQLITE"); if (!m_db.open())
m_db.setDatabaseName(QUrl("file://"+db_url+".sqlite").toLocalFile()); {
m_db = QSqlDatabase::addDatabase("QSQLITE");
m_db.setDatabaseName(QUrl("file://"+db_url+".sqlite").toLocalFile());
}
if (!m_db.open()) if (!m_db.open())
{ {
@ -87,9 +90,46 @@ void UPDATENEWS::setDatabase()
} }
QJsonArray UPDATENEWS::getAccounts(QString filtername, QString filtervalue){
QString filterstring="";
if (filtername!=""){
bool ok;
int filternumber = filtervalue.toInt(&ok, 10);
if(ok){
filterstring=" WHERE " + filtername + " = " + filtervalue;
}
else{
filterstring=" WHERE " + filtername + " = '" + filtervalue +"'";
}
}
QSqlQuery query("SELECT * FROM config" + filterstring + " ORDER BY isActive ASC, username ASC",m_db);
QJsonArray accountlist;
while(query.next()){
{
QJsonObject accountData;
accountData.insert("server",query.value(0).toString());
accountData.insert("username",query.value(1).toString());
accountData.insert("password",query.value(2).toString());
accountData.insert("imagestore",query.value(3).toString());
accountData.insert("isActive",query.value(7).toString());
QJsonArray m_permissions=query.value(7).toJsonArray();
accountData.insert("permissions",m_permissions);
accountData.insert("token",QString(QByteArray::fromBase64(query.value(10).toByteArray())));
QJsonDocument m_client;
if(query.value(12).toByteArray()!=""){
m_client=QJsonDocument::fromJson(QByteArray::fromBase64(query.value(12).toByteArray()));
}
accountData.insert("client",m_client.object());
accountlist.append(accountData);
}
}
query.clear();
return accountlist;
}
void UPDATENEWS::login() void UPDATENEWS::login()
{ {
QSqlQuery syncquery("SELECT * FROM globaloptions",m_db); QSqlQuery syncquery("SELECT * FROM globaloptions",m_db);
m_updateInterval=0; m_updateInterval=0;
syncindex=0; syncindex=0;
@ -100,11 +140,9 @@ void UPDATENEWS::login()
} }
if (syncquery.value(0).toString().left(5)=="sync_" && syncquery.value(1).toInt()==1){ if (syncquery.value(0).toString().left(5)=="sync_" && syncquery.value(1).toInt()==1){
synclist.append(syncquery.value(0).toString()); synclist.append(syncquery.value(0).toString());
//qDebug() << " sync " << syncquery.value(0).toString() << " " <<syncquery.value(1).toString();
} }
if (syncquery.value(0).toString().left(7)=="notify_" && syncquery.value(1).toInt()==1){ if (syncquery.value(0).toString().left(7)=="notify_" && syncquery.value(1).toInt()==1){
notifylist.append(syncquery.value(0).toString()); notifylist.append(syncquery.value(0).toString());
//qDebug() << " notify " << syncquery.value(0).toString() << " " <<syncquery.value(1).toString();
} }
} }
@ -117,28 +155,17 @@ void UPDATENEWS::login()
if(!(synctimequery3.exec())) {qDebug() << " synctimequery3 " << synctimequery3.lastError();} if(!(synctimequery3.exec())) {qDebug() << " synctimequery3 " << synctimequery3.lastError();}
} }
QSqlQuery query("SELECT * FROM config ORDER BY isActive ASC, username ASC",m_db); QJsonArray acc=getAccounts();
query.last(); usernamelength=acc.size();
usernamelength=query.at()+1; if (usernameindex<usernamelength){
QJsonObject currentAccount =acc[usernameindex].toObject();
if (query.isActive()&&(usernameindex<usernamelength)) xhr.setAccount(currentAccount.toVariantMap());
{ query.seek(usernameindex); username = currentAccount["username"].toString();
username = query.value(1).toString();
QByteArray bpassword=query.value(2).toByteArray();
QString password=QByteArray::fromBase64(bpassword);
m_login=username+":"+password ;
xhr.setLogin(m_login);
m_url=query.value(0).toString();
xhr.setUrl(m_url);
m_imagedir=query.value(3).toString();
xhr.setImagedir(m_imagedir);
QString isActive=query.value(7).toString();
} }
} }
void UPDATENEWS::startsync() void UPDATENEWS::startsync()
{ //qDebug()<<"Friendiqa start syncing "<<syncindex <<" of "<<synclist.length() << " m_login "<<m_login; {
if (syncindex<synclist.length()){ if (syncindex<synclist.length()){
if (synclist[syncindex]=="sync_Timeline"){ if (synclist[syncindex]=="sync_Timeline"){
timeline(); timeline();
@ -179,7 +206,7 @@ void UPDATENEWS::timeline()
{ {
m_api="/api/statuses/friends_timeline"; m_api="/api/statuses/friends_timeline";
xhr.clearParams(); xhr.clearParams();
xhr.setUrl(m_url); //xhr.setUrl(m_url);
xhr.setApi(m_api); xhr.setApi(m_api);
QSqlQuery query("SELECT status_id FROM news WHERE messagetype=0 AND username='"+ username +"' ORDER BY status_id DESC LIMIT 1",m_db); QSqlQuery query("SELECT status_id FROM news WHERE messagetype=0 AND username='"+ username +"' ORDER BY status_id DESC LIMIT 1",m_db);
if (query.isActive() && query.isSelect()){ if (query.isActive() && query.isSelect()){
@ -199,7 +226,6 @@ void UPDATENEWS::replies()
{ {
m_api="/api/statuses/replies"; m_api="/api/statuses/replies";
xhr.clearParams(); xhr.clearParams();
xhr.setUrl(m_url);
xhr.setApi(m_api); xhr.setApi(m_api);
QSqlQuery query("SELECT status_id FROM news WHERE messagetype=3 AND username='"+ username +"' ORDER BY status_id DESC LIMIT 1",m_db); QSqlQuery query("SELECT status_id FROM news WHERE messagetype=3 AND username='"+ username +"' ORDER BY status_id DESC LIMIT 1",m_db);
if (query.isActive() && query.isSelect()){ if (query.isActive() && query.isSelect()){
@ -219,7 +245,6 @@ void UPDATENEWS::directmessages()
{ {
m_api="/api/direct_messages/all"; m_api="/api/direct_messages/all";
xhr.clearParams(); xhr.clearParams();
xhr.setUrl(m_url);
xhr.setApi(m_api); xhr.setApi(m_api);
QSqlQuery query("SELECT status_id FROM news WHERE messagetype=1 AND username='"+ username +"' ORDER BY status_id DESC LIMIT 1",m_db); QSqlQuery query("SELECT status_id FROM news WHERE messagetype=1 AND username='"+ username +"' ORDER BY status_id DESC LIMIT 1",m_db);
if (query.isActive() && query.isSelect()){ if (query.isActive() && query.isSelect()){
@ -238,7 +263,6 @@ void UPDATENEWS::notifications()
{ {
m_api="/api/friendica/notification"; m_api="/api/friendica/notification";
xhr.clearParams(); xhr.clearParams();
xhr.setUrl(m_url);
xhr.setApi(m_api); xhr.setApi(m_api);
xhr.get(); xhr.get();
QObject::connect(&xhr,SIGNAL(success(QByteArray,QString)),this,SLOT(store(QByteArray,QString))); QObject::connect(&xhr,SIGNAL(success(QByteArray,QString)),this,SLOT(store(QByteArray,QString)));
@ -249,7 +273,6 @@ void UPDATENEWS::notifications()
void UPDATENEWS::events() void UPDATENEWS::events()
{ m_api="/api/friendica/events"; { m_api="/api/friendica/events";
xhr.clearParams(); xhr.clearParams();
xhr.setUrl(m_url);
xhr.setApi(m_api); xhr.setApi(m_api);
QSqlQuery query("SELECT id FROM events WHERE username='"+ username +"' ORDER BY id DESC LIMIT 1",m_db); QSqlQuery query("SELECT id FROM events WHERE username='"+ username +"' ORDER BY id DESC LIMIT 1",m_db);
if (query.isActive() && query.isSelect()){ if (query.isActive() && query.isSelect()){
@ -268,7 +291,6 @@ void UPDATENEWS::events()
void UPDATENEWS::friendrequests() void UPDATENEWS::friendrequests()
{ m_api="/api/v1/follow_requests"; { m_api="/api/v1/follow_requests";
xhr.clearParams(); xhr.clearParams();
xhr.setUrl(m_url);
xhr.setApi(m_api); xhr.setApi(m_api);
xhr.get(); xhr.get();
QObject::disconnect(&xhr,SIGNAL(success(QByteArray,QString)),this,SLOT(store(QByteArray,QString))); QObject::disconnect(&xhr,SIGNAL(success(QByteArray,QString)),this,SLOT(store(QByteArray,QString)));
@ -282,7 +304,6 @@ void UPDATENEWS::friendrequests()
void UPDATENEWS::store(QByteArray serverreply,QString apiname) void UPDATENEWS::store(QByteArray serverreply,QString apiname)
{ if (apiname!=m_api || xhr.downloadtype()!=""){} else { { if (apiname!=m_api || xhr.downloadtype()!=""){} else {
QJsonDocument news; QJsonDocument news;
//qDebug()<<apiname;
QJsonParseError jsonerror; QJsonParseError jsonerror;
news=QJsonDocument::fromJson(serverreply,&jsonerror); news=QJsonDocument::fromJson(serverreply,&jsonerror);
if (news.isArray()){ if (news.isArray()){
@ -421,7 +442,7 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname)
} }
} }
else { else {
qDebug()<< "Friendiqa updatenews error " << serverreply; qDebug()<< m_api << "Friendiqa updatenews error " << serverreply <<username ;
//emit this->error(m_api,QTextCodec::codecForName("utf-8")->toUnicode(serverreply)); //emit this->error(m_api,QTextCodec::codecForName("utf-8")->toUnicode(serverreply));
emit this->error(m_api,QString(serverreply)); emit this->error(m_api,QString(serverreply));
if(m_syncAll){ if(m_syncAll){
@ -436,13 +457,11 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname)
void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index){ void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index){
//qDebug()<< "update Imagelocation " << downloadtype << " " << imageurl << " " << filename;
if (downloadtype=="contactlist"){ if (downloadtype=="contactlist"){
QSqlQuery testquery("SELECT profile_image FROM contacts WHERE profile_image_url ='"+imageurl+ "' AND username = '" +username+"'",m_db); QSqlQuery testquery("SELECT profile_image FROM contacts WHERE profile_image_url ='"+imageurl+ "' AND username = '" +username+"'",m_db);
testquery.first(); testquery.first();
QSqlQuery query("UPDATE contacts SET profile_image='"+ filename +"' WHERE profile_image_url ='"+imageurl+ "' AND username = '" +username+"'",m_db); QSqlQuery query("UPDATE contacts SET profile_image='"+ filename +"' WHERE profile_image_url ='"+imageurl+ "' AND username = '" +username+"'",m_db);
if(!(query.exec())) {qDebug()<< "updateImagelocation " << query.lastError();} if(!(query.exec())) {qDebug()<< "updateImagelocation " << query.lastError();}
//qDebug()<< "index " << index << " " << newcontactnames.length()-1 << " " << m_syncAll;
if (index==(newcontactnames.length()-1)){ if (index==(newcontactnames.length()-1)){
newcontactnames.clear(); newcontactnames.clear();
newcontactimagelinks.clear(); newcontactimagelinks.clear();
@ -469,7 +488,6 @@ void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QStr
} }
QJsonObject UPDATENEWS::findNotificationContact(QString contacturl){ QJsonObject UPDATENEWS::findNotificationContact(QString contacturl){
//qDebug()<< "findNotificationContact "<<contacturl;
QSqlQuery query("SELECT id,url FROM contacts WHERE url='"+contacturl+"' AND username='"+ username+"'",m_db); QSqlQuery query("SELECT id,url FROM contacts WHERE url='"+contacturl+"' AND username='"+ username+"'",m_db);
query.first(); query.first();
QJsonObject contact{ QJsonObject contact{
@ -806,23 +824,16 @@ void UPDATENEWS::storeEvents(QByteArray serverreply,QString apiname)
QObject::disconnect(&xhr,SIGNAL(success(QByteArray,QString)),this,SLOT(storeEvents(QByteArray,QString))); QObject::disconnect(&xhr,SIGNAL(success(QByteArray,QString)),this,SLOT(storeEvents(QByteArray,QString)));
} }
QString UPDATENEWS::url() const
{
return m_url;
}
void UPDATENEWS::startImagedownload(QString downloadtype) void UPDATENEWS::startImagedownload(QString downloadtype)
{ {
xhr.setDownloadtype(downloadtype ); xhr.setDownloadtype(downloadtype );
xhr.setFilelist(newcontactimagelinks); xhr.setFilelist(newcontactimagelinks);
xhr.setContactlist(newcontactnames); xhr.setContactlist(newcontactnames);
xhr.setImagedir(m_imagedir);
xhr.getlist(); xhr.getlist();
} }
void UPDATENEWS::showError(QString data, QString url,QString api, int code ) void UPDATENEWS::showError(QString data, QString url,QString api, int code )
{ {
//qDebug() << "showerror " << api << " data " << data;
emit this->error(api,data); emit this->error(api,data);
if (api!=m_api || xhr.downloadtype()!=""){} else{ if (api!=m_api || xhr.downloadtype()!=""){} else{
if((m_updateInterval!=0) && m_syncAll){ if((m_updateInterval!=0) && m_syncAll){

View file

@ -34,6 +34,7 @@
#include <QObject> #include <QObject>
#include <QJsonObject> #include <QJsonObject>
#include <QJsonArray>
#include <QSqlDatabase> #include <QSqlDatabase>
#include "xhr.h" #include "xhr.h"
#include "alarm.h" #include "alarm.h"
@ -42,25 +43,18 @@
class UPDATENEWS : public QObject class UPDATENEWS : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
// Q_PROPERTY(QString login READ login NOTIFY loginChanged)
public: public:
static UPDATENEWS *instance(); static UPDATENEWS *instance();
explicit UPDATENEWS(QObject *parent = 0); explicit UPDATENEWS(QObject *parent = 0);
QString url() const;
//QString login() const;
signals: signals:
void urlChanged(QString url);
void success(QString api); void success(QString api);
void error(QString api, QString content); void error(QString api, QString content);
void quitapp(); void quitapp();
public slots: public slots:
void setUrl(QString url);
void setSyncAll(bool syncAll); void setSyncAll(bool syncAll);
void setDatabase(); void setDatabase();
void login(); void login();
@ -71,19 +65,16 @@ public slots:
void notifications(); void notifications();
void friendrequests(); void friendrequests();
void events(); void events();
//void startservice(QString type,QVariantMap map);
void startImagedownload(QString downloadtype); void startImagedownload(QString downloadtype);
void updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index); void updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index);
void store(QByteArray serverreply,QString apiname); void store(QByteArray serverreply,QString apiname);
void storeFriendrequests(QByteArray serverreply,QString apiname); void storeFriendrequests(QByteArray serverreply,QString apiname);
void storeEvents(QByteArray serverreply,QString apiname); void storeEvents(QByteArray serverreply,QString apiname);
void showError(QString data, QString url,QString api, int code); void showError(QString data, QString url,QString api, int code);
QJsonArray getAccounts(QString filtername="",QString filtervalue="");
private: private:
QString m_url;
QString m_api; QString m_api;
QString m_imagedir;
QString m_login;
QString username; QString username;
bool m_syncAll; bool m_syncAll;
int syncindex; int syncindex;
@ -95,8 +86,6 @@ private:
QList<QJsonValue> findNewContacts(QJsonDocument news); QList<QJsonValue> findNewContacts(QJsonDocument news);
QJsonObject findNotificationContact(QString imagelink); QJsonObject findNotificationContact(QString imagelink);
int m_updateInterval; int m_updateInterval;
//void timeline();
//void store(QByteArray serverreply,QString apiname);
void updateContacts(QList<QJsonValue> contacts); void updateContacts(QList<QJsonValue> contacts);
XHR xhr; XHR xhr;

View file

@ -54,65 +54,90 @@ XHR::XHR(QObject *parent) : QObject(parent)
void XHR::setUrl(QString url) void XHR::setUrl(QString url)
{ {
if (url!=m_url) { if (url!=m_url) {
m_url = url; m_url = url;
emit urlChanged(); emit urlChanged();
} }
} }
void XHR::setApi(QString api) void XHR::setApi(QString api)
{ {
if (api!=m_api) { if (api!=m_api) {
m_api = api; m_api = api;
emit apiChanged(); emit apiChanged();
} }
} }
void XHR::setLogin(QString login) void XHR::setLogin(QString login)
{ {
if (login!=m_login) { if (login!=m_login) {
m_login = login; m_login = login;
emit loginChanged(); m_token="";
} emit loginChanged();
}
}
void XHR::setAccount(QVariantMap account)
{
clearParams();
if (account["password"].toString() !=""){
setLogin(account["username"].toString()+":"+QByteArray::fromBase64(account["password"].toByteArray()));
}
else if (account["token"].toString() !="" && !account["token"].isNull()){
setToken(account["token"].toString());
}
setUrl(account["server"].toString());
setImagedir(account["imagestore"].toString());
m_account = account;
emit accountChanged();
}
void XHR::setToken(QString token)
{
if (token!=m_token) {
m_token = token;
m_login="";
emit tokenChanged();
}
} }
void XHR::setFilename(QString filename) void XHR::setFilename(QString filename)
{ {
if (filename!=m_filename) { if (filename!=m_filename) {
m_filename = filename; m_filename = filename;
emit filenameChanged(); emit filenameChanged();
} }
} }
void XHR::setContactlist(QList<QString> contactlist) void XHR::setContactlist(QList<QString> contactlist)
{ {
if (contactlist!=m_contactlist) { if (contactlist!=m_contactlist) {
m_contactlist = contactlist; m_contactlist = contactlist;
emit contactlistChanged(); emit contactlistChanged();
} }
} }
void XHR::setFilelist(QList<QString> filelist) void XHR::setFilelist(QList<QString> filelist)
{ {
if (filelist!=m_filelist) { if (filelist!=m_filelist) {
m_filelist = filelist; m_filelist = filelist;
emit filelistChanged(); emit filelistChanged();
} }
} }
void XHR::setImagedir(QString imagedir) void XHR::setImagedir(QString imagedir)
{ {
if (imagedir!=m_imagedir) { if (imagedir!=m_imagedir) {
m_imagedir = imagedir; m_imagedir = imagedir;
emit imagedirChanged(); emit imagedirChanged();
} }
} }
void XHR::setDownloadtype(QString downloadtype) void XHR::setDownloadtype(QString downloadtype)
{ {
if (downloadtype!=m_downloadtype) { if (downloadtype!=m_downloadtype) {
m_downloadtype = downloadtype; m_downloadtype = downloadtype;
emit downloadtypeChanged(); emit downloadtypeChanged();
} }
} }
QString XHR::url() const QString XHR::url() const
@ -130,6 +155,16 @@ QString XHR::login() const
return m_login; return m_login;
} }
QString XHR::token() const
{
return m_token;
}
QVariantMap XHR::account() const
{
return m_account;
}
QString XHR::filename() const QString XHR::filename() const
{ {
return m_filename; return m_filename;
@ -176,9 +211,14 @@ void XHR::download()
QUrl requrl(m_url); QUrl requrl(m_url);
QNetworkRequest request; QNetworkRequest request;
if(m_downloadtype=="picturelist"){ if(m_downloadtype=="picturelist"){
QByteArray loginData = m_login.toLocal8Bit().toBase64(); if(m_login!=""){
QString headerData = "Basic " + loginData; QByteArray loginData = m_login.toLocal8Bit().toBase64();
request.setRawHeader("Authorization", headerData.toLocal8Bit()); QString headerData = "Basic " + loginData;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
} else{
QString headerData = "Bearer " + m_token;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
}
} }
request.setUrl(requrl); request.setUrl(requrl);
reply = manager.get(request); reply = manager.get(request);
@ -198,20 +238,22 @@ void XHR::get()
while(i.hasNext()) { while(i.hasNext()) {
i.next(); i.next();
query.addQueryItem(i.key(), i.value()); query.addQueryItem(i.key(), i.value());
//qDebug()<<i.key() << " value "<< i.value();
} }
QUrl requrl(m_url+m_api); QUrl requrl(m_url+m_api);
//qDebug() << "API "<< requrl<<m_api;
requrl.setQuery(query); requrl.setQuery(query);
QByteArray loginData = m_login.toLocal8Bit().toBase64();
QString headerData = "Basic " + loginData;
QNetworkRequest request; QNetworkRequest request;
request.setRawHeader("Authorization", headerData.toLocal8Bit()); if(m_login!=""){
QByteArray loginData = m_login.toLocal8Bit().toBase64();
QString headerData = "Basic " + loginData;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
} else if (m_token!=""){
QString headerData = "Bearer " + m_token;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
}
request.setUrl(requrl); request.setUrl(requrl);
reply = manager.get(request); reply = manager.get(request);
connect(reply, &QNetworkReply::finished, this, &XHR::onReplySuccess); connect(reply, &QNetworkReply::finished, this, &XHR::onReplySuccess);
//connect(reply,SIGNAL(downloadProgress(qint64,qint64)), this,SLOT(updateDownloadProgress(qint64,qint64)));
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onReplyError(QNetworkReply::NetworkError))); connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onReplyError(QNetworkReply::NetworkError)));
connect(reply, &QNetworkReply::readyRead, this, &XHR::onReadyRead); connect(reply, &QNetworkReply::readyRead, this, &XHR::onReadyRead);
connect(reply, &QNetworkReply::sslErrors, this, &XHR::onSSLError); connect(reply, &QNetworkReply::sslErrors, this, &XHR::onSSLError);
@ -221,7 +263,8 @@ void XHR::getlist()
{ {
if(dlindex < m_filelist.size()) { if(dlindex < m_filelist.size()) {
QString cleanfilename; QString cleanfilename;
if (m_downloadtype=="contactlist" || m_downloadtype=="friendrequests" ){cleanfilename = m_contactlist.at(dlindex)+"-"+ m_filelist.at(dlindex).section('/',-1).section('?',0,0); if (m_downloadtype=="contactlist" || m_downloadtype=="friendrequests" ){
cleanfilename = m_contactlist.at(dlindex)+"-"+ m_filelist.at(dlindex).section('/',-1).section('?',0,0);
XHR::setFilename(imagedir()+"contacts/"+cleanfilename); XHR::setFilename(imagedir()+"contacts/"+cleanfilename);
XHR::setUrl(m_filelist.at(dlindex));} XHR::setUrl(m_filelist.at(dlindex));}
else { else {
@ -234,7 +277,6 @@ void XHR::getlist()
void XHR::post() void XHR::post()
{ {
//qDebug() << "start post to " << m_url;
QHttpMultiPart *multiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType); QHttpMultiPart *multiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType);
QHashIterator<QString, QString> iparams(params); QHashIterator<QString, QString> iparams(params);
@ -250,7 +292,6 @@ void XHR::post()
if (files.contains("media")){ if (files.contains("media")){
uimg.setAngle(files.value("angle").toInt()); uimg.setAngle(files.value("angle").toInt());
uimg.setSource(files.value("media")); uimg.setSource(files.value("media"));
//qDebug() << "\t add media " << files.value("media") << " : " << files.value("angle").toInt();
QHttpPart imagePart; QHttpPart imagePart;
imagePart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant(uimg.mimetype())); imagePart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant(uimg.mimetype()));
imagePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"media\"; filename=\""+uimg.filename()+"\"")); imagePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"media\"; filename=\""+uimg.filename()+"\""));
@ -258,10 +299,15 @@ void XHR::post()
multiPart->append(imagePart); multiPart->append(imagePart);
} }
QByteArray loginData = m_login.toLocal8Bit().toBase64();
QString headerData = "Basic " + loginData;
QNetworkRequest request; QNetworkRequest request;
request.setRawHeader(QByteArray("Authorization"), headerData.toLocal8Bit()); if(m_login!=""){
QByteArray loginData = m_login.toLocal8Bit().toBase64();
QString headerData = "Basic " + loginData;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
} else if (m_token!=""){
QString headerData = "Bearer " + m_token;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
}
request.setUrl(m_url+m_api); request.setUrl(m_url+m_api);
reply = manager.post(request, multiPart); reply = manager.post(request, multiPart);
qDebug() << "\t request sent"; qDebug() << "\t request sent";
@ -269,17 +315,21 @@ void XHR::post()
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onReplyError(QNetworkReply::NetworkError))); connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onReplyError(QNetworkReply::NetworkError)));
connect(reply, &QNetworkReply::readyRead, this, &XHR::onReadyRead); connect(reply, &QNetworkReply::readyRead, this, &XHR::onReadyRead);
connect(reply, &QNetworkReply::sslErrors, this, &XHR::onSSLError); connect(reply, &QNetworkReply::sslErrors, this, &XHR::onSSLError);
qDebug() << "\t reply signals connected";
} }
void XHR::postJSON() void XHR::postJSON()
{ {
if (params.contains("JSON")){ if (params.contains("JSON")){
QByteArray mJSON=params.value("JSON").toUtf8(); QByteArray mJSON=params.value("JSON").toUtf8();
QByteArray loginData = m_login.toLocal8Bit().toBase64();
QString headerData = "Basic " + loginData;
QNetworkRequest request; QNetworkRequest request;
request.setRawHeader(QByteArray("Authorization"), headerData.toLocal8Bit()); if(m_login!=""){
QByteArray loginData = m_login.toLocal8Bit().toBase64();
QString headerData = "Basic " + loginData;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
} else if (m_token!=""){
QString headerData = "Bearer " + m_token;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
}
request.setHeader(QNetworkRequest::ContentTypeHeader,"application/json; charset=UTF-8"); request.setHeader(QNetworkRequest::ContentTypeHeader,"application/json; charset=UTF-8");
request.setUrl(m_url+m_api); request.setUrl(m_url+m_api);
reply = manager.post(request, mJSON); reply = manager.post(request, mJSON);
@ -306,7 +356,7 @@ void XHR::onReplySuccess()
qDebug() << "!"; qDebug() << "!";
emit this->success(buffer, m_api); emit this->success(buffer, m_api);
buffer.clear(); buffer.clear();
// reply->deleteLater(); // reply->deleteLater();
} }
void XHR::onRequestFinished() void XHR::onRequestFinished()
@ -317,7 +367,7 @@ void XHR::onRequestFinished()
else if (m_downloadtype=="picturelist") { else if (m_downloadtype=="picturelist") {
QJsonDocument jsonResponse = QJsonDocument::fromJson(buffer); QJsonDocument jsonResponse = QJsonDocument::fromJson(buffer);
QJsonObject jsonObject = jsonResponse.object(); QJsonObject jsonObject = jsonResponse.object();
int arraystart=buffer.indexOf('{"data":"')+8; int arraystart=buffer.indexOf("{\"data\":\"")+8;
int arraylength=buffer.indexOf('"',9)-arraystart; int arraylength=buffer.indexOf('"',9)-arraystart;
QByteArray b64=buffer.mid(arraystart,arraylength); QByteArray b64=buffer.mid(arraystart,arraylength);
QString helpfilename=jsonObject["filename"].toString(); QString helpfilename=jsonObject["filename"].toString();
@ -352,7 +402,7 @@ void XHR::onRequestFinished()
emit this->downloaded(m_downloadtype,m_url,m_filename,dlindex); emit this->downloaded(m_downloadtype,m_url,m_filename,dlindex);
if(downloadtype()=="contactlist" || downloadtype()=="friendrequests"){dlindex=dlindex+1;XHR::getlist();} if(downloadtype()=="contactlist" || downloadtype()=="friendrequests"){dlindex=dlindex+1;XHR::getlist();}
//reply->deleteLater(); //reply->deleteLater();
} }
} }
@ -365,7 +415,7 @@ void XHR::onReadyRead()
//void XHR::updateDownloadProgress(qint64 bytesRead, qint64 totalBytes) //void XHR::updateDownloadProgress(qint64 bytesRead, qint64 totalBytes)
//{ //{
// qDebug() << "Bytes: " << bytesRead<<" / "<<totalBytes; // qDebug() << "Bytes: " << bytesRead<<" / "<<totalBytes;
//} //}
void XHR::onSSLError(const QList<QSslError> &errors) void XHR::onSSLError(const QList<QSslError> &errors)

View file

@ -44,6 +44,8 @@ class XHR : public QObject
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged) Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
Q_PROPERTY(QString login READ login WRITE setLogin NOTIFY loginChanged) Q_PROPERTY(QString login READ login WRITE setLogin NOTIFY loginChanged)
Q_PROPERTY(QString token READ token WRITE setToken NOTIFY tokenChanged)
Q_PROPERTY(QVariantMap account READ account WRITE setAccount NOTIFY accountChanged)
Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged) Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
Q_PROPERTY(QString imagedir READ imagedir WRITE setImagedir NOTIFY imagedirChanged) Q_PROPERTY(QString imagedir READ imagedir WRITE setImagedir NOTIFY imagedirChanged)
Q_PROPERTY(QList<QString> contactlist READ contactlist WRITE setContactlist NOTIFY contactlistChanged) Q_PROPERTY(QList<QString> contactlist READ contactlist WRITE setContactlist NOTIFY contactlistChanged)
@ -60,6 +62,8 @@ public:
QString url() const; QString url() const;
QString api() const; QString api() const;
QString login() const; QString login() const;
QString token() const;
QVariantMap account() const;
QString filename() const; QString filename() const;
QList<QString> contactlist() const; QList<QString> contactlist() const;
QList<QString> filelist() const; QList<QString> filelist() const;
@ -71,6 +75,8 @@ signals:
void urlChanged(); void urlChanged();
void apiChanged(); void apiChanged();
void loginChanged(); void loginChanged();
void tokenChanged();
void accountChanged();
void filenameChanged(); void filenameChanged();
void contactlistChanged(); void contactlistChanged();
void filelistChanged(); void filelistChanged();
@ -86,6 +92,8 @@ public slots:
void setUrl(QString url); void setUrl(QString url);
void setApi(QString api); void setApi(QString api);
void setLogin(QString login); void setLogin(QString login);
void setToken(QString token);
void setAccount(QVariantMap account);
void setDownloadtype(QString downloadtype); void setDownloadtype(QString downloadtype);
void setFilename(QString filename); void setFilename(QString filename);
void setContactlist(QList<QString> filename); void setContactlist(QList<QString> filename);
@ -115,6 +123,8 @@ private:
QString m_url; QString m_url;
QString m_api; QString m_api;
QString m_login; QString m_login;
QString m_token;
QVariantMap m_account;
QString m_filename; QString m_filename;
QString m_downloadtype; QString m_downloadtype;
// QString m_networktype; // QString m_networktype;

View file

@ -34,7 +34,6 @@ WorkerScript.onMessage = function(msg) {
if (msg.albums[j]) { if (msg.albums[j]) {
var albumobject=msg.albums[j]; var albumobject=msg.albums[j];
var data=({"albumobject": albumobject,"foreignPicture": msg.foreignPicture})} var data=({"albumobject": albumobject,"foreignPicture": msg.foreignPicture})}
// print("Albums:"+j+msg.albums.length+JSON.stringify(data));
msg.model.append(data);} msg.model.append(data);}
if (j==msg.albums.length){ if (j==msg.albums.length){
msg.model.sync() msg.model.sync()

View file

@ -41,7 +41,6 @@ function friendicaRequest(login,api,rootwindow,callback) {
callback(xhrequest.responseText) callback(xhrequest.responseText)
}else{print("xhrequest.status "+xhrequest.status) }else{print("xhrequest.status "+xhrequest.status)
callback(xhrequest.responseText) callback(xhrequest.responseText)
//showMessage("Error","API:\n" +login.server+api+"\n NO RESPONSE"+xhrequest.statusText,rootwindow);
} }
} }
catch (e){ catch (e){
@ -49,30 +48,39 @@ function friendicaRequest(login,api,rootwindow,callback) {
} }
} }
} }
xhrequest.open("GET", login.server+api,true,login.username,Qt.atob(login.password)); if (login.password==""){
xhrequest.open("GET", login.server+api,true);
xhrequest.setRequestHeader("Authorization","Bearer "+login.token);
}
else{
xhrequest.open("GET", login.server+api,true,login.username,Qt.atob(login.password));
}
xhrequest.send(); xhrequest.send();
} }
function friendicaPostRequest(login,api,data,method,rootwindow,callback) { function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
var xhrequest= new XMLHttpRequest(); var xhrequest= new XMLHttpRequest();
xhrequest.onreadystatechange = function() { xhrequest.onreadystatechange = function() {
//print(api+JSON.stringify(login)+Qt.atob(login.password));
if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) { if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
} else if(xhrequest.readyState === XMLHttpRequest.DONE) { } else if(xhrequest.readyState === XMLHttpRequest.DONE) {
try{ if (xhrequest.responseText!=""){//print (xhrequest.responseText) try{ if (xhrequest.responseText!=""){//print (xhrequest.responseText)
callback(xhrequest.responseText) callback(xhrequest.responseText)
}else{//print("API:\n" +api+" NO RESPONSE"); }else{
//showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow)
callback(xhrequest.responseText) callback(xhrequest.responseText)
} }
} }
catch (e){ catch (e){
print("API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText); print("API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText);
//showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)
} }
} }
} }
xhrequest.open(method, login.server+api,true,login.username,Qt.atob(login.password)); if (login.password==""){
xhrequest.open(method, login.server+api,true);
xhrequest.setRequestHeader("Authorization","Bearer "+login.token);
}
else{
xhrequest.open(method, login.server+api,true,login.username,Qt.atob(login.password));
}
xhrequest.send(data); xhrequest.send(data);
} }
@ -86,32 +94,6 @@ function getCount(database,login,table,field,countvalue){
return count return count
} }
function friendicaWebRequest(url,rootwindow,callback) {
var xhrequest = new XMLHttpRequest();
xhrequest.onreadystatechange = function() {
if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {}
else if(xhrequest.readyState === XMLHttpRequest.DONE) {
try{callback(xhrequest.responseText)}
catch (e){showMessage("Error","API:\n" +url+" "+e+"\n Return: "+xhrequest.responseText, rootwindow)}
}
}
xhrequest.open("GET", url,true);
xhrequest.send();
}
function friendicaXmlRequest(url,rootwindow,callback) {
var xhrequest = new XMLHttpRequest();
xhrequest.onreadystatechange = function() {
if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {}
else if(xhrequest.readyState === XMLHttpRequest.DONE) {
try{callback(xhrequest.responseXML)}
catch (e){showMessage("Error","API:\n" +url+" "+e+"\n Return: "+xhrequest.responseText, rootwindow)}
}
}
xhrequest.open("GET", url);
xhrequest.responseType ="document";
xhrequest.send();
}
function friendicaRemoteAuthRequest(login,url,c_url,rootwindow,callback) { function friendicaRemoteAuthRequest(login,url,c_url,rootwindow,callback) {
var xhrequest = new XMLHttpRequest(); var xhrequest = new XMLHttpRequest();
@ -142,7 +124,6 @@ function readData(database,table,username,callback,filter,filtervalue, sort) { /
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
if(!db) { return; } if(!db) { return; }
db.transaction( function(tx) { db.transaction( function(tx) {
//print('select * from '+table+user+where+sortparam);
var rsArray=[]; var rsArray=[];
var rs = tx.executeSql('select * from '+table+user+where+sortparam); var rs = tx.executeSql('select * from '+table+user+where+sortparam);
for(var i = 0; i < rs.rows.length; i++) { for(var i = 0; i < rs.rows.length; i++) {
@ -161,7 +142,6 @@ var where = " AND "+ filter +" = '" + filtervalue+"'";
db.transaction( function(tx) { db.transaction( function(tx) {
//print('... read from database ' + field) //print('... read from database ' + field)
var rsArray=[]; var rsArray=[];
//print('select DISTINCT '+field+' from '+table+' WHERE username="'+username+'"'+where+' ORDER BY '+field+' ASC');
var rs = tx.executeSql('select DISTINCT '+field+' from '+table+' WHERE username="'+username+'"'+where+' ORDER BY '+field+' ASC'); var rs = tx.executeSql('select DISTINCT '+field+' from '+table+' WHERE username="'+username+'"'+where+' ORDER BY '+field+' ASC');
for(var i = 0; i < rs.rows.length; i++) { for(var i = 0; i < rs.rows.length; i++) {
rsArray.push(rs.rows.item(i)[field]) rsArray.push(rs.rows.item(i)[field])

View file

@ -55,7 +55,7 @@ function dataRequest(login,photo,database,xhr,rootwindow) {
Helperjs.friendicaRequest(login,"/api/friendica/photo?photo_id="+photo.id, rootwindow, function (image){ Helperjs.friendicaRequest(login,"/api/friendica/photo?photo_id="+photo.id, rootwindow, function (image){
if(image=="" || typeof(image)=="undefined"){currentimageno=currentimageno+1}else{ if(image=="" || typeof(image)=="undefined"){currentimageno=currentimageno+1}else{
try{print("image "+ image) try{
var obj = JSON.parse(image); var obj = JSON.parse(image);
if (obj.hasOwnProperty('status')){ if (obj.hasOwnProperty('status')){
var helpfilename=photo.filename.substring(0,photo.filename.lastIndexOf(".")); var helpfilename=photo.filename.substring(0,photo.filename.lastIndexOf("."));
@ -69,7 +69,8 @@ function dataRequest(login,photo,database,xhr,rootwindow) {
else{photo.filename=helpfilename+filesuffix} else{photo.filename=helpfilename+filesuffix}
var link=""; var link="";
xhr.setUrl(Qt.resolvedUrl(photo.thumb)); xhr.setUrl(Qt.resolvedUrl(photo.thumb));
xhr.setLogin(login.username+":"+Qt.atob(login.password)); if(login.password!=""){xhr.setLogin(login.username+":"+Qt.atob(login.password));}
else{xhr.setToken(login.token)}
xhr.setFilename(login.imagestore+'albums/'+photo.album+"/"+photo["filename"]); xhr.setFilename(login.imagestore+'albums/'+photo.album+"/"+photo["filename"]);
xhr.setDownloadtype("picture"); xhr.setDownloadtype("picture");
xhr.download(); xhr.download();
@ -95,7 +96,8 @@ function dataRequest(login,photo,database,xhr,rootwindow) {
var link=""; var link="";
if(obj["link"][0]){link=obj["link"][0]} else{link=obj["link"]["4"]} if(obj["link"][0]){link=obj["link"][0]} else{link=obj["link"]["4"]}
xhr.setUrl(Qt.resolvedUrl(link)); xhr.setUrl(Qt.resolvedUrl(link));
xhr.setLogin(login.username+":"+Qt.atob(login.password)); if(login.password!=""){xhr.setLogin(login.username+":"+Qt.atob(login.password));}
else{xhr.setToken(login.token)}
xhr.setFilename(login.imagestore+'albums/'+obj.album+"/"+obj["filename"]); xhr.setFilename(login.imagestore+'albums/'+obj.album+"/"+obj["filename"]);
xhr.setDownloadtype("picture"); xhr.setDownloadtype("picture");
xhr.download(); xhr.download();
@ -120,7 +122,8 @@ function dataRequest(login,photo,database,xhr,rootwindow) {
else{photo.filename=helpfilename+filesuffix} else{photo.filename=helpfilename+filesuffix}
var link=""; var link="";
xhr.setUrl(Qt.resolvedUrl(photo.thumb)); xhr.setUrl(Qt.resolvedUrl(photo.thumb));
xhr.setLogin(login.username+":"+Qt.atob(login.password)); if(login.password!=""){xhr.setLogin(login.username+":"+Qt.atob(login.password));}
else{xhr.setToken(login.token)}
xhr.setFilename(login.imagestore+'albums/'+photo.album+"/"+photo["filename"]); xhr.setFilename(login.imagestore+'albums/'+photo.album+"/"+photo["filename"]);
xhr.setDownloadtype("picture"); xhr.setDownloadtype("picture");
xhr.download(); xhr.download();
@ -154,7 +157,6 @@ function deleteImage(database,login,type,location,filesystem,rootwindow,callback
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
var rsfilename=location.substring(location.lastIndexOf("/")+1,location.length); var rsfilename=location.substring(location.lastIndexOf("/")+1,location.length);
var rslocation=location.substring(0,location.lastIndexOf("/")+1); var rslocation=location.substring(0,location.lastIndexOf("/")+1);
//print(type+" Name "+ rsfilename+" Location: "+rslocation)
db.transaction( function(tx) { db.transaction( function(tx) {
if (type=='image'){ if (type=='image'){
var rs= tx.executeSql('SELECT * FROM imageData WHERE filename="'+rsfilename+'" AND location="'+rslocation+'"') var rs= tx.executeSql('SELECT * FROM imageData WHERE filename="'+rsfilename+'" AND location="'+rslocation+'"')
@ -211,47 +213,13 @@ function deleteContacts(database,user,callback) { // does nothing useful at the
callback(result)}) callback(result)})
} }
//function requestFriendsAlbumPictures(login,friend,rootwindow,callback){
//// screenscraping of albums page of contact without user and password
// Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
// //print(photohtml);
// var photoarray=[];
// var arr = photohtml.split("sidebar-photos-albums-li");
// for (var i=2;i<arr.length;i++){
// var albumlink = arr[i].substring(arr[i].indexOf('http'),arr[i].indexOf('class')-2);
// var albumname=arr[i].substring(arr[i].indexOf('/span')+6,arr[i].indexOf('</a>')-1);
// var album={'link':albumlink,'name':albumname}
// photoarray.push(album);
// }
// callback(photoarray)
// })
//}
function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){//print("newRequestFriendsAlbumPictures");
// screenscraping of albums page of contact with remoteAuth
//commented out for broken remoteauth
Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","photos"),friend.url,rootwindow,function(photohtml){
//Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
try {var obj=JSON.parse(photohtml);//print ("Photohtml: "+photohtml)
if (obj.hasOwnProperty('status')){
Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
getAlbumFromHtml(photohtml,false,rootwindow,callback)})
}}
catch (e){
//getAlbumFromHtml(photohtml,true,rootwindow,callback)
getAlbumFromHtml(photohtml,false,rootwindow,callback)
}
})
}
function getAlbumFromHtml(photohtml,remoteAuthBool,rootwindow,callback){ function getAlbumFromHtml(photohtml,remoteAuthBool,rootwindow,callback){
//print(photohtml);
var photoarray=[]; var photoarray=[];
var arr = photohtml.split("sidebar-photos-albums-li"); var arr = photohtml.split("sidebar-photos-albums-li");
for (var i=2;i<arr.length;i++){ for (var i=2;i<arr.length;i++){
var albumlink = arr[i].substring(arr[i].indexOf('http'),arr[i].indexOf('class')-2); var albumlink = arr[i].substring(arr[i].indexOf('http'),arr[i].indexOf('class')-2);
var albumname=arr[i].substring(arr[i].indexOf('/span')+6,arr[i].indexOf('</a>')-1); var albumname=arr[i].substring(arr[i].indexOf('/span')+6,arr[i].indexOf('</a>')-1);
var album={'link':albumlink,'name':albumname}//print(albumlink+" "+albumname); var album={'link':albumlink,'name':albumname}
photoarray.push(album); photoarray.push(album);
} }
callback(photoarray,remoteAuthBool) callback(photoarray,remoteAuthBool)
@ -269,13 +237,6 @@ function newRequestFriendsPictures(login,link,friend,remoteAuthBool,remoteauth,r
callback(photoarray) callback(photoarray)
}) })
})} })}
else{
Helperjs.friendicaWebRequest(link,rootwindow,function(photohtml){
getPictureFromHtml(photohtml,remoteAuthBool,function(photoarray){
callback(photoarray)
})
})
}
} }
function getPictureFromHtml(photohtml,remoteAuthBool,callback){ function getPictureFromHtml(photohtml,remoteAuthBool,callback){
@ -290,10 +251,6 @@ function getPictureFromHtml(photohtml,remoteAuthBool,callback){
if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2 if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end")) var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
var arr = photoarea.split("</a>");} var arr = photoarea.split("</a>");}
//print("Url: "+login.server+ "Contacturl: "+friend.url)
// remoteauth.setUrl(login.server);
// remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
// remoteauth.setContacturl(friend.url);
for (var i=0;i<arr.length-1;i++){ for (var i=0;i<arr.length-1;i++){
var photoname=arr[i].substring(arr[i].lastIndexOf('alt')+5,arr[i].lastIndexOf('title')-2); var photoname=arr[i].substring(arr[i].lastIndexOf('alt')+5,arr[i].lastIndexOf('title')-2);
var thumblink=arr[i].substring(arr[i].lastIndexOf('<img')+10,arr[i].lastIndexOf('alt')-2); var thumblink=arr[i].substring(arr[i].lastIndexOf('<img')+10,arr[i].lastIndexOf('alt')-2);
@ -305,41 +262,8 @@ function getPictureFromHtml(photohtml,remoteAuthBool,callback){
thumblink="image://remoteauthimage/"+thumblink; thumblink="image://remoteauthimage/"+thumblink;
photolink="image://remoteauthimage/"+photolink; photolink="image://remoteauthimage/"+photolink;
} }
//Helperjs.friendicaRemoteAuthRequest(login,thumblink,friend.url,rootwindow,function(thumbimage){thumbbase64=QT.btoa(thumbimage)});
//thumblink="image://remoteauthimage/"+login.username+":"+Qt.atob(login.password)+"@"+login.server+"/api/friendica/remoteauth?c_url="+friend.url+"&url="+thumblink;
var photo={'link':photolink,'name':photoname,'thumb':thumblink} var photo={'link':photolink,'name':photoname,'thumb':thumblink}
photoarray.push(photo); photoarray.push(photo);
} }
callback(photoarray) callback(photoarray)
} }
function requestFriendsPictures(link,rootwindow,callback){
// screenscraping of pictures page for given album
Helperjs.friendicaWebRequest(link,rootwindow,function(photohtml){
var photoarray=[];
var basehtml=photohtml.substring(photohtml.indexOf('<base')+12,photohtml.indexOf('/>',photohtml.indexOf('<base'))-2);
// old theme
if (photohtml.indexOf("photo-album-image-wrapper-end")>-1){ //theme 1
var arr = photohtml.split("photo-album-image-wrapper-end");}
// other themes
if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
var arr = photoarea.split("</a>");}
for (var i=0;i<arr.length-1;i++){
var photoname=arr[i].substring(arr[i].lastIndexOf('alt')+5,arr[i].lastIndexOf('title')-2);
var thumblink=arr[i].substring(arr[i].lastIndexOf('<img')+10,arr[i].lastIndexOf('alt')-2);
var imagetype=thumblink.substring(thumblink.lastIndexOf("."));
var photolink=thumblink.substring(0,thumblink.length-imagetype.length-2)+"-0"+imagetype
if(thumblink.substring(0,4)!=="http"){thumblink=basehtml+thumblink}
if(photolink.substring(0,4)!=="http"){photolink=basehtml+photolink}
var photo={'link':photolink,'name':photoname,'thumb':thumblink}
photoarray.push(photo);
}
callback(photoarray)
})
}

View file

@ -1,76 +0,0 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
function showFriends(db) {
Service.readActiveConfig(db,function(login){
Service.requestFriends(login.url,login.user,login.password,displayFriends);
});
}
function displayFriends(obj){
for (var i=0; i<obj.length; i++){
//print(obj[i]);
if (obj[i]) {friendsModel.append({"friendName": obj[i]});
};
}}
function ensureVisibility(c,f)
{
if (f.contentX >= c.x)
f.contentX = c.x;
else if (f.contentX+f.width <= c.x+c.width)
f.contentX = c.x+c.width-f.width;
if (f.contentY >= c.y)
f.contentY = c.y;
else if (f.contentY+f.height <= c.y+c.height)
f.contentY = c.y+c.height-f.height;
}
function createObject(objectQml,qmlParameters,parentitem,callback) {
var component = Qt.createComponent(objectQml);
if (component.status === Component.Ready || component.status === Component.Error)
finishCreation(component,qmlParameters,parentitem,callback);
else
component.statusChanged.connect(finishCreation(qmlParameters));
}
function finishCreation(component,qmlParameters,parentitem,callback) {
if (component.status === Component.Ready) {
var createdObject = component.createObject(parentitem, qmlParameters);
if (createdObject === null)
print("Error creating image"); }
else if (component.status === Component.Error)
print("Error loading component:"+component.errorString());
else {print("created")}
//callback(createdObject);
}

View file

@ -279,7 +279,6 @@ function storeNews(login,database,news,rootwindow){
db.transaction( function(tx) { db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+news[i].id+'" AND messagetype='+news[i].messagetype); // check for news id var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+news[i].id+'" AND messagetype='+news[i].messagetype); // check for news id
if(result.rows.length === 1) {// use update if(result.rows.length === 1) {// use update
//print(news[i].id +' news exists, update it'+'UPDATE news SET username="'+login.username+'", messagetype=0, text="'+Qt.btoa(news[i].text)+'", created_at="'+Date.parse(cleanDate(news[i].created_at))+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].status_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_owner.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0')
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype='+news[i].messagetype+', text="'+Qt.btoa(news[i].text)+'", created_at="'+news[i].created_at+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].statusnet_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_author.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0'); result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype='+news[i].messagetype+', text="'+Qt.btoa(news[i].text)+'", created_at="'+news[i].created_at+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].statusnet_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_author.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0');
} else {// use insert } else {// use insert
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,in_reply_to_status_id,source,status_id,in_reply_to_user_id,geo,favorited,uid,statusnet_html,statusnet_conversation_id,friendica_activities,friendica_activities_self,attachments,friendica_owner) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,news[i].messagetype,Qt.btoa(news[i].text),news[i].created_at, news[i].in_reply_to_status_id, news[i].source, news[i].id,news[i].in_reply_to_user_id,news[i].geo,news[i].favorited, news[i].user.id,Qt.btoa(news[i].statusnet_html),news[i].statusnet_conversation_id, Qt.btoa(JSON.stringify(friendica_activities)),"[]",attachments,news[i].friendica_author.url])}}) result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,in_reply_to_status_id,source,status_id,in_reply_to_user_id,geo,favorited,uid,statusnet_html,statusnet_conversation_id,friendica_activities,friendica_activities_self,attachments,friendica_owner) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,news[i].messagetype,Qt.btoa(news[i].text),news[i].created_at, news[i].in_reply_to_status_id, news[i].source, news[i].id,news[i].in_reply_to_user_id,news[i].geo,news[i].favorited, news[i].user.id,Qt.btoa(news[i].statusnet_html),news[i].statusnet_conversation_id, Qt.btoa(JSON.stringify(friendica_activities)),"[]",attachments,news[i].friendica_author.url])}})
@ -308,7 +307,6 @@ function newsfromdb(database,login,messagetype,callback,contact,stop_time){
else{var stop="<"+stop_time} else{var stop="<"+stop_time}
var contactfilter="";if(contact){contactfilter=" AND (uid='"+contact+"' OR friendica_owner='"+contact+"')"} var contactfilter="";if(contact){contactfilter=" AND (uid='"+contact+"' OR friendica_owner='"+contact+"')"}
if (messagetype=="0"){messagetype="0,5"} if (messagetype=="0"){messagetype="0,5"}
//print('select * from news WHERE username="'+login.username+'" AND messagetype IN ( '+messagetype+' ) AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20');
var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND messagetype IN ( '+messagetype+' ) AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20'); var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND messagetype IN ( '+messagetype+' ) AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20');
var newsArray=[]; var newsArray=[];
var allcontacts=getAllContacts(database,login.username); var allcontacts=getAllContacts(database,login.username);
@ -326,7 +324,7 @@ function newsfromdb(database,login,messagetype,callback,contact,stop_time){
} }
function fetchUsersForNews(database,username,news,allcontacts){//print("fetchusers "+JSON.stringify(news)) function fetchUsersForNews(database,username,news,allcontacts){//print("fetchusers "+JSON.stringify(news));
news.user=objFromArray(allcontacts,"id",news.uid); news.user=objFromArray(allcontacts,"id",news.uid);
if(news.in_reply_to_user_id){news.reply_user=objFromArray(allcontacts,"id",news.in_reply_to_user_id)} if(news.in_reply_to_user_id){news.reply_user=objFromArray(allcontacts,"id",news.in_reply_to_user_id)}
//news.friendica_owner_object=objFromArray(allcontacts,"url",news.friendica_owner); //news.friendica_owner_object=objFromArray(allcontacts,"url",news.friendica_owner);
@ -382,7 +380,6 @@ function likerequest(login,database,verb,newsid,rootwindow){
db.transaction( function(tx) { db.transaction( function(tx) {
var currentActivities_rs=tx.executeSql('select friendica_activities_self from news WHERE username="'+login.username+'" AND status_id='+newsid) ; var currentActivities_rs=tx.executeSql('select friendica_activities_self from news WHERE username="'+login.username+'" AND status_id='+newsid) ;
var currentActivities=JSON.parse(currentActivities_rs.rows.item(0).friendica_activities_self); var currentActivities=JSON.parse(currentActivities_rs.rows.item(0).friendica_activities_self);
//print(verb+"currentActivities "+JSON.stringify(currentActivities));
if ((verb=="like")&&(currentActivities.indexOf(1)==-1)){ currentActivities.push(1); if ((verb=="like")&&(currentActivities.indexOf(1)==-1)){ currentActivities.push(1);
if (currentActivities.indexOf(2)!=-1){currentActivities.splice(currentActivities.indexOf(2),1)} if (currentActivities.indexOf(2)!=-1){currentActivities.splice(currentActivities.indexOf(2),1)}
} }
@ -391,7 +388,6 @@ function likerequest(login,database,verb,newsid,rootwindow){
} }
if (verb=="unlike"){ if (currentActivities.indexOf(1)!=-1){currentActivities.splice(currentActivities.indexOf(1),1)}} if (verb=="unlike"){ if (currentActivities.indexOf(1)!=-1){currentActivities.splice(currentActivities.indexOf(1),1)}}
if (verb=="undislike"){ if (currentActivities.indexOf(2)!=-1){currentActivities.splice(currentActivities.indexOf(2),1)}} if (verb=="undislike"){ if (currentActivities.indexOf(2)!=-1){currentActivities.splice(currentActivities.indexOf(2),1)}}
//print(JSON.stringify(currentActivities));
var result = tx.executeSql('UPDATE news SET friendica_activities_self ="'+JSON.stringify(currentActivities)+'" where username="'+login.username+'" AND status_id ='+newsid); var result = tx.executeSql('UPDATE news SET friendica_activities_self ="'+JSON.stringify(currentActivities)+'" where username="'+login.username+'" AND status_id ='+newsid);
})} })}
else{}}) else{}})
@ -408,7 +404,6 @@ function like(login,database,toggle,verb,newsid,rootwindow){
function attend(login,database,attend,newsid,rootwindow,callback){ function attend(login,database,attend,newsid,rootwindow,callback){
Helperjs.friendicaPostRequest(login,"/api/friendica/activity/attend"+attend+"?id="+newsid, "","POST",rootwindow,function (obj){ Helperjs.friendicaPostRequest(login,"/api/friendica/activity/attend"+attend+"?id="+newsid, "","POST",rootwindow,function (obj){
//print("attend: "+attend+obj);
if (obj=='"ok"') if (obj=='"ok"')
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) { db.transaction( function(tx) {
@ -418,7 +413,6 @@ function attend(login,database,attend,newsid,rootwindow,callback){
currentActivities.push(3); currentActivities.push(3);
if (currentActivities.indexOf(4)!=-1){currentActivities.splice(currentActivities.indexOf(4),1)} if (currentActivities.indexOf(4)!=-1){currentActivities.splice(currentActivities.indexOf(4),1)}
if (currentActivities.indexOf(5)!=-1){currentActivities.splice(currentActivities.indexOf(5),1)} if (currentActivities.indexOf(5)!=-1){currentActivities.splice(currentActivities.indexOf(5),1)}
//print(JSON.stringify(currentActivities));
} }
if ((attend=="no")&&(currentActivities.indexOf(4)==-1)){ if ((attend=="no")&&(currentActivities.indexOf(4)==-1)){
currentActivities.push(4); currentActivities.push(4);
@ -443,26 +437,8 @@ function requestConversation(login,database,newsid,contacts,rootwindow,callback)
callback(news,newContacts) callback(news,newContacts)
})} })}
//function conversationfromdb(database,user,conversationId,callback){
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// db.transaction( function(tx) {
// var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationId+'" ORDER BY created_at ASC');
// var newsArray=[];
// var allcontacts=getAllContacts(database,user);
// for(var i = 0; i < newsrs.rows.length; i++) {
// newsArray.push(newsrs.rows.item(i));
// newsArray[i].statusnet_html=Qt.atob(newsArray[i].statusnet_html);
// newsArray[i].text=Qt.atob(newsArray[i].text);
// newsArray[i].id=newsArray[i].status_id;
// newsArray[i]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
// if (helpernews.attachments!="" && newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
// }
// callback(newsArray)})
//}
function requestFavorites(login,database,contacts,rootwindow,callback){ function requestFavorites(login,database,contacts,rootwindow,callback){
Helperjs.friendicaRequest(login,"/api/favorites",rootwindow, function (obj){ Helperjs.friendicaRequest(login,"/api/favorites",rootwindow, function (obj){
//print(obj+JSON.stringify(obj));
var news=JSON.parse(obj); var news=JSON.parse(obj);
var newContacts=findNewContacts(news,contacts); var newContacts=findNewContacts(news,contacts);
// storeNews(login,database,news,rootwindow,callback) // storeNews(login,database,news,rootwindow,callback)
@ -494,7 +470,6 @@ function chatsfromdb(database,login,messagetype,currentconversations,callback,st
for(var j = 0; j< conversations.length; j++) { for(var j = 0; j< conversations.length; j++) {
var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND statusnet_conversation_id="'+conversations[j] +'" AND messagetype="'+messagetype+'" ORDER BY created_at ASC'); var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND statusnet_conversation_id="'+conversations[j] +'" AND messagetype="'+messagetype+'" ORDER BY created_at ASC');
//print(JSON.stringify(newsrs.rows.item(0))+JSON.stringify(newsrs.rows.item(1)))
var helpernews=newsrs.rows.item(0); var helpernews=newsrs.rows.item(0);
helpernews=cleanhelpernews(database,login.username,helpernews,allcontacts) helpernews=cleanhelpernews(database,login.username,helpernews,allcontacts)
helpernews.currentconversation=[]; helpernews.currentconversation=[];
@ -532,17 +507,18 @@ function allchatsfromdb(database,user,callback){
for(var j = 0; j< conversationIds.length; j++) { for(var j = 0; j< conversationIds.length; j++) {
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationIds[j] +'" ORDER BY created_at ASC'); var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationIds[j] +'" ORDER BY created_at ASC');
var helpernews=newsrs.rows.item(0); var helpernews=newsrs.rows.item(0);
var helpernews=cleanhelpernews(database,user,helpernews,allcontacts) if (helpernews){
helpernews.currentconversation=[]; var helpernews=cleanhelpernews(database,user,helpernews,allcontacts)
for (var h = 0;h<newsrs.rows.length;h++){ helpernews.currentconversation=[];
var helpernews2=newsrs.rows.item(h); for (var h = 0;h<newsrs.rows.length;h++){
if(helpernews.id!=helpernews2.status_id){ var helpernews2=newsrs.rows.item(h);
helpernews2.newscount=0; if(helpernews.id!=helpernews2.status_id){
helpernews2=cleanhelpernews(database,user,helpernews2,allcontacts) helpernews2.newscount=0;
helpernews.currentconversation.push(helpernews2) helpernews2=cleanhelpernews(database,user,helpernews2,allcontacts)
helpernews.currentconversation.push(helpernews2)
}
} }
} }
newsArray.push(helpernews); newsArray.push(helpernews);
countArray.push(newsrs.rows.length) countArray.push(newsrs.rows.length)
} }
@ -557,16 +533,10 @@ function allchatsfromdb(database,user,callback){
function oldchatfromdb(database,user,conversationId,lastpost,allcontacts,callback){ function oldchatfromdb(database,user,conversationId,lastpost,allcontacts,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) { db.transaction( function(tx) {
// var newsArray=[];
// var countArray=[];
//var allcontacts=getAllContacts(database,user);
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationId +'" AND status_id<'+lastpost+' ORDER BY created_at ASC'); var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationId +'" AND status_id<'+lastpost+' ORDER BY created_at ASC');
let conversation=[]; let conversation=[];
var helpernews={currentconversation:conversation} var helpernews={currentconversation:conversation}
if(newsrs.rows.length>0){ if(newsrs.rows.length>0){
//helpernews=newsrs.rows.item(0);
//helpernews=cleanhelpernews(database,user,helpernews,allcontacts)
//helpernews.currentconversation=[];
for (var h = 0;h<newsrs.rows.length;h++){ for (var h = 0;h<newsrs.rows.length;h++){
var helpernews2=newsrs.rows.item(h); var helpernews2=newsrs.rows.item(h);
if(helpernews.id!=helpernews2.status_id){ if(helpernews.id!=helpernews2.status_id){
@ -579,8 +549,6 @@ function oldchatfromdb(database,user,conversationId,lastpost,allcontacts,callbac
} }
var newscount=newsrs.rows.length; var newscount=newsrs.rows.length;
callback(helpernews,newscount); callback(helpernews,newscount);
// var conversationobject={news:helpernews,newscount:newscount};
// return conversationobject;
}) })
} }
@ -595,7 +563,6 @@ function cleanhelpernews(database,user,helpernews,allcontacts){
return helpernews return helpernews
} }
function getAllContacts(database,user){ function getAllContacts(database,user){
var allcontacts=[]; var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){ Helperjs.readData(database,"contacts",user,function(obj){

View file

@ -32,14 +32,14 @@
WorkerScript.onMessage = function(msg) { WorkerScript.onMessage = function(msg) {
if (msg.firstalbum==0){msg.model.clear();} if (msg.firstalbum==0){msg.model.clear();}
var contact={}; try{contact=msg.friend}catch(e){print(e)} var contact={}; try{contact=msg.friend}catch(e){print(e)}
var limit=0; if (msg.albums.length-msg.firstalbum<20){limit=msg.albums.length} else{limit=msg.firstalbum+20} var limit=0; if (msg.albums.length-msg.firstalbum<20){limit=msg.albums.length} else{limit=msg.firstalbum+20}
for (var j=msg.firstalbum;j<limit;j++){ for (var j=msg.firstalbum;j<limit;j++){
if (msg.albums[msg.firstalbum]) { if (msg.albums[msg.firstalbum]) {
// print("album"+msg.albums[j].name);
if(msg.foreignPicture){ if(msg.foreignPicture){
var albumname=msg.albums[j].name.trim();var albumlink=msg.albums[j].link var albumname=msg.albums[j].name.trim();var albumlink=msg.albums[j].link
}else{ }else{
var albumname=msg.albums[j].toString();var albumlink=""} var albumname=msg.albums[j].name;var albumlink=""
}
msg.model.append({"albumlink":albumlink,"foreignPicture":msg.foreignPicture,"albumname":albumname,"friend":contact}); msg.model.append({"albumlink":albumlink,"foreignPicture":msg.foreignPicture,"albumname":albumname,"friend":contact});
msg.model.sync() msg.model.sync()
}; };

View file

@ -62,27 +62,6 @@ function cleanPermissions(oldperms){
return (newpermArray) return (newpermArray)
} }
function getEvents(database,login,rootwindow,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
Helperjs.friendicaWebRequest(login.server+"/cal/"+login.username+"/json",rootwindow,function(obj){
//Helperjs.friendicaRemoteAuthRequest(login,login.server+"/cal/"+login.username+"/json",login.server+"/profile/"+login.username,rootwindow,function(obj){
var events = JSON.parse(obj);
db.transaction( function(tx) {
for (var i=0;i<events.length;i++){
var permissions=[];
permissions.push(cleanPermissions(events[i].item.allow_cid));
permissions.push(cleanPermissions(events[i].item.allow_gid));
permissions.push(cleanPermissions(events[i].item.deny_cid));
permissions.push(cleanPermissions(events[i].item.deny_gid));
var result = tx.executeSql('SELECT * from events where username="'+login.username+'" AND id = '+events[i].id); // check for news id
if(result.rows.length === 1) {// use update
result = tx.executeSql('UPDATE events SET username="'+login.username+'", start="'+Date.parse(events[i].start)+'", end="'+Date.parse(events[i].end)+'", allday="'+Number(events[i].allday)+'", title="'+events[i].title+'", j="'+events[i].j+'", d="'+events[i].d+ '", isFirst="'+Number(events[i].isFirst)+'", uid="'+events[i].item.uid+'", cid="'+events[i].item.cid+'", uri="'+events[i].item.uri+'", created="'+ Date.parse(events[i].item.created)+'", edited="'+ Date.parse(events[i].item.edited)+'", desc="'+events[i].item.desc+'", location="'+events[i].item.location+'", type="'+events[i].item.type+'", nofinish="'+events[i].item.nofinish+'", adjust ="'+events[i].item.adjust+'", ignore="'+events[i].item.ignore+'", permissions="'+ JSON.stringify(permissions)+'", guid="'+events[i].item.guid+'", itemid="'+events[i].item.itemid+ '", plink="'+events[i].item.plink+ '", authorName="'+events[i].item["author-name"]+ '", authorAvatar="'+events[i].item["author-avatar"]+ '", authorLink="'+events[i].item["author-link"]+ '", html="'+Qt.btoa(events[i].html)+'" where username="'+login.username+'" AND id='+events[i].id);
} else {// use insert
result = tx.executeSql('INSERT INTO events (username,id,start,end,allday,title,j,d,isFirst,uid,cid,uri,created,edited,desc,location,type,nofinish,adjust,ignore,permissions,guid,itemid,plink,authorName,authorAvatar,authorLink,html) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username, events[i].id, Date.parse(events[i].start), Date.parse(events[i].end), events[i].allday, events[i].title, events[i].j, events[i].d, events[i].isFirst, events[i].item.uid, events[i].item.cid, events[i].item.uri, Date.parse(events[i].item.created), Date.parse(events[i].item.edited), events[i].item.desc, events[i].item.location, events[i].item.type, events[i].item.nofinish, events[i].item.adjust, events[i].item.ignore, JSON.stringify(permissions), events[i].item.guid, events[i].item.itemid, events[i].item.plink, events[i].item["author-name"], events[i].item["author-avatar"], events[i].item["author-link"], Qt.btoa(events[i].html)])}
callback()
}
})})}
function newscount(database, callback){ function newscount(database, callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) { db.transaction( function(tx) {
@ -115,84 +94,6 @@ function eventsfromdb(database, username,callback){
callback(eventArray,dayArray)}); callback(eventArray,dayArray)});
} }
function requestFriendsEvents(login,friend,rootwindow,callback){
// get calendar JSON object of contact without user and password
Helperjs.friendicaWebRequest(friend.replace("profile","cal")+"/json",rootwindow,function(calhtml){
//print(calhtml);
var eventarray=[];var eventdays=[];
var events=JSON.parse(calhtml);
for (var i=0;i<events.length;i++){
var permissions=[];
permissions.push(cleanPermissions(events[i].item.allow_cid));
permissions.push(cleanPermissions(events[i].item.allow_gid));
permissions.push(cleanPermissions(events[i].item.deny_cid));
permissions.push(cleanPermissions(events[i].item.deny_gid));
var event ={}
event.start=Date.parse(events[i].start);event.end=Date.parse(events[i].end);
event.allday=events[i].allday; event.title=events[i].title; event.j=events[i].j;
event.d=events[i].d; event.isFirst=events[i].isFirst; event.uid=events[i].item.uid;
event.cid=events[i].item.cid; event.uri=events[i].item.uri;
event.created=Date.parse(events[i].item.created); event.edited=Date.parse(events[i].item.edited);
event.desc=events[i].item.desc; event.location=events[i].item.location; event.type=events[i].item.type;
event.nofinish=events[i].item.nofinish; event.adjust =events[i].item.adjust; event.ignore=events[i].item.ignore;
event.permissions=JSON.stringify(permissions); event.guid=events[i].item.guid;
event.itemid=events[i].item.itemid; event.plink=events[i].plink; event.authorName=events[i].item["author-name"];
event.authorAvatar=events[i].item["author-avatar"]; event. authorLink=events[i].item["author-link"];
event.html=Qt.btoa(events[i].html);
eventarray.push(event);
// var offsetTime = new Date().getTimezoneOffset() * 60 * 1000;print(new Date(event.start).toLocaleString()+"Zeitverschiebung:"+offsetTime)
// var time = event.start - offsetTime;
eventdays.push(Math.floor(event.start/(24*60*60*1000)))
}
//print(JSON.stringify(eventarray));
callback(eventarray,eventdays)
})
}
function newRequestFriendsEvents(login,friend,rootwindow,callback){
// get calendar JSON object of contact with remoteAuth or without user and password
if(friend.isFriend==1){
Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","cal")+"/json",friend.url,rootwindow,function(calhtml){
getEventsFromHtml(calhtml,rootwindow,callback)})
}
else{
Helperjs.friendicaWebRequest(friend.url.replace("profile","cal")+"/json",rootwindow,function(calhtml){
getEventsFromHtml(calhtml,rootwindow,callback)})
}
}
function getEventsFromHtml(calhtml,rootwindow,callback){
var eventarray=[];var eventdays=[];
var events=JSON.parse(calhtml);
for (var i=0;i<events.length;i++){
var permissions=[];
permissions.push(cleanPermissions(events[i].item.allow_cid));
permissions.push(cleanPermissions(events[i].item.allow_gid));
permissions.push(cleanPermissions(events[i].item.deny_cid));
permissions.push(cleanPermissions(events[i].item.deny_gid));
var event ={}
event.start=Date.parse(events[i].start);event.end=Date.parse(events[i].end);
event.allday=events[i].allday; event.title=events[i].title; event.j=events[i].j;
event.d=events[i].d; event.isFirst=events[i].isFirst; event.uid=events[i].item.uid;
event.cid=events[i].item.cid; event.uri=events[i].item.uri;
event.created=Date.parse(events[i].item.created); event.edited=Date.parse(events[i].item.edited);
event.desc=events[i].item.desc; event.location=events[i].item.location; event.type=events[i].item.type;
event.nofinish=events[i].item.nofinish; event.adjust =events[i].item.adjust; event.ignore=events[i].item.ignore;
event.permissions=JSON.stringify(permissions); event.guid=events[i].item.guid;
event.itemid=events[i].item.itemid; event.plink=events[i].plink; event.authorName=events[i].item["author-name"];
event.authorAvatar=events[i].item["author-avatar"]; event. authorLink=events[i].item["author-link"];
event.html=Qt.btoa(events[i].html);
eventarray.push(event);
// var offsetTime = new Date().getTimezoneOffset() * 60 * 1000;print(new Date(event.start).toLocaleString()+"Zeitverschiebung:"+offsetTime)
// var time = event.start - offsetTime;
eventdays.push(Math.floor(event.start/(24*60*60*1000)))
}
//print(JSON.stringify(eventarray));
callback(eventarray,eventdays)
}
function savePermissions(database,obj) { // stores config to DB function savePermissions(database,obj) { // stores config to DB
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
var permissions=JSON.stringify(obj) var permissions=JSON.stringify(obj)
@ -207,34 +108,14 @@ function storeConfig(database,obj) { // stores config to DB
//print(JSON.stringify(obj)); //print(JSON.stringify(obj));
var result = tx.executeSql('SELECT * from config WHERE username="'+obj.username+'"'); var result = tx.executeSql('SELECT * from config WHERE username="'+obj.username+'"');
if(result.rows.length === 1) {// use update if(result.rows.length === 1) {// use update
var result2 = tx.executeSql('UPDATE config SET server="'+obj.server+'",password="'+obj.password+'", imagestore="'+obj.imagestore+'", maxnews="'+obj.accountId+'", timerInterval=0, newsViewType="'+obj.newsViewType+'", isActive=0 WHERE username="'+obj.username +'"'); var result2 = tx.executeSql('UPDATE config SET server="'+obj.server+'",password="'+obj.password+'", imagestore="'+obj.imagestore+'", maxnews="'+obj.accountId+'", timerInterval=0, newsViewType="'+obj.newsViewType+'", isActive=0, APIVersion="'+Qt.btoa(obj.token)+'", addons="'+obj.client + '" WHERE username="'+obj.username +'"');
var result3 = tx.executeSql('UPDATE config SET isActive=1 WHERE username !="'+obj.username +'"'); var result3 = tx.executeSql('UPDATE config SET isActive=1 WHERE username !="'+obj.username +'"');
} else {// use insert print('... does not exists, create it') } else {// use insert print('... does not exists, create it')
var result2 = tx.executeSql('INSERT INTO config VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)', [obj.server, obj.username, obj.password, obj.imagestore, obj.accountId, 0,obj.newsViewType,0,"[[],[],[],[]]",0,"","",""]); var result2 = tx.executeSql('INSERT INTO config VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)', [obj.server, obj.username, obj.password, obj.imagestore, obj.accountId, 0,obj.newsViewType,0,"[[],[],[],[]]",0,Qt.btoa(obj.token),"",obj.client]);
var result3 = tx.executeSql('UPDATE config SET isActive=1 WHERE username !="'+obj.username +'"'); var result3 = tx.executeSql('UPDATE config SET isActive=1 WHERE username !="'+obj.username +'"');
} }
})} })}
function showServerConfig(url,rootwindow,callback){
Helperjs.friendicaWebRequest(url+"/api/statusnet/config",rootwindow, function (obj){
var serverconfig = JSON.parse(obj);
var serverConfigString="import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:'Server';standardButtons: StandardButton.Ok;text: 'Name: "+serverconfig.site.name+"\nLanguage: "+serverconfig.site.language+
"\nEmail: "+serverconfig.site.email+"\nTimezone: "+serverconfig.site.timezone+"\nClosed: "+serverconfig.site.closed+
"\nText limit: "+serverconfig.site.textlimit+"\nShort Url length: "+serverconfig.site.shorturllength+
"\nFriendica version: "+serverconfig.site.friendica.FRIENDICA_VERSION+"\nDFRN version: "+serverconfig.site.friendica.DFRN_PROTOCOL_VERSION +
"\nDB Update version: "+serverconfig.site.friendica.DB_UPDATE_VERSION+"'}";
callback(serverConfigString)
})}
//function checkLogin(login,rootwindow,callback){
// // check server with given credentials
// try {Helperjs.friendicaRequest(login,"/api/account/verify_credentials",rootwindow, function (obj){
// var account = JSON.parse(obj);
// callback(account)
// })}
// catch(e){}
//}
function requestProfile(login,database,rootwindow,callback){ function requestProfile(login,database,rootwindow,callback){
// return profile data // return profile data
Helperjs.friendicaRequest(login,"/api/friendica/profile/show", rootwindow,function (obj){ Helperjs.friendicaRequest(login,"/api/friendica/profile/show", rootwindow,function (obj){
@ -256,41 +137,15 @@ function requestProfile(login,database,rootwindow,callback){
}); });
} }
function getServerConfig(database,login,rootwindow,callback){
// check server with given credentials
try {Helperjs.friendicaRequest(login,"/api/statusnet/config",rootwindow, function (obj){
var serverconfig = JSON.parse(obj);
var serverconfigString="import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:'Server';standardButtons: StandardButton.Ok;text: 'SUCCESS! \nName: "+serverconfig.site.name+"\nLanguage: "+serverconfig.site.language+
"\nEmail: "+serverconfig.site.email+"\nTimezone: "+serverconfig.site.timezone+"\nClosed: "+serverconfig.site.closed+
"\nText limit: "+serverconfig.site.textlimit+"\nShort Url length: "+serverconfig.site.shorturllength+
"\nFriendica version: "+serverconfig.site.friendica.FRIENDICA_VERSION+"\nDFRN version: "+serverconfig.site.friendica.DFRN_PROTOCOL_VERSION +
"\nDB Update version: "+serverconfig.site.friendica.DB_UPDATE_VERSION+"'}";
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
var result = tx.executeSql('UPDATE config SET APIVersion="'+ serverconfig.site.friendica.FRIENDICA_VERSION+'" WHERE username="'+login.username +'"')})
callback(serverconfigString);
})}
catch (e){callback (e);
}}
function readConfig(database,callback,filter,filtervalue) { // reads config function readConfig(database,callback,filter,filtervalue) { // reads config
if (filter){var where = " WHERE "+ filter +" = '" + filtervalue+"'"} else { var where=""} if (filter){var where = " WHERE "+ filter +" = '" + filtervalue+"'"} else { var where=""}
//print("readConfig");
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3],initDatabase(database)); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3],initDatabase(database));
db.transaction( function(tx) { db.transaction( function(tx) {
var tables = tx.executeSql("SELECT * FROM sqlite_master WHERE type='table'"); var tables = tx.executeSql("SELECT * FROM sqlite_master WHERE type='table'");
if (tables.rows.length==0){print("no database");callback("")} else { if (tables.rows.length==0){print("no database");callback("")} else {
updatenews.setDatabase();
var rs = tx.executeSql('select * from config'+where); let rsArray=updatenews.getAccounts(filter,filtervalue);
var rsArray=[]; let rsObject=rsArray[0];
if (rs.rows.length>0){
for(var i = 0; i < rs.rows.length; i++) {
rsArray.push(rs.rows.item(i))
}
var rsObject={server:rsArray[0].server,username:rsArray[0].username, password:rsArray[0].password,imagestore:rsArray[0].imagestore,isActive:rsArray[0].isActive, newsViewType:rsArray[0].newsViewType,accountId:rsArray[0].maxnews,permissions:JSON.parse(rsArray[0].permissions),maxContactAge:rsArray[0].maxContactAge,APIVersion:rsArray[0].APIVersion,addons:rsArray[0].addons};
if (rsObject.newsViewType!="" && rsObject.newsViewType!=null &&!typeof(rsObject.newsViewType)=='undefined'){updateNewsviewtype(database,rsObject.newsViewType)}
} else {var rsObject=""}
callback(rsObject)}} callback(rsObject)}}
) )
} }
@ -300,14 +155,8 @@ function readAllLogins(database,callback) { // reads config
db.transaction( function(tx) { db.transaction( function(tx) {
var tables = tx.executeSql("SELECT * FROM sqlite_master WHERE type='table'"); var tables = tx.executeSql("SELECT * FROM sqlite_master WHERE type='table'");
if (tables.rows.length==0){print("no database");callback("")} else { if (tables.rows.length==0){print("no database");callback("")} else {
var rs = tx.executeSql('select * from config'); updatenews.setDatabase();
var rsArray=[]; var rsArray=updatenews.getAccounts();
if (rs.rows.length>0){
for(var i = 0; i < rs.rows.length; i++) {
rsArray.push(rs.rows.item(i));
rsArray[i].permissions=JSON.parse(rsArray[i].permissions)
}
}
} }
callback(rsArray)} callback(rsArray)}
) )
@ -326,7 +175,6 @@ function setDefaultOptions(database){
}) })
} }
function readGlobaloptions(database,callback){ function readGlobaloptions(database,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
var go=({}); var go=({});
@ -368,7 +216,7 @@ function deleteConfig(database,userobj,callback) { // delete user data from DB
var rs3 = tx.executeSql("delete from contacts WHERE username='"+ userobj.username+"'"); var rs3 = tx.executeSql("delete from contacts WHERE username='"+ userobj.username+"'");
var rs4 = tx.executeSql("delete from imageData WHERE username='"+ userobj.username+"'"); var rs4 = tx.executeSql("delete from imageData WHERE username='"+ userobj.username+"'");
var rs5 = tx.executeSql("delete from groups WHERE username='"+ userobj.username+"'"); var rs5 = tx.executeSql("delete from groups WHERE username='"+ userobj.username+"'");
var rs5 = tx.executeSql("delete from events WHERE username='"+ userobj.username+"'"); var rs6 = tx.executeSql("delete from events WHERE username='"+ userobj.username+"'");
callback(); callback();
}) })
} }
@ -379,11 +227,9 @@ function updateNewsviewtype(database, newsViewtype){
db.transaction( function(tx) { db.transaction( function(tx) {
var rs1 = tx.executeSql('INSERT INTO globaloptions (k,v) VALUES (?,?)', ["newsViewType",newsViewtype]) var rs1 = tx.executeSql('INSERT INTO globaloptions (k,v) VALUES (?,?)', ["newsViewType",newsViewtype])
var rs2 = tx.executeSql('UPDATE config SET newsViewType=""'); var rs2 = tx.executeSql('UPDATE config SET newsViewType=""');
//Helperjs.showMessage(qsTr("Changelog"),qsTr("Setting view type of news has moved from account page to config page."),root)
}) })
} }
function cleanNews(database,callback){ function cleanNews(database,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) { db.transaction( function(tx) {
@ -448,7 +294,7 @@ function updateContactInDB(login,database,isFriend,contact){// for newstab and f
}); });
} }
function processNews(api,data){//print("processnews "+ " api "+ api + " data "+data); function processNews(api,data){
try{var newslist=JSON.parse(data)} catch(e){print("processnews "+e+ " api "+ api + " data "+data);newsBusy.running=false;}; try{var newslist=JSON.parse(data)} catch(e){print("processnews "+e+ " api "+ api + " data "+data);newsBusy.running=false;};
if (api=="/api/users/show"){ if (api=="/api/users/show"){
var usermessages=[]; var usermessages=[];
@ -618,7 +464,6 @@ function processNews(api,data){//print("processnews "+ " api "+ api + " data "+d
} }
} }
function cleanUser(user){ function cleanUser(user){
user.created_at=Date.parse(Newsjs.cleanDate(user.created_at)); user.created_at=Date.parse(Newsjs.cleanDate(user.created_at));
var imagehelper1=user.profile_image_url.split("?"); var imagehelper1=user.profile_image_url.split("?");
@ -628,78 +473,11 @@ function cleanUser(user){
return user return user
} }
function updateView(viewtype){//print("lastnews "+lastnews); function updateView(viewtype,lastnews=0){
//messageSend.state=""; //messageSend.state="";
//newsBusy.running=true; //newsBusy.running=true;
//downloadNotice.text="xhr start "+Date.now() //downloadNotice.text="xhr start "+Date.now()
switch(viewtype){
case "Conversations":
Newsjs.getLastNews(login,db,function(lastnews){
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)});
break;
case "Timeline":
var lastnews=Newsjs.getLastNews(login,db,function(lastnews){
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
});
break;
case "Search":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/search");
break;
case "Notifications":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/friendica/notification");
xhr.clearParams();
break;
case "Direct Messages":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/all");
xhr.clearParams();
break;
case "Public Timeline":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/public_timeline");
xhr.clearParams();
break;
case "Favorites":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/favorites");
xhr.clearParams();
break;
case "Replies":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/replies");
xhr.clearParams();
break;
default:
Newsjs.getLastNews(login,db,function(lastnews){
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
newstab.newstabstatus="Conversations";
});
}
xhr.get();
if (viewtype==="Conversations"){Newsjs.allchatsfromdb(db,login.username,function(temp){ if (viewtype==="Conversations"){Newsjs.allchatsfromdb(db,login.username,function(temp){
newsStack.allchats=temp newsStack.allchats=temp
})} })}
@ -707,6 +485,44 @@ function updateView(viewtype){//print("lastnews "+lastnews);
//alarm.setAlarm(root.globaloptions.syncinterval); //alarm.setAlarm(root.globaloptions.syncinterval);
setBackgroundsync() setBackgroundsync()
} }
xhr.setAccount(login);
switch(viewtype){
case "Conversations":
xhr.setApi("/api/statuses/friends_timeline");
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50);
break;
case "Timeline":
xhr.setApi("/api/statuses/friends_timeline");
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
break;
case "Search":
xhr.setApi("/api/search");
break;
case "Notifications":
xhr.setApi("/api/friendica/notification");
break;
case "Direct Messages":
xhr.setApi("/api/direct_messages/all");
break;
case "Public Timeline":
xhr.setApi("/api/statuses/public_timeline");
break;
case "Favorites":
xhr.setApi("/api/favorites");
break;
case "Replies":
xhr.setApi("/api/statuses/replies");
break;
default:
xhr.setApi("/api/statuses/friends_timeline");
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
newstab.newstabstatus="Conversations";
}
xhr.get();
} }
function showGroups(){ function showGroups(){
@ -732,10 +548,8 @@ function setBackgroundsync(){
function getGroupnews(list){ function getGroupnews(list){
newstab.newstabstatus="Group news"; newstab.newstabstatus="Group news";
newsBusy.running=true; newsBusy.running=true;
xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setAccount(login);
xhr.setUrl(login.server);
xhr.setApi("/api/lists/statuses"); xhr.setApi("/api/lists/statuses");
xhr.clearParams();
xhr.setParam("list_id",list) xhr.setParam("list_id",list)
xhr.get(); xhr.get();
} }

View file

@ -82,12 +82,23 @@ var html=[//Smileys
'\ud83d\ude4E', '\ud83d\ude4E',
'\ud83d\ude4F', '\ud83d\ude4F',
'\ud83e\udd2F', '\ud83e\udd2F',
'\uD83E\uDD17',
'\uD83E\uDD14',
'\uD83E\uDD73',
'\uD83E\uDD21',
'\uD83D\uDC4D', '\uD83D\uDC4D',
'\uD83D\uDC94',
'\u2764\uFE0F', '\u2764\uFE0F',
'\uD83D\uDCA9', '\uD83D\uDCA9',
'\uD83D\uDC2D', '\uD83D\uDC2D',
'\uD83D\uDC2E', '\uD83D\uDC2E',
'\uD83D\uDC31', '\uD83D\uDC31',
'\uD83D\uDCAF',
'\uD83C\uDF82',
'\uD83C\uDF89',
'\uD83C\uDF81',
'\uD83C\uDF08',
'\uD83D\uDC80',
'\u2639', '\u2639',
'\u263B', '\u263B',
//Weather //Weather

View file

@ -1,47 +0,0 @@
<html>
<head>
<title>-1</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>
<body bgcolor="black" marginwidth="0" marginheight="0">
<div id="player"></div>
<script>
function getVideoId() {
return window.location.href.slice(window.location.href.indexOf('?') + 1);
}
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
console.log("Videoid: "+getVideoId());
player = new YT.Player('player', {
playerVars: { 'html5': 1, 'iv_load_policy': 3, 'autoplay': 1 },
frameborder: '0',
height: '100%',
width: '100%',
videoId: getVideoId(),
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}
function onPlayerReady(event) {
document.title = 0;
event.target.playVideo();
}
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING) {
document.title = 1;
} else if (event.data == YT.PlayerState.ENDED || event.data == YT.PlayerState.PAUSED) {
document.title = 2;
}
}
</script>
</body>
</html>

View file

@ -68,7 +68,7 @@ Rectangle {
eventdays=dayArray; eventdays=dayArray;
calBusy.running=false calBusy.running=false
var currentevents=events; var currentevents=events;
var currentevents=events.filter(event=>(currentTime<=event.end)); currentevents=events.filter(event=>(currentTime<=event.end));
for (var i=0; i<Math.min(5,currentevents.length);i++){ for (var i=0; i<Math.min(5,currentevents.length);i++){
var liststate=""; var liststate="";
eventModel.append({"event":currentevents[i],"eventstatus":liststate}); eventModel.append({"event":currentevents[i],"eventstatus":liststate});
@ -155,10 +155,8 @@ Rectangle {
standardButtons: Dialog.Ok | Dialog.Cancel standardButtons: Dialog.Ok | Dialog.Cancel
modal: true modal: true
onAccepted: { onAccepted: {
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/friendica/event_delete"); xhr.setApi("/api/friendica/event_delete");
xhr.clearParams();
xhr.setParam("id",eventid); xhr.setParam("id",eventid);
xhr.post(); xhr.post();
} }

View file

@ -350,10 +350,8 @@ Flickable{
let startdatetext=textStartDate.getText(0,textStartDate.length); let startdatetext=textStartDate.getText(0,textStartDate.length);
let startdate=new Date(startdatetext.substring(6,10)+"-"+startdatetext.substring(3,5)+"-"+startdatetext.substring(0,2)+"T"+textStartTime.text) let startdate=new Date(startdatetext.substring(6,10)+"-"+startdatetext.substring(3,5)+"-"+startdatetext.substring(0,2)+"T"+textStartTime.text)
eventCreateBusy.running=true; eventCreateBusy.running=true;
xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setAccount(login);
xhr.setUrl(login.server);
xhr.setApi("/api/friendica/event_create"); xhr.setApi("/api/friendica/event_create");
xhr.clearParams();
xhr.setParam("name", titleField.text); xhr.setParam("name", titleField.text);
xhr.setParam("start_time",startdate.toISOString()) xhr.setParam("start_time",startdate.toISOString())
if(!checkNoEndTime.checked){ if(!checkNoEndTime.checked){

View file

@ -74,10 +74,8 @@ Rectangle{
standardButtons: Dialog.Ok | Dialog.Cancel standardButtons: Dialog.Ok | Dialog.Cancel
modal: true modal: true
onAccepted: { onAccepted: {
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/friendica/event_delete"); xhr.setApi("/api/friendica/event_delete");
xhr.clearParams();
xhr.setParam("id",eventid); xhr.setParam("id",eventid);
xhr.post(); xhr.post();
} }

View file

@ -43,10 +43,11 @@ Dialog {
standardButtons: Dialog.Yes | Dialog.No standardButtons: Dialog.Yes | Dialog.No
modal: true modal: true
onAccepted: { onAccepted: {
username.visible=true; // username.visible=true;
password.visible=true; // password.visible=true;
ruleButton.visible=false; ruleButton.visible=false;
confirmation.visible=true // confirmation.visible=true
accountPage.state="oauth"
} }
onRejected: {close()} onRejected: {close()}
ScrollView{ ScrollView{

View file

@ -35,7 +35,6 @@ import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import QtQml.Models 2.15 import QtQml.Models 2.15
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
import "qrc:/js/layout.js" as Layoutjs
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/configqml" import "qrc:/qml/configqml"
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
@ -47,18 +46,56 @@ Page{
property var users:[] property var users:[]
property var userdata: ({}) property var userdata: ({})
property string imagestoredir: "" property string imagestoredir: ""
property var appdata: ({})
function setServericon(server){ function setServericon(server){
if ((server!=null) && (server!="")){ if ((server!=null) && (server!="")){
try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){ xhr.setUrl(server);
var serverdata = JSON.parse(obj); xhr.setApi("/api/statusnet/config");
servericon.visible=true; xhr.clearParams();
servericon.source=serverdata.site.logo}) xhr.get();
} catch(e){print(e)}
} }
} }
function verify(userconfig){
Helperjs.friendicaRequest(userconfig,"/api/v1/accounts/verify_credentials",root,function(obj){
accountBusy.running=false;
try{var credentials=JSON.parse(obj);
if (credentials.hasOwnProperty('error')){
Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)
}
else{
if (users.length==0){Service.setDefaultOptions(db);}
if (userconfig.APIVersion!=""){userconfig.password=""}
if (imagestoredir==""){imagestoredir=filesystem.homePath+"/"+credentials.username+"/";
userconfig.imagestore=imagestoredir}
if(userconfig.imagestore == filesystem.homePath+"/"+username.text+"/")
{filesystem.makePath(filesystem.homePath+"/"+username.text);}
filesystem.Directory=imagestoredir;
filesystem.makeDir("contacts");
filesystem.makeDir("albums");
userconfig.accountId=credentials.id;
userconfig.username=credentials.username;
Service.storeConfig(db,userconfig);
Service.readConfig(db,function(userconfig){
Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive;
});
accountPage.users=storedUsers});
//reset values
login=userconfig;
news=[];
contactlist=[];
rootstack.currentIndex=0;
newstypeSignal("refresh");
},"isActive",0);
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.display_name+"\nScreen Name: "+credentials.username,root)
rootstackView.pop()
}
}catch(e){Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)};
})}
MButton{ MButton{
id:userButton id:userButton
text:qsTr("User") text:qsTr("User")
@ -82,6 +119,8 @@ Page{
imagestore.text=obj.imagestore; imagestore.text=obj.imagestore;
imagestoredir=obj.imagestore; imagestoredir=obj.imagestore;
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'} if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
if(obj.password!=''){accountPage.state='password'}
else if (obj.token!=''){accountPage.state='oauth'}
},'username','"+ accountPage.users[i].username+"')}}" },'username','"+ accountPage.users[i].username+"')}}"
} }
var menuString="import QtQuick.Controls 2.12;import 'qrc:/js/service.js' as Service;"+ var menuString="import QtQuick.Controls 2.12;import 'qrc:/js/service.js' as Service;"+
@ -96,11 +135,18 @@ Page{
width:2.5*root.fontFactor*osSettings.bigFontSize; height: 2.5*root.fontFactor*osSettings.bigFontSize width:2.5*root.fontFactor*osSettings.bigFontSize; height: 2.5*root.fontFactor*osSettings.bigFontSize
visible: false visible: false
source:"" source:""
property var serverconfig:({})
MouseArea{ MouseArea{
anchors.fill:parent anchors.fill:parent
onClicked:{ onClicked:{
Service.showServerConfig(servername.text, accountPage, function(configString){ let serverConfigString="import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:'Server';standardButtons: StandardButton.Ok;text: 'Name: "+
var serverconfigObject=Qt.createQmlObject(configString,accountPage,"serverconfigOutput");}) servericon.serverconfig.site.name+"\nLanguage: "+servericon.serverconfig.site.language+
"\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+
"\nFriendica version: "+servericon.serverconfig.site.friendica.FRIENDICA_VERSION+
"\nDB Update version: "+servericon.serverconfig.site.friendica.DB_UPDATE_VERSION+"'}";
var serverconfigObject=Qt.createQmlObject(serverConfigString,accountPage,"serverconfigOutput");
} }
} }
} }
@ -180,22 +226,23 @@ Page{
} }
ListModel{id:serverModel ListModel{id:serverModel
ListElement{text:"https://anonsys.net"}
ListElement{text:"https://asaps-sm.lafayettegroup.com"} ListElement{text:"https://asaps-sm.lafayettegroup.com"}
ListElement{text:"https://f.freinetz.ch"} ListElement{text:"https://f.freinetz.ch"}
ListElement{text:"https://friendica.chilemasto.casa"} ListElement{text:"https://friendica.chilemasto.casa"}
ListElement{text:"https://friendica.eskimo.com"}
ListElement{text:"https://friendica.me"}
ListElement{text:"https://friendica.opensocial.space"}
ListElement{text:"https://friendica.utzer.de"} ListElement{text:"https://friendica.utzer.de"}
ListElement{text:"https://friendica.vrije-mens.org"} ListElement{text:"https://friendica.vrije-mens.org"}
ListElement{text:"https://friendicarg.nsupdate.info.de"}
ListElement{text:"https://friends.nogafam.es"}
ListElement{text:"https://libranet.de"} ListElement{text:"https://libranet.de"}
ListElement{text:"https://loma.ml"} ListElement{text:"https://loma.ml"}
ListElement{text:"https://social.trom.tf"}
ListElement{text:"https://motley.club"}
ListElement{text:"https://nerdica.net"} ListElement{text:"https://nerdica.net"}
ListElement{text:"https://noovi.org"}
ListElement{text:"https://nsfw.wnymathguy.com"} ListElement{text:"https://nsfw.wnymathguy.com"}
ListElement{text:"https://opensocial.at"} ListElement{text:"https://opensocial.at"}
ListElement{text:"https://poliverso.org"}
ListElement{text:"https://social.isurf.ca"} ListElement{text:"https://social.isurf.ca"}
ListElement{text:"https://social.trom.tf"}
ListElement{text:"https://squeet.me"} ListElement{text:"https://squeet.me"}
ListElement{text:"https://venera.social"} ListElement{text:"https://venera.social"}
} }
@ -208,16 +255,10 @@ Page{
text: qsTr("Instance rules") text: qsTr("Instance rules")
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
onClicked:{ onClicked:{
Helperjs.friendicaWebRequest(servername.text+"/api/v1/instance/rules",root,function(rules){ xhr.setUrl(servername.text);
let rulestext=""; xhr.setApi("/api/v1/instance/rules");
let rulesarray=JSON.parse(rules) xhr.clearParams();
for (let rule in rulesarray){ xhr.get();
rulestext=rulestext+rulesarray[rule].text+"\n"
}
var component = Qt.createComponent("qrc:/qml/configqml/AcceptRules.qml");
var rulesdialog = component.createObject(root,{"rules": rulestext});
rulesdialog.open()
})
} }
} }
@ -237,7 +278,6 @@ Page{
} }
} }
TextField { TextField {
id: password id: password
x: root.fontFactor*osSettings.bigFontSize; y: 9*root.fontFactor*osSettings.bigFontSize; width: root.width-9*mm; //height: 5*mm; x: root.fontFactor*osSettings.bigFontSize; y: 9*root.fontFactor*osSettings.bigFontSize; width: root.width-9*mm; //height: 5*mm;
@ -298,62 +338,119 @@ Page{
running: false running: false
} }
MButton {
id:confirmationOAuth
x: root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize
text: qsTr("Connect")
font.pointSize: osSettings.bigFontSize
visible: (osSettings.osType=="Android")?userButton.text!= qsTr("User"):true
onClicked:{
if (servername.text==""){Helperjs.showMessage(qsTr("Error"), qsTr("No server given!"),root)}
else{
xhr.setUrl(servername.text);
xhr.setApi("/api/v1/apps");
xhr.clearParams();
if (osSettings.osType=="Android"){
xhr.setParam("client_name","Friendiqa-Android");
} else {
xhr.setParam("client_name","Friendiqa-"+filesystem.hostname);
}
xhr.setParam("redirect_uris","http://127.0.0.1:1337/");
xhr.setParam("scopes","read write follow push");
xhr.setParam("website","https://friendiqa.ma-nic.de");
xhr.post();
}
}
}
Connections{
target: xhr
function onSuccess(text,api){
if(api=="/api/v1/instance/rules"){
let rulestext="";
let rulesarray=JSON.parse(text)
for (let rule in rulesarray){
rulestext=rulestext+rulesarray[rule].text+"\n"
}
var component = Qt.createComponent("qrc:/qml/configqml/AcceptRules.qml");
var rulesdialog = component.createObject(root,{"rules": rulestext});
rulesdialog.open();
}
else if(api=="/api/statusnet/config"){
try{let serverdata = JSON.parse(text);
servericon.visible=true;
servericon.source=serverdata.site.logo;
servericon.serverconfig=serverdata;
}
catch(e){print(e)}
}
else if (api=="/api/v1/apps"){
let app=JSON.parse(text);
accountPage.appdata=app;
oauth2.setClientId(app.client_id);
oauth2.setClientSecret(app.client_secret);
oauth2.setServer(servername.text);
oauth2.grant();
}
}
function onError(text,api){
print(api + " Error "+ text)
}
}
Connections{
target: oauth2
function onSuccess(text){
var userconfig={server: servername.displayText, username:"", password:"", imagestore: imagestoredir,interval:"",token: text,client:Qt.btoa(JSON.stringify(appdata))}
verify(userconfig)
}
function onError(text){
Helperjs.showMessage(qsTr("Error"), qsTr("Couldn't connect to server"),root)
print ("oauth2 onerror "+text)
}
}
MButton { MButton {
id:confirmation id:confirmation
x: root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize x: root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize
text: qsTr("Confirm") text: qsTr("Confirm")
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
visible: (osSettings.osType=="Android")?userButton.text!= qsTr("User"):true visible: false// (osSettings.osType=="Android")?userButton.text!= qsTr("User"):true
onClicked:{ onClicked:{
accountBusy.running=true;//servername.displayText accountBusy.running=true;
var userconfig={server: servername.displayText, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir,interval: ""}; var userconfig={server: servername.displayText, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir,interval:""};
var errormessage=""; var errormessage="";
if (servername.text==""){errormessage=qsTr("No server given! ")} if (servername.text==""){errormessage=qsTr("No server given! ")}
else if (username.text==""){errormessage+=qsTr("No nickname given! ")} else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
else if (password.text=="") {errormessage+=qsTr("No password given! ")} else if (password.text=="") {errormessage+=qsTr("No password given! ")}
else if (imagestoredir=="") {errormessage+=qsTr("No image directory given!")} else if (imagestoredir=="") {errormessage+=qsTr("No image directory given!")}
else {errormessage=""} else {errormessage=""}
if (errormessage=="") { if (errormessage=="") {verify(userconfig)}
Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials.json?skip_status=true",root,function(obj){ else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
accountBusy.running=false;
try{var credentials=JSON.parse(obj);
if (credentials.hasOwnProperty('error')){
Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)
}
else{
if (users.length==0){Service.setDefaultOptions(db);}
if(userconfig.imagestore == filesystem.homePath+"/"+username.text+"/")
{
filesystem.makePath(filesystem.homePath+"/"+username.text);
}
filesystem.Directory=imagestoredir
filesystem.makeDir("contacts");
filesystem.makeDir("albums");
userconfig.accountId=credentials.id
Service.storeConfig(db,userconfig);
Service.readConfig(db,function(userconfig){
Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive;
});
accountPage.users=storedUsers});
//reset values
login=userconfig;
news=[];
contactlist=[];
rootstack.currentIndex=0;
newstypeSignal("refresh");
},"isActive",0);
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.name+"\nScreen Name: "+credentials.screen_name,root)
rootstackView.pop()
}
}catch(e){Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)};
})}
else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
}} }}
MButton {
id: setDefault
x: 10*root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize
text: qsTr("Set as default")
font.pointSize: osSettings.bigFontSize
visible: false
onClicked:{
accountBusy.running=true;
let users=updatenews.getAccounts("username",username.text)
Service.storeConfig(db,users[0]);
Service.readConfig(db,function(userconfig){
//reset values
login=userconfig;
news=[];
contactlist=[];
rootstack.currentIndex=0;
newstypeSignal("refresh");
},"isActive",0);
Helperjs.showMessage(qsTr("Success"),"Screen Name: "+users[0].username,root)
rootstackView.pop()
}}
Row{ Row{
spacing:0.5*mm spacing:0.5*mm
@ -368,6 +465,19 @@ Page{
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
onClicked:{ onClicked:{
var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)}; var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
Service.readConfig(db,function(user){
if(userdata.token!=""){xhr.setUrl(servername.text);
xhr.setApi("/oauth/revoke");
xhr.clearParams();
xhr.setParam("client_id",user.client.client_id);
xhr.setParam("client_secret",user.client.client_secret);
xhr.setParam("token",user.token);
xhr.post();
}
},"username",username.text);
Service.deleteConfig(db,userconfig,function(){ Service.deleteConfig(db,userconfig,function(){
filesystem.Directory=imagestore.text+"contacts"; filesystem.Directory=imagestore.text+"contacts";
filesystem.rmDir(); filesystem.rmDir();
@ -379,15 +489,13 @@ Page{
username.text=""; username.text="";
password.text=""; password.text="";
imagestore.text=""; imagestore.text="";
//maxNews.value=0;
//newsTypeField.text="Conversations";
//messageIntervalSlider.value=30;
userButton.text=qsTr("User"); userButton.text=qsTr("User");
Helperjs.readData(db,"config","",function(storedUsers){ Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) { storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive; return obj1.isActive - obj2.isActive;
}) })
accountPage.users=storedUsers;}) accountPage.users=storedUsers;})
accountPage.state="new_oauth"
}) })
}} }}
@ -404,6 +512,7 @@ Page{
password.text="" password.text=""
imagestore.text="" imagestore.text=""
userButton.text=qsTr("User") userButton.text=qsTr("User")
accountPage.state="new_oauth"
} }
} }
@ -425,7 +534,31 @@ Page{
} }
} }
Component.onCompleted: { states: [
State {
name: "new_oauth"
PropertyChanges { target: username; visible: false }
PropertyChanges { target: password; visible: false}
PropertyChanges { target: ruleButton; visible: true}
},
State {
name:"oauth"
PropertyChanges {target: username; visible: true}
PropertyChanges { target: password; visible: false}
PropertyChanges {target: confirmationOAuth; visible: true}
PropertyChanges {target: setDefault; visible: true}
PropertyChanges { target: confirmation; visible: false}
},
State{
name:"password"
PropertyChanges { target: username; visible: true }
PropertyChanges { target: password; visible: true}
PropertyChanges { target: confirmation; visible: true}
PropertyChanges {target: confirmationOAuth; visible: false}
}
]
Component.onCompleted: { //print("filesystem.osType " +filesystem.osType)
try{Helperjs.readData(db,"config","",function(storedUsers){ try{Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) { storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive; return obj1.isActive - obj2.isActive;
@ -441,6 +574,9 @@ Page{
imagestore.text=obj.imagestore; imagestore.text=obj.imagestore;
imagestoredir=obj.imagestore; imagestoredir=obj.imagestore;
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'} if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
if(obj.password!=""){accountPage.state="password"}
else if (obj.token!=""){accountPage.state="oauth"}
else {accountPage.state="new_oauth"}
},"isActive",0) },"isActive",0)
})} })}
catch (e){//print("onCompleted" +users.count +e) catch (e){//print("onCompleted" +users.count +e)

View file

@ -43,14 +43,13 @@ Page{
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
color:Material.primaryTextColor color:Material.primaryTextColor
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: "<b>Friendiqa v0.6.7 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+ text: "<b>Friendiqa v0.6.8 </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>"+ "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>"+ "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>"+ "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>"+
"Code by <a href='https://freunde.ma-nic.de/profile/pankraz'>Marco</a><br>"+ "Code by <a href='https://freunde.ma-nic.de/profile/pankraz'>Marco</a><br>"+
"Qt Framework <a href='https://www.qt.io'>www.qt.io</a><br>"+ "Qt Framework <a href='https://www.qt.io'>www.qt.io</a><br>"+
"Icons by <a href='http://fontawesome.io'>FontAwesome</a><br>"+ "Icons by <a href='http://fontawesome.io'>FontAwesome</a><br>"+
"Folder Icon by <a href='https://github.com/KDE/breeze-icons'>KDE Breeze Icons</a><br>"+
"AndroidNative by <a href='https://github.com/benlau/androidnative.pri'>Ben Lau</a><br>"+ "AndroidNative by <a href='https://github.com/benlau/androidnative.pri'>Ben Lau</a><br>"+
"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href='http://www.openssl.org/'>http://www.openssl.org/</a>)" "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href='http://www.openssl.org/'>http://www.openssl.org/</a>)"
onLinkActivated:{ onLinkActivated:{

View file

@ -47,9 +47,7 @@ Page{
function search(term){ function search(term){
contactSearchBusy.running=true; contactSearchBusy.running=true;
try {contactsSearchModel.clear()} catch(e){}; try {contactsSearchModel.clear()} catch(e){};
xhr.clearParams(); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/v1/accounts/search"); xhr.setApi("/api/v1/accounts/search");
xhr.setParam("q",term); xhr.setParam("q",term);
xhr.setParam("limit",99) xhr.setParam("limit",99)

View file

@ -53,10 +53,8 @@ Item{
// update groups // update groups
var api=""; var api="";
if (group.new){api="/api/friendica/group_create.json?name="+group.name}else{api="/api/friendica/group_update.json?gid="+group.id} if (group.new){api="/api/friendica/group_create.json?name="+group.name}else{api="/api/friendica/group_update.json?gid="+group.id}
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi(api); xhr.setApi(api);
xhr.clearParams();
xhr.setParam("gid",group.id); xhr.setParam("gid",group.id);
xhr.setParam("name",group.name); xhr.setParam("name",group.name);
xhr.setParam("user", group.user); xhr.setParam("user", group.user);

View file

@ -45,10 +45,8 @@ Rectangle {
property var createdAtDate: new Date(profile.friendica_owner.created_at) property var createdAtDate: new Date(profile.friendica_owner.created_at)
function updateProfileImage(){ function updateProfileImage(){
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/account/update_profile_image.json"); xhr.setApi("/api/account/update_profile_image.json");
xhr.clearParams();
xhr.setImageFileParam("image", photoImage.source ); xhr.setImageFileParam("image", photoImage.source );
xhr.post(); xhr.post();
} }

View file

@ -82,8 +82,8 @@ ApplicationWindow{
function onLoginChanged(login){ function onLoginChanged(login){
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")} if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
else{ else{
if (login.newsViewType!="" || login.newsViewType!=null){ // if (login.newsViewType!="" || login.newsViewType!=null){
newstab.newstabstatus=login.newsViewType;} // newstab.newstabstatus=login.newsViewType;}
Newsjs.getCurrentContacts(login,db,function(contacts){ Newsjs.getCurrentContacts(login,db,function(contacts){
contactlist=contacts}) contactlist=contacts})
} }
@ -214,6 +214,8 @@ ApplicationWindow{
anchors.fill: parent anchors.fill: parent
color: Material.backgroundDimColor color: Material.backgroundDimColor
} }
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Posts")
onDoubleClicked: {newstypeSignal("refresh")} onDoubleClicked: {newstypeSignal("refresh")}
} }
TabButton { TabButton {
@ -222,6 +224,8 @@ ApplicationWindow{
anchors.fill: parent anchors.fill: parent
color: Material.backgroundDimColor color: Material.backgroundDimColor
} }
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Contacts")
} }
TabButton { TabButton {
text: "\uf03e" text: "\uf03e"
@ -229,6 +233,8 @@ ApplicationWindow{
anchors.fill: parent anchors.fill: parent
color: Material.backgroundDimColor color: Material.backgroundDimColor
} }
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Photos")
} }
TabButton { TabButton {
text: "\uf073" text: "\uf073"
@ -236,6 +242,8 @@ ApplicationWindow{
anchors.fill: parent anchors.fill: parent
color: Material.backgroundDimColor color: Material.backgroundDimColor
} }
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Calendar")
} }
} }
} }

View file

@ -65,6 +65,7 @@ Item {
login=account; login=account;
if(!wideScreen){leftDrawerAndroid.close()} if(!wideScreen){leftDrawerAndroid.close()}
friendsTabView.currentIndex=0; friendsTabView.currentIndex=0;
friendsbar.currentIndex=0;
profileLoader.source=""; profileLoader.source="";
profileLoader.source="qrc:/qml/contactqml/ProfileTab.qml" profileLoader.source="qrc:/qml/contactqml/ProfileTab.qml"
} }
@ -82,7 +83,8 @@ Item {
onClicked:{ onClicked:{
login=account; login=account;
if(!wideScreen){leftDrawerAndroid.close()} if(!wideScreen){leftDrawerAndroid.close()}
friendsTabView.currentIndex=1 friendsTabView.currentIndex=1;
friendsbar.currentIndex=1;
friendsListLoader.source=""; friendsListLoader.source="";
friendsListLoader.source="qrc:/qml/contactqml/FriendsListTab.qml" friendsListLoader.source="qrc:/qml/contactqml/FriendsListTab.qml"
} }
@ -93,14 +95,15 @@ Item {
y:5*root.fontFactor*osSettings.bigFontSize y:5*root.fontFactor*osSettings.bigFontSize
width:parent.width width:parent.width
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
font.bold: account.username==login.username && friendsTabView.currentIndex==3 font.bold: account.username==login.username && friendsTabView.currentIndex==2
text: " "+qsTr("Groups") text: " "+qsTr("Groups")
MouseArea{ MouseArea{
anchors.fill:parent anchors.fill:parent
onClicked:{ onClicked:{
login=account; login=account;
if(!wideScreen){leftDrawerAndroid.close()} if(!wideScreen){leftDrawerAndroid.close()}
friendsTabView.currentIndex=2 friendsTabView.currentIndex=2;
friendsbar.currentIndex=2;
} }
} }
} }

View file

@ -206,21 +206,21 @@ Rectangle{
} }
} }
Component.onCompleted:{ // Component.onCompleted:{
Helperjs.readData(db,"contacts",login.username,function(contacts){ // Helperjs.readData(db,"contacts",login.username,function(contacts){
for (var name in contacts){ // for (var name in contacts){
var contactstatus="neutral"; // var contactstatus="neutral";
if (contact_allow.indexOf(contacts[name].cid)>-1){contactstatus="positive"} // if (contact_allow.indexOf(contacts[name].cid)>-1){contactstatus="positive"}
else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"} // else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"}
contactModel.append({"contact":contacts[name],"contactstatus":contactstatus}) // contactModel.append({"contact":contacts[name],"contactstatus":contactstatus})
}},"isFriend",1,"name"); // }},"isFriend",1,"name");
Helperjs.readData(db,"groups",login.username,function(owngroups){ // Helperjs.readData(db,"groups",login.username,function(owngroups){
for (var number in owngroups){ // for (var number in owngroups){
var groupstatus= "neutral"; // var groupstatus= "neutral";
if (group_allow.indexOf(owngroups[number].gid)>-1){groupstatus="positive"} // if (group_allow.indexOf(owngroups[number].gid)>-1){groupstatus="positive"}
else if (group_deny.indexOf(owngroups[number].gid)>-1){groupstatus="negative"} // else if (group_deny.indexOf(owngroups[number].gid)>-1){groupstatus="negative"}
groupModel.append({"group":owngroups[number],"groupstatus":groupstatus}) // groupModel.append({"group":owngroups[number],"groupstatus":groupstatus})
}}); // }});
} // }
} }

View file

@ -44,10 +44,8 @@ Dialog {
modal: true modal: true
onAccepted: { onAccepted: {
Helperjs.updateData(root.db,"contacts",login.username,"statusnet_blocking", true,function(){},"id",newsitem.user.id) Helperjs.updateData(root.db,"contacts",login.username,"statusnet_blocking", true,function(){},"id",newsitem.user.id)
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/v1/accounts/" + newsitem.user.id + "/block"); xhr.setApi("/api/v1/accounts/" + newsitem.user.id + "/block");
xhr.clearParams();
xhr.post(); xhr.post();
} }
onRejected: {close()} onRejected: {close()}

View file

@ -89,18 +89,13 @@ Page {
} }
function showConversation(conversationIndex,newsitemobject){ function showConversation(conversationIndex,newsitemobject){
xhr.setAccount(login);
if(newsitemobject.messagetype==0 || newsitemobject.messagetype==3){ if(newsitemobject.messagetype==0 || newsitemobject.messagetype==3){
xhr.clearParams();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/conversation/show"); xhr.setApi("/api/conversation/show");
xhr.setParam("id",newsitemobject.id) xhr.setParam("id",newsitemobject.id)
xhr.get(); xhr.get();
} }
else{ else{
xhr.clearParams();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/conversation"); xhr.setApi("/api/direct_messages/conversation");
xhr.setParam("uri",newsitemobject.statusnet_conversation_id) xhr.setParam("uri",newsitemobject.statusnet_conversation_id)
xhr.get(); xhr.get();
@ -218,11 +213,10 @@ Page {
height: 6*mm height: 6*mm
text:qsTr("Approve") text:qsTr("Approve")
onClicked:{ onClicked:{
Helperjs.friendicaPostRequest(login,"/api/v1/follow_requests/" + contact.id + "/authorize",'',"POST",root,function(returnvalue){ xhr.setAccount(login);
xhr.setApi("/api/v1/follow_requests/" + contact.id + "/authorize");
}) xhr.post();
Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id) Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id)
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)} try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
rootstackView.pop() rootstackView.pop()
} }
@ -233,11 +227,10 @@ Page {
height: 6*mm height: 6*mm
text:qsTr("Reject") text:qsTr("Reject")
onClicked:{ onClicked:{
Helperjs.friendicaPostRequest(login,"/api/v1/follow_requests/" + contact.id + "/reject",'',"POST",root,function(returnvalue){ xhr.setAccount(login);
xhr.setApi("/api/v1/follow_requests/" + contact.id + "/authorize");
}) xhr.post();
Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id) Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id)
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)} try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
rootstackView.pop() rootstackView.pop()
} }
@ -248,11 +241,10 @@ Page {
height: 6*mm height: 6*mm
text:qsTr("Ignore") text:qsTr("Ignore")
onClicked:{ onClicked:{
Helperjs.friendicaPostRequest(login,"/api/v1/follow_requests/" + contact.id + "/ignore",'',"POST",root,function(returnvalue){ xhr.setAccount(login);
xhr.setApi("/api/v1/follow_requests/" + contact.id + "/ignore");
}); xhr.post();
Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id) Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id)
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)} try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
rootstackView.pop() rootstackView.pop()
} }
@ -264,12 +256,11 @@ Page {
text:qsTr("Follow") text:qsTr("Follow")
onClicked:{ onClicked:{
contactBusy.running=true; contactBusy.running=true;
Helperjs.friendicaPostRequest(login,"/api/v1/accounts/" + contact.id + "/follow",'',"POST",root,function(returnvalue){ xhr.setAccount(login);
xhr.setApi("/api/v1/accounts/" + contact.id + "/follow");
}); xhr.post();
Helperjs.updateData(root.db,"contacts",root.login.username,"isFriend",1,function(){},"id",contact.id) Helperjs.updateData(root.db,"contacts",root.login.username,"isFriend",1,function(){},"id",contact.id)
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)} try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
rootstackView.pop() rootstackView.pop()
} }
} }
@ -281,11 +272,9 @@ Page {
text:qsTr("Unfollow") text:qsTr("Unfollow")
onClicked:{ onClicked:{
contactBusy.running=true; contactBusy.running=true;
Helperjs.friendicaPostRequest(login,"/api/v1/accounts/" + contact.id + "/unfollow",'',"POST",root,function(returnvalue){ xhr.setApi("/api/v1/accounts/" + contact.id + "/unfollow");
xhr.post();
});
Helperjs.updateData(root.db,"contacts",root.login.username,"isFriend",0,function(){},"id",contact.id) Helperjs.updateData(root.db,"contacts",root.login.username,"isFriend",0,function(){},"id",contact.id)
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)} try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
rootstackView.pop() rootstackView.pop()
} }
@ -299,8 +288,9 @@ Page {
onClicked:{ onClicked:{
contactBusy.running=true; contactBusy.running=true;
Helperjs.updateData(root.db,"contacts",root.login.username,"statusnet_blocking",true,function(){},"id",contact.id) Helperjs.updateData(root.db,"contacts",root.login.username,"statusnet_blocking",true,function(){},"id",contact.id)
Helperjs.friendicaPostRequest(login,"/api/v1/accounts/" + contact.id + "/block",'',"POST",root,function(returnvalue){ xhr.setAccount(login);
}); xhr.setApi("/api/v1/accounts/" + contact.id + "/block");
xhr.post();
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)} try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
rootstackView.pop() rootstackView.pop()
} }
@ -314,8 +304,9 @@ Page {
onClicked:{ onClicked:{
contactBusy.running=true; contactBusy.running=true;
Helperjs.updateData(root.db,"contacts",root.login.username,"statusnet_blocking",false,function(){},"id",contact.id) Helperjs.updateData(root.db,"contacts",root.login.username,"statusnet_blocking",false,function(){},"id",contact.id)
Helperjs.friendicaPostRequest(login,"/api/v1/accounts/" + contact.id + "/unblock",'',"POST",root,function(returnvalue){ xhr.setAccount(login);
}); xhr.setApi("/api/v1/accounts/" + contact.id + "/unblock");
xhr.post();
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)} try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
rootstackView.pop() rootstackView.pop()
} }
@ -368,6 +359,10 @@ Page {
if (api=="/api/statuses/user_timeline"){ if (api=="/api/statuses/user_timeline"){
Service.processNews(api,data) Service.processNews(api,data)
} }
else if (api=="/api/statuses/user_timeline"){
Service.processNews(api,data)
}
} }
} }
@ -402,9 +397,7 @@ Page {
} }
} }
Component.onCompleted: { Component.onCompleted: {
xhr.clearParams(); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/user_timeline") xhr.setApi("/api/statuses/user_timeline")
xhr.setParam("user_id",contact.id) xhr.setParam("user_id",contact.id)
xhr.get(); xhr.get();

View file

@ -38,12 +38,12 @@ import "qrc:/qml/genericqml"
Page{ Page{
id:imageDialog id:imageDialog
property var attachImageURLs: [] property var attachImageURLs: []
// property var contacts: [] // property var contacts: []
// property var groups: [] // property var groups: []
// property var contact_allow:login.permissions[0] // property var contact_allow:login.permissions[0]
// property var contact_deny:login.permissions[1] // property var contact_deny:login.permissions[1]
// property var group_allow:login.permissions[2] // property var group_allow:login.permissions[2]
// property var group_deny:login.permissions[3] // property var group_deny:login.permissions[3]
property int imageNo: 0 property int imageNo: 0
function uploadImage(imageid){ function uploadImage(imageid){
@ -53,10 +53,8 @@ Page{
uploadImage(imageNo); uploadImage(imageNo);
} }
} else{ } else{
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/media/upload"); xhr.setApi("/api/media/upload");
xhr.clearParams();
//if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))}; //if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))};
//if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))}; //if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))};
//if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))}; //if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))};
@ -67,12 +65,9 @@ Page{
} }
} }
function updateAltText(imageid, media){
function updateAltText(imageid, media){print("media "+media + " alt_text "+imageUploadModel.get(imageid).description) xhr.setAccount(login);
xhr.setUrl(login.server);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/media/metadata/create"); xhr.setApi("/api/media/metadata/create");
xhr.clearParams();
xhr.setParam("JSON",JSON.stringify({media_id:media,alt_text:{text:imageUploadModel.get(imageid).description}})); xhr.setParam("JSON",JSON.stringify({media_id:media,alt_text:{text:imageUploadModel.get(imageid).description}}));
xhr.postJSON(); xhr.postJSON();
} }
@ -80,9 +75,9 @@ Page{
function attach(){ function attach(){
imagePicking=true; imagePicking=true;
var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+ var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
osSettings.imagePickQml+'{multiple : false;onReady: {'+ osSettings.imagePickQml+'{multiple : false;onReady: {'+
'attachImage(imageUrl)}}',imageDialog,"imagePicker"); 'attachImage(imageUrl)}}',imageDialog,"imagePicker");
imagePicker.pickImage() imagePicker.pickImage()
} }
function attachImage(url){ function attachImage(url){
@ -111,7 +106,7 @@ Page{
print("error "+data); print("error "+data);
} }
function onSuccess(data,api){ function onSuccess(data,api){
if (api=="/api/media/upload" ){print("data "+data); if (api=="/api/media/upload" ){
let obj=JSON.parse(data); let obj=JSON.parse(data);
messageSend.media_ids.push(obj.media_id); messageSend.media_ids.push(obj.media_id);
if(imageUploadModel.get(imageNo).description!==""){ if(imageUploadModel.get(imageNo).description!==""){
@ -164,13 +159,13 @@ Page{
} }
BusyIndicator{ BusyIndicator{
id: uploadBusy id: uploadBusy
running: false running: false
anchors.horizontalCenter: imageUploadView.horizontalCenter anchors.horizontalCenter: imageUploadView.horizontalCenter
anchors.top:imageUploadView.top anchors.top:imageUploadView.top
anchors.topMargin: root.fontFactor*osSettings.bigFontSize anchors.topMargin: root.fontFactor*osSettings.bigFontSize
width: 2.5*root.fontFactor*osSettings.bigFontSize width: 2.5*root.fontFactor*osSettings.bigFontSize
height: 2.5*root.fontFactor*osSettings.bigFontSize height: 2.5*root.fontFactor*osSettings.bigFontSize
} }
ListModel{ ListModel{
@ -268,6 +263,7 @@ Page{
width: 5*root.fontFactor*osSettings.bigFontSize width: 5*root.fontFactor*osSettings.bigFontSize
height:imageUploadView.height-3*root.fontFactor*osSettings.bigFontSize height:imageUploadView.height-3*root.fontFactor*osSettings.bigFontSize
color: Material.backgroundColor color: Material.backgroundColor
border.color: "transparent"
text:"\u002b" text:"\u002b"
fontSize: 3*osSettings.bigFontSize fontSize: 3*osSettings.bigFontSize
onClicked:{attach()} onClicked:{attach()}
@ -287,7 +283,7 @@ Page{
{newimageProgress.visible=true; {newimageProgress.visible=true;
if (imageUploadModel.count>0){ if (imageUploadModel.count>0){
uploadImage(imageNo) uploadImage(imageNo)
}} }}
} }
} }
ProgressBar{ ProgressBar{

View file

@ -90,31 +90,28 @@ Rectangle{
function statusUpdate(title,status,in_reply_to_status_id) { function statusUpdate(title,status,in_reply_to_status_id) {
//xhr.url= login.server + "/api/statuses/update.json"; //xhr.url= login.server + "/api/statuses/update.json";
try{newsBusy.running=true;conversationBusy.running=true}catch(e){} try{newsBusy.running=true;conversationBusy.running=true}catch(e){}
xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setAccount(login);
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/update"); xhr.setApi("/api/statuses/update");
xhr.clearParams();
xhr.setParam("source", "Friendiqa"); xhr.setParam("source", "Friendiqa");
xhr.setParam("htmlstatus", status); xhr.setParam("htmlstatus", status);
if (parentId!="") {xhr.setParam("in_reply_to_status_id", parentId)}; if (parentId!="") {xhr.setParam("in_reply_to_status_id", parentId)};
if (title!=="") {xhr.setParam("title", title)}; if (title!=="") {xhr.setParam("title", title)};
if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))}; // if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))};
if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))}; // if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))};
if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))}; // if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))};
if (contact_deny.length>0) {xhr.setParam("contact_deny", Helperjs.cleanArray(contact_deny))}; // if (contact_deny.length>0) {xhr.setParam("contact_deny", Helperjs.cleanArray(contact_deny))};
if (media_ids.length>0) { if (media_ids.length>0) {
xhr.setParam("media_ids", media_ids.join()); xhr.setParam("media_ids", media_ids.join());
} }
xhr.post(); xhr.post();
Newsjs.storeHashtags(login,db,status,root) Newsjs.storeHashtags(login,db,status,root);
media_ids=[]
} }
function dmUpdate(title,text,replyto,screen_name) { function dmUpdate(title,text,replyto,screen_name) {
newsBusy.running=true; newsBusy.running=true;
xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setAccount(login);
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/new"); xhr.setApi("/api/direct_messages/new");
xhr.clearParams();
xhr.setParam("text", text); xhr.setParam("text", text);
xhr.setParam("screen_name", screen_name); xhr.setParam("screen_name", screen_name);
if (parentId!="") {xhr.setParam("replyto", replyto)}; if (parentId!="") {xhr.setParam("replyto", replyto)};
@ -127,7 +124,7 @@ Rectangle{
messageSend.reply_to_user=newsitemobject.user.screen_name; messageSend.reply_to_user=newsitemobject.user.screen_name;
messageSend.parentId=newsitemobject.id messageSend.parentId=newsitemobject.id
} else { } else {
messageSend.state=null; messageSend.state="";
messageSend.reply_to_user=""; messageSend.reply_to_user="";
messageSend.parentId=""; messageSend.parentId="";
bodyField.text=""; bodyField.text="";
@ -206,7 +203,7 @@ Rectangle{
height:stackTypeDescription.height height:stackTypeDescription.height
anchors.right: stackTypeDescription.right anchors.right: stackTypeDescription.right
anchors.rightMargin: 2*root.fontFactor*osSettings.bigFontSize anchors.rightMargin: 2*root.fontFactor*osSettings.bigFontSize
visible: newsSwipeview.currentIndex!=newsSwipeview.length-1 visible: newsSwipeview.currentIndex!=newsSwipeview.count-1
text:"\uf054" text:"\uf054"
fontColor: Material.hintTextColor fontColor: Material.hintTextColor
border.color: "transparent" border.color: "transparent"

View file

@ -50,6 +50,7 @@ Page{
anchors.fill: parent anchors.fill: parent
orientation: Qt.Horizontal orientation: Qt.Horizontal
highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
spacing: root.fontFactor*osSettings.systemFontSize
model:photolistModel model:photolistModel
delegate: photoWrapper delegate: photoWrapper
} }

View file

@ -60,7 +60,7 @@ Rectangle{
function newstypeHandling(newstype){ function newstypeHandling(newstype){
try{newsBusy.running=true}catch(e){print(e)}; try{newsBusy.running=true}catch(e){print(e)};
replySignal(""); root.replySignal("");
switch(newstype){ switch(newstype){
case "timeline": case "timeline":
newstab.newstabstatus="Timeline"; newstab.newstabstatus="Timeline";
@ -158,10 +158,8 @@ Rectangle{
newstabstatus="Search"; newstabstatus="Search";
newsBusy.running=true; newsBusy.running=true;
newsStack.updateMethodNews="refresh"; newsStack.updateMethodNews="refresh";
xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setAccount(login);
xhr.setUrl(login.server);
xhr.setApi("/api/search"); xhr.setApi("/api/search");
xhr.clearParams();
xhr.setParam("q",term) xhr.setParam("q",term)
xhr.get();} xhr.get();}
newsView.anchors.topMargin=mm newsView.anchors.topMargin=mm
@ -242,7 +240,7 @@ Rectangle{
]; ];
if(newsApiArray.includes(api)){ if(newsApiArray.includes(api)){
Service.processNews(api,data) Service.processNews(api,data)
replySignal("") root.replySignal("")
} }
} }
} }
@ -267,7 +265,7 @@ Rectangle{
else if (newsSwipeview.stacktype=="Replies"){ else if (newsSwipeview.stacktype=="Replies"){
Service.updateView("Replies") Service.updateView("Replies")
} }
replySignal("") root.replySignal("")
} }
} }
} }
@ -365,7 +363,6 @@ Rectangle{
if (newsSwipeview.stacktype=="Home"){ if (newsSwipeview.stacktype=="Home"){
Newsjs.getLastNews(root.login,root.db,function(currentlastnews){ Newsjs.getLastNews(root.login,root.db,function(currentlastnews){
//print("currentlastnews "+currentlastnews+ " lastnewsid "+lastnewsid)
if (currentlastnews>lastnewsid){ if (currentlastnews>lastnewsid){
if(currentnewstabstatus=="Timeline"){ if(currentnewstabstatus=="Timeline"){
try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){ try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){
@ -379,7 +376,7 @@ Rectangle{
showNews(news)}); showNews(news)});
} }
} else { } else {
Service.updateView(currentnewstabstatus) Service.updateView(currentnewstabstatus,currentlastnews)
} }
}); });
} }

View file

@ -52,18 +52,14 @@ Rectangle{
function showConversation(conversationIndex,newsitemobject){ function showConversation(conversationIndex,newsitemobject){
if(newsitemobject.messagetype==0 || newsitemobject.messagetype==3){ if(newsitemobject.messagetype==0 || newsitemobject.messagetype==3){
xhr.clearParams(); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/conversation/show"); xhr.setApi("/api/conversation/show");
xhr.setParam("id",newsitemobject.id) xhr.setParam("id",newsitemobject.id)
xhr.setParam("count","200") xhr.setParam("count","200")
xhr.get(); xhr.get();
} }
else{ else{
xhr.clearParams(); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/conversation"); xhr.setApi("/api/direct_messages/conversation");
xhr.setParam("uri",newsitemobject.statusnet_conversation_id) xhr.setParam("uri",newsitemobject.statusnet_conversation_id)
xhr.get(); xhr.get();

View file

@ -53,7 +53,8 @@ Page{
visible: video.playbackState!=MediaPlayer.PlayingState visible: video.playbackState!=MediaPlayer.PlayingState
} }
Video {id:video; Video {
id:video;
anchors.fill:parent anchors.fill:parent
property string mimetype:"" property string mimetype:""
onErrorChanged:{noticeText.font.pointSize=osSettings.bigFontSize;noticeText.text=errorString;} onErrorChanged:{noticeText.font.pointSize=osSettings.bigFontSize;noticeText.text=errorString;}
@ -61,12 +62,6 @@ Page{
autoLoad: true autoLoad: true
autoPlay: true autoPlay: true
audioRole: MediaPlayer.VideoRole audioRole: MediaPlayer.VideoRole
// MouseArea {
// anchors.fill:parent;
// onClicked:{
// rootstackView.pop()
// }
// }
} }
ProgressBar{ ProgressBar{
@ -110,12 +105,13 @@ Page{
} }
// Slider{ id: videoSlider Slider{
// width: parent.width id: videoSlider
// height: 3*mm width: parent.width
// anchors.top: video.bottom height: 3*mm
// visible:video.playbackState!=MediaPlayer.StoppedState && video.seekable anchors.top: video.bottom
// value: video.position/video.duration visible:video.playbackState!=MediaPlayer.StoppedState && video.seekable
// onPressed:video.seek(value*video.duration) value: video.position/video.duration
// } onMoved: video.seek(value*video.duration)
}
} }

View file

@ -38,8 +38,8 @@ import "qrc:/qml/genericqml"
Item { Item {
id: newsitem id: newsitem
width: newsitemobject.hasOwnProperty("indent")&&newsitemobject.indent>0?parent.width:newsitem.ListView.view.width//parent.width//newsView.width // width: newsitemobject.hasOwnProperty("indent")&&newsitemobject.indent>0?parent.width:newsitem.ListView.view.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) height:toprow.height+friendicaActivities.height+controlrow.height+conversationColumn.height+1
property int itemindex: index property int itemindex: index
property var newsitemobject:model.newsitemobject property var newsitemobject:model.newsitemobject
property string attending: "" property string attending: ""
@ -129,7 +129,6 @@ Item {
font.pointSize: 0.6*osSettings.systemFontSize font.pointSize: 0.6*osSettings.systemFontSize
font.family: "Noto Sans" font.family: "Noto Sans"
horizontalAlignment: Label.AlignRight horizontalAlignment: Label.AlignRight
//text: (newsitemobject.in_reply_to_status_id!="null"&&newsitemobject.in_reply_to_status_id!=null)?" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name:" "
text: (newsitemobject.reply_user!=false&&typeof(newsitemobject.reply_user)!="undefined")?" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name:" " text: (newsitemobject.reply_user!=false&&typeof(newsitemobject.reply_user)!="undefined")?" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name:" "
} }
} }
@ -438,11 +437,6 @@ Item {
var component = Qt.createComponent("qrc:/qml/newsqml/BlockUser.qml"); var component = Qt.createComponent("qrc:/qml/newsqml/BlockUser.qml");
var userblockdialog = component.createObject(root,{"newsitem": newsitemobject}); var userblockdialog = component.createObject(root,{"newsitem": newsitemobject});
userblockdialog.open() userblockdialog.open()
// try{
// var msg = {'deleteId': index, 'model': newsitem.ListView.view.model};
// conversationWorker.sendMessage(msg);
// }catch(e){print("block "+e)
// }
} }
} }
Action { Action {

View file

@ -44,10 +44,8 @@ Dialog {
modal: true modal: true
onAccepted: { onAccepted: {
let statusArray=[];statusArray.push(newsitem.id.toString()); let statusArray=[];statusArray.push(newsitem.id.toString());
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/v1/reports"); xhr.setApi("/api/v1/reports");
xhr.clearParams();
xhr.setParam("account_id",newsitem.user.id); xhr.setParam("account_id",newsitem.user.id);
//xhr.setParam("status_ids",JSON.stringify(statusArray)); //xhr.setParam("status_ids",JSON.stringify(statusArray));
xhr.setParam("comment",comment.text); xhr.setParam("comment",comment.text);

View file

@ -207,7 +207,7 @@ Rectangle{
width:4.5*mm width:4.5*mm
height: 4.5*mm height: 4.5*mm
textFormat:Text.RichText textFormat:Text.RichText
font.pointSize: osSettings.osType=="Linux"?1.7*osSettings.systemFontSize:1.2*osSettings.systemFontSize font.pointSize: osSettings.osType=="Linux"?1.7*osSettings.systemFontSize:1.4*osSettings.systemFontSize
text: emoji text: emoji
MouseArea{ MouseArea{

View file

@ -50,10 +50,8 @@ Page{
property int imageNo: 0 property int imageNo: 0
function uploadSelectedImage(inumber){ function uploadSelectedImage(inumber){
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/friendica/photo/create.json"); xhr.setApi("/api/friendica/photo/create.json");
xhr.clearParams();
xhr.setParam("desc",imageUploadModel.get(inumber).description); xhr.setParam("desc",imageUploadModel.get(inumber).description);
if(album.editText!=""){xhr.setParam("album", album.editText)}else{xhr.setParam("album", album.currentText)}; if(album.editText!=""){xhr.setParam("album", album.editText)}else{xhr.setParam("album", album.currentText)};
//if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))}; //if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))};
@ -66,10 +64,8 @@ Page{
function updateImage(){ function updateImage(){
xhr.setUrl(login.server); xhr.setAccount(login);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setApi("/api/friendica/photo/update.json"); xhr.setApi("/api/friendica/photo/update.json");
xhr.clearParams();
xhr.setParam("desc",imageUploadModel.get(0).description); xhr.setParam("desc",imageUploadModel.get(0).description);
xhr.setParam("album", currentAlbum); xhr.setParam("album", currentAlbum);
xhr.setParam("album_new", album.currentText); xhr.setParam("album_new", album.currentText);

View file

@ -62,7 +62,8 @@ StackView{
} }
//Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle); //Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle);
}) })
xhr.setLogin(login.username+":"+Qt.atob(login.password)); if(login.password!=""){xhr.setLogin(login.username+":"+Qt.atob(login.password));}
else{xhr.setToken(login.token)}
xhr.setImagedir(login.imagestore); xhr.setImagedir(login.imagestore);
xhr.setFilelist(ownimagelist); xhr.setFilelist(ownimagelist);
xhr.setDownloadtype("picturelist"); xhr.setDownloadtype("picturelist");
@ -104,6 +105,13 @@ StackView{
}else{ }else{
fotorectangle.currentimageno=fotorectangle.currentimageno+1} fotorectangle.currentimageno=fotorectangle.currentimageno+1}
} }
function onSuccess(text,api){
if (api=="/api/friendica/photoalbums"){
let albums=JSON.parse(text);
var msg = { 'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture': false};
photoWorker.sendMessage(msg);
}
}
} }
// Connections{ // Connections{
// target:filesystem // target:filesystem
@ -124,21 +132,24 @@ StackView{
else{ else{
try {photogroupModel.clear()}catch (e){print(e)} try {photogroupModel.clear()}catch (e){print(e)}
if (friend){ if (friend){
Imagejs.newRequestFriendsAlbumPictures(login,friend,fotorectangle,function(albums,remoteAuthBool){ // Imagejs.newRequestFriendsAlbumPictures(login,friend,fotorectangle,function(albums,remoteAuthBool){
remoteContact=remoteAuthBool; // remoteContact=remoteAuthBool;
var msg = {'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture':true,'friend':friend} // var msg = {'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture':true,'friend':friend}
photoWorker.sendMessage(msg); // photoWorker.sendMessage(msg);
}) // })
phototabstatusButton.text=friend.screen_name+qsTr("\'s images") // phototabstatusButton.text=friend.screen_name+qsTr("\'s images")
} }
else { else {
Helperjs.readField("album", db, "imageData",login.username,function(albums){ xhr.setAccount(login);
if (albums[0]) { xhr.setApi("/api/friendica/photoalbums");
var msg = { 'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture': false}; xhr.get();
photoWorker.sendMessage(msg); // Helperjs.readField("album", db, "imageData",login.username,function(albums){
} // if (albums[0]) {
}) // var msg = { 'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture': false};
// photoWorker.sendMessage(msg);
// }
// })
} }
} }
} }
@ -291,11 +302,11 @@ StackView{
onClicked:{ onClicked:{
var lastalbum_id=photogroupModel.count-1; var lastalbum_id=photogroupModel.count-1;
if(photogroupModel.get(photogroupModel.count-1).foreignPicture==true){ if(photogroupModel.get(photogroupModel.count-1).foreignPicture==true){
Imagejs.newRequestFriendsAlbumPictures(login,photogroupModel.get(0).friend,fotorectangle,function(albums,remoteAuthBool){ // Imagejs.newRequestFriendsAlbumPictures(login,photogroupModel.get(0).friend,fotorectangle,function(albums,remoteAuthBool){
remoteContact=remoteAuthBool; // remoteContact=remoteAuthBool;
var msg = {'model': photogroupModel,'albums':albums,'firstalbum':lastalbum_id+1,'foreignPicture':true,'friend':photogroupModel.get(0).friend} // var msg = {'model': photogroupModel,'albums':albums,'firstalbum':lastalbum_id+1,'foreignPicture':true,'friend':photogroupModel.get(0).friend}
photoWorker.sendMessage(msg) // photoWorker.sendMessage(msg)
}) // })
} }
else{Helperjs.readField("album",root.db, "imageData",root.login.username,function(albums){ else{Helperjs.readField("album",root.db, "imageData",root.login.username,function(albums){
var msg = { 'model': photogroupModel,'albums':albums,'foreignPicture': false,'firstalbum':lastalbum_id+1}; var msg = { 'model': photogroupModel,'albums':albums,'foreignPicture': false,'firstalbum':lastalbum_id+1};

View file

@ -112,14 +112,24 @@ Package {
} }
})} })}
else{ else{
Helperjs.readData(db,"imageData",root.login.username,function(obj){ Helperjs.friendicaRequest(login,"/api/friendica/photoalbum?album="+albumname,parent,function(obj){
if (obj) { if(obj){ let albumphotos=JSON.parse(obj);
for (var k=0;k<obj.length;k++){ for (var k=0;k<albumphotos.length;k++){
if(typeof(obj[k].desc)=="string" && obj[k].desc!=""){var name=obj[k].desc}else{var name=obj[k].filename} if(typeof(albumphotos[k].desc)=="string" && albumphotos[k].desc!=""){var name=albumphotos[k].desc}else{var name=albumphotos[k].filename}
photoModel.append({"imageLocation": obj[k].location+obj[k].filename,"photoDescription":name,"photoLink":obj[k].location+obj[k].filename,"imageId":obj[k].id}) photoModel.append({"imageLocation": albumphotos[k].thumb,"photoDescription":name,"photoLink":albumphotos[k].thumb,"imageId":albumphotos[k].id})
} }
} }
},"album",albumname)} }
// Helperjs.readData(db,"imageData",root.login.username,function(obj){
// if (obj) {
// for (var k=0;k<obj.length;k++){
// if(typeof(obj[k].desc)=="string" && obj[k].desc!=""){var name=obj[k].desc}else{var name=obj[k].filename}
// photoModel.append({"imageLocation": obj[k].location+obj[k].filename,"photoDescription":name,"photoLink":obj[k].location+obj[k].filename,"imageId":obj[k].id})
// }
// }
// },"album",albumname)
)}
} }
MouseArea { MouseArea {

View file

@ -90,6 +90,22 @@
<source>Wrong password or 2FA enabled!</source> <source>Wrong password or 2FA enabled!</source>
<translation>Falsches Passwort bzw. 2FA eingeschaltet!</translation> <translation>Falsches Passwort bzw. 2FA eingeschaltet!</translation>
</message> </message>
<message>
<source>Connect</source>
<translation>Anmelden</translation>
</message>
<message>
<source>No server given!</source>
<translation>Kein Server angegeben!</translation>
</message>
<message>
<source>Couldn&apos;t connect to server</source>
<translation>Keine Verbindung zum Server</translation>
</message>
<message>
<source>Set as default</source>
<translation>Als Standard setzen</translation>
</message>
</context> </context>
<context> <context>
<name>BlockUser</name> <name>BlockUser</name>
@ -1109,7 +1125,7 @@
<name>PhotoTab</name> <name>PhotoTab</name>
<message> <message>
<source>&apos;s images</source> <source>&apos;s images</source>
<translation>s Bilder</translation> <translation type="vanished">s Bilder</translation>
</message> </message>
<message> <message>
<source>All Images</source> <source>All Images</source>
@ -1431,6 +1447,22 @@ Rechtsklick oder Mittelklick zum Schliessen</translation>
<source>Click to open Friendiqa</source> <source>Click to open Friendiqa</source>
<translation>Klicken, um Friendiqa zu öffnen</translation> <translation>Klicken, um Friendiqa zu öffnen</translation>
</message> </message>
<message>
<source>Posts</source>
<translation>Beiträge</translation>
</message>
<message>
<source>Contacts</source>
<translation>Kontakte</translation>
</message>
<message>
<source>Photos</source>
<translation>Fotos</translation>
</message>
<message>
<source>Calendar</source>
<translation>Kalender</translation>
</message>
</context> </context>
<context> <context>
<name>newsworker</name> <name>newsworker</name>

View file

@ -12,13 +12,13 @@
<context> <context>
<name>AccountPage</name> <name>AccountPage</name>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="64"/> <location filename="../qml/configqml/AccountPage.qml" line="101"/>
<location filename="../qml/configqml/AccountPage.qml" line="206"/> <location filename="../qml/configqml/AccountPage.qml" line="253"/>
<location filename="../qml/configqml/AccountPage.qml" line="228"/> <location filename="../qml/configqml/AccountPage.qml" line="269"/>
<location filename="../qml/configqml/AccountPage.qml" line="245"/> <location filename="../qml/configqml/AccountPage.qml" line="285"/>
<location filename="../qml/configqml/AccountPage.qml" line="306"/> <location filename="../qml/configqml/AccountPage.qml" line="346"/>
<location filename="../qml/configqml/AccountPage.qml" line="385"/> <location filename="../qml/configqml/AccountPage.qml" line="488"/>
<location filename="../qml/configqml/AccountPage.qml" line="406"/> <location filename="../qml/configqml/AccountPage.qml" line="510"/>
<source>User</source> <source>User</source>
<translation>Usuario</translation> <translation>Usuario</translation>
</message> </message>
@ -27,17 +27,17 @@
<translation type="vanished">Servidor</translation> <translation type="vanished">Servidor</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="229"/> <location filename="../qml/configqml/AccountPage.qml" line="270"/>
<source>Nickname</source> <source>Nickname</source>
<translation>Usuario</translation> <translation>Usuario</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="248"/> <location filename="../qml/configqml/AccountPage.qml" line="288"/>
<source>Password</source> <source>Password</source>
<translation>Contraseña</translation> <translation>Contraseña</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="255"/> <location filename="../qml/configqml/AccountPage.qml" line="295"/>
<source>Image dir.</source> <source>Image dir.</source>
<translation>Dir. de imágenes</translation> <translation>Dir. de imágenes</translation>
</message> </message>
@ -46,51 +46,73 @@
<translation type="vanished">Noticias como</translation> <translation type="vanished">Noticias como</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="208"/> <location filename="../qml/configqml/AccountPage.qml" line="255"/>
<source>Instance rules</source> <source>Instance rules</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="233"/> <location filename="../qml/configqml/AccountPage.qml" line="65"/>
<location filename="../qml/configqml/AccountPage.qml" line="322"/> <location filename="../qml/configqml/AccountPage.qml" line="96"/>
<location filename="../qml/configqml/AccountPage.qml" line="351"/> <location filename="../qml/configqml/AccountPage.qml" line="274"/>
<location filename="../qml/configqml/AccountPage.qml" line="354"/> <location filename="../qml/configqml/AccountPage.qml" line="348"/>
<location filename="../qml/configqml/AccountPage.qml" line="405"/>
<location filename="../qml/configqml/AccountPage.qml" line="426"/>
<source>Error</source> <source>Error</source>
<translation>Error</translation> <translation>Error</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="233"/> <location filename="../qml/configqml/AccountPage.qml" line="274"/>
<source>Nicknames containing @ symbol currently not supported</source> <source>Nicknames containing @ symbol currently not supported</source>
<translation>No se admiten los apodos que contienen el símbolo @ actualmente</translation> <translation>No se admiten los apodos que contienen el símbolo @ actualmente</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="304"/> <location filename="../qml/configqml/AccountPage.qml" line="344"/>
<source>Connect</source>
<translation type="unfinished">Conectar</translation>
</message>
<message>
<location filename="../qml/configqml/AccountPage.qml" line="348"/>
<source>No server given!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/AccountPage.qml" line="405"/>
<source>Couldn&apos;t connect to server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/AccountPage.qml" line="413"/>
<source>Confirm</source> <source>Confirm</source>
<translation>Confirmar</translation> <translation>Confirmar</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="311"/> <location filename="../qml/configqml/AccountPage.qml" line="420"/>
<source>No server given! </source> <source>No server given! </source>
<translation>¡Servidor no encontrado!</translation> <translation>¡Servidor no encontrado!</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="312"/> <location filename="../qml/configqml/AccountPage.qml" line="421"/>
<source>No nickname given! </source> <source>No nickname given! </source>
<translation>¡Usuario incorrecto!</translation> <translation>¡Usuario incorrecto!</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="313"/> <location filename="../qml/configqml/AccountPage.qml" line="422"/>
<source>No password given! </source> <source>No password given! </source>
<translation>¡Contraseña incorrecta!</translation> <translation>¡Contraseña incorrecta!</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="314"/> <location filename="../qml/configqml/AccountPage.qml" line="423"/>
<source>No image directory given!</source> <source>No image directory given!</source>
<translation>¡No se ha encontrado el directorio de imágenes!</translation> <translation>¡No se ha encontrado el directorio de imágenes!</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="322"/> <location filename="../qml/configqml/AccountPage.qml" line="432"/>
<location filename="../qml/configqml/AccountPage.qml" line="351"/> <source>Set as default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/AccountPage.qml" line="65"/>
<location filename="../qml/configqml/AccountPage.qml" line="96"/>
<source>Wrong password or 2FA enabled!</source> <source>Wrong password or 2FA enabled!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -99,12 +121,13 @@
<translation type="vanished">¡Contraseña incorrecta!</translation> <translation type="vanished">¡Contraseña incorrecta!</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="348"/> <location filename="../qml/configqml/AccountPage.qml" line="93"/>
<location filename="../qml/configqml/AccountPage.qml" line="447"/>
<source>Success</source> <source>Success</source>
<translation>éxito!</translation> <translation>éxito!</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="348"/> <location filename="../qml/configqml/AccountPage.qml" line="93"/>
<source>Name</source> <source>Name</source>
<translation>Nombre</translation> <translation>Nombre</translation>
</message> </message>
@ -133,12 +156,12 @@
<translation>¿Borrar la cita?</translation> <translation>¿Borrar la cita?</translation>
</message> </message>
<message> <message>
<location filename="../qml/calendarqml/CalendarTab.qml" line="201"/> <location filename="../qml/calendarqml/CalendarTab.qml" line="199"/>
<source>Events</source> <source>Events</source>
<translation>Eventos</translation> <translation>Eventos</translation>
</message> </message>
<message> <message>
<location filename="../qml/calendarqml/CalendarTab.qml" line="206"/> <location filename="../qml/calendarqml/CalendarTab.qml" line="204"/>
<source>Own Calendar</source> <source>Own Calendar</source>
<translation>Calendario propio</translation> <translation>Calendario propio</translation>
</message> </message>
@ -473,77 +496,77 @@
<translation type="vanished">Conectar</translation> <translation type="vanished">Conectar</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="219"/> <location filename="../qml/newsqml/ContactPage.qml" line="214"/>
<source>Approve</source> <source>Approve</source>
<translation>Aprobar</translation> <translation>Aprobar</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="234"/> <location filename="../qml/newsqml/ContactPage.qml" line="228"/>
<source>Reject</source> <source>Reject</source>
<translation>Rechazar</translation> <translation>Rechazar</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="249"/> <location filename="../qml/newsqml/ContactPage.qml" line="242"/>
<source>Ignore</source> <source>Ignore</source>
<translation>Ignorar</translation> <translation>Ignorar</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="264"/> <location filename="../qml/newsqml/ContactPage.qml" line="256"/>
<source>Follow</source> <source>Follow</source>
<translation>Seguir</translation> <translation>Seguir</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="281"/> <location filename="../qml/newsqml/ContactPage.qml" line="272"/>
<source>Unfollow</source> <source>Unfollow</source>
<translation>Dejar de seguir</translation> <translation>Dejar de seguir</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="298"/> <location filename="../qml/newsqml/ContactPage.qml" line="287"/>
<source>Block</source> <source>Block</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="313"/> <location filename="../qml/newsqml/ContactPage.qml" line="303"/>
<source>Unblock</source> <source>Unblock</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="350"/> <location filename="../qml/newsqml/ContactPage.qml" line="341"/>
<source>Description</source> <source>Description</source>
<translation>Descripción</translation> <translation>Descripción</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="350"/> <location filename="../qml/newsqml/ContactPage.qml" line="341"/>
<source>Location</source> <source>Location</source>
<translation>Localización</translation> <translation>Localización</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="350"/> <location filename="../qml/newsqml/ContactPage.qml" line="341"/>
<source>Posts</source> <source>Posts</source>
<translation>Mensajes</translation> <translation>Mensajes</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="351"/> <location filename="../qml/newsqml/ContactPage.qml" line="342"/>
<source>URL</source> <source>URL</source>
<translation>URL</translation> <translation>URL</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="352"/> <location filename="../qml/newsqml/ContactPage.qml" line="343"/>
<source>Created at</source> <source>Created at</source>
<translation>Creado en</translation> <translation>Creado en</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="353"/> <location filename="../qml/newsqml/ContactPage.qml" line="344"/>
<source>Followers</source> <source>Followers</source>
<translation>Seguidores</translation> <translation>Seguidores</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="354"/> <location filename="../qml/newsqml/ContactPage.qml" line="345"/>
<source>Following</source> <source>Following</source>
<translation>Siguiente</translation> <translation>Siguiente</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="364"/> <location filename="../qml/newsqml/ContactPage.qml" line="355"/>
<source>Network Error</source> <source>Network Error</source>
<translation>Fallo de red</translation> <translation>Fallo de red</translation>
</message> </message>
@ -551,17 +574,17 @@
<context> <context>
<name>ContactsSearchPage</name> <name>ContactsSearchPage</name>
<message> <message>
<location filename="../qml/contactqml/ContactsSearchPage.qml" line="62"/> <location filename="../qml/contactqml/ContactsSearchPage.qml" line="60"/>
<source>Network Error</source> <source>Network Error</source>
<translation>Fallo de red</translation> <translation>Fallo de red</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ContactsSearchPage.qml" line="91"/> <location filename="../qml/contactqml/ContactsSearchPage.qml" line="89"/>
<source>Forum</source> <source>Forum</source>
<translation>Foro</translation> <translation>Foro</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ContactsSearchPage.qml" line="93"/> <location filename="../qml/contactqml/ContactsSearchPage.qml" line="91"/>
<source>Person</source> <source>Person</source>
<translation>Persona</translation> <translation>Persona</translation>
</message> </message>
@ -788,7 +811,7 @@
</message> </message>
<message> <message>
<location filename="../qml/calendarqml/EventCreate.qml" line="348"/> <location filename="../qml/calendarqml/EventCreate.qml" line="348"/>
<location filename="../qml/calendarqml/EventCreate.qml" line="385"/> <location filename="../qml/calendarqml/EventCreate.qml" line="383"/>
<source>Error</source> <source>Error</source>
<translation>Error</translation> <translation>Error</translation>
</message> </message>
@ -867,7 +890,7 @@
<context> <context>
<name>ImageUploadDialog</name> <name>ImageUploadDialog</name>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="133"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="129"/>
<source>Upload to album</source> <source>Upload to album</source>
<translation>Subir álbum</translation> <translation>Subir álbum</translation>
</message> </message>
@ -880,27 +903,27 @@
<translation type="vanished">imagen</translation> <translation type="vanished">imagen</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="277"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="273"/>
<source>Description</source> <source>Description</source>
<translation>Descripción</translation> <translation>Descripción</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="309"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="305"/>
<source>Upload</source> <source>Upload</source>
<translation>Subir</translation> <translation>Subir</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="309"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="305"/>
<source>Change</source> <source>Change</source>
<translation>Cambiar</translation> <translation>Cambiar</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="312"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="308"/>
<source>Error</source> <source>Error</source>
<translation>Error</translation> <translation>Error</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="312"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="308"/>
<source> No album name given</source> <source> No album name given</source>
<translation>¡Nombre del álbum no encontrado!</translation> <translation>¡Nombre del álbum no encontrado!</translation>
</message> </message>
@ -926,12 +949,12 @@
<context> <context>
<name>MessageImageUploadDialog</name> <name>MessageImageUploadDialog</name>
<message> <message>
<location filename="../qml/newsqml/MessageImageUploadDialog.qml" line="258"/> <location filename="../qml/newsqml/MessageImageUploadDialog.qml" line="254"/>
<source>Description</source> <source>Description</source>
<translation type="unfinished">Descripción</translation> <translation type="unfinished">Descripción</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/MessageImageUploadDialog.qml" line="284"/> <location filename="../qml/newsqml/MessageImageUploadDialog.qml" line="281"/>
<source>Upload</source> <source>Upload</source>
<translation type="unfinished">Subir</translation> <translation type="unfinished">Subir</translation>
</message> </message>
@ -959,7 +982,7 @@
<translation>¿Qué tienes en mente?</translation> <translation>¿Qué tienes en mente?</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/MessageSend.qml" line="431"/> <location filename="../qml/newsqml/MessageSend.qml" line="433"/>
<source>Error</source> <source>Error</source>
<translation>Error</translation> <translation>Error</translation>
</message> </message>
@ -970,7 +993,7 @@
¡Elimine y deje un archivo adjunto!</translation> ¡Elimine y deje un archivo adjunto!</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/MessageSend.qml" line="431"/> <location filename="../qml/newsqml/MessageSend.qml" line="433"/>
<source>No receiver supplied!</source> <source>No receiver supplied!</source>
<translation>No se ha suministrado ningún receptor!</translation> <translation>No se ha suministrado ningún receptor!</translation>
</message> </message>
@ -990,7 +1013,7 @@
<translation type="vanished">Fallo de red</translation> <translation type="vanished">Fallo de red</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsStack.qml" line="286"/> <location filename="../qml/newsqml/NewsStack.qml" line="284"/>
<source>More</source> <source>More</source>
<translation>Mas</translation> <translation>Mas</translation>
</message> </message>
@ -1046,102 +1069,102 @@
<translation type="vanished">Salida</translation> <translation type="vanished">Salida</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="75"/> <location filename="../qml/newsqml/NewsTab.qml" line="71"/>
<source>seconds</source> <source>seconds</source>
<translation>Segundos</translation> <translation>Segundos</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="76"/> <location filename="../qml/newsqml/NewsTab.qml" line="72"/>
<source>minute</source> <source>minute</source>
<translation>Minuto</translation> <translation>Minuto</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="77"/> <location filename="../qml/newsqml/NewsTab.qml" line="73"/>
<source>minutes</source> <source>minutes</source>
<translation>Minutos</translation> <translation>Minutos</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="78"/> <location filename="../qml/newsqml/NewsTab.qml" line="74"/>
<source>hour</source> <source>hour</source>
<translation>Hora</translation> <translation>Hora</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="79"/> <location filename="../qml/newsqml/NewsTab.qml" line="75"/>
<source>hours</source> <source>hours</source>
<translation>Horas</translation> <translation>Horas</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="80"/> <location filename="../qml/newsqml/NewsTab.qml" line="76"/>
<source>day</source> <source>day</source>
<translation>Dia</translation> <translation>Dia</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="81"/> <location filename="../qml/newsqml/NewsTab.qml" line="77"/>
<source>days</source> <source>days</source>
<translation>Dias</translation> <translation>Dias</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="82"/> <location filename="../qml/newsqml/NewsTab.qml" line="78"/>
<source>month</source> <source>month</source>
<translation>Mes</translation> <translation>Mes</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="83"/> <location filename="../qml/newsqml/NewsTab.qml" line="79"/>
<source>months</source> <source>months</source>
<translation>Meses</translation> <translation>Meses</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="84"/> <location filename="../qml/newsqml/NewsTab.qml" line="80"/>
<source>years</source> <source>years</source>
<translation>Años</translation> <translation>Años</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="93"/> <location filename="../qml/newsqml/NewsTab.qml" line="89"/>
<source>likes this.</source> <source>likes this.</source>
<translation>le gusta esto.</translation> <translation>le gusta esto.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="94"/> <location filename="../qml/newsqml/NewsTab.qml" line="90"/>
<source>like this.</source> <source>like this.</source>
<translation>me gusta esto.</translation> <translation>me gusta esto.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="97"/> <location filename="../qml/newsqml/NewsTab.qml" line="93"/>
<source>doesn&apos;t like this.</source> <source>doesn&apos;t like this.</source>
<translation>no de ése.</translation> <translation>no de ése.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="98"/> <location filename="../qml/newsqml/NewsTab.qml" line="94"/>
<source>don&apos;t like this.</source> <source>don&apos;t like this.</source>
<translation>no me gusta.</translation> <translation>no me gusta.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="101"/> <location filename="../qml/newsqml/NewsTab.qml" line="97"/>
<source>will attend.</source> <source>will attend.</source>
<translation>asistirá.</translation> <translation>asistirá.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="102"/> <location filename="../qml/newsqml/NewsTab.qml" line="98"/>
<source>persons will attend.</source> <source>persons will attend.</source>
<translation>Personas que asistirán.</translation> <translation>Personas que asistirán.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="105"/> <location filename="../qml/newsqml/NewsTab.qml" line="101"/>
<source>will not attend.</source> <source>will not attend.</source>
<translation>no asistirá.</translation> <translation>no asistirá.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="106"/> <location filename="../qml/newsqml/NewsTab.qml" line="102"/>
<source>persons will not attend.</source> <source>persons will not attend.</source>
<translation>Personas que no asistirán.</translation> <translation>Personas que no asistirán.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="109"/> <location filename="../qml/newsqml/NewsTab.qml" line="105"/>
<source>may attend.</source> <source>may attend.</source>
<translation>Puede asistir.</translation> <translation>Puede asistir.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="110"/> <location filename="../qml/newsqml/NewsTab.qml" line="106"/>
<source>persons may attend.</source> <source>persons may attend.</source>
<translation>Personas que pueden asistir.</translation> <translation>Personas que pueden asistir.</translation>
</message> </message>
@ -1277,28 +1300,27 @@
<context> <context>
<name>PhotoTab</name> <name>PhotoTab</name>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="132"/>
<source>&apos;s images</source> <source>&apos;s images</source>
<translation>s Imágenes</translation> <translation type="vanished">s Imágenes</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="219"/> <location filename="../qml/photoqml/PhotoTab.qml" line="230"/>
<source>All Images</source> <source>All Images</source>
<translation>Todas las imagenes</translation> <translation>Todas las imagenes</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="225"/> <location filename="../qml/photoqml/PhotoTab.qml" line="236"/>
<source>Only new</source> <source>Only new</source>
<translation>Solo nueva</translation> <translation>Solo nueva</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="241"/> <location filename="../qml/photoqml/PhotoTab.qml" line="252"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="246"/> <location filename="../qml/photoqml/PhotoTab.qml" line="257"/>
<source>Own Images</source> <source>Own Images</source>
<translation>Mis imágenes</translation> <translation>Mis imágenes</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="288"/> <location filename="../qml/photoqml/PhotoTab.qml" line="299"/>
<source>More</source> <source>More</source>
<translation>Mas</translation> <translation>Mas</translation>
</message> </message>
@ -1306,227 +1328,227 @@
<context> <context>
<name>ProfileComponent</name> <name>ProfileComponent</name>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="63"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="61"/>
<source>profile name</source> <source>profile name</source>
<translation>Nombre de perfil</translation> <translation>Nombre de perfil</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="64"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="62"/>
<source>is default</source> <source>is default</source>
<translation>es por defecto</translation> <translation>es por defecto</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="65"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="63"/>
<source>hide friends</source> <source>hide friends</source>
<translation>ocultar amigos</translation> <translation>ocultar amigos</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="66"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="64"/>
<source>profile photo</source> <source>profile photo</source>
<translation>foto de perfil</translation> <translation>foto de perfil</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="67"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="65"/>
<source>profile thumb</source> <source>profile thumb</source>
<translation>foto de perfil pequeña</translation> <translation>foto de perfil pequeña</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="68"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="66"/>
<source>publish</source> <source>publish</source>
<translation>publicar</translation> <translation>publicar</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="69"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="67"/>
<source>publish in network</source> <source>publish in network</source>
<translation>publicar en la red</translation> <translation>publicar en la red</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="70"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="68"/>
<source>description</source> <source>description</source>
<translation>descripción</translation> <translation>descripción</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="71"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="69"/>
<source>date of birth</source> <source>date of birth</source>
<translation>fecha de nacimiento</translation> <translation>fecha de nacimiento</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="72"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="70"/>
<source>address</source> <source>address</source>
<translation>dirección</translation> <translation>dirección</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="73"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="71"/>
<source>city</source> <source>city</source>
<translation>ciudad</translation> <translation>ciudad</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="74"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="72"/>
<source>region</source> <source>region</source>
<translation>región</translation> <translation>región</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="75"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="73"/>
<source>postal code</source> <source>postal code</source>
<translation>código postal</translation> <translation>código postal</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="76"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="74"/>
<source>country</source> <source>country</source>
<translation>país</translation> <translation>país</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="77"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="75"/>
<source>hometown</source> <source>hometown</source>
<translation>ciudad natal</translation> <translation>ciudad natal</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="78"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="76"/>
<source>gender</source> <source>gender</source>
<translation>género</translation> <translation>género</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="79"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="77"/>
<source>marital status</source> <source>marital status</source>
<translation>estado civil</translation> <translation>estado civil</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="80"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="78"/>
<source>married with</source> <source>married with</source>
<translation>casado con</translation> <translation>casado con</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="81"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="79"/>
<source>married since</source> <source>married since</source>
<translation>casado desde</translation> <translation>casado desde</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="82"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="80"/>
<source>sexual</source> <source>sexual</source>
<translation>orientación sexual</translation> <translation>orientación sexual</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="83"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="81"/>
<source>politics</source> <source>politics</source>
<translation>política</translation> <translation>política</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="84"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="82"/>
<source>religion</source> <source>religion</source>
<translation>religión</translation> <translation>religión</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="85"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="83"/>
<source>public keywords</source> <source>public keywords</source>
<translation>palabras clave públicas</translation> <translation>palabras clave públicas</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="86"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="84"/>
<source>private keywords</source> <source>private keywords</source>
<translation>palabras clave privadas</translation> <translation>palabras clave privadas</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="87"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="85"/>
<source>likes</source> <source>likes</source>
<translation>le gusta</translation> <translation>le gusta</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="88"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="86"/>
<source>dislikes</source> <source>dislikes</source>
<translation>no le gusta</translation> <translation>no le gusta</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="89"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="87"/>
<source>about</source> <source>about</source>
<translation>sobre</translation> <translation>sobre</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="90"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="88"/>
<source>music</source> <source>music</source>
<translation>música</translation> <translation>música</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="91"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="89"/>
<source>book</source> <source>book</source>
<translation>libro</translation> <translation>libro</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="92"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="90"/>
<source>tv</source> <source>tv</source>
<translation>tv</translation> <translation>tv</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="93"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="91"/>
<source>film</source> <source>film</source>
<translation>película</translation> <translation>película</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="94"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="92"/>
<source>interest</source> <source>interest</source>
<translation>interés</translation> <translation>interés</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="95"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="93"/>
<source>romance</source> <source>romance</source>
<translation>romance</translation> <translation>romance</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="96"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="94"/>
<source>work</source> <source>work</source>
<translation>trabajo</translation> <translation>trabajo</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="97"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="95"/>
<source>education</source> <source>education</source>
<translation>educación</translation> <translation>educación</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="98"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="96"/>
<source>social networks</source> <source>social networks</source>
<translation>redes sociales</translation> <translation>redes sociales</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="99"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="97"/>
<source>homepage</source> <source>homepage</source>
<translation>página web</translation> <translation>página web</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="100"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="98"/>
<source>other</source> <source>other</source>
<translation>otros</translation> <translation>otros</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="193"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="191"/>
<source>Update</source> <source>Update</source>
<translation>Actualización</translation> <translation>Actualización</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="227"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="225"/>
<source>profile id</source> <source>profile id</source>
<translation>profile id</translation> <translation>profile id</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="253"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="251"/>
<source>Description</source> <source>Description</source>
<translation>Descripción</translation> <translation>Descripción</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="253"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="251"/>
<source>Location</source> <source>Location</source>
<translation>Localización</translation> <translation>Localización</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="253"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="251"/>
<source>Posts</source> <source>Posts</source>
<translation>Mensajes</translation> <translation>Mensajes</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="254"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="252"/>
<source>URL</source> <source>URL</source>
<translation>URL</translation> <translation>URL</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="255"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="253"/>
<source>Created at</source> <source>Created at</source>
<translation>Creado en</translation> <translation>Creado en</translation>
</message> </message>
@ -1539,22 +1561,22 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ReportUser.qml" line="65"/> <location filename="../qml/newsqml/ReportUser.qml" line="63"/>
<source>comment</source> <source>comment</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ReportUser.qml" line="72"/> <location filename="../qml/newsqml/ReportUser.qml" line="70"/>
<source>illegal</source> <source>illegal</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ReportUser.qml" line="72"/> <location filename="../qml/newsqml/ReportUser.qml" line="70"/>
<source>spam</source> <source>spam</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ReportUser.qml" line="72"/> <location filename="../qml/newsqml/ReportUser.qml" line="70"/>
<source>violation</source> <source>violation</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1655,14 +1677,34 @@
<translation type="vanished">Salida</translation> <translation type="vanished">Salida</translation>
</message> </message>
<message> <message>
<location filename="../qml/friendiqa.qml" line="177"/> <location filename="../qml/friendiqa.qml" line="178"/>
<source>Background Sync <source>Background Sync
Rightclick or Middleclick to Quit</source> Rightclick or Middleclick to Quit</source>
<translation>Sincronización de fondo <translation>Sincronización de fondo
Haga clic con el botón derecho del ratón o con el botón central para salir.</translation> Haga clic con el botón derecho del ratón o con el botón central para salir.</translation>
</message> </message>
<message> <message>
<location filename="../qml/friendiqa.qml" line="294"/> <location filename="../qml/friendiqa.qml" line="218"/>
<source>Posts</source>
<translation type="unfinished">Mensajes</translation>
</message>
<message>
<location filename="../qml/friendiqa.qml" line="228"/>
<source>Contacts</source>
<translation type="unfinished">Contactos</translation>
</message>
<message>
<location filename="../qml/friendiqa.qml" line="237"/>
<source>Photos</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/friendiqa.qml" line="246"/>
<source>Calendar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/friendiqa.qml" line="303"/>
<source>Click to open Friendiqa</source> <source>Click to open Friendiqa</source>
<translation>Haga clic para abrir Friendiqa</translation> <translation>Haga clic para abrir Friendiqa</translation>
</message> </message>
@ -1780,12 +1822,12 @@ Haga clic con el botón derecho del ratón o con el botón central para salir.</
<translation type="vanished">La configuración del tipo de vista de las noticias se ha movido de la página de la cuenta a la página de configuración.</translation> <translation type="vanished">La configuración del tipo de vista de las noticias se ha movido de la página de la cuenta a la página de configuración.</translation>
</message> </message>
<message> <message>
<location filename="../js/service.js" line="460"/> <location filename="../js/service.js" line="307"/>
<source>Undefined Array Error</source> <source>Undefined Array Error</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../js/service.js" line="463"/> <location filename="../js/service.js" line="310"/>
<source>JSON status Error</source> <source>JSON status Error</source>
<translation></translation> <translation></translation>
</message> </message>

View file

@ -12,13 +12,13 @@
<context> <context>
<name>AccountPage</name> <name>AccountPage</name>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="64"/> <location filename="../qml/configqml/AccountPage.qml" line="101"/>
<location filename="../qml/configqml/AccountPage.qml" line="206"/> <location filename="../qml/configqml/AccountPage.qml" line="253"/>
<location filename="../qml/configqml/AccountPage.qml" line="228"/> <location filename="../qml/configqml/AccountPage.qml" line="269"/>
<location filename="../qml/configqml/AccountPage.qml" line="245"/> <location filename="../qml/configqml/AccountPage.qml" line="285"/>
<location filename="../qml/configqml/AccountPage.qml" line="306"/> <location filename="../qml/configqml/AccountPage.qml" line="346"/>
<location filename="../qml/configqml/AccountPage.qml" line="385"/> <location filename="../qml/configqml/AccountPage.qml" line="488"/>
<location filename="../qml/configqml/AccountPage.qml" line="406"/> <location filename="../qml/configqml/AccountPage.qml" line="510"/>
<source>User</source> <source>User</source>
<translation>Felhasználó</translation> <translation>Felhasználó</translation>
</message> </message>
@ -27,17 +27,17 @@
<translation type="vanished">Kiszolgáló</translation> <translation type="vanished">Kiszolgáló</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="229"/> <location filename="../qml/configqml/AccountPage.qml" line="270"/>
<source>Nickname</source> <source>Nickname</source>
<translation>Becenév</translation> <translation>Becenév</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="248"/> <location filename="../qml/configqml/AccountPage.qml" line="288"/>
<source>Password</source> <source>Password</source>
<translation>Jelszó</translation> <translation>Jelszó</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="255"/> <location filename="../qml/configqml/AccountPage.qml" line="295"/>
<source>Image dir.</source> <source>Image dir.</source>
<translation>Képkönyvtár</translation> <translation>Képkönyvtár</translation>
</message> </message>
@ -46,51 +46,73 @@
<translation type="vanished">Hírek mint</translation> <translation type="vanished">Hírek mint</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="208"/> <location filename="../qml/configqml/AccountPage.qml" line="255"/>
<source>Instance rules</source> <source>Instance rules</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="233"/> <location filename="../qml/configqml/AccountPage.qml" line="65"/>
<location filename="../qml/configqml/AccountPage.qml" line="322"/> <location filename="../qml/configqml/AccountPage.qml" line="96"/>
<location filename="../qml/configqml/AccountPage.qml" line="351"/> <location filename="../qml/configqml/AccountPage.qml" line="274"/>
<location filename="../qml/configqml/AccountPage.qml" line="354"/> <location filename="../qml/configqml/AccountPage.qml" line="348"/>
<location filename="../qml/configqml/AccountPage.qml" line="405"/>
<location filename="../qml/configqml/AccountPage.qml" line="426"/>
<source>Error</source> <source>Error</source>
<translation>Hiba</translation> <translation>Hiba</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="233"/> <location filename="../qml/configqml/AccountPage.qml" line="274"/>
<source>Nicknames containing @ symbol currently not supported</source> <source>Nicknames containing @ symbol currently not supported</source>
<translation>A @ szimbólumot tartalmazó becenevek jelenleg nem támogatottak</translation> <translation>A @ szimbólumot tartalmazó becenevek jelenleg nem támogatottak</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="304"/> <location filename="../qml/configqml/AccountPage.qml" line="344"/>
<source>Connect</source>
<translation type="unfinished">Kapcsolódás</translation>
</message>
<message>
<location filename="../qml/configqml/AccountPage.qml" line="348"/>
<source>No server given!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/AccountPage.qml" line="405"/>
<source>Couldn&apos;t connect to server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/AccountPage.qml" line="413"/>
<source>Confirm</source> <source>Confirm</source>
<translation>Megerősítés</translation> <translation>Megerősítés</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="311"/> <location filename="../qml/configqml/AccountPage.qml" line="420"/>
<source>No server given! </source> <source>No server given! </source>
<translation>Nincs kiszolgáló megadva! </translation> <translation>Nincs kiszolgáló megadva! </translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="312"/> <location filename="../qml/configqml/AccountPage.qml" line="421"/>
<source>No nickname given! </source> <source>No nickname given! </source>
<translation>Nincs becenév megadva! </translation> <translation>Nincs becenév megadva! </translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="313"/> <location filename="../qml/configqml/AccountPage.qml" line="422"/>
<source>No password given! </source> <source>No password given! </source>
<translation>Nincs jelszó megadva! </translation> <translation>Nincs jelszó megadva! </translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="314"/> <location filename="../qml/configqml/AccountPage.qml" line="423"/>
<source>No image directory given!</source> <source>No image directory given!</source>
<translation>Nincs képkönyvtár megadva!</translation> <translation>Nincs képkönyvtár megadva!</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="322"/> <location filename="../qml/configqml/AccountPage.qml" line="432"/>
<location filename="../qml/configqml/AccountPage.qml" line="351"/> <source>Set as default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/AccountPage.qml" line="65"/>
<location filename="../qml/configqml/AccountPage.qml" line="96"/>
<source>Wrong password or 2FA enabled!</source> <source>Wrong password or 2FA enabled!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -99,12 +121,13 @@
<translation type="vanished">Hibás jelszó!</translation> <translation type="vanished">Hibás jelszó!</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="348"/> <location filename="../qml/configqml/AccountPage.qml" line="93"/>
<location filename="../qml/configqml/AccountPage.qml" line="447"/>
<source>Success</source> <source>Success</source>
<translation>Sikeres</translation> <translation>Sikeres</translation>
</message> </message>
<message> <message>
<location filename="../qml/configqml/AccountPage.qml" line="348"/> <location filename="../qml/configqml/AccountPage.qml" line="93"/>
<source>Name</source> <source>Name</source>
<translation>Név</translation> <translation>Név</translation>
</message> </message>
@ -133,12 +156,12 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/calendarqml/CalendarTab.qml" line="201"/> <location filename="../qml/calendarqml/CalendarTab.qml" line="199"/>
<source>Events</source> <source>Events</source>
<translation>Események</translation> <translation>Események</translation>
</message> </message>
<message> <message>
<location filename="../qml/calendarqml/CalendarTab.qml" line="206"/> <location filename="../qml/calendarqml/CalendarTab.qml" line="204"/>
<source>Own Calendar</source> <source>Own Calendar</source>
<translation>Saját naptár</translation> <translation>Saját naptár</translation>
</message> </message>
@ -489,77 +512,77 @@
<translation type="vanished">Kapcsolódás</translation> <translation type="vanished">Kapcsolódás</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="219"/> <location filename="../qml/newsqml/ContactPage.qml" line="214"/>
<source>Approve</source> <source>Approve</source>
<translation>Jóváhagyás</translation> <translation>Jóváhagyás</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="234"/> <location filename="../qml/newsqml/ContactPage.qml" line="228"/>
<source>Reject</source> <source>Reject</source>
<translation>Visszautasítás</translation> <translation>Visszautasítás</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="249"/> <location filename="../qml/newsqml/ContactPage.qml" line="242"/>
<source>Ignore</source> <source>Ignore</source>
<translation>Mellőzés</translation> <translation>Mellőzés</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="264"/> <location filename="../qml/newsqml/ContactPage.qml" line="256"/>
<source>Follow</source> <source>Follow</source>
<translation>Követés</translation> <translation>Követés</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="281"/> <location filename="../qml/newsqml/ContactPage.qml" line="272"/>
<source>Unfollow</source> <source>Unfollow</source>
<translation>Követés megszüntetése</translation> <translation>Követés megszüntetése</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="298"/> <location filename="../qml/newsqml/ContactPage.qml" line="287"/>
<source>Block</source> <source>Block</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="313"/> <location filename="../qml/newsqml/ContactPage.qml" line="303"/>
<source>Unblock</source> <source>Unblock</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="350"/> <location filename="../qml/newsqml/ContactPage.qml" line="341"/>
<source>Description</source> <source>Description</source>
<translation>Leírás</translation> <translation>Leírás</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="350"/> <location filename="../qml/newsqml/ContactPage.qml" line="341"/>
<source>Location</source> <source>Location</source>
<translation>Hely</translation> <translation>Hely</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="350"/> <location filename="../qml/newsqml/ContactPage.qml" line="341"/>
<source>Posts</source> <source>Posts</source>
<translation>Bejegyzések</translation> <translation>Bejegyzések</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="351"/> <location filename="../qml/newsqml/ContactPage.qml" line="342"/>
<source>URL</source> <source>URL</source>
<translation>URL</translation> <translation>URL</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="352"/> <location filename="../qml/newsqml/ContactPage.qml" line="343"/>
<source>Created at</source> <source>Created at</source>
<translation>Létrehozva</translation> <translation>Létrehozva</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="353"/> <location filename="../qml/newsqml/ContactPage.qml" line="344"/>
<source>Followers</source> <source>Followers</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="354"/> <location filename="../qml/newsqml/ContactPage.qml" line="345"/>
<source>Following</source> <source>Following</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ContactPage.qml" line="364"/> <location filename="../qml/newsqml/ContactPage.qml" line="355"/>
<source>Network Error</source> <source>Network Error</source>
<translation>Hálózati hiba</translation> <translation>Hálózati hiba</translation>
</message> </message>
@ -567,17 +590,17 @@
<context> <context>
<name>ContactsSearchPage</name> <name>ContactsSearchPage</name>
<message> <message>
<location filename="../qml/contactqml/ContactsSearchPage.qml" line="62"/> <location filename="../qml/contactqml/ContactsSearchPage.qml" line="60"/>
<source>Network Error</source> <source>Network Error</source>
<translation>Hálózati hiba</translation> <translation>Hálózati hiba</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ContactsSearchPage.qml" line="91"/> <location filename="../qml/contactqml/ContactsSearchPage.qml" line="89"/>
<source>Forum</source> <source>Forum</source>
<translation>fórum</translation> <translation>fórum</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ContactsSearchPage.qml" line="93"/> <location filename="../qml/contactqml/ContactsSearchPage.qml" line="91"/>
<source>Person</source> <source>Person</source>
<translation>személy</translation> <translation>személy</translation>
</message> </message>
@ -804,7 +827,7 @@
</message> </message>
<message> <message>
<location filename="../qml/calendarqml/EventCreate.qml" line="348"/> <location filename="../qml/calendarqml/EventCreate.qml" line="348"/>
<location filename="../qml/calendarqml/EventCreate.qml" line="385"/> <location filename="../qml/calendarqml/EventCreate.qml" line="383"/>
<source>Error</source> <source>Error</source>
<translation type="unfinished">Hiba</translation> <translation type="unfinished">Hiba</translation>
</message> </message>
@ -894,7 +917,7 @@
<context> <context>
<name>ImageUploadDialog</name> <name>ImageUploadDialog</name>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="133"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="129"/>
<source>Upload to album</source> <source>Upload to album</source>
<translation>Feltöltés albumba</translation> <translation>Feltöltés albumba</translation>
</message> </message>
@ -907,27 +930,27 @@
<translation type="vanished">Kép</translation> <translation type="vanished">Kép</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="277"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="273"/>
<source>Description</source> <source>Description</source>
<translation>Leírás</translation> <translation>Leírás</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="309"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="305"/>
<source>Upload</source> <source>Upload</source>
<translation>Feltöltés</translation> <translation>Feltöltés</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="309"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="305"/>
<source>Change</source> <source>Change</source>
<translation>Változtatás</translation> <translation>Változtatás</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="312"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="308"/>
<source>Error</source> <source>Error</source>
<translation>Hiba</translation> <translation>Hiba</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="312"/> <location filename="../qml/photoqml/ImageUploadDialog.qml" line="308"/>
<source> No album name given</source> <source> No album name given</source>
<translation> Nincs albumnév megadva</translation> <translation> Nincs albumnév megadva</translation>
</message> </message>
@ -953,12 +976,12 @@
<context> <context>
<name>MessageImageUploadDialog</name> <name>MessageImageUploadDialog</name>
<message> <message>
<location filename="../qml/newsqml/MessageImageUploadDialog.qml" line="258"/> <location filename="../qml/newsqml/MessageImageUploadDialog.qml" line="254"/>
<source>Description</source> <source>Description</source>
<translation type="unfinished">Leírás</translation> <translation type="unfinished">Leírás</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/MessageImageUploadDialog.qml" line="284"/> <location filename="../qml/newsqml/MessageImageUploadDialog.qml" line="281"/>
<source>Upload</source> <source>Upload</source>
<translation type="unfinished">Feltöltés</translation> <translation type="unfinished">Feltöltés</translation>
</message> </message>
@ -986,7 +1009,7 @@
<translation>Mire gondol?</translation> <translation>Mire gondol?</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/MessageSend.qml" line="431"/> <location filename="../qml/newsqml/MessageSend.qml" line="433"/>
<source>Error</source> <source>Error</source>
<translation>Hiba</translation> <translation>Hiba</translation>
</message> </message>
@ -997,7 +1020,7 @@
Először távolítsa el a másik mellékletet.</translation> Először távolítsa el a másik mellékletet.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/MessageSend.qml" line="431"/> <location filename="../qml/newsqml/MessageSend.qml" line="433"/>
<source>No receiver supplied!</source> <source>No receiver supplied!</source>
<translation>Nincs fogadó megadva!</translation> <translation>Nincs fogadó megadva!</translation>
</message> </message>
@ -1017,7 +1040,7 @@
<translation type="vanished">Hálózati hiba</translation> <translation type="vanished">Hálózati hiba</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsStack.qml" line="286"/> <location filename="../qml/newsqml/NewsStack.qml" line="284"/>
<source>More</source> <source>More</source>
<translation>Több</translation> <translation>Több</translation>
</message> </message>
@ -1077,102 +1100,102 @@
<translation type="vanished">Kilépés</translation> <translation type="vanished">Kilépés</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="75"/> <location filename="../qml/newsqml/NewsTab.qml" line="71"/>
<source>seconds</source> <source>seconds</source>
<translation>másodperc</translation> <translation>másodperc</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="76"/> <location filename="../qml/newsqml/NewsTab.qml" line="72"/>
<source>minute</source> <source>minute</source>
<translation>perc</translation> <translation>perc</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="77"/> <location filename="../qml/newsqml/NewsTab.qml" line="73"/>
<source>minutes</source> <source>minutes</source>
<translation>perc</translation> <translation>perc</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="78"/> <location filename="../qml/newsqml/NewsTab.qml" line="74"/>
<source>hour</source> <source>hour</source>
<translation>óra</translation> <translation>óra</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="79"/> <location filename="../qml/newsqml/NewsTab.qml" line="75"/>
<source>hours</source> <source>hours</source>
<translation>óra</translation> <translation>óra</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="80"/> <location filename="../qml/newsqml/NewsTab.qml" line="76"/>
<source>day</source> <source>day</source>
<translation>nap</translation> <translation>nap</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="81"/> <location filename="../qml/newsqml/NewsTab.qml" line="77"/>
<source>days</source> <source>days</source>
<translation>nap</translation> <translation>nap</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="82"/> <location filename="../qml/newsqml/NewsTab.qml" line="78"/>
<source>month</source> <source>month</source>
<translation>hónap</translation> <translation>hónap</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="83"/> <location filename="../qml/newsqml/NewsTab.qml" line="79"/>
<source>months</source> <source>months</source>
<translation>hónap</translation> <translation>hónap</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="84"/> <location filename="../qml/newsqml/NewsTab.qml" line="80"/>
<source>years</source> <source>years</source>
<translation>év</translation> <translation>év</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="93"/> <location filename="../qml/newsqml/NewsTab.qml" line="89"/>
<source>likes this.</source> <source>likes this.</source>
<translation>kedveli ezt.</translation> <translation>kedveli ezt.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="94"/> <location filename="../qml/newsqml/NewsTab.qml" line="90"/>
<source>like this.</source> <source>like this.</source>
<translation>kedveli ezt.</translation> <translation>kedveli ezt.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="97"/> <location filename="../qml/newsqml/NewsTab.qml" line="93"/>
<source>doesn&apos;t like this.</source> <source>doesn&apos;t like this.</source>
<translation>nem kedveli ezt.</translation> <translation>nem kedveli ezt.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="98"/> <location filename="../qml/newsqml/NewsTab.qml" line="94"/>
<source>don&apos;t like this.</source> <source>don&apos;t like this.</source>
<translation>nem kedveli ezt.</translation> <translation>nem kedveli ezt.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="101"/> <location filename="../qml/newsqml/NewsTab.qml" line="97"/>
<source>will attend.</source> <source>will attend.</source>
<translation>részt vesz.</translation> <translation>részt vesz.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="102"/> <location filename="../qml/newsqml/NewsTab.qml" line="98"/>
<source>persons will attend.</source> <source>persons will attend.</source>
<translation>személy részt vesz.</translation> <translation>személy részt vesz.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="105"/> <location filename="../qml/newsqml/NewsTab.qml" line="101"/>
<source>will not attend.</source> <source>will not attend.</source>
<translation>nem vesz részt.</translation> <translation>nem vesz részt.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="106"/> <location filename="../qml/newsqml/NewsTab.qml" line="102"/>
<source>persons will not attend.</source> <source>persons will not attend.</source>
<translation>személy nem vesz részt.</translation> <translation>személy nem vesz részt.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="109"/> <location filename="../qml/newsqml/NewsTab.qml" line="105"/>
<source>may attend.</source> <source>may attend.</source>
<translation>talán részt vesz.</translation> <translation>talán részt vesz.</translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/NewsTab.qml" line="110"/> <location filename="../qml/newsqml/NewsTab.qml" line="106"/>
<source>persons may attend.</source> <source>persons may attend.</source>
<translation>személy talán részt vesz.</translation> <translation>személy talán részt vesz.</translation>
</message> </message>
@ -1308,28 +1331,27 @@
<context> <context>
<name>PhotoTab</name> <name>PhotoTab</name>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="132"/>
<source>&apos;s images</source> <source>&apos;s images</source>
<translation> képei</translation> <translation type="vanished"> képei</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="219"/> <location filename="../qml/photoqml/PhotoTab.qml" line="230"/>
<source>All Images</source> <source>All Images</source>
<translation>Összes kép</translation> <translation>Összes kép</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="225"/> <location filename="../qml/photoqml/PhotoTab.qml" line="236"/>
<source>Only new</source> <source>Only new</source>
<translation>Csak újak</translation> <translation>Csak újak</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="241"/> <location filename="../qml/photoqml/PhotoTab.qml" line="252"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="246"/> <location filename="../qml/photoqml/PhotoTab.qml" line="257"/>
<source>Own Images</source> <source>Own Images</source>
<translation>Saját képek</translation> <translation>Saját képek</translation>
</message> </message>
<message> <message>
<location filename="../qml/photoqml/PhotoTab.qml" line="288"/> <location filename="../qml/photoqml/PhotoTab.qml" line="299"/>
<source>More</source> <source>More</source>
<translation>Több</translation> <translation>Több</translation>
</message> </message>
@ -1337,227 +1359,227 @@
<context> <context>
<name>ProfileComponent</name> <name>ProfileComponent</name>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="63"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="61"/>
<source>profile name</source> <source>profile name</source>
<translation>profilnév</translation> <translation>profilnév</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="64"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="62"/>
<source>is default</source> <source>is default</source>
<translation>alapértelmezett</translation> <translation>alapértelmezett</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="65"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="63"/>
<source>hide friends</source> <source>hide friends</source>
<translation>ismerősök elrejtése</translation> <translation>ismerősök elrejtése</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="66"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="64"/>
<source>profile photo</source> <source>profile photo</source>
<translation>profilfénykép</translation> <translation>profilfénykép</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="67"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="65"/>
<source>profile thumb</source> <source>profile thumb</source>
<translation>profilbélyegkép</translation> <translation>profilbélyegkép</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="68"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="66"/>
<source>publish</source> <source>publish</source>
<translation>közzététel</translation> <translation>közzététel</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="69"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="67"/>
<source>publish in network</source> <source>publish in network</source>
<translation>közzététel hálózaton</translation> <translation>közzététel hálózaton</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="70"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="68"/>
<source>description</source> <source>description</source>
<translation>leírás</translation> <translation>leírás</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="71"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="69"/>
<source>date of birth</source> <source>date of birth</source>
<translation>születési dátum</translation> <translation>születési dátum</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="72"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="70"/>
<source>address</source> <source>address</source>
<translation>cím</translation> <translation>cím</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="73"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="71"/>
<source>city</source> <source>city</source>
<translation>település</translation> <translation>település</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="74"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="72"/>
<source>region</source> <source>region</source>
<translation>régió</translation> <translation>régió</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="75"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="73"/>
<source>postal code</source> <source>postal code</source>
<translation>irányítószám</translation> <translation>irányítószám</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="76"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="74"/>
<source>country</source> <source>country</source>
<translation>ország</translation> <translation>ország</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="77"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="75"/>
<source>hometown</source> <source>hometown</source>
<translation>szülőváros</translation> <translation>szülőváros</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="78"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="76"/>
<source>gender</source> <source>gender</source>
<translation>nem</translation> <translation>nem</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="79"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="77"/>
<source>marital status</source> <source>marital status</source>
<translation>családi állapot</translation> <translation>családi állapot</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="80"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="78"/>
<source>married with</source> <source>married with</source>
<translation>házas vele</translation> <translation>házas vele</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="81"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="79"/>
<source>married since</source> <source>married since</source>
<translation>házas ekkortól</translation> <translation>házas ekkortól</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="82"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="80"/>
<source>sexual</source> <source>sexual</source>
<translation>szexuális</translation> <translation>szexuális</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="83"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="81"/>
<source>politics</source> <source>politics</source>
<translation>politika</translation> <translation>politika</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="84"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="82"/>
<source>religion</source> <source>religion</source>
<translation>vallás</translation> <translation>vallás</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="85"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="83"/>
<source>public keywords</source> <source>public keywords</source>
<translation>nyilvános kulcsszavak</translation> <translation>nyilvános kulcsszavak</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="86"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="84"/>
<source>private keywords</source> <source>private keywords</source>
<translation>személyes kulcsszavak</translation> <translation>személyes kulcsszavak</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="87"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="85"/>
<source>likes</source> <source>likes</source>
<translation>kedvelések</translation> <translation>kedvelések</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="88"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="86"/>
<source>dislikes</source> <source>dislikes</source>
<translation>nem kedvelések</translation> <translation>nem kedvelések</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="89"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="87"/>
<source>about</source> <source>about</source>
<translation>névjegy</translation> <translation>névjegy</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="90"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="88"/>
<source>music</source> <source>music</source>
<translation>zene</translation> <translation>zene</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="91"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="89"/>
<source>book</source> <source>book</source>
<translation>könyv</translation> <translation>könyv</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="92"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="90"/>
<source>tv</source> <source>tv</source>
<translation>TV</translation> <translation>TV</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="93"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="91"/>
<source>film</source> <source>film</source>
<translation>film</translation> <translation>film</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="94"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="92"/>
<source>interest</source> <source>interest</source>
<translation>érdeklődés</translation> <translation>érdeklődés</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="95"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="93"/>
<source>romance</source> <source>romance</source>
<translation>romantika</translation> <translation>romantika</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="96"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="94"/>
<source>work</source> <source>work</source>
<translation>munka</translation> <translation>munka</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="97"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="95"/>
<source>education</source> <source>education</source>
<translation>oktatás</translation> <translation>oktatás</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="98"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="96"/>
<source>social networks</source> <source>social networks</source>
<translation>közösségi hálózatok</translation> <translation>közösségi hálózatok</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="99"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="97"/>
<source>homepage</source> <source>homepage</source>
<translation>honlap</translation> <translation>honlap</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="100"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="98"/>
<source>other</source> <source>other</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="193"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="191"/>
<source>Update</source> <source>Update</source>
<translation>Frissítés</translation> <translation>Frissítés</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="227"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="225"/>
<source>profile id</source> <source>profile id</source>
<translation>profilazonosító</translation> <translation>profilazonosító</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="253"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="251"/>
<source>Description</source> <source>Description</source>
<translation>Leírás</translation> <translation>Leírás</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="253"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="251"/>
<source>Location</source> <source>Location</source>
<translation>Hely</translation> <translation>Hely</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="253"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="251"/>
<source>Posts</source> <source>Posts</source>
<translation>Bejegyzések</translation> <translation>Bejegyzések</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="254"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="252"/>
<source>URL</source> <source>URL</source>
<translation>URL</translation> <translation>URL</translation>
</message> </message>
<message> <message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="255"/> <location filename="../qml/contactqml/ProfileComponent.qml" line="253"/>
<source>Created at</source> <source>Created at</source>
<translation>Létrehozva</translation> <translation>Létrehozva</translation>
</message> </message>
@ -1570,22 +1592,22 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ReportUser.qml" line="65"/> <location filename="../qml/newsqml/ReportUser.qml" line="63"/>
<source>comment</source> <source>comment</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ReportUser.qml" line="72"/> <location filename="../qml/newsqml/ReportUser.qml" line="70"/>
<source>illegal</source> <source>illegal</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ReportUser.qml" line="72"/> <location filename="../qml/newsqml/ReportUser.qml" line="70"/>
<source>spam</source> <source>spam</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/newsqml/ReportUser.qml" line="72"/> <location filename="../qml/newsqml/ReportUser.qml" line="70"/>
<source>violation</source> <source>violation</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1686,14 +1708,34 @@
<translation type="vanished">Kilépés</translation> <translation type="vanished">Kilépés</translation>
</message> </message>
<message> <message>
<location filename="../qml/friendiqa.qml" line="177"/> <location filename="../qml/friendiqa.qml" line="178"/>
<source>Background Sync <source>Background Sync
Rightclick or Middleclick to Quit</source> Rightclick or Middleclick to Quit</source>
<translation>Háttérszinkronizálás <translation>Háttérszinkronizálás
Kilépéshez kattintson a jobb gombbal vagy középső gombbal</translation> Kilépéshez kattintson a jobb gombbal vagy középső gombbal</translation>
</message> </message>
<message> <message>
<location filename="../qml/friendiqa.qml" line="294"/> <location filename="../qml/friendiqa.qml" line="218"/>
<source>Posts</source>
<translation type="unfinished">Bejegyzések</translation>
</message>
<message>
<location filename="../qml/friendiqa.qml" line="228"/>
<source>Contacts</source>
<translation type="unfinished">Partnerek</translation>
</message>
<message>
<location filename="../qml/friendiqa.qml" line="237"/>
<source>Photos</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/friendiqa.qml" line="246"/>
<source>Calendar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/friendiqa.qml" line="303"/>
<source>Click to open Friendiqa</source> <source>Click to open Friendiqa</source>
<translation>Kattintson a Friendiqa megnyitásához</translation> <translation>Kattintson a Friendiqa megnyitásához</translation>
</message> </message>
@ -1811,12 +1853,12 @@ Kilépéshez kattintson a jobb gombbal vagy középső gombbal</translation>
<translation type="vanished">A hírek nézettípusának beállítása át lett helyezve a fiókoldalról a beállítási oldalra.</translation> <translation type="vanished">A hírek nézettípusának beállítása át lett helyezve a fiókoldalról a beállítási oldalra.</translation>
</message> </message>
<message> <message>
<location filename="../js/service.js" line="460"/> <location filename="../js/service.js" line="307"/>
<source>Undefined Array Error</source> <source>Undefined Array Error</source>
<translation>Meghatározatlan tömbhiba</translation> <translation>Meghatározatlan tömbhiba</translation>
</message> </message>
<message> <message>
<location filename="../js/service.js" line="463"/> <location filename="../js/service.js" line="310"/>
<source>JSON status Error</source> <source>JSON status Error</source>
<translation>JSON-állapothiba</translation> <translation>JSON-állapothiba</translation>
</message> </message>

File diff suppressed because it is too large Load diff