From d43c18bb76cc8122759de62fb58f1d9d277ee2b1 Mon Sep 17 00:00:00 2001 From: LubuWest Date: Wed, 24 May 2023 21:40:26 +0200 Subject: [PATCH] OAuth and bugfixes --- .gitignore | 3 + CHANGELOG.md | 9 +- FlatpakAutostart.patch | 2 +- README.md | 7 +- source-android/CMakeLists.txt | 96 +++ source-android/android/AndroidManifest.xml | 2 +- source-android/android/gradle.properties | 3 - .../android/src/FriendiqaStopService.java | 2 +- source-android/common/friendiqa.cpp | 6 +- source-android/common/oauth.cpp | 1 + source-android/common/oauth.h | 1 + source-android/friendiqa.pro | 12 +- source-android/qml/friendiqa.qml | 1 - source-linux/CMakeLists.txt | 9 +- source-linux/application.qrc | 4 +- source-linux/common/filesystem.cpp | 21 +- source-linux/common/filesystem.h | 7 +- source-linux/common/filesystemandroid.cpp | 10 + source-linux/common/friendiqa.cpp | 4 + source-linux/common/oauth.cpp | 88 +++ source-linux/common/oauth.h | 71 +++ source-linux/common/updatenews.cpp | 109 ++-- source-linux/common/updatenews.h | 17 +- source-linux/common/xhr.cpp | 162 +++-- source-linux/common/xhr.h | 10 + source-linux/js/friendworker.js | 1 - source-linux/js/helper.js | 50 +- source-linux/js/image.js | 92 +-- source-linux/js/layout.js | 76 --- source-linux/js/news.js | 55 +- source-linux/js/photoworker.js | 6 +- source-linux/js/service.js | 284 ++------- source-linux/js/smiley.js | 11 + source-linux/js/yplayer.html | 47 -- source-linux/qml/calendarqml/CalendarTab.qml | 6 +- source-linux/qml/calendarqml/EventCreate.qml | 4 +- source-linux/qml/calendarqml/EventList.qml | 4 +- source-linux/qml/configqml/AcceptRules.qml | 7 +- source-linux/qml/configqml/AccountPage.qml | 278 ++++++--- source-linux/qml/configqml/InfoBox.qml | 3 +- .../qml/contactqml/ContactsSearchPage.qml | 4 +- source-linux/qml/contactqml/GroupsListTab.qml | 4 +- .../qml/contactqml/ProfileComponent.qml | 4 +- source-linux/qml/friendiqa.qml | 12 +- .../DrawerAccountComponentContacts.qml | 9 +- .../qml/genericqml/PermissionDialog.qml | 32 +- source-linux/qml/newsqml/BlockUser.qml | 4 +- source-linux/qml/newsqml/ContactPage.qml | 59 +- .../qml/newsqml/MessageImageUploadDialog.qml | 48 +- source-linux/qml/newsqml/MessageSend.qml | 23 +- source-linux/qml/newsqml/NewsPhotolist.qml | 1 + source-linux/qml/newsqml/NewsStack.qml | 13 +- source-linux/qml/newsqml/NewsTab.qml | 8 +- source-linux/qml/newsqml/NewsVideoLarge.qml | 26 +- source-linux/qml/newsqml/Newsitem.qml | 10 +- source-linux/qml/newsqml/ReportUser.qml | 4 +- source-linux/qml/newsqml/SmileyDialog.qml | 2 +- .../qml/photoqml/ImageUploadDialog.qml | 8 +- source-linux/qml/photoqml/PhotoTab.qml | 47 +- .../qml/photoqml/PhotogroupComponent.qml | 22 +- source-linux/translations/friendiqa-de.qm | Bin 19283 -> 19833 bytes source-linux/translations/friendiqa-de.ts | 34 +- source-linux/translations/friendiqa-es.ts | 316 ++++++---- source-linux/translations/friendiqa-hu.ts | 316 ++++++---- source-linux/translations/friendiqa-nl.ts | 588 ++++++++++-------- 65 files changed, 1681 insertions(+), 1494 deletions(-) create mode 100644 .gitignore create mode 100644 source-android/CMakeLists.txt create mode 120000 source-android/common/oauth.cpp create mode 120000 source-android/common/oauth.h create mode 100644 source-linux/common/oauth.cpp create mode 100644 source-linux/common/oauth.h delete mode 100644 source-linux/js/layout.js delete mode 100644 source-linux/js/yplayer.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..71842bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +CMakeLists.txt.user* +friendiqa.pro.user* +IJPSvd.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 703baf5..d8d791e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ + +## v0.6.8 + +* OAuth +* New translation: netherland + ## v0.6.7 * Upload multiple images for post and add image descriptions @@ -27,7 +33,6 @@ * Removed permissions for new messages due to buggy Contacts API * Sync all accounts in background (not only active) - ## v0.6.3 * Dark theme @@ -205,4 +210,4 @@ # Translations -* German, Spanish +* German, Spanish \ No newline at end of file diff --git a/FlatpakAutostart.patch b/FlatpakAutostart.patch index 2778c11..0905eb1 100644 --- a/FlatpakAutostart.patch +++ b/FlatpakAutostart.patch @@ -1,6 +1,6 @@ --- source-linux/common/filesystem.cpp +++ source-linux/common/filesystem.cpp -@@ -178,7 +178,7 @@ +@@ -165,7 +165,7 @@ QTextStream stream(&file); stream << "[Desktop Entry]" << Qt::endl; stream << "Name=Friendiqa" << Qt::endl; diff --git a/README.md b/README.md index f13676f..bbc0244 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,6 @@ Currently supported: * Sync home timeline, replies, DM, Events, friend requests; Notify yes/no * Hide #nsfw -ToDo * OAuth @@ -121,8 +120,8 @@ ToDo # Translations -* German, Spanish, Italian, Hungarian -* 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. +* German, Spanish, Italian, Hungarian, dutch +* To contribute translations: # Install @@ -133,4 +132,4 @@ ToDo ## 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. \ No newline at end of file diff --git a/source-android/CMakeLists.txt b/source-android/CMakeLists.txt new file mode 100644 index 0000000..c47a156 --- /dev/null +++ b/source-android/CMakeLists.txt @@ -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 diff --git a/source-android/android/AndroidManifest.xml b/source-android/android/AndroidManifest.xml index 5fcbd9e..69ccde9 100644 --- a/source-android/android/AndroidManifest.xml +++ b/source-android/android/AndroidManifest.xml @@ -1,5 +1,5 @@ - +