From 8482bde3ede7a73d017c0547ba30c53a878a1f23 Mon Sep 17 00:00:00 2001 From: LubuWest Date: Wed, 12 May 2021 21:41:34 +0200 Subject: [PATCH] version v0.6 --- CHANGELOG.md | 216 +-- README.md | 10 +- source-android/android/AndroidManifest.xml | 10 +- source-android/android/arm/libcrypto_1_1.so | Bin source-android/android/arm/libssl_1_1.so | Bin source-android/android/arm64/libcrypto_1_1.so | Bin source-android/android/arm64/libssl_1_1.so | Bin source-android/android/gradle.properties | 3 - source-android/android/gradlew | 0 .../androidnative/AndroidNativeActivity.java | 4 +- .../java/src/androidnative/ImagePicker.java | 5 +- .../src/androidnative/SystemDispatcher.java | 1 + source-android/common/friendiqa.cpp | 7 +- source-android/friendiqa.pro | 5 +- source-android/qml/friendiqa.qml | 395 ++--- source-linux/CMakeLists.txt | 47 + source-linux/application.qrc | 13 +- source-linux/common/alarm.h | 1 - source-linux/common/friendiqa.cpp | 17 +- source-linux/common/updatenews.cpp | 282 ++- source-linux/common/updatenews.h | 4 +- source-linux/common/xhr.cpp | 4 +- source-linux/js/helper.js | 18 +- source-linux/js/image.js | 2 +- source-linux/js/news.js | 20 +- source-linux/js/newsworker.js | 19 +- source-linux/js/service.js | 117 +- source-linux/qml/calendarqml/CalendarDay.qml | 21 +- source-linux/qml/calendarqml/CalendarTab.qml | 105 +- source-linux/qml/calendarqml/EventList.qml | 96 +- .../qml/calendarqml/EventListItem.qml | 90 + source-linux/qml/configqml/AccountPage.qml | 435 +++-- source-linux/qml/configqml/ConfigPage.qml | 94 +- source-linux/qml/configqml/InfoBox.qml | 49 +- .../qml/configqml/LeftDrawerScrollview.qml | 113 ++ .../qml/configqml/OSSettingsAndroid.qml | 2 + .../qml/configqml/OSSettingsLinux.qml | 6 +- source-linux/qml/configqml/RegisterPage.qml | 7 +- source-linux/qml/configqml/SyncComponent.qml | 18 +- source-linux/qml/configqml/SyncConfig.qml | 74 +- source-linux/qml/contactqml/Contactlist.qml | 118 +- .../qml/contactqml/ContactsListTab.qml | 96 ++ .../qml/contactqml/FriendsListTab.qml | 159 ++ source-linux/qml/contactqml/FriendsTab.qml | 330 +--- .../qml/contactqml/GroupComponent.qml | 118 +- source-linux/qml/contactqml/GroupsListTab.qml | 141 ++ .../qml/contactqml/ProfileComponent.qml | 22 +- source-linux/qml/contactqml/ProfileTab.qml | 65 + source-linux/qml/friendiqa.qml | 397 ++--- source-linux/qml/genericqml/BlueButton.qml | 11 +- .../qml/genericqml/ContactComponent.qml | 45 +- .../qml/genericqml/DrawerAccountComponent.qml | 235 +++ .../DrawerAccountComponentContacts.qml | 126 ++ .../qml/genericqml/ImagePickerLinux.qml | 6 +- .../qml/genericqml/IntentReceiver.qml | 2 +- .../qml/genericqml/LeftDrawerAndroid.qml | 41 + .../qml/genericqml/LeftDrawerLinux.qml | 55 + source-linux/qml/genericqml/MButton.qml | 9 +- source-linux/qml/genericqml/Search.qml | 4 +- source-linux/qml/newsqml/ContactPage.qml | 425 +++-- source-linux/qml/newsqml/Conversation.qml | 67 +- .../qml/newsqml/FriendicaActivities.qml | 5 +- source-linux/qml/newsqml/Hashtag.qml | 2 +- source-linux/qml/newsqml/MessageSend.qml | 94 +- source-linux/qml/newsqml/MoreComments.qml | 1 - source-linux/qml/newsqml/NewsImage.qml | 31 +- source-linux/qml/newsqml/NewsPhotolist.qml | 134 ++ source-linux/qml/newsqml/NewsStack.qml | 672 ++++---- source-linux/qml/newsqml/NewsTab.qml | 144 +- source-linux/qml/newsqml/NewsVideo.qml | 4 +- source-linux/qml/newsqml/NewsVideoLarge.qml | 14 +- source-linux/qml/newsqml/NewsYplayer.qml | 8 +- source-linux/qml/newsqml/Newsitem.qml | 701 ++++---- source-linux/qml/newsqml/SmileyDialog.qml | 20 +- .../qml/photoqml/ImageUploadDialog.qml | 108 +- source-linux/qml/photoqml/PhotoComponent.qml | 2 +- source-linux/qml/photoqml/PhotoTab.qml | 56 +- .../qml/photoqml/PhotogroupComponent.qml | 4 +- source-linux/translations/friendiqa-de.qm | Bin 12674 -> 16031 bytes source-linux/translations/friendiqa-de.ts | 604 +++++-- source-linux/translations/friendiqa-es.qm | Bin 9845 -> 15879 bytes source-linux/translations/friendiqa-es.ts | 675 ++++++-- source-linux/translations/friendiqa-hu.qm | Bin 0 -> 15758 bytes source-linux/translations/friendiqa-hu.ts | 1534 +++++++++++++++++ source-linux/translations/friendiqa-it.qm | Bin 9603 -> 15773 bytes source-linux/translations/friendiqa-it.ts | 677 ++++++-- 86 files changed, 7064 insertions(+), 3208 deletions(-) mode change 100755 => 100644 source-android/android/arm/libcrypto_1_1.so mode change 100755 => 100644 source-android/android/arm/libssl_1_1.so mode change 100755 => 100644 source-android/android/arm64/libcrypto_1_1.so mode change 100755 => 100644 source-android/android/arm64/libssl_1_1.so mode change 100755 => 100644 source-android/android/gradlew create mode 100644 source-linux/CMakeLists.txt create mode 100644 source-linux/qml/calendarqml/EventListItem.qml create mode 100644 source-linux/qml/configqml/LeftDrawerScrollview.qml create mode 100644 source-linux/qml/contactqml/ContactsListTab.qml create mode 100644 source-linux/qml/contactqml/FriendsListTab.qml create mode 100644 source-linux/qml/contactqml/GroupsListTab.qml create mode 100644 source-linux/qml/contactqml/ProfileTab.qml create mode 100644 source-linux/qml/genericqml/DrawerAccountComponent.qml create mode 100644 source-linux/qml/genericqml/DrawerAccountComponentContacts.qml create mode 100644 source-linux/qml/genericqml/LeftDrawerAndroid.qml create mode 100644 source-linux/qml/genericqml/LeftDrawerLinux.qml create mode 100644 source-linux/qml/newsqml/NewsPhotolist.qml create mode 100644 source-linux/translations/friendiqa-hu.qm create mode 100644 source-linux/translations/friendiqa-hu.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 06a5b1f..c119362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,143 +1,157 @@ -## v0.5.4 ## -* More Simplification of account page (images are stored in the private app directory, no permission required) -* Image attachment for Android 10 repaired -* Hashtags are saved after message is sent and can be used in later messages -* Bugfixes +## v0.6 -## v0.5.3 ## -* Implementation of new events API (incl. sync and notification) for Friendica version >= 20.03 -* Indentation to see replied to newsitem for conversation view -* News view type config moved from account page to config page -* Simplification of account page on first start -* Bugfixes +* New language: Hungarian +* Multiple photos in post open in separate slideshow +* Layout redesign +* Adaptive sidebar +* Sync Friendship Requests, approve/deny/ignore requests +* Events: show upcoming events below calendar +* Linux: Drag&Drop for new messages and photo upload +* Linux: Remember app size +## v0.5.3 -## v0.5.2 ## -* Redesign of news item -* Background sync for Android >8.0 -* Bugfixes +* Implementation of new events API (incl. sync and notification) for Friendica version >= 20.03 +* Indentation to see replied to newsitem for conversation view +* News view type config moved from account page to config page +* Simplification of account page on first start +* Bugfixes +## v0.5.2 -## v0.5.1 ## -* Videos open in full screen -* Youtube videos open in app -* Option to minimize #nsfw post -* Rotate image in messageSend component +* Redesign of news item +* Background sync for Android >8.0 +* Bugfixes -## v0.5 ## -* Redesign due to QML Components 1 being deprecated in Qt 5.12: Slideview for News, left Drawer for Settings, message creation in listview header -* Android Notifications for News, DMs, Replies -* Global app config separated from account config +## v0.5.1 +* Videos open in full screen +* Youtube videos open in app +* Option to minimize #nsfw post +* Rotate image in messageSend component -## v0.4 ## -* Background sync for friends timeline (interval on config page must be > 0) for Android > 5 -* Replies timeline -* Bugfix: App asks for storage permission on first start +## v0.5 +* Redesign due to QML Components 1 being deprecated in Qt 5.12: Slideview for News, left Drawer for Settings, message creation in listview header +* Android Notifications for News, DMs, Replies +* Global app config separated from account config -## v0.3.4 ## -* Direct message creation from profile page works again -* Profile image upload works again -* Viewing private album pictures of contacts works again -* On first start servername from https://dir.friendica.social/servers/surprise selected -* Register button opens webview of registration page on server +## v0.4 +* Background sync for friends timeline (interval on config page must be > 0) for Android > 5 +* Replies timeline +* Bugfix: App asks for storage permission on first start -## v0.3.3 ## -* Update for OpenSSL and At -* Experimental support for Peertube (links are expanded to video widget) -* Some Unicode emojis -* Redesign of contact details (click on contact opens in new stack and shows last news) +## v0.3.4 +* Direct message creation from profile page works again +* Profile image upload works again +* Viewing private album pictures of contacts works again +* On first start servername from https://dir.friendica.social/servers/surprise selected +* Register button opens webview of registration page on server -## v0.3.2 ## -* For news containing url ending with mp3, mp4, avi, webm, ogg: media can be played in app -* Pictures can be renamed or moved to another album -* Bugfix: random crashes for conversations -* Bugfix: attach image to message works again -* Bugfix: check for nickname on Server has been removed due to API change +## v0.3.3 +* Update for OpenSSL and At +* Experimental support for Peertube (links are expanded to video widget) +* Some Unicode emojis +* Redesign of contact details (click on contact opens in new stack and shows last news) -## v0.3.1 ## -* By popular demand: Conversations open in a new stack, like in Twidere -* Conversations open after (long) press on news, like in Twidere -* Image attachments are shown below text and can be enlarged, like in Twidere (solves issue #8) -* New messages are html, line breaks work (solves issue #7) +## v0.3.2 +* For news containing url ending with mp3, mp4, avi, webm, ogg: media can be played in app +* Pictures can be renamed or moved to another album +* Bugfix: random crashes for conversations +* Bugfix: attach image to message works again +* Bugfix: check for nickname on Server has been removed due to API change -## v0.3 ## -* Fix for [issue 6](https://github.com/LubuWest/Friendiqa/issues/6) -* Refactoring of news part -* Search button for news -* Click on hashtag in newsitem starts search for news with that word -* Public timeline -* Timeline for selected group -* Small redesign of SendMessage page +## v0.3.1 +* By popular demand: Conversations open in a new stack, like in Twidere +* Conversations open after (long) press on news, like in Twidere +* Image attachments are shown below text and can be enlarged, like in Twidere (solves issue #8) +* New messages are html, line breaks work (solves issue #7) -## v0.2.2 ## -* Fix for [issue 5](https://github.com/LubuWest/Friendiqa/issues/5) -* Link to list of public server on Config Tab -* Small redesign of SendMessage page -* Intents for texts/urls (Send text or url from everywhere to create message) +## v0.3 +* Fix for [issue 6](https://github.com/LubuWest/Friendiqa/issues/6) +* Refactoring of news part +* Search button for news +* Click on hashtag in newsitem starts search for news with that word +* Public timeline +* Timeline for selected group +* Small redesign of SendMessage page -## v0.2.1 ## -* Fix for [issue 4](https://github.com/LubuWest/Friendiqa/issues/4) -* Fix for Friendica [issue 4689](https://github.com/friendica/friendica/issues/4689) -* Long posts are automatically truncated -* Intents for pictures (Send one image from gallery: attach to message, send multiple images: upload to album) +## v0.2.2 +* Fix for [issue 5](https://github.com/LubuWest/Friendiqa/issues/5) +* Link to list of public server on Config Tab +* Small redesign of SendMessage page +* Intents for texts/urls (Send text or url from everywhere to create message) -## v0.2 ## -# News # -* Profile image download completely reworked, resulting in speed improvement +## v0.2.1 -# Contacts # -* New profile tab, data of public and private profiles shown -* Change profile picture -* For friends image button shows private images thanks to new remoteAuth API (Friendica 3.6 server required) --> private holiday pictures have finally arrived! -* For friends calendar button shows private events thanks to new remoteAuth API (Friendica 3.6 server required) -* News button for forum accounts shows news published via that forum +* Fix for [issue 4](https://github.com/LubuWest/Friendiqa/issues/4) +* Fix for Friendica [issue 4689](https://github.com/friendica/friendica/issues/4689) +* Long posts are automatically truncated +* Intents for pictures (Send one image from gallery: attach to message, send multiple images: upload to album) -# Images # -* Complete rework of image download, fixes bug with private images -* Download all or only new images +## v0.2 -# Config # -* Check if nickname exist on server -* Check if password is correct -* Account deletion now also removes news, image data and events from local db +# News -# Translations # -* Italian thanks to Davide de Prisco +* Profile image download completely reworked, resulting in speed improvement +# Contacts + +* New profile tab, data of public and private profiles shown +* Change profile picture +* For friends image button shows private images thanks to new remoteAuth API (Friendica 3.6 server required) --> private holiday pictures have finally arrived! +* For friends calendar button shows private events thanks to new remoteAuth API (Friendica 3.6 server required) +* News button for forum accounts shows news published via that forum + +# Images + +* Complete rework of image download, fixes bug with private images +* Download all or only new images + +# Config + +* Check if nickname exist on server +* Check if password is correct +* Account deletion now also removes news, image data and events from local db + +# Translations + +* Italian thanks to Davide de Prisco ## v0.1.2## -* FIX: Include openssl v1.0.2m for SSL connections in Android v7 and above +* FIX: Include openssl v1.0.2m for SSL connections in Android v7 and above ## v0.1.1## -* FIX: Spanish translation -* FIX: Empty Newsview after deletion of first newsitem +* FIX: Spanish translation +* FIX: Empty Newsview after deletion of first newsitem ## v0.1## -# News # +# News -* Native Android image selector for new message -* Click on contacts shows contact details on news page -* Fix problem with news list after deletion of item +* Native Android image selector for new message +* Click on contacts shows contact details on news page +* Fix problem with news list after deletion of item -# Contacts # -* Clean contacts with no news +# Contacts -# Images # -* Upload pictures with description to album (permissions cannot be set due to API problems) -* Delete pictures or albums from client and server (long press on picture in overview) -* Fix problem when enlarging photo +* Clean contacts with no news -# Translations # -* German, Spanish +# Images + +* Upload pictures with description to album (permissions cannot be set due to API problems) +* Delete pictures or albums from client and server (long press on picture in overview) +* Fix problem when enlarging photo + +# Translations + +* German, Spanish \ No newline at end of file diff --git a/README.md b/README.md index e1fd95d..9ce7ddc 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Currently supported: * Android notifications or Dbus notification (Linux) for new items in friends timeline, replies and DMs * Search for news * Click on hashtag in newsitem starts search for news with that word -* Click on image shows image fullscreen +* Only first photo attachment in post is shown, click for more images and fullscreen image * Click on video or youtube video shows video fullscreen * For news containing urls ending with mp3, mp4, avi, webm, ogg or to a Peertube instance: media can be played in the app * Open links in external browser @@ -36,7 +36,6 @@ Currently supported: * Update fetches new posts (up to last 50) since last in local DB * More shows older posts from local DB * Create new Message with images or direct messages, Contact/Group access rights (can be stored), smileys -* Hashtags are saved after message is sent and can be used in later messages * Send image from Android gallery * Send text or urls from other apps to Friendiqa * Native Android image dialog @@ -52,6 +51,7 @@ Currently supported: * Tabs for own profiles, friends, other contacts and groups * Show profile(s) of user and change profile picture * List of all known contacts with locally downloaded pictures +* Show follow requests; approve, deny, ignore requests * Additional information, last messages and other functionality shown in news tab * Show public and private pictures of contact (screenscraping of contact's website, works only with certain theme) * Show public and private events of contact @@ -96,7 +96,7 @@ Currently supported: * Multiple accounts * View mode for news (tree or timeline) * Maximum news (deleted after use of Quit button) -* Sync home timeline, replies, DM, Notify yes/no +* Sync home timeline, replies, DM, Events, friend requests; Notify yes/no * Hide #nsfw ToDo @@ -111,8 +111,8 @@ ToDo # Translations # -* German, Spanish, Italian -* 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/do pull request. +* 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. # Install # * F-Droid binary repository: [https://www.ma-nic.de/fdroid/repo](https://www.ma-nic.de/fdroid/repo) or for those who get the "error getting index file" from F-Droid client due to outdated crypto libraries the url without encryption: [http://www.ma-nic.de/fdroid/repo](http://www.ma-nic.de/fdroid/repo) To include repo in Fdroid: Open config --> package sources --> plus symbol --> paste url diff --git a/source-android/android/AndroidManifest.xml b/source-android/android/AndroidManifest.xml index 3bfe2cd..67fcf88 100644 --- a/source-android/android/AndroidManifest.xml +++ b/source-android/android/AndroidManifest.xml @@ -1,5 +1,5 @@ - + - + @@ -16,11 +16,13 @@ android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Friendiqa" android:extractNativeLibs="true" - android:requestLegacyExternalStorage="true" + android:icon="@drawable/friendiqa" android:theme="@android:style/Theme.Holo.Light" android:logo="@drawable/friendiqa"> - + diff --git a/source-android/android/arm/libcrypto_1_1.so b/source-android/android/arm/libcrypto_1_1.so old mode 100755 new mode 100644 diff --git a/source-android/android/arm/libssl_1_1.so b/source-android/android/arm/libssl_1_1.so old mode 100755 new mode 100644 diff --git a/source-android/android/arm64/libcrypto_1_1.so b/source-android/android/arm64/libcrypto_1_1.so old mode 100755 new mode 100644 diff --git a/source-android/android/arm64/libssl_1_1.so b/source-android/android/arm64/libssl_1_1.so old mode 100755 new mode 100644 diff --git a/source-android/android/gradle.properties b/source-android/android/gradle.properties index bedc041..82755ae 100644 --- a/source-android/android/gradle.properties +++ b/source-android/android/gradle.properties @@ -1,7 +1,4 @@ -# androidBuildToolsVersion=25.0.3 -# androidCompileSdkVersion=26 buildDir=.build -# qt5AndroidDir=/home/pankraz/Qt/5.11.1/android_armv7/src/android/java android.useAndroidX=true android.enableJetifier=true android.enforceUniquePackageName=false diff --git a/source-android/android/gradlew b/source-android/android/gradlew old mode 100755 new mode 100644 diff --git a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java index dabee61..ae44267 100644 --- a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java +++ b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java @@ -8,8 +8,6 @@ import java.util.HashMap; import android.content.pm.PackageManager; import android.content.Context; import android.Manifest.permission; -//import android.support.v4.app.ActivityCompat; -//import android.support.v4.content.ContextCompat; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; @@ -43,6 +41,7 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt //} else { System.loadLibrary("friendiqa_arm64-v8a"); + //System.loadLibrary("friendiqa_armeabi-v7a"); if((getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY)) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_NEW_TASK) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) || (getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED))) { SystemDispatcher.onActivityResume(); } else { @@ -94,6 +93,7 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt protected void onNewIntent(Intent data) { System.loadLibrary("friendiqa_arm64-v8a"); + //System.loadLibrary("friendiqa_armeabi-v7a"); super.onNewIntent(data); if ((data!=null) && (data.getType() != null) && !(data.getBooleanExtra("used",false))){ String type = data.getType(); diff --git a/source-android/androidnative.pri/java/src/androidnative/ImagePicker.java b/source-android/androidnative.pri/java/src/androidnative/ImagePicker.java index 48b0a90..9b9b0e5 100644 --- a/source-android/androidnative.pri/java/src/androidnative/ImagePicker.java +++ b/source-android/androidnative.pri/java/src/androidnative/ImagePicker.java @@ -112,7 +112,6 @@ public class ImagePicker { return; int requestCode = (Integer) message.get("requestCode"); Intent data = (Intent) message.get("data"); - if (requestCode == PICK_IMAGE_ACTION) { importImage(data); } else if (requestCode == TAKE_PHOTO_ACTION) { @@ -127,8 +126,8 @@ public class ImagePicker { static private void importImage(Intent data) { Uri uri = data.getData(); - Log.d(TAG,"importImage: uri:" + uri); - Log.d(TAG,"importImage: type: " + data.getType()); + //Log.d(TAG,"importImage: uri:" + uri); + //Log.d(TAG,"importImage: type: " + data.getType()); if (data.getClipData() != null) { importImageFromClipData(data); diff --git a/source-android/androidnative.pri/java/src/androidnative/SystemDispatcher.java b/source-android/androidnative.pri/java/src/androidnative/SystemDispatcher.java index a8f0015..616fce5 100644 --- a/source-android/androidnative.pri/java/src/androidnative/SystemDispatcher.java +++ b/source-android/androidnative.pri/java/src/androidnative/SystemDispatcher.java @@ -140,6 +140,7 @@ public class SystemDispatcher { waitingIntent=null; isIntentPending=false; } else { //onIntent start + Log.e(TAG,"notInitialized: onIntentStart "+data); message.put("text",data.getStringExtra(Intent.EXTRA_TEXT)); message.put("subject",data.getStringExtra(Intent.EXTRA_SUBJECT)); waitingIntent = message; diff --git a/source-android/common/friendiqa.cpp b/source-android/common/friendiqa.cpp index 96526ae..8193d70 100644 --- a/source-android/common/friendiqa.cpp +++ b/source-android/common/friendiqa.cpp @@ -67,13 +67,13 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) { } else{ QApplication app(argc, argv); - QQuickView view; + QQmlApplicationEngine view; //qDebug()<<"FriendiqaMain started"; QTranslator qtTranslator; qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations"); app.installTranslator(&qtTranslator); RemoteAuthAsyncImageProvider *imageProvider = new RemoteAuthAsyncImageProvider; - view.engine()->addImageProvider("remoteauthimage",imageProvider); + view.addImageProvider("remoteauthimage",imageProvider); view.rootContext()->setContextProperty("remoteauth", imageProvider); XHR* xhr = XHR::instance(); view.rootContext()->setContextProperty("xhr", xhr); @@ -83,8 +83,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) { view.rootContext()->setContextProperty("alarm", alarm); UPDATENEWS* updatenews = UPDATENEWS::instance(); view.rootContext()->setContextProperty("updatenews", updatenews); - view.setSource(QUrl("qrc:/qml/friendiqa.qml")); - view.show(); + view.load(QUrl("qrc:/qml/friendiqa.qml")); view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit())); return app.exec(); diff --git a/source-android/friendiqa.pro b/source-android/friendiqa.pro index c009772..40f7006 100644 --- a/source-android/friendiqa.pro +++ b/source-android/friendiqa.pro @@ -52,7 +52,8 @@ OTHER_FILES += qml/friendiqa.qml \ TRANSLATIONS += translations/friendiqa-de.ts \ translations/friendiqa-es.ts \ - translations/friendiqa-it.ts + translations/friendiqa-it.ts \ + translations/friendiqa-hu.ts HEADERS += \ common/uploadableimage.h \ @@ -85,5 +86,3 @@ DISTFILES += \ ANDROID_EXTRA_LIBS = $$PWD/android/arm/libcrypto_1_1.so $$PWD/android/arm/libssl_1_1.so $$PWD/android/arm64/libcrypto_1_1.so $$PWD/android/arm64/libssl_1_1.so -ANDROID_ABIS = arm64-v8a -android: include(/home/pankraz/git/android_openssl/openssl.pri) diff --git a/source-android/qml/friendiqa.qml b/source-android/qml/friendiqa.qml index 9f4955e..41558a7 100644 --- a/source-android/qml/friendiqa.qml +++ b/source-android/qml/friendiqa.qml @@ -36,47 +36,52 @@ import QtQuick.Controls 2.4 import QtQuick.Layouts 1.11 import "qrc:/js/news.js" as Newsjs import "qrc:/js/service.js" as Service +import "qrc:/qml/genericqml" -StackView{ +ApplicationWindow{ id:root + title: "Friendiqa" + property var globaloptions: Service.readGO(db) property QtObject osSettings: {var tmp=Qt.createComponent("qrc:/qml/configqml/OSSettingsAndroid.qml");return tmp.createObject(root)} - width: osSettings.appWidth - height:osSettings.appHeight + visible: true property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000] property var login: Service.readActiveConfig(db) - property var globaloptions: Service.readGO(db) + property real fontFactor: root.font.pixelSize/root.font.pointSize property var contactlist: [] property real mm: osSettings.osType=="Android"?Screen.pixelDensity:Screen.pixelDensity*1.5 - signal messageSignal(var friend) + property bool wideScreen : width>height signal fotoSignal(var username, var friend) signal directmessageSignal(var friend) signal newsSignal(var news) signal newstypeSignal(var type) signal friendsSignal(var username) signal contactdetailsSignal(var contact) + signal searchSignal (var searchterm) signal eventSignal(var contact) signal uploadSignal(var urls) signal sendtextSignal(var intenttext) signal changeimage(var method, var type, var id) signal updateSyncinterval(int interval) + signal replySignal(var newsobject) property var news:[] property var newContacts:[] + property var contactposts:[] //property string contactLoadType: "" property bool imagePicking: false - onLoginChanged:{ - if(login==""){root.push("qrc:/qml/configqml/AccountPage.qml")} - else{root.push(rootStackItem) + function onLoginChanged(login){ + if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")} + else{//rootstackView.push(rootstack) if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;} Newsjs.getCurrentContacts(login,db,function(contacts){ contactlist=contacts})} } - onNewContactsChanged:{ + function onNewContactsChanged(newContacts){ if(newContacts.length>0){// download contact images and update db var contacturls=[]; var contactnames=[]; - for (var link in newContacts){ + for (var link in newContacts){//print("new contact " +newContacts[link].screen_name); contacturls.push(newContacts[link].profile_image_url); contactnames.push(newContacts[link].screen_name); Service.updateContactInDB(login,db,newContacts[link].isFriend,newContacts[link]) @@ -91,9 +96,32 @@ StackView{ } + Connections { + target: root + function onWidthChanged(appWidth) { + if(osSettings.osType=="Linux" && Math.abs(appWidth-(globaloptions.appWidth||0))>50){ + Service.updateglobaloptions(db,"appWidth",appWidth) + } + } + } + Connections { + target: root + function onHeightChanged(appHeight) { + if(osSettings.osType=="Linux" && Math.abs(appHeight-(globaloptions.appHeight||0))>50){ + Service.updateglobaloptions(db,"appHeight",appHeight) + } + } + } + + + function showContact(contact){ //print(JSON.stringify(contact)); + rootstackView.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact}) + } + + Connections{ target:xhr - onDownloaded:{ + function onDownloaded(type,url,filename,i){ if(type=="contactlist"){ var database=LocalStorage.openDatabaseSync(root.db[0],root.db[1],root.db[2],root.db[3]); var result; @@ -104,10 +132,12 @@ StackView{ } } + FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"} - Keys.onReleased: {//print(event.key + "Backkey"+newstab.conversation.length+" "+root.depth) - if (event.key === osSettings.backKey) { + //Keys.onReleased: {//print(event.key + "Backkey"+newstab.conversation.length+" "+root.depth) + onClosing: { + //if (event.key === osSettings.backKey) { if (rootstack.currentIndex==0){ newstab.active=true; if (newstab.newstabstatus!=globaloptions.newsViewType){ @@ -119,278 +149,147 @@ StackView{ Newsjs.chatsfromdb(db,login.username,function(dbnews){ newsSignal(dbnews) })} + close.accepted=false; } - else if (newstab.conversation.length>0){newstab.conversation=[]} - else if (root.depth>1){root.pop()} - else{Service.cleanNews(root.db,function(){ - Service.cleanContacts(root.login,root.db,function(){ - Qt.quit()}) - })} + else if (newstab.conversation.length>0){ + newstab.conversation=[]; + close.accepted=false + } + else if (root.depth>1){ + root.pop(); + close.accepted=false + } + else{ + Service.cleanNews(root.db,function(){ + Service.cleanHashtags(root.db,function(){ + Service.cleanContacts(root.login,root.db,function(){ + Qt.quit()}) + })}) + close.accepted=true + } } else if (rootstack.currentIndex==2){fotoSignal("backButton")} else {rootstack.currentIndex=0} - event.accepted = true - }} - - Drawer{ - id: leftDrawer - width: 0.66* root.width - height: root.height - edge: Qt.LeftEdge - position: 1.0 - Column{ - x:mm - width:parent.width-mm - Label{ - text: login.hasOwnProperty("username")?login.username:"" - font.pixelSize: 4*mm - width: parent.width - height: 6*mm - } -// Label{ -// text:login.hasOwnProperty("server")?"@"+login.server:"" -// font.pixelSize: 5*mm -// width: parent.width -// } - - Label{ - text: "\uf021 " + qsTr("Refresh") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); -// newstypeSignal("refresh") - updatenews.setDatabase(); - updatenews.login(); - updatenews.startsync(); - } - } - } - - - Label{ - text: "\uf1da " + qsTr("Timeline") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("timeline") - } - } - } - - Label{ - text: "\uf086 " + qsTr("Conversations") - width: parent.width - font.pixelSize: 4*mm - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("conversation") - } - } - } - - Label{ - text: "\uf005 " + qsTr("Favorites") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("favorites") - } - } - } - Label{ - text: "\uf0ec " + qsTr("Replies") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("replies") - } - } - } - - - Label{ - text: "\uf0ac " + qsTr("Public Timeline") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("publictimeline") - } - } - } - - Label{ - text: "\uf0c0 " + qsTr("Group news") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("groupnews") - } - } - } - - Label{ - text: "\uf002 " + qsTr("Search") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("search") - } - } - } - - Label{ - text: "\uf085 "+ qsTr("Settings") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked: {root.push("qrc:qml/configqml/ConfigPage.qml"); - leftDrawer.close() - } - } - } - Label{ - text: "\uf2bb " + qsTr("Accounts") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked: {root.push("qrc:qml/configqml/AccountPage.qml"); - leftDrawer.close() - } - } - } - - Label{ - text: "\uf08b " +qsTr("Quit") - font.pixelSize: 4*mm - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - Service.cleanNews(root.db,function(){ - Service.cleanContacts(root.login,root.db,function(){ - Qt.quit()}) - }) - } - } - } - - } + //event.accepted = true + //} } - Item{ - id:rootStackItem - width:parent.width - height: parent.height - //anchors.fill:parent - states: State { - name: "fullscreen"; - PropertyChanges { target: bar; height:0 } - PropertyChanges { target: rootstack; height:parent.height } - } - transitions: Transition { - PropertyAnimation { properties: "height"; - easing.type: Easing.InOutQuad - duration: 1000 + + + footer:ToolBar{ + //position: ToolBar.Footer + background: Rectangle{ + anchors.fill: parent + color: "#EEEEEE"//"#F8F8F8" + } + //RowLayout{ + // anchors.fill: parent + + TabBar { + id: bar + width:parent.width + // Layout.fillWidth: true + //width: wideScreen?contentWidth:parent.width-10*mm + //x: 7*mm + onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex + TabButton { + text: "\uf03a" + font.pointSize: osSettings.bigFontSize + background:Rectangle{ + anchors.fill: parent + color: "#EEEEEE" + } + } + TabButton { + text: "\uf0c0" + font.pointSize: osSettings.bigFontSize + background:Rectangle{ + anchors.fill: parent + color: "#EEEEEE" + } + } + TabButton { + text: "\uf03e" + font.pointSize: osSettings.bigFontSize + background:Rectangle{ + anchors.fill: parent + color: "#EEEEEE" + } + } + TabButton { + text: "\uf073" + font.pointSize: osSettings.bigFontSize + background:Rectangle{ + anchors.fill: parent + color: "#EEEEEE" + } + } } - } - TabBar { - id: bar - width: parent.width - height: 7*mm - position:TabBar.Footer - anchors.top: rootstack.bottom - onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex - TabButton { - text: "\uf03a" - font.pixelSize: 3*mm - height: 6*mm - } - TabButton { - text: "\uf0c0" - font.pixelSize: 3*mm - height: 6*mm - } - TabButton { - text: "\uf03e" - font.pixelSize: 3*mm - height: 6*mm - } + // } + } - TabButton { - text: "\uf073" - font.pixelSize: 3*mm - height: 6*mm - } - } - StackLayout{ + + // states: State { + // name: "fullscreen"; + // PropertyChanges { target: bar; height:0 } + // PropertyChanges { target: rootstack; height:parent.height } + // } + + // transitions: Transition { + // PropertyAnimation { properties: "height"; + // easing.type: Easing.InOutQuad + // duration: 1000 + // } + // } + StackView{id:rootstackView + width:root.width + height: root.height + initialItem: StackLayout{ id:rootstack - width:parent.width - height: parent.height-7*mm + width:rootstackView.width + height: rootstackView.height//-7*mm + //y:wideScreen?7*mm:0 currentIndex:bar.currentIndex - Loader{ id: newstab Layout.fillWidth:true Layout.fillHeight: true property string newstabstatus property var conversation:[] - property var contactposts:[] + source:(rootstack.currentIndex==0)? "qrc:/qml/newsqml/NewsTab.qml":"" } Loader{ id: friendstab - Layout.fillWidth:true - Layout.fillHeight: true + // Layout.fillWidth:true + // Layout.fillHeight: true source: (rootstack.currentIndex==1)?"qrc:/qml/contactqml/FriendsTab.qml":"" } Loader{ id: fotostab property string phototabstatus:"Images" - Layout.fillWidth:true - Layout.fillHeight: true + // Layout.fillWidth:true + // Layout.fillHeight: true source: (rootstack.currentIndex==2)?"qrc:/qml/photoqml/PhotoTab.qml":"" } Loader{ id: calendartab property string calendartabstatus:"Events" - Layout.fillWidth:true - Layout.fillHeight: true + // Layout.fillWidth:true + // Layout.fillHeight: true source: (rootstack.currentIndex==3)?"qrc:/qml/calendarqml/CalendarTab.qml":"" } - } + } + //} Component.onCompleted: { - forceActiveFocus(); - //print(xhr.networktype()); + onLoginChanged(login); + globaloptions=Service.readGO(db); + //forceActiveFocus(); if(osSettings.osType=="Android"){ var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml"); var IntentReceiverQml = component.createObject(root); @@ -400,5 +299,5 @@ StackView{ var LinuxSyncQml = component.createObject(root); } } -} + //} } diff --git a/source-linux/CMakeLists.txt b/source-linux/CMakeLists.txt new file mode 100644 index 0000000..5569c2d --- /dev/null +++ b/source-linux/CMakeLists.txt @@ -0,0 +1,47 @@ +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) + +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/alarmlinux.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) diff --git a/source-linux/application.qrc b/source-linux/application.qrc index c4d4cd8..091eb8a 100644 --- a/source-linux/application.qrc +++ b/source-linux/application.qrc @@ -19,7 +19,6 @@ qml/contactqml/FriendsTab.qml qml/contactqml/GroupComponent.qml qml/contactqml/ProfileComponent.qml - qml/contactqml/ContactDetailsComponent.qml qml/contactqml/Contactlist.qml qml/photoqml/PhotoComponent.qml qml/photoqml/PhotogroupComponent.qml @@ -237,6 +236,16 @@ common/xhr.cpp common/xhr.h qml/newsqml/MoreComments.qml - common/filesystemandroid.cpp + qml/newsqml/NewsPhotolist.qml + qml/genericqml/DrawerAccountComponent.qml + qml/configqml/LeftDrawerScrollview.qml + qml/genericqml/LeftDrawerLinux.qml + qml/genericqml/LeftDrawerAndroid.qml + qml/genericqml/DrawerAccountComponentContacts.qml + qml/contactqml/ProfileTab.qml + qml/contactqml/FriendsListTab.qml + qml/contactqml/ContactsListTab.qml + qml/contactqml/GroupsListTab.qml + qml/calendarqml/EventListItem.qml diff --git a/source-linux/common/alarm.h b/source-linux/common/alarm.h index 9d35fd0..9edea0b 100644 --- a/source-linux/common/alarm.h +++ b/source-linux/common/alarm.h @@ -40,7 +40,6 @@ class ALARM : public QObject //Q_PROPERTY(int alarmtime READ alarmtime WRITE setAlarm NOTIFY alarmChanged) public: static ALARM *instance(); - explicit ALARM(QObject *parent = 0); //int alarmtime() const; diff --git a/source-linux/common/friendiqa.cpp b/source-linux/common/friendiqa.cpp index 52ef822..794697c 100644 --- a/source-linux/common/friendiqa.cpp +++ b/source-linux/common/friendiqa.cpp @@ -31,7 +31,7 @@ #include #include -#include +//#include //#include //#include #include @@ -39,7 +39,7 @@ #include "updatenews.h" #include "filesystem.h" #include "remoteauthasyncimageprovider.h" -//#include "alarm.h" +#include "alarm.h" //#include "AndroidNative/systemdispatcher.h" //#include "AndroidNative/environment.h" //#include "AndroidNative/debug.h" @@ -73,15 +73,16 @@ int main(int argc, char *argv[]) { //return app.exec(); } else{ - QtWebEngine::initialize(); + //QtWebEngine::initialize(); QApplication app(argc, argv); - QQuickView view; - view.setResizeMode(QQuickView::SizeRootObjectToView); + QQmlApplicationEngine view; + //QQuickView view; + //view.setResizeMode(QQuickView::SizeRootObjectToView); QTranslator qtTranslator; qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations"); app.installTranslator(&qtTranslator); RemoteAuthAsyncImageProvider *imageProvider = new RemoteAuthAsyncImageProvider; - view.engine()->addImageProvider("remoteauthimage",imageProvider); + view.addImageProvider("remoteauthimage",imageProvider); view.rootContext()->setContextProperty("remoteauth", imageProvider); XHR* xhr = XHR::instance(); view.rootContext()->setContextProperty("xhr", xhr); @@ -92,8 +93,8 @@ int main(int argc, char *argv[]) { UPDATENEWS* updatenews = UPDATENEWS::instance(); view.rootContext()->setContextProperty("updatenews", updatenews); - view.setSource(QUrl("qrc:/qml/friendiqa.qml")); - view.show(); + view.load(QUrl("qrc:/qml/friendiqa.qml")); + //view.show(); view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit())); return app.exec(); } diff --git a/source-linux/common/updatenews.cpp b/source-linux/common/updatenews.cpp index 5441f10..77d607a 100644 --- a/source-linux/common/updatenews.cpp +++ b/source-linux/common/updatenews.cpp @@ -61,11 +61,11 @@ UPDATENEWS::UPDATENEWS(QObject *parent) : QObject(parent) void UPDATENEWS::setUrl(QString url) { - if (url!=m_url) { - m_url = url; - xhr.setUrl(url); - emit urlChanged(m_url); - } + if (url!=m_url) { + m_url = url; + xhr.setUrl(url); + emit urlChanged(m_url); + } } @@ -77,10 +77,10 @@ void UPDATENEWS::setDatabase() m_db.setDatabaseName(QUrl("file://"+db_url+".sqlite").toLocalFile()); //qDebug() << db_url; - if (!m_db.open()) - { - qDebug() << "Error: connection with database fail " << m_db.lastError(); - } + if (!m_db.open()) + { + qDebug() << "Error: connection with database fail " << m_db.lastError(); + } } @@ -89,23 +89,23 @@ void UPDATENEWS::login() QSqlQuery query("SELECT * FROM config WHERE isActive=0",m_db); while (query.next()) { - 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(); + 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(); } - //m_updateInterval=query.value(5).toInt(); + //m_updateInterval=query.value(5).toInt(); QSqlQuery syncquery("SELECT * FROM globaloptions",m_db); -// QSqlQuery delquery("DELETE FROM globaloptions WHERE k='sync_interval'",m_db); -// delquery.exec(); + // QSqlQuery delquery("DELETE FROM globaloptions WHERE k='sync_interval'",m_db); + // delquery.exec(); m_updateInterval=0; syncindex=0; synclist.clear(); @@ -136,33 +136,35 @@ void UPDATENEWS::login() void UPDATENEWS::startsync() { qDebug()<<"Friendiqa start syncing "<

"+newsitem["friendica_html"].toString(); query.bindValue(11, friendicaHtml.toUtf8().toBase64());} else{query.bindValue(11, newsitem["friendica_html"].toString().toUtf8().toBase64());} - query.bindValue(12, newsitem["statusnet_conversation_id"].toInt()); + if (newsitem["statusnet_conversation_id"].isDouble()){ + query.bindValue(12, newsitem["statusnet_conversation_id"].toInt()); + }else{query.bindValue(12, newsitem["statusnet_conversation_id"].toString());} QJsonArray likeArray;QJsonArray dislikeArray;QJsonArray attendyesArray;QJsonArray attendnoArray;QJsonArray attendmaybeArray; if (newsitem.toObject().contains("friendica_activities")){ for (int a=0; a < newsitem["friendica_activities"]["like"].toArray().count();a++){ @@ -310,7 +327,7 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname) for (int e = 0; e < newsitem["friendica_activities"]["attendmaybe"].toArray().count();e++){ attendmaybeArray.append(newsitem["friendica_activities"]["attendmaybe"][e]["url"].toString()); } - } + } QJsonArray friendica_activities; friendica_activities={likeArray,dislikeArray,attendyesArray,attendnoArray,attendmaybeArray}; QJsonDocument activities; activities.setArray(friendica_activities); query.bindValue(13,activities.toJson(QJsonDocument::Compact).toBase64()); @@ -326,7 +343,7 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname) query.bindValue(16, newsitem["friendica_author"]["url"]); }else { query.bindValue(16, newsitem["user"]["url"]); - } + } if (apiname=="/api/statuses/replies"){ query.bindValue(1,"3"); @@ -382,7 +399,7 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname) QList newcontacts=findNewContacts(news); if (newcontacts.size()>0){ updateContacts(newcontacts); - startImagedownload(); + startImagedownload("contactlist"); } else { if(m_updateInterval!=0){ @@ -404,6 +421,7 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname) void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index){ + //qDebug()<< "update Imagelocation " << downloadtype << " " << imageurl << " " << filename; if (downloadtype=="contactlist"){ QSqlQuery testquery("SELECT profile_image FROM contacts WHERE profile_image_url ='"+imageurl+ "' AND username = '" +username+"'",m_db); testquery.first(); @@ -413,6 +431,22 @@ void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QStr newcontactnames.clear(); newcontactimagelinks.clear(); if(m_updateInterval!=0){ + qDebug()<< "contactdownload finished!"; + syncindex+=1; + startsync(); + } + } + } + else if (downloadtype=="friendrequests"){ + QSqlQuery testquery("SELECT avatar_static FROM friendshiprequests WHERE avatar ='"+imageurl+ "' AND username = '" +username+"'",m_db); + testquery.first(); + QSqlQuery query("UPDATE friendshiprequests SET avatar_static='"+ filename +"' WHERE avatar ='"+imageurl+ "' AND username = '" +username+"'",m_db); + if(!(query.exec())) {qDebug()<< "update friendrequests Imagelocation " << query.lastError();} + if (index==(newcontactnames.length()-1)){ + newcontactnames.clear(); + newcontactimagelinks.clear(); + if(m_updateInterval!=0){ + qDebug()<< "friendrequests finished!"; syncindex+=1; startsync(); } @@ -421,6 +455,7 @@ void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QStr } QJsonObject UPDATENEWS::findNotificationContact(QString contacturl){ + //qDebug()<< "findNotificationContact "< UPDATENEWS::findNewContacts(QJsonDocument news){ //main contacts if (news[i].toObject().contains("sender") ){ if(imageurls.contains(news[i]["sender"]["profile_image_url"].toString().section('?',0,0)) || newcontactimagelinks.contains(news[i]["sender"]["profile_image_url"].toString().section('?',0,0))){ - } + } else{ newcontacts.append(news[i]["sender"]); newcontactimagelinks.append(news[i]["sender"]["profile_image_url"].toString().section('?',0,0)); @@ -462,7 +497,7 @@ QList UPDATENEWS::findNewContacts(QJsonDocument news){ if (news[i].toObject().contains("friendica_activities") ){ for (int a=0; a < news[i]["friendica_activities"]["like"].toArray().count();a++){ if(imageurls.contains(news[i]["friendica_activities"]["like"][a]["profile_image_url"].toString().section('?',0,0)) || newcontactimagelinks.contains(news[i]["friendica_activities"]["like"][a]["profile_image_url"].toString().section('?',0,0))){ - } + } else{ newcontacts.append(news[i]["friendica_activities"]["like"][a]); newcontactimagelinks.append(news[i]["friendica_activities"]["like"][a]["profile_image_url"].toString().section('?',0,0)); @@ -471,7 +506,7 @@ QList UPDATENEWS::findNewContacts(QJsonDocument news){ } for (int b=0; b < news[i]["friendica_activities"]["dislike"].toArray().count();b++){ if(imageurls.contains(news[i]["friendica_activities"]["dislike"][b]["profile_image_url"].toString().section('?',0,0)) || newcontactimagelinks.contains(news[i]["friendica_activities"]["dislike"][b]["profile_image_url"].toString().section('?',0,0))){ - } + } else{ newcontacts.append(news[i]["friendica_activities"]["dislike"][b]); newcontactimagelinks.append(news[i]["friendica_activities"]["dislike"][b]["profile_image_url"].toString().section('?',0,0)); @@ -482,13 +517,13 @@ QList UPDATENEWS::findNewContacts(QJsonDocument news){ //owner contacts if (news[i].toObject().contains("friendica_author") ){ if(imageurls.contains(news[i]["friendica_author"]["profile_image_url"].toString().section('?',0,0)) || newcontactimagelinks.contains(news[i]["friendica_owner"]["profile_image_url"].toString().section('?',0,0))){ - } + } else{ newcontacts.append(news[i]["friendica_author"]); newcontactimagelinks.append(news[i]["friendica_author"]["profile_image_url"].toString().section('?',0,0)); newcontactnames.append(news[i]["friendica_author"]["screen_name"].toString()); } - } + } } return newcontacts; } @@ -585,9 +620,110 @@ void UPDATENEWS::updateContacts(QList contacts){ } } +void UPDATENEWS::storeFriendrequests(QByteArray serverreply,QString apiname) +{ if (apiname!=m_api || xhr.downloadtype()!=""){} else { + QJsonDocument friendrequests; + QJsonParseError jsonerror; + friendrequests=QJsonDocument::fromJson(serverreply,&jsonerror); + if (friendrequests.isArray()){ + + QSqlQuery imagequery("SELECT avatar FROM friendshiprequests",m_db); + QList imageurls; + while (imagequery.next()){ + imageurls.append(imagequery.value(0).toString()); + } + + for (int i=0; i < friendrequests.array().count();i++){ + QJsonValue friendrequestitem=friendrequests[i]; + try{ + QSqlQuery testquery("SELECT url FROM friendshiprequests WHERE username='"+ username +"' AND url='" + friendrequestitem["url"].toString() +"'",m_db); + QSqlQuery query(m_db); + if (testquery.first()){ + query.prepare("UPDATE friendshiprequests SET id=?, usernamef=?, acct=?, display_name=?,locked=?," + "bot=?, discoverable=?, groupf=?, created_at=?," + "note=?, avatar=?, header=?, header_static=?, followers_count=?," + "following_count=?, statuses_count=?, last_status_at=?, emojis=?, fields=? " + " WHERE username='"+ username +"' AND url='" + friendrequestitem["url"].toString() +"'"); + + query.bindValue(0, friendrequestitem["id"].toInt()); + query.bindValue(1, friendrequestitem["username"]); + query.bindValue(2, friendrequestitem["acct"]); + query.bindValue(3, friendrequestitem["display_name"].toString().toUtf8().toBase64()); + query.bindValue(4, friendrequestitem["locked"].toBool()); + query.bindValue(5, friendrequestitem["bot"].toBool()); + query.bindValue(6, friendrequestitem["discoverable"].toBool()); + query.bindValue(7, friendrequestitem["group"].toBool()); + query.bindValue(8, QDateTime::fromString(friendrequestitem["created_at"].toString(),Qt::ISODate).toMSecsSinceEpoch() ); + query.bindValue(9, friendrequestitem["note"].toString().toUtf8().toBase64()); + query.bindValue(10, friendrequestitem["avatar"]); + query.bindValue(11, friendrequestitem["header"]); + query.bindValue(12, friendrequestitem["header_static"]); + query.bindValue(13, friendrequestitem["followers_count"].toInt()); + query.bindValue(14, friendrequestitem["following_count"].toInt()); + query.bindValue(15, friendrequestitem["statuses_count"].toInt()); + query.bindValue(16, QDateTime::fromString(friendrequestitem["last_status_at"].toString(),Qt::ISODate).toMSecsSinceEpoch() ); + query.bindValue(17, friendrequestitem["emojis"].toString().toUtf8().toBase64()); + query.bindValue(18, friendrequestitem["fields"].toString().toUtf8().toBase64()); + } + else{ + + query.prepare("INSERT INTO friendshiprequests (username, id, usernamef, acct, display_name, locked," + " created_at, followers_count, following_count, statuses_count, note, url, avatar, avatar_static, " + "header, header_static, emojis, moved, fields, bot, groupf, discoverable, last_status_at) " + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + query.bindValue(0, username); + query.bindValue(1, friendrequestitem["id"].toInt()); + query.bindValue(2, friendrequestitem["username"].toString()); + query.bindValue(3, friendrequestitem["acct"].toString()); + query.bindValue(4, friendrequestitem["display_name"].toString().toUtf8().toBase64()); + query.bindValue(5, friendrequestitem["locked"].toBool()); + query.bindValue(6, QDateTime::fromString(friendrequestitem["created_at"].toString(),Qt::ISODate).toMSecsSinceEpoch()); + query.bindValue(7, friendrequestitem["followers_count"].toInt()); + query.bindValue(8, friendrequestitem["following_count"].toInt()); + query.bindValue(9, friendrequestitem["statuses_count"].toInt()); + query.bindValue(10, friendrequestitem["note"].toString().toUtf8().toBase64()); + query.bindValue(11, friendrequestitem["url"].toString()); + query.bindValue(12, friendrequestitem["avatar"].toString()); + query.bindValue(13, ""); + query.bindValue(14, friendrequestitem["header"].toString()); + query.bindValue(15, friendrequestitem["header_static"].toString()); + query.bindValue(16, friendrequestitem["emojis"].toString().toUtf8().toBase64()); + query.bindValue(17, "false"); + query.bindValue(18, friendrequestitem["fields"].toString().toUtf8().toBase64()); + query.bindValue(19, friendrequestitem["bot"].toBool()); + query.bindValue(20, friendrequestitem["group"].toBool()); + query.bindValue(21, friendrequestitem["discoverable"].toBool()); + query.bindValue(22, QDateTime::fromString(friendrequestitem["last_status_at"].toString(),Qt::ISODate).toMSecsSinceEpoch()); + + if(notifylist.contains("notify_FriendRequests")){ + alarm.notify("Friend Request: "+ friendrequestitem["acct"].toString(),friendrequestitem["note"].toString(),0); + } + + } + if(!(query.exec())) {qDebug()<< "friendrequestitem error " << query.lastError() << " " << query.lastQuery();} + } catch(...){ + qDebug() << "Friendiqasync Error inserting friendrequestitem" << friendrequestitem["acct"] << " " ; + } + + if(imageurls.contains(friendrequestitem["avatar"].toString() )){ + } + else{ + newcontactimagelinks.append(friendrequestitem["avatar"].toString()); + newcontactnames.append(friendrequestitem["username"].toString()); + } + + } + if (newcontactimagelinks.length()>0){ + qDebug() << "start Friendrequests imagedownload"; + startImagedownload("friendrequests"); + } + } + } + QObject::disconnect(&xhr,SIGNAL(success(QByteArray,QString)),this,SLOT(storeFriendrequests(QByteArray,QString))); +} void UPDATENEWS::storeEvents(QByteArray serverreply,QString apiname) -{ if (apiname!=m_api || xhr.downloadtype()!=""){} else { +{ if (apiname!=m_api || xhr.downloadtype()!=""){} else { QJsonDocument events; QJsonParseError jsonerror; events=QJsonDocument::fromJson(serverreply,&jsonerror); @@ -616,18 +752,18 @@ void UPDATENEWS::storeEvents(QByteArray serverreply,QString apiname) QJsonDocument permissionDocument; permissionDocument.setArray(permissions); query.bindValue(13,permissionDocument.toJson(QJsonDocument::Compact)); if(!(query.exec())) {qDebug()<< "store events " << query.lastError();} - } catch(...){ - qDebug() << "Friendiqasync Error event" << eventitem["name"]; - } + } catch(...){ + qDebug() << "Friendiqasync Error event" << eventitem["name"]; + } } - emit this->success(m_api); + emit this->success(m_api); } } if(notifylist.contains("notify_Events")){ QSqlQuery eventnotifyquery("SELECT start,title FROM events WHERE (start BETWEEN " + QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch()) + " AND "+QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch()+(m_updateInterval*60*1000))+") AND username='"+ username +"'",m_db); - while (eventnotifyquery.next()) { - alarm.notify("Event: "+ QDateTime::fromMSecsSinceEpoch(eventnotifyquery.value(0).toLongLong()).toString("dd.MM.yyyy hh:mm"),eventnotifyquery.value(1).toString(),1); - } + while (eventnotifyquery.next()) { + alarm.notify("Event: "+ QDateTime::fromMSecsSinceEpoch(eventnotifyquery.value(0).toLongLong()).toString("dd.MM.yyyy hh:mm"),eventnotifyquery.value(1).toString(),1); + } } if(m_updateInterval!=0){ syncindex+=1; @@ -641,9 +777,9 @@ QString UPDATENEWS::url() const return m_url; } -void UPDATENEWS::startImagedownload() +void UPDATENEWS::startImagedownload(QString downloadtype) { - xhr.setDownloadtype("contactlist"); + xhr.setDownloadtype(downloadtype ); xhr.setFilelist(newcontactimagelinks); xhr.setContactlist(newcontactnames); xhr.setImagedir(m_imagedir); diff --git a/source-linux/common/updatenews.h b/source-linux/common/updatenews.h index b44b558..4fe6741 100644 --- a/source-linux/common/updatenews.h +++ b/source-linux/common/updatenews.h @@ -68,11 +68,13 @@ public slots: void startsync(); void directmessages(); void notifications(); + void friendrequests(); void events(); //void startservice(QString type,QVariantMap map); - void startImagedownload(); + void startImagedownload(QString downloadtype); void updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index); void store(QByteArray serverreply,QString apiname); + void storeFriendrequests(QByteArray serverreply,QString apiname); void storeEvents(QByteArray serverreply,QString apiname); void showError(QString data, QString url,QString api, int code); diff --git a/source-linux/common/xhr.cpp b/source-linux/common/xhr.cpp index d098037..27b31d6 100644 --- a/source-linux/common/xhr.cpp +++ b/source-linux/common/xhr.cpp @@ -218,7 +218,7 @@ void XHR::getlist() { if(dlindex < m_filelist.size()) { QString cleanfilename; - if (m_downloadtype=="contactlist"){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::setUrl(m_filelist.at(dlindex));} else { @@ -329,7 +329,7 @@ void XHR::onRequestFinished() buffer.clear(); file.close(); emit this->downloaded(m_downloadtype,m_url,m_filename,dlindex); - if(downloadtype()=="contactlist"){dlindex=dlindex+1;XHR::getlist();} + if(downloadtype()=="contactlist" || downloadtype()=="friendrequests"){dlindex=dlindex+1;XHR::getlist();} //reply->deleteLater(); } diff --git a/source-linux/js/helper.js b/source-linux/js/helper.js index c69d524..e22ccbe 100644 --- a/source-linux/js/helper.js +++ b/source-linux/js/helper.js @@ -60,12 +60,12 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) { } else if(xhrequest.readyState === XMLHttpRequest.DONE) { try{ if (xhrequest.responseText!=""){ callback(xhrequest.responseText) - }else{ + }else{print("API:\n" +api+" NO RESPONSE"); showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow) callback(xhrequest.responseText) } } - catch (e){showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)} + catch (e){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)); @@ -166,6 +166,20 @@ var where = " AND "+ filter +" = '" + filtervalue+"'"; }); } + +function deleteData(database,table, username, callback,filter,filtervalue) { // reads and applies data from DB +if (filter){ +var where = " AND "+ filter +" = '" + filtervalue+"'"; +} else { var where="";} + var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); + if(!db) { return; } + db.transaction( function(tx) { + var rsArray=[]; + var rs = tx.executeSql('DELETE from '+table+' WHERE username="'+username+'"'+where); + callback(); + }); +} + function showMessage(header,message,rootwindow){//print(message); var cleanmessage=message.replace(/"/g,"-"); if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'} diff --git a/source-linux/js/image.js b/source-linux/js/image.js index 2a5fdb0..b05bf08 100644 --- a/source-linux/js/image.js +++ b/source-linux/js/image.js @@ -177,7 +177,7 @@ function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){//prin //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) + 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)}) diff --git a/source-linux/js/news.js b/source-linux/js/news.js index 637449c..fd3524c 100644 --- a/source-linux/js/news.js +++ b/source-linux/js/news.js @@ -334,7 +334,7 @@ function favorite(login,favorited,newsid,rootwindow){ } function likerequest(login,database,verb,newsid,rootwindow){ - Helperjs.friendicaPostRequest(login,"/api/friendica/activity/"+verb+"?id="+newsid, "","POST",rootwindow,function (obj){ + Helperjs.friendicaPostRequest(login,"/api/friendica/activity/"+verb+"?id="+newsid, "","POST",rootwindow,function (obj){print("like "+ obj); if (obj=='"ok"'){ var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); db.transaction( function(tx) { @@ -461,14 +461,16 @@ function chatsfromdb(database,login,messagetype,callback,stop_time){ helpernews.currentconversation=[]; for (var h = 0;h-1){ @@ -112,11 +113,11 @@ function beautify(newsitemobject,msg){ var ythelper={mimetype:"video/youtube"} ythelper.url=yttext.substring(ythelperstringposition+8,ytposend); yttext=yttext.substring(ytposend,yttext.length); - if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ythelper.url)){attachmentList.push(ythelper)} + if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=ythelper.url)){videoAttachmentList.push(ythelper)} } } - newsitemobject.attachmentList=attachmentList; - + newsitemobject.videoAttachmentList=videoAttachmentList; + newsitemobject.imageAttachmentList=imageAttachmentList; if ((msg.options.hasOwnProperty("hide_nsfw"))&&(msg.options.hide_nsfw==1)&&(newsitemobject.text.indexOf("#nsfw")>-1)){ newsitemobject.nsfw=true } else{newsitemobject.nsfw=false} @@ -152,9 +153,9 @@ else{ if (j==0){newsitemobject.indent=0}else{ for (var k=msg.model.count-1;k>-1;k--){ if (newsitemobject.in_reply_to_status_id==msg.model.get(k).newsitemobject.id){ - newsitemobject.indent=msg.model.get(k).newsitemobject.indent+1; + newsitemobject.indent=(msg.model.get(k).newsitemobject.indent||0)+1; if (newsitemobject.indent>6){newsitemobject.indent=6}; - break} + } } }} diff --git a/source-linux/js/service.js b/source-linux/js/service.js index 2c71591..b15338b 100644 --- a/source-linux/js/service.js +++ b/source-linux/js/service.js @@ -46,7 +46,7 @@ function initDatabase(database) { // initialize the database object tx.executeSql('CREATE TABLE IF NOT EXISTS news(username TEXT, messagetype INT, text TEXT, created_at INT, in_reply_to_status_id INT, source TEXT, status_id INT, in_reply_to_user_id INT, geo TEXT,favorited TEXT, uid INT, statusnet_html TEXT, statusnet_conversation_id TEXT,friendica_activities TEXT, friendica_activities_self TEXT, attachments TEXT, friendica_owner TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS contacts(username TEXT, id INT, name TEXT, screen_name TEXT, location TEXT,imageAge INT, profile_image_url TEXT, description TEXT, profile_image BLOB, url TEXT, protected TEXT, followers_count INT, friends_count INT, created_at INT, favourites_count TEXT, utc_offset TEXT, time_zone TEXT, statuses_count INT, following TEXT, verified TEXT, statusnet_blocking TEXT, notifications TEXT, statusnet_profile_url TEXT, cid INT, network TEXT, isFriend INT, timestamp INT)'); // tx.executeSql('CREATE INDEX IF NOT EXISTS contact_id ON contacts(id)'); - tx.executeSql('CREATE TABLE IF NOT EXISTS profiles(username TEXT, id INT, profiledata TEXT)'); + tx.executeSql('CREATE TABLE IF NOT EXISTS profiles(username TEXT, id INT, profiledata TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS groups(username TEXT, groupname TEXT, gid INT, members TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS events(username TEXT, id INT, start INT, end INT, allday INT, title TEXT, j INT, d TEXT, isFirst INT, uid INT, cid INT, uri TEXT, created INT, edited INT, desc TEXT, location TEXT, type TEXT, nofinish TEXT, adjust INT, ignore INT, permissions TEXT, guid INT, itemid INT, plink TEXT, authorName TEXT, authorAvatar TEXT, authorLink TEXT, html TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS globaloptions(k TEXT, v TEXT)'); @@ -277,10 +277,12 @@ try {Helperjs.friendicaRequest(login,"/api/statusnet/config",rootwindow, functio function readConfig(database,callback,filter,filtervalue) { // reads config 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)); db.transaction( function(tx) { var tables = tx.executeSql("SELECT * FROM sqlite_master WHERE type='table'"); if (tables.rows.length==0){print("no database");callback("")} else { + var rs = tx.executeSql('select * from config'+where); var rsArray=[]; if (rs.rows.length>0){ @@ -289,11 +291,29 @@ function readConfig(database,callback,filter,filtervalue) { // reads config } 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,permissions:JSON.parse(rsArray[0].permissions),maxContactAge:rsArray[0].maxContactAge,APIVersion:rsArray[0].APIVersion,addons:rsArray[0].addons}; if (rsObject.newsViewType!="" && rsObject.newsViewType!=null){updateNewsviewtype(database,rsObject.newsViewType)} - } else {var rsObject=""} + } else {print("config empty");var rsObject=""} callback(rsObject)}} ) } +function readAllLogins(database,callback) { // reads config + var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3],initDatabase(database)); + db.transaction( function(tx) { + var tables = tx.executeSql("SELECT * FROM sqlite_master WHERE type='table'"); + if (tables.rows.length==0){print("no database");callback("")} else { + var rs = tx.executeSql('select * from config'); + var rsArray=[]; + 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)} + ) +} + function readActiveConfig(database){ var obj=""; readConfig(database,function(config){obj=config},"isActive", 0); @@ -312,7 +332,7 @@ function readGlobaloptions(database,callback){ var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var go=({}); db.transaction( function(tx) { - var rs = tx.executeSql('select * from globaloptions'); + var rs = tx.executeSql('select * from globaloptions'); for (var r=0; r

"+newslist[n].friendica_html;} - else{newslist[n].statusnet_html=newslist[n].friendica_html} + if (newslist[n]!=null){ + newslist[n].created_at=Date.parse(Newsjs.cleanDate(newslist[n].created_at)); + if (api=="/api/statuses/replies"){newslist[n].messagetype=3}else{newslist[n].messagetype=0;} + newslist[n].friendica_author=cleanUser(newslist[n].friendica_author); + newslist[n].user=cleanUser(newslist[n].user); + if (newslist[n].friendica_title!="") {newslist[n].statusnet_html=""+newslist[n].friendica_title +"

"+newslist[n].friendica_html;} + else{newslist[n].statusnet_html=newslist[n].friendica_html} - if(newslist[n].in_reply_to_user_id){newslist[n].reply_user=Newsjs.objFromArray(allcontacts,"id",newslist[n].in_reply_to_user_id)} - if(newslist[n].hasOwnProperty('friendica_activities')){ - for (var m in newslist[n].friendica_activities.like){ - newslist[n].friendica_activities.like[m]=cleanUser(newslist[n].friendica_activities.like[m]); - } - for (var o in newslist[n].friendica_activities.dislike){ - newslist[n].friendica_activities.dislike[o]=cleanUser(newslist[n].friendica_activities.dislike[o]); - } - for (var p in newslist[n].friendica_activities.attendyes){ - newslist[n].friendica_activities.attendyes[p]=cleanUser(newslist[n].friendica_activities.attendyes[p]); - } - for (var q in newslist[n].friendica_activities.attendno){ - newslist[n].friendica_activities.attendno[q]=cleanUser(newslist[n].friendica_activities.attendno[q]); - } - for (var r in newslist[n].friendica_activities.attendmaybe){ - newslist[n].friendica_activities.attendmaybe[r]=cleanUser(newslist[n].friendica_activities.attendmaybe[r]); - } - } - if(!(newslist[n].hasOwnProperty('friendica_author'))){ - newslist[n].friendica_author=newslist[n].user - } - var conversationindex=conversationIds.indexOf(newslist[n].statusnet_conversation_id); + if(newslist[n].in_reply_to_user_id){newslist[n].reply_user=Newsjs.objFromArray(allcontacts,"id",newslist[n].in_reply_to_user_id)} + if(newslist[n].hasOwnProperty('friendica_activities')){ + for (var m in newslist[n].friendica_activities.like){ + newslist[n].friendica_activities.like[m]=cleanUser(newslist[n].friendica_activities.like[m]); + } + for (var o in newslist[n].friendica_activities.dislike){ + newslist[n].friendica_activities.dislike[o]=cleanUser(newslist[n].friendica_activities.dislike[o]); + } + for (var p in newslist[n].friendica_activities.attendyes){ + newslist[n].friendica_activities.attendyes[p]=cleanUser(newslist[n].friendica_activities.attendyes[p]); + } + for (var q in newslist[n].friendica_activities.attendno){ + newslist[n].friendica_activities.attendno[q]=cleanUser(newslist[n].friendica_activities.attendno[q]); + } + for (var r in newslist[n].friendica_activities.attendmaybe){ + newslist[n].friendica_activities.attendmaybe[r]=cleanUser(newslist[n].friendica_activities.attendmaybe[r]); + } + } + if(!(newslist[n].hasOwnProperty('friendica_author'))){ + newslist[n].friendica_author=newslist[n].user + } + var conversationindex=conversationIds.indexOf(newslist[n].statusnet_conversation_id); - //fill chatlist - if (conversationindex==-1){ - chatlist.push(newslist[n]); - conversationIds.push(newslist[n].statusnet_conversation_id); - commentCount.push(1); - } else{ - commentCount[conversationindex]=commentCount[conversationindex]+1; - chatlist[conversationindex]=newslist[n]; + //fill chatlist + if (conversationindex==-1){ + chatlist.push(newslist[n]); + conversationIds.push(newslist[n].statusnet_conversation_id); + commentCount.push(1); + } else{ + commentCount[conversationindex]=commentCount[conversationindex]+1; + chatlist[conversationindex]=newslist[n]; + } } } //enrich chatlist with old entries @@ -541,8 +572,8 @@ function processNews(api,data){ newslist.reverse(); newstab.conversation=newslist } - else if (api=="/api/statuses/user_timeline"){ - newstab.contactposts=newslist + else if (api=="/api/statuses/user_timeline" || api=="/api/users/show"){ + root.contactposts=newslist } else if ((api!="/api/direct_messages/all")&&(api!="/api/friendica/notifications")&&(newstab.newstabstatus==="Conversations")){ showNews(chatlist);root.news=newslist diff --git a/source-linux/qml/calendarqml/CalendarDay.qml b/source-linux/qml/calendarqml/CalendarDay.qml index 18232f9..6033099 100644 --- a/source-linux/qml/calendarqml/CalendarDay.qml +++ b/source-linux/qml/calendarqml/CalendarDay.qml @@ -34,12 +34,15 @@ import QtQuick 2.11 Item { id: calendarDay - width:7*mm - height: 7*mm + width: root.fontFactor*osSettings.bigFontSize*2//5*mm + height: root.fontFactor*osSettings.bigFontSize*2//5*mm property int dateInt: Math.floor(Date.parse(model.date)/86400000) //Math.floor((Date.parse(model.date)-(new Date().getTimezoneOffset() * 60 * 1000))/86400000) Rectangle { id: placeHolder - color: 'lightblue'; antialiasing: true + color: model.today?'lightblue':'transparent'; + border.color: 'lightblue' + border.width: 2 + antialiasing: true anchors.fill:parent radius: 0.5*mm } @@ -51,7 +54,7 @@ Item { wrapMode: Text.WrapAnywhere text: model.day font.bold: model.today - font.pixelSize: 4*mm + font.pointSize: 1.2*osSettings.systemFontSize } Rectangle { id:eventRect @@ -59,15 +62,15 @@ Item { anchors.margins: 0.5*mm anchors.bottom: calendarDay.bottom width: parent.width-mm - height: mm + height: 0.5*osSettings.systemFontSize//mm visible: eventdays.indexOf(dateInt)>-1 } MouseArea { anchors.fill: calendarDay - onClicked: { - var component = Qt.createComponent("qrc:/qml/calendarqml/EventList.qml"); - if (component.status== Component.Ready){ - var eventlist = component.createObject(calendartab,{"dayint": dateInt})} + onClicked: {rootstackView.push("qrc:/qml/calendarqml/EventList.qml",{"dayint": dateInt,"events":events}); +// var component = Qt.createComponent("qrc:/qml/calendarqml/EventList.qml"); +// if (component.status== Component.Ready){ +// var eventlist = component.createObject(calendartab,{"dayint": dateInt})} } } } diff --git a/source-linux/qml/calendarqml/CalendarTab.qml b/source-linux/qml/calendarqml/CalendarTab.qml index 67efd8a..57dffc8 100644 --- a/source-linux/qml/calendarqml/CalendarTab.qml +++ b/source-linux/qml/calendarqml/CalendarTab.qml @@ -33,8 +33,7 @@ import QtQuick 2.0 import QtQuick.Controls 2.12 import QtQml 2.2 import Qt.labs.calendar 1.0 -//import QtQuick.Controls 1.2 as Oldcontrol -import QtQuick.Layouts 1.3 +//import QtQuick.Layouts 1.3 import "qrc:/js/service.js" as Service import "qrc:/js/helper.js" as Helperjs import "qrc:/qml/calendarqml" @@ -43,9 +42,9 @@ import "qrc:/qml/genericqml" Rectangle { id:calendarrectangle // y:1 -// width:root.width-mm -// height:root.height-5*mm - anchors.fill: parent + width:parent.width//-mm + height:parent.height//-5*mm +// anchors.fill: parent color: '#fff' property date currentTime: new Date() property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000 @@ -69,6 +68,12 @@ Rectangle { events=eventArray; eventdays=dayArray; calBusy.running=false + + var currentevents=events.filter(event=>(currentTime<=event.end)); + for (var i=0; i(dayint>=event.startday)&&(dayint<=event.endday)); for (var i=0; i0?new Date(event.end).toLocaleString(Qt.locale(),Locale.NarrowFormat):" ")+": "+event.title //+calendarrectangle.offsetTime - font.pixelSize: 3*mm - wrapMode:Text.Wrap - } - - Text { - id:eventDetailsText - x:8*mm - z:4 - width: parent.width-8*mm - height: contentHeight - textFormat: Text.RichText - text: status==""?"":Qt.atob(event.desc) + (event.location==""?"":"

"+qsTr("Location")+": "+event.location)//Qt.atob(event.html) - anchors.top: eventNameText.bottom - font.pixelSize: 3*mm - wrapMode:Text.Wrap - onLinkActivated:{Qt.openUrlExternally(link)} - } - MouseArea{ - anchors.fill: parent - onClicked:{if (status==""){status="large"} else {status=""} - } - } - } } } diff --git a/source-linux/qml/calendarqml/EventListItem.qml b/source-linux/qml/calendarqml/EventListItem.qml new file mode 100644 index 0000000..3d5347f --- /dev/null +++ b/source-linux/qml/calendarqml/EventListItem.qml @@ -0,0 +1,90 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + +import QtQuick 2.0 +import QtQuick.Controls 2.12 +import "qrc:/js/service.js" as Service +import "qrc:/js/helper.js" as Helperjs +import "qrc:/qml/genericqml" +import "qrc:/qml/calendarqml" + +Rectangle{ + id:eventItem + property string status: eventstatus + property var currEvent: event + width:parent.width + height:eventNameText.height+eventDetailsText.height+mm + border.color: "light grey" + border.width: 1 + radius: 0.5*mm + Image { + id:profileImage + source: ((event.eventOwner.profile_image!="") && (typeof(event.eventOwner.profile_image)=="string"))? "file://"+event.eventOwner.profile_image : event.eventOwner.profile_image_url + x:1 + y:1 + width: 7*mm + height: 7*mm + //radius:mm + + onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} + } + Text { + id:eventNameText + x: 8*mm + width:parent.width-8*mm + height:contentHeight + font.pointSize: osSettings.systemFontSize + text: new Date(event.start).toLocaleString(Qt.locale(),Locale.NarrowFormat)+ " - " +((event.end>0)&&(event.end!=null)?new Date(event.end).toLocaleString(Qt.locale(),Locale.NarrowFormat):"\u221E")+":\n"+event.title //+calendarrectangle.offsetTime + wrapMode:Text.Wrap + } + + Text { + id:eventDetailsText + x:8*mm + z:4 + width: parent.width-8*mm + height: contentHeight + textFormat: Text.RichText + text: status!="large"?"":Qt.atob(event.desc) + (event.location==""?"":"

"+qsTr("Location")+": "+event.location)//Qt.atob(event.html) + anchors.top: eventNameText.bottom + font.pointSize: osSettings.systemFontSize + wrapMode:Text.Wrap + onLinkActivated:{Qt.openUrlExternally(link)} + } + MouseArea{ + anchors.fill: parent + onClicked:{ + if (status==""){ + rootstackView.push("qrc:/qml/calendarqml/EventList.qml",{"dayint": event.startday, "events":[event]}); + } else {rootstackView.pop()} + } + } +} diff --git a/source-linux/qml/configqml/AccountPage.qml b/source-linux/qml/configqml/AccountPage.qml index 39e59ef..6363511 100644 --- a/source-linux/qml/configqml/AccountPage.qml +++ b/source-linux/qml/configqml/AccountPage.qml @@ -32,7 +32,7 @@ import QtQuick 2.7 import QtQuick.Dialogs 1.2 import QtQuick.Controls 2.12 - +import QtQuick.Layouts 1.12 import "qrc:/js/service.js" as Service import "qrc:/js/layout.js" as Layoutjs import "qrc:/js/helper.js" as Helperjs @@ -55,22 +55,21 @@ Page{ servericon.source=serverdata.site.logo})} catch(e){print(e)} } - Button{ + MButton{ id:userButton - height: 8*mm text:qsTr("User") - //font.pixelSize: 3*mm - font.pointSize: 16 - x: mm - y: mm - width: root.width/2 + font.pointSize: osSettings.bigFontSize + x: root.fontFactor*osSettings.bigFontSize + y: root.fontFactor*osSettings.bigFontSize + width: root.width/2 - 2*mm + height: 2*root.fontFactor*osSettings.bigFontSize visible: users.length>0 onClicked:{ var useritems=""; for (var i=0;i-1){ - Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),accountPage) + TextField { + id: servername + x: 4*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; width: root.width-18*mm; //height: 5*mm; + placeholderText: qsTr("Server") + font.pointSize: osSettings.systemFontSize + onEditingFinished: { + if ((servername.text)==""){} + else if((servername.text).substring(0,7) !=="https://"){ + servername.text= "https://"+text//(serverstring.text).substring(8) } - imagestoredir=filesystem.homePath+"/"+username.text+"/" - //if (imagestore.text==filesystem.homePath+"/.friendiqa/"){imagestore.text=filesystem.homePath+"/.friendiqa/"+username.text+"/"} - } - } + accountPage.setServericon(servername.text)} } -// Button { -// x: root.width-9*mm; y: 23.5*mm; width:5*mm; height:5*mm -// text: "\uf234" -// font.pixelSize: 3*mm -// onClicked: { -// root.push("qrc:/qml/configqml/RegisterPage.qml",{url:servername.text+"/register?nickname="+username.getText(0,username.length)}) -// } -// } - Rectangle{ - color: "light grey" - x: 4*mm; y: 33.5*mm; width: root.width-6*mm; height: 5*mm; - TextInput { - id: password - anchors.fill: parent - //font.pixelSize:3*mm - font.pointSize: 16 - selectByMouse: true - echoMode: TextInput.PasswordEchoOnEdit + TextField { + id: username + x: root.fontFactor*osSettings.bigFontSize; y: 6*root.fontFactor*osSettings.bigFontSize; width: root.width-9*mm; //height: 5*mm; + font.pointSize: osSettings.systemFontSize + placeholderText: qsTr("Nickname") + selectByMouse: true + onEditingFinished: { + if (username.text.indexOf('@')>-1){ + Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),accountPage) + } + imagestoredir=filesystem.homePath+"/"+username.text+"/" + //if (imagestore.text==filesystem.homePath+"/.friendiqa/"){imagestore.text=filesystem.homePath+"/.friendiqa/"+username.text+"/"} } + } + + + TextField { + id: password + x: root.fontFactor*osSettings.bigFontSize; y: 9*root.fontFactor*osSettings.bigFontSize; width: root.width-9*mm; //height: 5*mm; + //font.pixelSize:3*mm + font.pointSize: osSettings.systemFontSize + selectByMouse: true + echoMode: TextInput.Password + placeholderText: qsTr("Password") + inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText | Qt.ImhSensitiveData + } + + Text { + id: imagedirlabel + visible: imagestore.text!="" + text: qsTr("Image dir.") + font.pointSize: osSettings.systemFontSize + x: root.fontFactor*osSettings.bigFontSize; y: 12*root.fontFactor*osSettings.bigFontSize + } + + TextField { + id: imagestore + x: root.fontFactor*osSettings.bigFontSize; y: 13*root.fontFactor*osSettings.bigFontSize; width: root.width-17*mm; //height: 5*mm; + visible:imagestore.text!="" + font.pointSize: osSettings.systemFontSize + selectByMouse: true + text: "" //filesystem.homePath+"/.friendiqa/"+username.text+"/" //(osSettings.osType=="Android") && (filesystem.fileexist("/storage/emulated/0/Pictures/"))?"/storage/emulated/0/Pictures/":"" + wrapMode: TextEdit.NoWrap + onTextChanged: imagestoredir=imagestore.text + } + MButton { + x: root.width-3*root.fontFactor*osSettings.bigFontSize; y: 13*root.fontFactor*osSettings.bigFontSize; + height: 2*root.fontFactor*osSettings.bigFontSize; + visible:imagestore.text!="" + text: "..." + font.pointSize: osSettings.bigFontSize + onClicked:{imagestoreDialog.open()} } - Rectangle{color: "light grey"; x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;visible:imagestore.text!=""} - Flickable { - id: imagestoreFlickable - visible:imagestore.text!="" //filesystem.homePath+"/"+username.text+"/"" - x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm; - clip: true - TextInput { - id: imagestore - width: imagestoreFlickable.width - height: imagestoreFlickable.height - //font.pixelSize:3*mm - font.pointSize: 16 - text: "" //filesystem.homePath+"/.friendiqa/"+username.text+"/" //(osSettings.osType=="Android") && (filesystem.fileexist("/storage/emulated/0/Pictures/"))?"/storage/emulated/0/Pictures/":"" - wrapMode: TextEdit.NoWrap - onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable) - onTextChanged: imagestoredir=imagestore.text - } - } FileDialog { id: imagestoreDialog @@ -238,76 +196,66 @@ Page{ } } - Button { - x: root.width-9*mm; y: 43.5*mm; width: 5*mm; height: 5*mm; - visible:imagestore.text!="" - text: "..." - //font.pixelSize: 3*mm - font.pointSize: 16 - onClicked:{imagestoreDialog.open()} - } - BusyIndicator{ id: accountBusy anchors.horizontalCenter: parent.horizontalCenter - y: 53.5*mm + y: 16*root.fontFactor*osSettings.bigFontSize width:10*mm height: 10*mm running: false } - Button { - x: 4*mm; y: 53.5*mm - height: 8*mm + MButton { + x: root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize text: qsTr("Confirm") - //font.pixelSize: 3*mm - font.pointSize: 16 + font.pointSize: osSettings.bigFontSize onClicked:{ accountBusy.running=true; - var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""}; - var errormessage=""; - if (servername.text==""){errormessage=qsTr("No server given! ")} - else if (username.text==""){errormessage+=qsTr("No nickname given! ")} - else if (password.text=="") {errormessage+=qsTr("No password given! ")} - else if (imagestoredir=="") {errormessage+=qsTr("No image directory given!")} - //else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")} + var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""}; + var errormessage=""; + if (servername.text==""){errormessage=qsTr("No server given! ")} + else if (username.text==""){errormessage+=qsTr("No nickname given! ")} + else if (password.text=="") {errormessage+=qsTr("No password given! ")} + else if (imagestoredir=="") {errormessage+=qsTr("No image directory given!")} + //else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")} //else if (maxNewsText.text=="") {errormessage+=qsTr("No maximum news number given!")} - else {errormessage=""} - if (errormessage=="") { - Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials?skip_status=true",root,function(obj){ + else {errormessage=""} + if (errormessage=="") { + Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials?skip_status=true",root,function(obj){ accountBusy.running=false; - var credentials=JSON.parse(obj); - if (credentials.hasOwnProperty('status')){ - Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password!"),root) - } - else{ - if (users.length==0){Service.setDefaultOptions(db);} - print("imagestore" + userconfig.imagestore + " path "+ filesystem.homePath+"/"+username.text) - if(userconfig.imagestore == filesystem.homePath+"/"+username.text+"/") - {//filesystem.Directory=filesystem.homePath; - filesystem.makePath(filesystem.homePath+"/"+username.text); - } - filesystem.Directory=imagestoredir //userconfig.imagestore; - filesystem.makeDir("contacts"); - filesystem.makeDir("albums"); - Service.storeConfig(db,userconfig); - Service.readConfig(db,function(userconfig){ - Helperjs.readData(db,"config","",function(storedUsers){ - storedUsers.sort(function(obj1, obj2) { - return obj1.isActive - obj2.isActive; - }); - accountPage.users=storedUsers}); + var credentials=JSON.parse(obj); + if (credentials.hasOwnProperty('status')){ + Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password!"),root) + } + else{ + if (users.length==0){Service.setDefaultOptions(db);} + //print("imagestore" + userconfig.imagestore + " path "+ filesystem.homePath+"/"+username.text) + if(userconfig.imagestore == filesystem.homePath+"/"+username.text+"/") + {//filesystem.Directory=filesystem.homePath; + filesystem.makePath(filesystem.homePath+"/"+username.text); + } + filesystem.Directory=imagestoredir //userconfig.imagestore; + filesystem.makeDir("contacts"); + filesystem.makeDir("albums"); + Service.storeConfig(db,userconfig); + 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 - root.login=userconfig; - root.news=[]; - rootstack.currentIndex=0; - root.newstypeSignal("refresh"); - },"isActive",0); + login=userconfig; + news=[]; + rootstack.currentIndex=0; + newstypeSignal("refresh"); + },"isActive",0); //Service.requestProfile(userconfig,db,root,function(nc){root.newContacts=nc}); Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.name+"\nScreen Name: "+credentials.screen_name,root) + rootstackView.pop() } }); @@ -316,79 +264,82 @@ Page{ }} - - Button { - x: parent.width/2+2*mm; y: mm; width: 5*mm; height: 8*mm; - visible: users.length>0 - text: "-" - //font.pixelSize: 3*mm - font.pointSize: 16 - onClicked:{ - var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)}; - Service.deleteConfig(db,userconfig,function(){ - filesystem.Directory=imagestore.text+"contacts"; - filesystem.rmDir(); - filesystem.Directory=imagestore.text+"albums"; - filesystem.rmDir(); - servername.text="https://"; - servericon.visible=false; - servericon.source=""; - username.text=""; - password.text=""; - imagestore.text=""; - //maxNews.value=0; - //newsTypeField.text="Conversations"; - //messageIntervalSlider.value=30; - userButton.text=qsTr("User"); - Helperjs.readData(db,"config","",function(storedUsers){ - storedUsers.sort(function(obj1, obj2) { - return obj1.isActive - obj2.isActive; - }) - accountPage.users=storedUsers;}) - }) - }} - - Button { - x: parent.width/2+8*mm; y: mm; width: 5*mm; height: 8*mm; - visible: users.length>0 - text: "+" - //font.pixelSize: 3*mm - font.pointSize: 16 - onClicked:{ - servername.text="https://" - servericon.visible=false; - servericon.source=""; - username.text="" - password.text="" - imagestore.text="" //filesystem.homePath+"/.friendiqa/"+username.text//"" - userButton.text=qsTr("User") - } - } - - Button { - x: parent.width/2+14*mm; y: mm; width: 5*mm; height: 8*mm; - text: "?" - //font.pixelSize: 3*mm - font.pointSize: 16 - onClicked:{ - root.push("qrc:/qml/configqml/InfoBox.qml"); - } - } - Button{ - id:closeButton - height: 8*mm - width: 5*mm - visible: users.length>0 + Row{ + spacing:0.5*mm anchors.top: parent.top - anchors.topMargin: 1*mm + anchors.topMargin: root.fontFactor*osSettings.bigFontSize anchors.right: parent.right anchors.rightMargin: 1*mm - text: "\uf057" - //font.pixelSize: 3*mm - font.pointSize: 16 - onClicked:{root.pop()} - } + MButton { + //x: parent.width/2+4*mm; y: mm; + width: 5*mm; + //height: 3*root.fontFactor*osSettings.bigFontSize + visible: users.length>0 + text: "-" + font.pointSize: osSettings.bigFontSize + onClicked:{ + var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)}; + Service.deleteConfig(db,userconfig,function(){ + filesystem.Directory=imagestore.text+"contacts"; + filesystem.rmDir(); + filesystem.Directory=imagestore.text+"albums"; + filesystem.rmDir(); + servername.text="https://"; + servericon.visible=false; + servericon.source=""; + username.text=""; + password.text=""; + imagestore.text=""; + //maxNews.value=0; + //newsTypeField.text="Conversations"; + //messageIntervalSlider.value=30; + userButton.text=qsTr("User"); + Helperjs.readData(db,"config","",function(storedUsers){ + storedUsers.sort(function(obj1, obj2) { + return obj1.isActive - obj2.isActive; + }) + accountPage.users=storedUsers;}) + }) + }} + MButton { + //x: parent.width/2+10*mm; y: mm; //width: 5*mm; height: 8*mm; + //height: 3*root.fontFactor*osSettings.bigFontSize + width: 5*mm; + visible: users.length>0 + text: "+" + font.pointSize: osSettings.bigFontSize + onClicked:{ + servername.text="https://" + servericon.visible=false; + servericon.source=""; + username.text="" + password.text="" + imagestore.text="" //filesystem.homePath+"/.friendiqa/"+username.text//"" + userButton.text=qsTr("User") + } + } + + MButton { + //x: parent.width-12*mm; y: mm; //width: 5*mm; height: 8*mm; + //height: 3*root.fontFactor*osSettings.bigFontSize + width: 5*mm; + text: "?" + font.pointSize: osSettings.bigFontSize + onClicked:{ + rootstackView.push("qrc:/qml/configqml/InfoBox.qml"); + } + } + MButton{ + id:closeButton + //height: 3*root.fontFactor*osSettings.bigFontSize + width: 5*mm; + visible: users.length>0 + text: "\uf057" + font.pointSize: osSettings.bigFontSize + onClicked:{rootstackView.pop()} + } + } Component.onCompleted: { try{Helperjs.readData(db,"config","",function(storedUsers){ diff --git a/source-linux/qml/configqml/ConfigPage.qml b/source-linux/qml/configqml/ConfigPage.qml index f95662b..0d9e1ea 100644 --- a/source-linux/qml/configqml/ConfigPage.qml +++ b/source-linux/qml/configqml/ConfigPage.qml @@ -38,40 +38,42 @@ import "qrc:/qml/configqml" import "qrc:/qml/genericqml" Page{ - //anchors.fill: parent + //anchors.fill: parent width:root.width height:root.height Rectangle{ - x: 4*mm; y:13.5*mm; width: parent.width - 14*mm; height: 5*mm; - color:"light grey" + x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize; + width: parent.width - 6*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize + color:"#F3F3F3" radius: 0.5*mm Text{ anchors.fill: parent - font.pixelSize:3*mm + font.pointSize: osSettings.bigFontSize text:qsTr("Sync") } MouseArea{ anchors.fill:parent - onClicked:root.push("qrc:qml/configqml/SyncConfig.qml"); + onClicked:rootstackView.push("qrc:qml/configqml/SyncConfig.qml"); } } Text { text: qsTr("News as") - font.pixelSize:3*mm - x: 4*mm; y: 20*mm + font.pointSize:osSettings.systemFontSize + x: root.fontFactor*osSettings.bigFontSize; y: 8*root.fontFactor*osSettings.bigFontSize } Rectangle{ - x: 4*mm; y: 23.5*mm; width: newsTypeField.contentWidth+2*mm; height: 5*mm; - color:"light grey" - radius: 0.5*mm - Text{ - id: newsTypeField - anchors.fill: parent - font.pixelSize:3*mm - text:qsTr("Conversations") + x: root.fontFactor*osSettings.bigFontSize; y: 10*root.fontFactor*osSettings.bigFontSize; + width: newsTypeField.contentWidth+2*mm; height: 2*root.fontFactor*osSettings.bigFontSize + color:"#F3F3F3" + radius: 0.5*mm + Text{ + id: newsTypeField + anchors.fill: parent + font.pointSize:osSettings.bigFontSize + text:qsTr("Conversations") } MouseArea{ anchors.fill:parent @@ -80,38 +82,43 @@ Page{ } Menu { id:newstypemenu + width:8*root.fontFactor*osSettings.bigFontSize MenuItem { - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize text: qsTr("Timeline") onTriggered: {newsTypeField.text=qsTr("Timeline"); Service.updateglobaloptions(root.db,"newsViewType","Timeline");} - } + } MenuItem { - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize text: qsTr("Conversations") onTriggered: {newsTypeField.text=qsTr("Conversations"); Service.updateglobaloptions(root.db,"newsViewType","Conversations");} - } + } } Text { text: qsTr("Max. News") - font.pixelSize:3*mm - x: 4*mm; y:30*mm + font.pointSize: osSettings.systemFontSize + x: root.fontFactor*osSettings.bigFontSize; y:14*root.fontFactor*osSettings.bigFontSize } Slider{ id: maxNews - x:19*mm; y: 33.5*mm;width: root.width/2;height:5*mm + x:6*root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize; + width: root.width/2;height:2*root.fontFactor*osSettings.bigFontSize from: 0;to:2000; stepSize: 100 value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000 } - Rectangle{color: "light grey"; x: 4*mm; y: 33.5*mm; width: 9*mm; height: 5*mm; + Rectangle{ + color: "#F3F3F3"; + x: root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize; + width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize; radius: 0.5*mm TextEdit{id:maxNewsText; anchors.fill: parent - font.pixelSize:3*mm + font.pointSize: osSettings.bigFontSize verticalAlignment:TextEdit.AlignRight text:maxNews.value selectByMouse: true @@ -125,10 +132,9 @@ Page{ CheckBox{ id: nsfwCheckbox - x: 4*mm - y: 43.5*mm - font.pixelSize: 3*mm - //width:5*mm + x: root.fontFactor*osSettings.bigFontSize + y: 20*root.fontFactor*osSettings.bigFontSize + font.pointSize: osSettings.bigFontSize text: qsTr("Hide #nsfw?") checked:(globaloptions["hide_nsfw"]==1)?true:false onClicked: { @@ -146,24 +152,24 @@ Page{ MButton { anchors.right: closeButton.left; anchors.rightMargin: mm; anchors.top: parent.top - anchors.topMargin: 1*mm - width: 8*mm; height: 6*mm; + anchors.topMargin:root.fontFactor*osSettings.bigFontSize + width: 2*root.fontFactor*osSettings.bigFontSize; text: "?" - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize onClicked:{ - root.push("qrc:/qml/configqml/InfoBox.qml"); - } - } + rootstackView.push("qrc:/qml/configqml/InfoBox.qml"); + } + } MButton{ - id:closeButton - height: 6*mm - width :8*mm - anchors.top: parent.top - anchors.topMargin: 1*mm - anchors.right: parent.right - anchors.rightMargin: 1*mm - text: "\uf057" - font.pixelSize: 3*mm - onClicked:{root.pop()} + id:closeButton + // height: 2*root.fontFactor*osSettings.bigFontSize + width: 2*root.fontFactor*osSettings.bigFontSize; + anchors.top: parent.top + anchors.topMargin:root.fontFactor*osSettings.bigFontSize + anchors.right: parent.right + anchors.rightMargin: 1*mm + text: "\uf057" + font.pointSize: osSettings.bigFontSize + onClicked:{rootstackView.pop()} } } diff --git a/source-linux/qml/configqml/InfoBox.qml b/source-linux/qml/configqml/InfoBox.qml index 6414010..2037435 100644 --- a/source-linux/qml/configqml/InfoBox.qml +++ b/source-linux/qml/configqml/InfoBox.qml @@ -33,39 +33,38 @@ import QtQuick 2.0 import QtQuick.Controls 2.12 import "qrc:/qml/genericqml" -Rectangle{ - color:"white" - width:infoBoxText.contentWidth - height:infoBoxText.contentHeight +Page{ + //color:"white" + // width:infoBoxText.contentWidth + // height:infoBoxText.contentHeight Text{id:infoBoxText anchors.top:closeButton.bottom anchors.topMargin: mm textFormat: Text.RichText width: root.width-mm + font.pointSize: osSettings.systemFontSize wrapMode: Text.WrapAtWordBoundaryOrAnywhere - text: "Friendiqa v0.5.4
Licensed under GPL 3 with the exception of OpenSSL
"+ + text: "Friendiqa v0.6
Licensed under GPL 3 with the exception of OpenSSL
"+ "Website https://friendiqa.ma-nic.de
"+ "Sourcecode: https://git.friendi.ca/LubuWest/Friendiqa
"+ "Privacy Policy: http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md
"+ - "Code by Marco
"+ - "Qt Framework www.qt.io
"+ - "Icons by FontAwesome
"+ - "Folder Icon by KDE Breeze Icons
"+ - "AndroidNative by Ben Lau
"+ - "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)" - onLinkActivated:{ + "Code by Marco
"+ + "Qt Framework www.qt.io
"+ + "Icons by FontAwesome
"+ + "Folder Icon by KDE Breeze Icons
"+ + "AndroidNative by Ben Lau
"+ + "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)" + onLinkActivated:{ Qt.openUrlExternally(link)} - } - Button{ - id:closeButton - height: 6*mm - width: 8*mm - anchors.top: parent.top - anchors.topMargin: 1*mm - anchors.right: parent.right - anchors.rightMargin: 1*mm - text: "\uf057" - font.pixelSize: 3*mm - onClicked:{root.pop()} - } + } + MButton{ + id:closeButton + anchors.top: parent.top + anchors.topMargin: root.fontFactor*osSettings.bigFontSize + anchors.right: parent.right + anchors.rightMargin: 1*mm + text: "\uf057" + font.pointSize: osSettings.bigFontSize + onClicked:{rootstackView.pop()} + } } diff --git a/source-linux/qml/configqml/LeftDrawerScrollview.qml b/source-linux/qml/configqml/LeftDrawerScrollview.qml new file mode 100644 index 0000000..f7f0f62 --- /dev/null +++ b/source-linux/qml/configqml/LeftDrawerScrollview.qml @@ -0,0 +1,113 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + +import QtQuick 2.0 +import QtQuick.Controls 2.12 +import "qrc:/qml/genericqml" +import "qrc:/js/service.js" as Service + +ScrollView{ + id:leftDrawerScrollviewId + clip: true + width:parent.width-mm + height: parent.height + contentHeight: leftDrawerColumn.height + property string currentnewstabstatus:root.globaloptions.hasOwnProperty("newsViewType")?root.globaloptions.newsViewType:"Conversations"; + + Column{ + id:leftDrawerColumn + x:mm + y:0.5*root.fontFactor*osSettings.bigFontSize + width:parent.width-2*mm + height: 4*root.fontFactor*osSettings.bigFontSize + spacing: 0.7*root.fontFactor*osSettings.bigFontSize + Label{ + width:implicitWidth + font.pointSize: osSettings.systemFontSize + text: "\uf085 "+ qsTr("Settings") + MouseArea{ + anchors.fill:parent + onClicked:{rootstackView.push("qrc:qml/configqml/ConfigPage.qml"); + if(!wideScreen){leftDrawerAndroid.close()} + } + } + } + + Label{y: 2*root.fontFactor*osSettings.bigFontSize + width:implicitWidth + font.pointSize: osSettings.systemFontSize + text: "\uf2bb " + qsTr("Accounts") + MouseArea{ + anchors.fill:parent + onClicked:{rootstackView.push("qrc:qml/configqml/AccountPage.qml"); + if(!wideScreen){leftDrawerAndroid.close()} + } + } + } + + Label{y: 4*root.fontFactor*osSettings.bigFontSize + width:implicitWidth + font.pointSize: osSettings.systemFontSize + text: "\uf08b " +qsTr("Quit") + MouseArea{ + anchors.fill:parent + onClicked:{ + Service.cleanNews(root.db,function(){ + Service.cleanHashtags(root.db,function(){ + Service.cleanContacts(root.login,root.db,function(){ + Qt.quit()}) + })}) + } + } + } + } + Component.onCompleted:{ + Service.readAllLogins(db,function(accounts){ + if (accounts.length>0 && bar.currentIndex==0){ + leftDrawerColumn.height=4.5*root.fontFactor*osSettings.bigFontSize+accounts.length*13*root.fontFactor*osSettings.bigFontSize + for(var i = 0; i < accounts.length; i++) { + var accountComponent = Qt.createComponent("qrc:/qml/genericqml/DrawerAccountComponent.qml"); + var accountQml = accountComponent.createObject(leftDrawerColumn,{ + "y":4.5*root.fontFactor*osSettings.bigFontSize+i*13*root.fontFactor*osSettings.bigFontSize, + "currentnewstabstatus":currentnewstabstatus, + "account":accounts[i]}); + } + }else if(accounts.length>0 && bar.currentIndex==1){ + leftDrawerColumn.height=4.5*root.fontFactor*osSettings.bigFontSize+accounts.length*6.5*root.fontFactor*osSettings.bigFontSize + for(var i = 0; i < accounts.length; i++) { + var accountComponent = Qt.createComponent("qrc:/qml/genericqml/DrawerAccountComponentContacts.qml"); + var accountQml = accountComponent.createObject(leftDrawerColumn,{ + "y":4.5*root.fontFactor*osSettings.bigFontSize+i*6.5*root.fontFactor*osSettings.bigFontSize, + "account":accounts[i]}); + } + } + })} +} diff --git a/source-linux/qml/configqml/OSSettingsAndroid.qml b/source-linux/qml/configqml/OSSettingsAndroid.qml index 4ef254d..4c5b9de 100644 --- a/source-linux/qml/configqml/OSSettingsAndroid.qml +++ b/source-linux/qml/configqml/OSSettingsAndroid.qml @@ -37,6 +37,8 @@ QtObject{ property int backKey: Qt.Key_Back //property string attachImageDir:filesystem.cameraPath+"/" property string osType: "Android" + property int systemFontSize: root.font.pointSize*1.1 + property int bigFontSize: systemFontSize*1.3 property string imagePickQml: "ImagePicker" property string imagePicker:'import QtQuick 2.0; import "qrc:/qml/genericqml";'+ imagePickQml+'{multiple : true;onReady: {attachImageURLs.push(imageUrl);'+ diff --git a/source-linux/qml/configqml/OSSettingsLinux.qml b/source-linux/qml/configqml/OSSettingsLinux.qml index 20440a7..a758b26 100644 --- a/source-linux/qml/configqml/OSSettingsLinux.qml +++ b/source-linux/qml/configqml/OSSettingsLinux.qml @@ -32,10 +32,12 @@ import QtQuick.Window 2.0 import QtQuick 2.0 QtObject{ - property real appWidth: Screen.desktopAvailableWidth/3 - property real appHeight: Screen.desktopAvailableHeight/3*2 + property real appWidth: Screen.desktopAvailableWidth/4*3 + property real appHeight: Screen.desktopAvailableHeight/4*3 property int backKey: Qt.Key_Escape property string osType: "Linux" + property int systemFontSize: root.font.pointSize*1.1 + property int bigFontSize: systemFontSize*1.5 //property string attachImageDir:filesystem.homePath+"/Pictures/" property string imagePickQml: "ImagePickerLinux" } diff --git a/source-linux/qml/configqml/RegisterPage.qml b/source-linux/qml/configqml/RegisterPage.qml index 3dcbc8d..90eb809 100644 --- a/source-linux/qml/configqml/RegisterPage.qml +++ b/source-linux/qml/configqml/RegisterPage.qml @@ -36,10 +36,7 @@ import "qrc:/qml/genericqml" Rectangle{ color:"white" - //border.color: "light grey" property alias url:htmlview.url -// width:root.width-5*mm -// height:root.height-12*mm WebView {id:htmlview; height:parent.height-7*mm @@ -55,13 +52,13 @@ Rectangle{ } Button{ id:closeButton - height:6*mm + height: 3*root.fontFactor*osSettings.bigFontSize anchors.top: parent.top anchors.topMargin: 1*mm anchors.right: parent.right anchors.rightMargin: 1*mm text: "\uf057" - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize onClicked:{root.pop()} } } diff --git a/source-linux/qml/configqml/SyncComponent.qml b/source-linux/qml/configqml/SyncComponent.qml index b8cd30c..c20055f 100644 --- a/source-linux/qml/configqml/SyncComponent.qml +++ b/source-linux/qml/configqml/SyncComponent.qml @@ -39,22 +39,22 @@ Rectangle{ color: "#EEEEEE" //Material.Grey property string adapter: "" width: parent.width - height: 12*mm + height: 4*root.fontFactor*osSettings.bigFontSize Label{ x: mm y: 0.5*mm - font.pixelSize:3*mm + font.pointSize: osSettings.systemFontSize text: qsTr(adapter) } CheckBox{ id: syncCheckbox x: mm - y: 5*mm - width:20*mm + y: root.fontFactor*osSettings.bigFontSize + width: 10*root.fontFactor*osSettings.bigFontSize checked:(globaloptions["sync_"+adapter]==1)?true:false //style: CheckBoxStyle { text: qsTr("sync") - font.pixelSize:3*mm + font.pointSize: osSettings.bigFontSize onClicked: { toggle(); if(syncCheckbox.checked==true){ @@ -67,13 +67,13 @@ Rectangle{ } CheckBox{ id: notifyCheckbox - x:25*mm - y: 5*mm - width:25*mm + x: 10*root.fontFactor*osSettings.bigFontSize + y: root.fontFactor*osSettings.bigFontSize + width: 10*root.fontFactor*osSettings.bigFontSize enabled: adapter!="Notifications" checked:(globaloptions["notify_"+adapter]==1)?true:false text: qsTr("notify") - font.pixelSize:3*mm + font.pointSize: osSettings.bigFontSize onClicked: { toggle(); if(notifyCheckbox.checked==true){ diff --git a/source-linux/qml/configqml/SyncConfig.qml b/source-linux/qml/configqml/SyncConfig.qml index ef7ebf6..65686b1 100644 --- a/source-linux/qml/configqml/SyncConfig.qml +++ b/source-linux/qml/configqml/SyncConfig.qml @@ -43,44 +43,50 @@ Rectangle{ //height:root.height Text { text: qsTr("Sync Interval (0=None)") - font.pixelSize:3*mm + font.pointSize: osSettings.bigFontSize //visible: false - x: 4*mm; y: 10*mm; //width:35*mm;wrapMode: Text.Wrap + x: root.fontFactor*osSettings.bigFontSize; y: root.fontFactor*osSettings.bigFontSize; //width:35*mm;wrapMode: Text.Wrap } Slider{ id: messageIntervalSlider - x:22*mm; y: 13.5*mm;width: root.width/2;height:5*mm + x:8*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; + width: root.width-10*root.fontFactor*osSettings.bigFontSize; + height:2*root.fontFactor*osSettings.bigFontSize value: globaloptions.hasOwnProperty("syncinterval")?globaloptions.syncinterval:0 from: 0;to:120; stepSize: 15 } Rectangle{ - x: 4*mm; y: 13.5*mm; width: 9*mm; height: 5*mm; - TextEdit{ - id: messageIntervalField - anchors.fill: parent - font.pixelSize:3*mm - verticalAlignment:TextEdit.AlignRight - text:messageIntervalSlider.value - focus: true - selectByMouse: true - onTextChanged: { - Service.updateglobaloptions(root.db,"syncinterval",text); - if(osSettings.osType=="Android"){ + x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize; + width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize; + TextEdit{ + id: messageIntervalField + anchors.fill: parent + font.pointSize: osSettings.bigFontSize + verticalAlignment:TextEdit.AlignRight + text:messageIntervalSlider.value + focus: true + selectByMouse: true + onTextChanged: { + Service.updateglobaloptions(root.db,"syncinterval",text); + if(osSettings.osType=="Android"){ + //print("setalarm") alarm.setAlarm(text); - } else if(osSettings.osType=="Linux" && text !=0){ - root.updateSyncinterval(parseInt(text)) - } - } + } else if(osSettings.osType=="Linux" && text !=0){ + root.updateSyncinterval(parseInt(text)) + } + } } } - Text{x: 14*mm; y: 13.5*mm; width: 5*mm; height: 5*mm; - font.pixelSize:3*mm + Text{x: 6*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; + width: 2*root.fontFactor*osSettings.bigFontSize; height: 1.5*root.fontFactor*osSettings.bigFontSize; + font.pointSize: osSettings.bigFontSize text:qsTr("Min.") } ScrollView{ width: root.width - height: root.height - 25*mm;y:22*mm + height: root.height - 10*root.fontFactor*osSettings.bigFontSize; + y:7*root.fontFactor*osSettings.bigFontSize clip:true Column{ //height: implicitHeight @@ -92,19 +98,19 @@ Rectangle{ SyncComponent{ adapter:"DirectMessages"} SyncComponent{ adapter:"Notifications"} SyncComponent{ adapter: "Events"} + SyncComponent{adapter: "FriendRequests"} } } - MButton{ - id:closeButton - anchors.top: parent.top - anchors.topMargin: 1*mm - anchors.right: parent.right - anchors.rightMargin: 1*mm - height: 6*mm - width: 8*mm - text: "\uf057" - font.pixelSize: 3*mm - onClicked:{root.pop()} - } + MButton{ + id:closeButton + anchors.top: parent.top + anchors.topMargin: osSettings.bigFontSize + anchors.right: parent.right + anchors.rightMargin: 1*mm + width: 2*root.fontFactor*osSettings.bigFontSize; + text: "\uf057" + font.pointSize: osSettings.bigFontSize + onClicked:{rootstackView.pop()} + } } diff --git a/source-linux/qml/contactqml/Contactlist.qml b/source-linux/qml/contactqml/Contactlist.qml index 045930b..576d990 100644 --- a/source-linux/qml/contactqml/Contactlist.qml +++ b/source-linux/qml/contactqml/Contactlist.qml @@ -47,41 +47,41 @@ Rectangle { height:groupListView.height ListView { - id: contactView - x:mm - y:6*mm - width: contactlistRectangle.width-2*mm - height: contactlistRectangle.height-10*mm - clip: true - spacing: 0 - model: contactModel - delegate: listContact - } + id: contactView + x:mm + y:6*mm + width: contactlistRectangle.width-2*mm + height: contactlistRectangle.height-10*mm + clip: true + spacing: 0 + model: contactModel + delegate: listContact + } - ListModel{id: contactModel} + ListModel{id: contactModel} - Component { id:listContact - Rectangle{ - border.color: "#EEEEEE" - border.width: 1 - radius:0.5*mm - width:contactView.width - height:6*mm - Image { - id: contactImage - x:1 - y:1 - width: 5*mm - height:5*mm - source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url - onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} - } - Text{ - font.pixelSize: 3*mm - anchors.left: contactImage.right - anchors.margins: 1*mm - text:Qt.atob(contact.name) - } + Component { id:listContact + Rectangle{ + border.color: "#EEEEEE" + border.width: 1 + radius:0.5*mm + width:contactView.width + height:6*mm + Image { + id: contactImage + x:1 + y:1 + width: 5*mm + height:5*mm + source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url + onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} + } + Text{ + font.pointSize: osSettings.bigFontSize + anchors.left: contactImage.right + anchors.margins: 1*mm + text:Qt.atob(contact.name) + } Text { id:selected anchors.right:parent.right @@ -91,40 +91,38 @@ Rectangle { width: 5*mm anchors.top: parent.top color: "green" - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize } - MouseArea{ + MouseArea{ anchors.fill: parent onClicked:{ if(selected.visible==true){ - contacts.splice(Helperjs.inArray(contacts,"id",contact.id),1); - selected.visible=false - } - else{ - contacts.push(contact); - selected.visible=true; - } - } - } + contacts.splice(Helperjs.inArray(contacts,"id",contact.id),1); + selected.visible=false + } + else{ + contacts.push(contact); + selected.visible=true; + } + } } - } + } + } - MButton { - id: closeButton - height:6* mm - width: 8*mm - anchors.top: parent.top - anchors.topMargin: 1*mm - anchors.right: parent.right - anchors.rightMargin: 1*mm - //color:"white" - text: "\uf057" - onClicked: { - groupModelAppend(contacts,function(){ - contactlistRectangle.destroy() - }); - } + MButton { + id: closeButton + anchors.top: parent.top + anchors.topMargin: 1*mm + anchors.right: parent.right + anchors.rightMargin: 1*mm + //color:"white" + text: "\uf057" + onClicked: { + groupModelAppend(contacts,function(){ + contactlistRectangle.destroy() + }); + } } Component.onCompleted: { diff --git a/source-linux/qml/contactqml/ContactsListTab.qml b/source-linux/qml/contactqml/ContactsListTab.qml new file mode 100644 index 0000000..b8f0d2a --- /dev/null +++ b/source-linux/qml/contactqml/ContactsListTab.qml @@ -0,0 +1,96 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + +import QtQuick 2.11 +import QtQuick.Controls 2.12 +import QtQuick.Layouts 1.11 +import QtQuick.LocalStorage 2.0 +import "qrc:/js/helper.js" as Helperjs +//import "qrc:/js/news.js" as Newsjs +import "qrc:/js/service.js" as Service +import "qrc:/qml/contactqml" +import "qrc:/qml/genericqml" + +Item{ + id: contactsGridTab + Layout.fillWidth:true + Layout.fillHeight: true + function showContacts(contact){ + try {contactsModel.clear()} catch(e){print(e)}; + Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){ + for (var j=0;j +// +// 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 . + +import QtQuick 2.11 +import QtQuick.Controls 2.12 +import QtQuick.Layouts 1.11 +import QtQuick.LocalStorage 2.0 +import "qrc:/js/helper.js" as Helperjs +import "qrc:/js/news.js" as Newsjs +import "qrc:/qml/contactqml" +import "qrc:/qml/genericqml" + +Item{ + id: friendsGridTab + Layout.fillWidth:true + Layout.fillHeight: true + property int currentContact: 0 + + function showFriends(contact){ + try {friendsModel.clear()} catch(e){print(e)}; + Helperjs.readData(root.db,"friendshiprequests",login.username,function(friendrequestsobject){ + for (var i=0;i1){ + friendsobject[i].screen_name=friendsobject[i].screen_name+"+"+friendsobject[i].cid + } + friendsModel.append({"contact":friendsobject[i],"contactType":qsTr("Friends")}); + } + },"isFriend",1,"screen_name ASC"); + } + Connections{ + target:xhr + function onDownloaded(type,url,filename,i){ + if(type=="contactlist"){ + //print(url+" "+filename+" "+i) + friendsGridTab.currentContact=i+1; + if(friendsGridTab.currentContact==root.newContacts.length){ + friendsGridTab.showFriends(root.login.username) + } + } + } + } + MButton { + id: updateFriendsButton + text: "\uf021" + anchors.top: parent.top + anchors.topMargin: mm + anchors.right: parent.right + onClicked: { + try {friendsModel.clear()} catch(e){print(e)}; + Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){}); + updatenews.setDatabase(); + updatenews.login(); + updatenews.friendrequests(); + //root.contactLoadType="friends"; + Newsjs.requestFriends(root.login,db,root,function(nc){ + root.newContacts=nc + root.onNewContactsChanged(nc); + }) + } + } + + ProgressBar{ + id: newContactsProgress + width: 15*mm + height: updateFriendsButton.height + anchors.top: parent.top + anchors.right:updateFriendsButton.left + anchors.rightMargin:mm + visible: (friendsGridTab.currentContact!=(root.newContacts.length))?true:false + value: friendsGridTab.currentContact/root.newContacts.length + } + + Component { + id: sectionHeading + Rectangle { + width: friendsView.width + height: childrenRect.height + //color: "lightsteelblue" + required property string section + Text { + text: parent.section + font.bold: true + font.pointSize: osSettings.bigFontSize + } + } + } + //GridView { + ListView{ + id: friendsView + x:mm + y:updateFriendsButton.height+mm + width:friendsGridTab.width-2*mm + height:friendsGridTab.height-(updateFriendsButton.height+5*mm) + clip: true + spacing: 2 + function processContactSelection(contactobject){showContactdetails(contactobject)} + //add: Transition { + // NumberAnimation { properties: "x,y"; from: 300; duration: 1000 } + // } + model: friendsModel + delegate: ContactComponent { } + section.property: "contactType" + section.criteria: ViewSection.FullString + section.delegate: sectionHeading + } + ListModel{id:friendsModel} + + Component.onCompleted: { + root.friendsSignal.connect(showFriends); + friendsTabView.contactsSignal.connect(showFriends); + showFriends(root.login.username); + root.newContacts=[] + } +} diff --git a/source-linux/qml/contactqml/FriendsTab.qml b/source-linux/qml/contactqml/FriendsTab.qml index 8b27dfd..dbf794c 100644 --- a/source-linux/qml/contactqml/FriendsTab.qml +++ b/source-linux/qml/contactqml/FriendsTab.qml @@ -31,7 +31,6 @@ import QtQuick 2.11 import QtQuick.Controls 2.12 -//import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.11 import QtQuick.LocalStorage 2.0 import "qrc:/js/helper.js" as Helperjs @@ -45,60 +44,72 @@ Rectangle { color: "white" function showContactdetails(contact){ - rootstack.currentIndex=0; - bar.currentIndex=0; +// rootstack.currentIndex=0; +// bar.currentIndex=0; root.contactdetailsSignal(contact) } - function showProfile(callback){ - var profile=({}); - Helperjs.readData(db,"profiles",login.username,function(profileobject){ - var profilearray=[]; - for (var i in profileobject){ - profilearray.push(JSON.parse(Qt.atob(profileobject[i].profiledata))); - } - profile.profiles=profilearray; - }); - Helperjs.readData(db,"contacts",login.username,function(owner){ - profile.friendica_owner=owner[0]; - },"isFriend",2); - callback(profile) + BlueButton{ + x:mm + y:mm + z:2 + visible: !wideScreen + fontColor: "grey" + border.color: "transparent" + text: "\uf0c9" + font.pointSize: osSettings.bigFontSize + onClicked:{ + leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()} } TabBar { id: friendsbar - width: parent.width + width: osSettings.osType=="Android"?parent.width-2*osSettings.bigFontSize:parent.width height: 9*mm + x: osSettings.osType=="Android"?2*osSettings.bigFontSize:0 + visible: !wideScreen position:TabBar.Header currentIndex: 1 TabButton { text: qsTr("Me") - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize height: 7*mm } TabButton { text: qsTr("Friends") - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize height: 7*mm } TabButton { text: qsTr("Contacts") - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize height: 7*mm } TabButton { text: qsTr("Groups") - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize height: 7*mm } - } + } + + LeftDrawerLinux{ + id:leftDrawer + visible: wideScreen&&rootstackView.depth<2 + width: visible?osSettings.systemFontSize*15:0 + height: root.height-bar.height + } + + LeftDrawerAndroid{ + id: leftDrawerAndroid + } + StackLayout{ id:friendsTabView //anchors.fill: parent - x:mm - y:10*mm - width: parent.width-2*mm - height: parent.height-10*mm + width: wideScreen&&rootstackView.depth<2?parent.width-leftDrawer.width-mm:parent.width-mm//newstabitem.width/3*2:newstabitem.width + x: leftDrawer.width + y: friendsbar.visible?friendsbar.height:0 + height: friendsbar.visible?parent.height-friendsbar.height-mm:parent.height-mm currentIndex: friendsbar.currentIndex signal contactsSignal(var contact) signal groupsSignal(var username) @@ -113,267 +124,26 @@ Rectangle { else if (currentIndex==3){groupsSignal(root.login.username)} } - - Item{ - id:profileGridTab - Layout.fillWidth:true - Layout.fillHeight: true - Component.onCompleted:{ - showProfile(function(profile){ - var component = Qt.createComponent("qrc:/qml/contactqml/ProfileComponent.qml"); - var profilecomp = component.createObject(profileGridTab,{"profile": profile}); - }); - } - } - - Item{ - id: friendsGridTab - Layout.fillWidth:true - Layout.fillHeight: true - property int currentContact: 0 - - function showFriends(contact){ - try {friendsModel.clear()} catch(e){print(e)}; - Helperjs.readData(root.db,"contacts",login.username,function(friendsobject){ - for (var i=0;i1){ - friendsobject[i].screen_name=friendsobject[i].screen_name+"+"+friendsobject[i].cid - } - friendsModel.append({"contact":friendsobject[i]}); - } - },"isFriend",1,"screen_name ASC"); - } - Connections{ - target:xhr - function onDownloaded(type,url,filename,i){ - if(type=="contactlist"){ - //print(url+" "+filename+" "+i) - friendsGridTab.currentContact=i+1; - if(friendsGridTab.currentContact==root.newContacts.length){ - friendsGridTab.showFriends(root.login.username) - } - } - } - } - MButton { - id: updateFriendsButton - text: "\uf021" - anchors.top: parent.top - anchors.topMargin: mm - anchors.right: parent.right - height: 6*mm - width: 8*mm - onClicked: { - try {friendsModel.clear()} catch(e){print(e)}; - //root.contactLoadType="friends"; - Newsjs.requestFriends(root.login,db,root,function(nc){ - root.newContacts=nc - }) - } + Loader{ + id: profileLoader + source:(friendsTabView.currentIndex==0)? "qrc:/qml/contactqml/ProfileTab.qml":"" } - ProgressBar{ - id: newContactsProgress - width: 15*mm - height: updateFriendsButton.height - anchors.top: parent.top - anchors.right:updateFriendsButton.left - anchors.rightMargin:mm - visible: (friendsGridTab.currentContact!=(root.newContacts.length))?true:false - value: friendsGridTab.currentContact/root.newContacts.length - } - - //GridView { - ListView{ - id: friendsView - x:mm - y:updateFriendsButton.height+2*mm - width:friendsGridTab.width-2*mm - height:friendsGridTab.height-updateFriendsButton.height-2*mm - clip: true - spacing: 2 - function processContactSelection(contactobject){showContactdetails(contactobject)} - //add: Transition { - // NumberAnimation { properties: "x,y"; from: 300; duration: 1000 } - // } - model: friendsModel - delegate: ContactComponent { } - } - - ListModel{id:friendsModel} - - Component.onCompleted: { - root.friendsSignal.connect(showFriends); - friendsTabView.contactsSignal.connect(showFriends); - showFriends(root.login.username); - root.newContacts=[] - } + Loader{ + id: friendsListLoader + source:(friendsTabView.currentIndex==1)? "qrc:/qml/contactqml/FriendsListTab.qml":"" } - Item{ - id: contactsGridTab - Layout.fillWidth:true - Layout.fillHeight: true - function showContacts(contact){ - try {contactsModel.clear()} catch(e){print(e)}; - Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){ - for (var j=0;j +// +// 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 . + +import QtQuick 2.11 +import QtQuick.Controls 2.12 +//import QtQuick.Layouts 1.11 +import QtQuick.LocalStorage 2.0 +import "qrc:/js/helper.js" as Helperjs +import "qrc:/js/news.js" as Newsjs +import "qrc:/js/service.js" as Service +import "qrc:/qml/contactqml" +import "qrc:/qml/genericqml" + +Item{ + id: groupsGridTab + + function showGroups(username){ + try {groupsModel.clear()} catch(e){print(e)}; + Helperjs.readData(db, "groups",root.login.username,function(groupsobject){ + for (var j=0;j"+qsTr("profile id")+": "+profileid+"
" color:"black" } @@ -222,7 +220,7 @@ Rectangle { y:4.5*mm width:parent.width-2.5*mm wrapMode: Text.Wrap - font.pixelSize: 3*mm + font.pointSize: osSettings.systemFontSize text:profiletext color:"black" } @@ -234,7 +232,7 @@ Rectangle { id:namelabeltext width: namelabelflickable.width height: implicitHeight - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize textFormat:Text.RichText wrapMode: Text.Wrap text:""+qsTr("Description")+": "+(Qt.atob(profile.friendica_owner.description))+"
"+qsTr("Location")+": "+profile.friendica_owner.location+"
"+qsTr("Posts")+": "+profile.friendica_owner.statuses_count+ diff --git a/source-linux/qml/contactqml/ProfileTab.qml b/source-linux/qml/contactqml/ProfileTab.qml new file mode 100644 index 0000000..e13cbf9 --- /dev/null +++ b/source-linux/qml/contactqml/ProfileTab.qml @@ -0,0 +1,65 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + +import QtQuick 2.11 +import QtQuick.Controls 2.12 +//import QtQuick.Controls.Styles 1.4 +//import QtQuick.Layouts 1.11 +//import QtQuick.LocalStorage 2.0 +import "qrc:/js/helper.js" as Helperjs +import "qrc:/js/news.js" as Newsjs +import "qrc:/js/service.js" as Service +import "qrc:/qml/contactqml" +import "qrc:/qml/genericqml" + +Item{ + id:profileTab + function showProfile(callback){ + var profile=({}); + Helperjs.readData(db,"profiles",login.username,function(profileobject){ + var profilearray=[]; + for (var i in profileobject){ + profilearray.push(JSON.parse(Qt.atob(profileobject[i].profiledata))); + } + profile.profiles=profilearray; + }); + Helperjs.readData(db,"contacts",login.username,function(owner){ + profile.friendica_owner=owner[0]; + },"isFriend",2); + callback(profile) + } + Component.onCompleted:{ + showProfile(function(profile){ + var component = Qt.createComponent("qrc:/qml/contactqml/ProfileComponent.qml"); + var profilecomp = component.createObject(profileTab,{"profile": profile}); + }); + } +} diff --git a/source-linux/qml/friendiqa.qml b/source-linux/qml/friendiqa.qml index 6f9df43..1844b81 100644 --- a/source-linux/qml/friendiqa.qml +++ b/source-linux/qml/friendiqa.qml @@ -36,47 +36,56 @@ import QtQuick.Controls 2.4 import QtQuick.Layouts 1.11 import "qrc:/js/news.js" as Newsjs import "qrc:/js/service.js" as Service +import "qrc:/qml/genericqml" -StackView{ +ApplicationWindow{ id:root + title: "Friendiqa" + property var globaloptions: Service.readGO(db) property QtObject osSettings: {var tmp=Qt.createComponent("qrc:/qml/configqml/OSSettingsLinux.qml");return tmp.createObject(root)} - width: osSettings.appWidth - height:osSettings.appHeight + width: globaloptions.hasOwnProperty("appWidth")?globaloptions.appWidth:osSettings.appWidth + height:globaloptions.hasOwnProperty("appHeight")?globaloptions.appHeight:osSettings.appHeight + visible: true property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000] property var login: Service.readActiveConfig(db) - property var globaloptions: Service.readGO(db) + property real fontFactor: root.font.pixelSize/root.font.pointSize property var contactlist: [] property real mm: osSettings.osType=="Android"?Screen.pixelDensity:Screen.pixelDensity*1.5 - signal messageSignal(var friend) + property bool wideScreen : width>height signal fotoSignal(var username, var friend) signal directmessageSignal(var friend) signal newsSignal(var news) signal newstypeSignal(var type) signal friendsSignal(var username) signal contactdetailsSignal(var contact) + signal searchSignal (var searchterm) signal eventSignal(var contact) signal uploadSignal(var urls) signal sendtextSignal(var intenttext) signal changeimage(var method, var type, var id) signal updateSyncinterval(int interval) + signal replySignal(var newsobject) property var news:[] property var newContacts:[] + property var contactposts:[] //property string contactLoadType: "" property bool imagePicking: false - onLoginChanged:{ - if(login==""){root.push("qrc:/qml/configqml/AccountPage.qml")} - else{root.push(rootStackItem) - if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;} + function onLoginChanged(login){ + if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")} + else{//rootstackView.push(rootstack) + if (login.newsViewType!="" || login.newsViewType!=null){ + newstab.newstabstatus=login.newsViewType;} Newsjs.getCurrentContacts(login,db,function(contacts){ - contactlist=contacts})} + contactlist=contacts}) + } } - onNewContactsChanged:{ + function onNewContactsChanged(newContacts){ if(newContacts.length>0){// download contact images and update db var contacturls=[]; var contactnames=[]; - for (var link in newContacts){ + for (var link in newContacts){//print("new contact " +newContacts[link].screen_name); contacturls.push(newContacts[link].profile_image_url); contactnames.push(newContacts[link].screen_name); Service.updateContactInDB(login,db,newContacts[link].isFriend,newContacts[link]) @@ -91,6 +100,29 @@ StackView{ } + Connections { + target: root + function onWidthChanged(appWidth) { + if(osSettings.osType=="Linux" && Math.abs(appWidth-(globaloptions.appWidth||0))>50){ + Service.updateglobaloptions(db,"appWidth",appWidth) + } + } + } + Connections { + target: root + function onHeightChanged(appHeight) { + if(osSettings.osType=="Linux" && Math.abs(appHeight-(globaloptions.appHeight||0))>50){ + Service.updateglobaloptions(db,"appHeight",appHeight) + } + } + } + + + function showContact(contact){ //print(JSON.stringify(contact)); + rootstackView.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact}) + } + + Connections{ target:xhr function onDownloaded(type,url,filename,i){ @@ -104,10 +136,12 @@ StackView{ } } + FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"} - Keys.onReleased: {//print(event.key + "Backkey"+newstab.conversation.length+" "+root.depth) - if (event.key === osSettings.backKey) { + //Keys.onReleased: {//print(event.key + "Backkey"+newstab.conversation.length+" "+root.depth) + onClosing: { + //if (event.key === osSettings.backKey) { if (rootstack.currentIndex==0){ newstab.active=true; if (newstab.newstabstatus!=globaloptions.newsViewType){ @@ -119,294 +153,149 @@ StackView{ Newsjs.chatsfromdb(db,login.username,function(dbnews){ newsSignal(dbnews) })} + close.accepted=false; } - else if (newstab.conversation.length>0){newstab.conversation=[]} - else if (root.depth>1){root.pop()} + else if (newstab.conversation.length>0){ + newstab.conversation=[]; + close.accepted=false + } + else if (root.depth>1){ + root.pop(); + close.accepted=false + } else{ Service.cleanNews(root.db,function(){ Service.cleanHashtags(root.db,function(){ Service.cleanContacts(root.login,root.db,function(){ Qt.quit()}) })}) + close.accepted=true } } else if (rootstack.currentIndex==2){fotoSignal("backButton")} else {rootstack.currentIndex=0} - event.accepted = true - }} + //event.accepted = true + //} + } - Drawer{ - id: leftDrawer - width: 0.66* root.width - height: root.height - edge: Qt.LeftEdge - position: 1.0 - Column{ - x:mm - width:parent.width-mm - Label{ - text: login.hasOwnProperty("username")?login.username:"" - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - height: 6*mm + + + + header: ToolBar{ + position: wideScreen?ToolBar.Header:ToolBar.Footer + background: Rectangle{ + anchors.fill: parent + color: "#EEEEEE"//"#F8F8F8" + } + RowLayout{ + anchors.fill: parent + ToolButton{ + visible: !wideScreen + text: "\uf0c9" + onClicked:{ + leftDrawer.visible?leftDrawer.close():leftDrawer.open()} } -// Label{ -// text:login.hasOwnProperty("server")?"@"+login.server:"" -// font.pixelSize: 5*mm -// width: parent.width -// } - - Label{ - text: "\uf021 " + qsTr("Refresh") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); -// newstypeSignal("refresh") - updatenews.setDatabase(); - updatenews.login(); - updatenews.startsync(); + TabBar { + id: bar + Layout.fillWidth: true + //width: wideScreen?contentWidth:parent.width-10*mm + //x: 7*mm + onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex + TabButton { + text: "\uf03a" + background:Rectangle{ + anchors.fill: parent + color: "#EEEEEE" + } + } + TabButton { + text: "\uf0c0" + background:Rectangle{ + anchors.fill: parent + color: "#EEEEEE" + } + } + TabButton { + text: "\uf03e" + background:Rectangle{ + anchors.fill: parent + color: "#EEEEEE" + } + } + TabButton { + text: "\uf073" + background:Rectangle{ + anchors.fill: parent + color: "#EEEEEE" } } } - - - Label{ - text: "\uf1da " + qsTr("Timeline") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("timeline") - } - } - } - - Label{ - text: "\uf086 " + qsTr("Conversations") - width: parent.width - //font.pixelSize: 4*mm - font.pointSize: 16 - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("conversation") - } - } - } - - Label{ - text: "\uf005 " + qsTr("Favorites") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("favorites") - } - } - } - Label{ - text: "\uf0ec " + qsTr("Replies") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("replies") - } - } - } - - - Label{ - text: "\uf0ac " + qsTr("Public Timeline") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("publictimeline") - } - } - } - - Label{ - text: "\uf0c0 " + qsTr("Group news") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("groupnews") - } - } - } - - Label{ - text: "\uf002 " + qsTr("Search") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.close(); - newstypeSignal("search") - } - } - } - - Label{ - text: "\uf085 "+ qsTr("Settings") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked: {root.push("qrc:qml/configqml/ConfigPage.qml"); - leftDrawer.close() - } - } - } - Label{ - text: "\uf2bb " + qsTr("Accounts") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked: {root.push("qrc:qml/configqml/AccountPage.qml"); - leftDrawer.close() - } - } - } - - Label{ - text: "\uf08b " +qsTr("Quit") - //font.pixelSize: 4*mm - font.pointSize: 16 - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - Service.cleanNews(root.db,function(){ - Service.cleanHashtags(root.db,function(){ - Service.cleanContacts(root.login,root.db,function(){ - Qt.quit()}) - })}) - } - } - } - } } - Item{ - id:rootStackItem - width:parent.width - height: parent.height - //anchors.fill:parent - states: State { - name: "fullscreen"; - PropertyChanges { target: bar; height:0 } - PropertyChanges { target: rootstack; height:parent.height } - } + LeftDrawerAndroid{ + id: leftDrawer + visible:!wideScreen + } - transitions: Transition { - PropertyAnimation { properties: "height"; - easing.type: Easing.InOutQuad - duration: 1000 - } - } - TabBar { - id: bar - width: parent.width - height: 7*mm - position:TabBar.Footer - anchors.top: rootstack.bottom - onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex - TabButton { - text: "\uf03a" - font.pixelSize: 3*mm - height: 6*mm - } - TabButton { - text: "\uf0c0" - font.pixelSize: 3*mm - height: 6*mm - } - TabButton { - text: "\uf03e" - font.pixelSize: 3*mm - height: 6*mm - } +// states: State { +// name: "fullscreen"; +// PropertyChanges { target: bar; height:0 } +// PropertyChanges { target: rootstack; height:parent.height } +// } - TabButton { - text: "\uf073" - font.pixelSize: 3*mm - height: 6*mm - } - } - - StackLayout{ +// transitions: Transition { +// PropertyAnimation { properties: "height"; +// easing.type: Easing.InOutQuad +// duration: 1000 +// } +// } +StackView{id:rootstackView + width:root.width + height: root.height + initialItem: StackLayout{ id:rootstack - width:parent.width - height: parent.height-7*mm + width:rootstackView.width + height: rootstackView.height//-7*mm + //y:wideScreen?7*mm:0 currentIndex:bar.currentIndex - Loader{ id: newstab Layout.fillWidth:true Layout.fillHeight: true property string newstabstatus property var conversation:[] - property var contactposts:[] + source:(rootstack.currentIndex==0)? "qrc:/qml/newsqml/NewsTab.qml":"" } Loader{ id: friendstab - Layout.fillWidth:true - Layout.fillHeight: true +// Layout.fillWidth:true +// Layout.fillHeight: true source: (rootstack.currentIndex==1)?"qrc:/qml/contactqml/FriendsTab.qml":"" } Loader{ id: fotostab property string phototabstatus:"Images" - Layout.fillWidth:true - Layout.fillHeight: true +// Layout.fillWidth:true +// Layout.fillHeight: true source: (rootstack.currentIndex==2)?"qrc:/qml/photoqml/PhotoTab.qml":"" } Loader{ id: calendartab property string calendartabstatus:"Events" - Layout.fillWidth:true - Layout.fillHeight: true +// Layout.fillWidth:true +// Layout.fillHeight: true source: (rootstack.currentIndex==3)?"qrc:/qml/calendarqml/CalendarTab.qml":"" } - } +} + //} Component.onCompleted: { - forceActiveFocus(); - //print(xhr.networktype()); + onLoginChanged(login); + globaloptions=Service.readGO(db); if(osSettings.osType=="Android"){ var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml"); var IntentReceiverQml = component.createObject(root); @@ -416,5 +305,5 @@ StackView{ var LinuxSyncQml = component.createObject(root); } } -} +//} } diff --git a/source-linux/qml/genericqml/BlueButton.qml b/source-linux/qml/genericqml/BlueButton.qml index 96bd887..0e1e14d 100644 --- a/source-linux/qml/genericqml/BlueButton.qml +++ b/source-linux/qml/genericqml/BlueButton.qml @@ -32,12 +32,12 @@ import QtQuick 2.0 Rectangle{ id: blueButton - width: Math.max(mainText.width+2*mm,8*mm) + width: Math.max(mainText.width+2*mm,5*mm) height: 5*mm - color:"light blue"//"#EFEAEA" "sky blue" + border.color: "light blue" + color:"transparent"//"#EFEAEA" "sky blue" property alias fontColor: mainText.color -// border.color:"grey" -// border.width:1 + border.width:1 radius: mm property alias text: mainText.text property alias font: mainText.font @@ -51,8 +51,9 @@ Rectangle{ width: contentWidth height: contentHeight font.family:fontAwesome.name - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize text: "" + elide: Text.ElideNone } MouseArea{ id:buttonArea diff --git a/source-linux/qml/genericqml/ContactComponent.qml b/source-linux/qml/genericqml/ContactComponent.qml index a6926e4..e652156 100644 --- a/source-linux/qml/genericqml/ContactComponent.qml +++ b/source-linux/qml/genericqml/ContactComponent.qml @@ -35,15 +35,15 @@ import "qrc:/qml/genericqml" Item { id: contactComponent - height: 8*mm - width: parent.width + height: 5*root.fontFactor*osSettings.systemFontSize//8*mm + width: contactComponent.ListView.view.width//parent.width property var createdAtDate: new Date(contact.created_at) property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend==1)?"":( ""+qsTr("Connect")+"
") Rectangle { id: wrapper width:parent.width - height: 8*mm + height: parent.height//8*mm radius: 0.5*mm border.color: "grey" color:"white" @@ -51,34 +51,45 @@ Item { id: photoImage x:0.5*mm y:0.5*mm - width: 7*mm - height:7*mm + width: 4*root.fontFactor*osSettings.systemFontSize//7*mm + height:4*root.fontFactor*osSettings.systemFontSize//7*mm source:((contact.profile_image!="") && (typeof(contact.profile_image)=="string"))? "file://"+contact.profile_image : contact.profile_image_url onStatusChanged: {if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}} } - Column{ - width: wrapper.width-8*mm + Flow{ + width: wrapper.width-4*root.fontFactor*osSettings.systemFontSize//8*mm + height: wrapper.height-mm anchors.left: photoImage.right anchors.margins: 1*mm - spacing: mm + //spacing: mm + clip: true Label { id: namelabel - width: wrapper.width-4 - height: 3*mm + width: Math.min(wrapper.width-(photoImage.width+mm),contentWidth)//wrapper.width-4 + height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm text: contact.name - elide:Text.ElideRight + elide: contentWidth>wrapper.width-4*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone color: "#303030" - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize } Label { id: screennamelabel - width: wrapper.width-8*mm - height: 2.5*mm - text: "@"+contact.screen_name - elide:Text.ElideRight + width: Math.min(wrapper.width-4*root.fontFactor*osSettings.systemFontSize,contentWidth)//contentWidth+2*mm//wrapper.width-8*mm + height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm + text: "(@"+contact.screen_name+")" + elide: contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone color: "#303030" - font.pixelSize: 2.5*mm + font.pointSize: osSettings.bigFontSize + } + Label { + id: descriptionlabel + width: Math.min(wrapper.width-4*root.fontFactor*osSettings.systemFontSize,contentWidth)//contentWidth+2*mm//wrapper.width-8*mm + height: 2*root.fontFactor*osSettings.systemFontSize//2.5*mm + text: contact.description + elide:contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone + color: "#303030" + font.pointSize: osSettings.systemFontSize } } MouseArea{ diff --git a/source-linux/qml/genericqml/DrawerAccountComponent.qml b/source-linux/qml/genericqml/DrawerAccountComponent.qml new file mode 100644 index 0000000..2736acd --- /dev/null +++ b/source-linux/qml/genericqml/DrawerAccountComponent.qml @@ -0,0 +1,235 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + +import QtQuick 2.0 +import QtQuick.Controls 2.12 +import "qrc:/qml/genericqml" + +Item { + id: drawerAccountComponent + property var account: ({}) + width: parent.width + + Label{ + + y:0.5*root.fontFactor*osSettings.bigFontSize + width:parent.width + height: 1.5*osSettings.bigFontSize*root.fontFactor + verticalAlignment:Text.AlignBottom + font.pointSize: osSettings.bigFontSize + text: account.username + } + // Label{ + // text:login.hasOwnProperty("server")?"@"+login.server:"" + // font.pixelSize: 5*mm + // width: parent.width + // } + + Label{ + y:2*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + text: "\uf021 " + qsTr("Refresh") + MouseArea{ + anchors.fill:parent + onClicked: { + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newstypeSignal("refresh") +// updatenews.setDatabase(); +// updatenews.login(); +// updatenews.startsync(); + } + } + } + + Label{ + y:3.5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="Timeline" + text: "\uf1da " + qsTr("Timeline") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=0; + currentnewstabstatus="Timeline"; + newstypeSignal("timeline") + } + } + } + + Label{ + y:5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="Conversations" + text: "\uf086 " + qsTr("Conversations") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=0; + currentnewstabstatus="Conversations"; + newstypeSignal("conversation") + } + } + } + + + + Label{ + y:6.5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="Replies" + text: "\uf0ec " + qsTr("Replies") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=1 + currentnewstabstatus="Replies"; + newstypeSignal("replies") + } + } + } + + Label{ + y:8*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="DirectMessages" + text: "\uf0e0 " + qsTr("Direct Messages") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=2//newstypeSignal("replies") + currentnewstabstatus="DirectMessages"; + } + } + } + Label{ + y:9.5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="Favorites" + text: "\uf005 " + qsTr("Favorites") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=0; + currentnewstabstatus="Favorites"; + newstypeSignal("favorites") + } + } + } + + Label{ + y:11*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="Public Timeline" + text: "\uf0ac " + qsTr("Public Timeline") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=0; + currentnewstabstatus="Public Timeline"; + newstypeSignal("publictimeline") + } + } + } + + Label{ + y:12.5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="Groupnews" + text: "\uf0c0 " + qsTr("Group news") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=0; + currentnewstabstatus="Groupnews"; + newstypeSignal("groupnews") + } + } + } + + Label{ + y:14*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="Search" + text: "\uf002 " + qsTr("Search") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=0; + currentnewstabstatus="Search"; + newstypeSignal("search") + } + } + } + + Label{ + y:15.5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && currentnewstabstatus=="Notifications" + text: "\uf0f3 " + qsTr("Notifications") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + newsSwipeview.currentIndex=3; + currentnewstabstatus="Notifications"; + newstypeSignal("notifications") + } + } + } +} diff --git a/source-linux/qml/genericqml/DrawerAccountComponentContacts.qml b/source-linux/qml/genericqml/DrawerAccountComponentContacts.qml new file mode 100644 index 0000000..da545e0 --- /dev/null +++ b/source-linux/qml/genericqml/DrawerAccountComponentContacts.qml @@ -0,0 +1,126 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + +import QtQuick 2.0 +import QtQuick.Controls 2.12 +import "qrc:/qml/genericqml" + +Item { + id: drawerAccountComponent + property var account: ({}) + width: parent.width + + Label{ + + y:0.5*osSettings.bigFontSize + width:parent.width + height: 1.5*root.fontFactor*osSettings.bigFontSize + verticalAlignment:Text.AlignBottom + font.pointSize: osSettings.bigFontSize + text: account.username + } + // Label{ + // text:login.hasOwnProperty("server")?"@"+login.server:"" + // font.pixelSize: 5*mm + // width: parent.width + // } + + Label{ + y:2*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && friendsTabView.currentIndex==0 + text: " "+qsTr("Profile") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + friendsTabView.currentIndex=0; + profileLoader.source=""; + profileLoader.source="qrc:/qml/contactqml/ProfileTab.qml" + } + } + } + + Label{ + y:3.5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && friendsTabView.currentIndex==1 + text: " "+qsTr("Friends") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + friendsTabView.currentIndex=1 + friendsListLoader.source=""; + friendsListLoader.source="qrc:/qml/contactqml/FriendsListTab.qml" + } + } + } + + Label{ + y:5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && friendsTabView.currentIndex==2 + text: " "+qsTr("Contacts") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + friendsTabView.currentIndex=2 + } + } + } + + + + Label{ + y:6.5*root.fontFactor*osSettings.bigFontSize + width:parent.width + font.pointSize: osSettings.systemFontSize + font.bold: account.username==login.username && friendsTabView.currentIndex==3 + text: " "+qsTr("Groups") + MouseArea{ + anchors.fill:parent + onClicked:{ + login=account; + if(!wideScreen){leftDrawerAndroid.close()} + friendsTabView.currentIndex=3 + } + } + } + } + diff --git a/source-linux/qml/genericqml/ImagePickerLinux.qml b/source-linux/qml/genericqml/ImagePickerLinux.qml index ddb0045..2e77f79 100644 --- a/source-linux/qml/genericqml/ImagePickerLinux.qml +++ b/source-linux/qml/genericqml/ImagePickerLinux.qml @@ -62,7 +62,7 @@ Rectangle{ } Button{ id:closeButton - height: 8*mm + height: 3*root.fontFactor*osSettings.bigFontSize anchors.top: parent.top anchors.topMargin: 0.5*mm anchors.right: parent.right @@ -126,7 +126,7 @@ Rectangle{ width: fileIsDir?parent.width - 12*mm :imageView.width-mm anchors.bottom: folderImage.bottom color: fileIsDir?"black":"white" - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize wrapMode:Text.Wrap } Text { @@ -138,7 +138,7 @@ Rectangle{ width: 10*mm anchors.top: folderImage.top color: "green" - font.pixelSize: 10*mm + font.pointSize: 3*osSettings.bigFontSize } Image{id:folderImage diff --git a/source-linux/qml/genericqml/IntentReceiver.qml b/source-linux/qml/genericqml/IntentReceiver.qml index 8c3a007..062ab36 100644 --- a/source-linux/qml/genericqml/IntentReceiver.qml +++ b/source-linux/qml/genericqml/IntentReceiver.qml @@ -15,7 +15,7 @@ Item { Connections { target: SystemDispatcher - onDispatched: { + function onDispatched (type, message) { if ((type === m_IMAGE_MESSAGE)&& (root.imagePicking==false)) { var h=[]; for (var n in message.imageUrls){ diff --git a/source-linux/qml/genericqml/LeftDrawerAndroid.qml b/source-linux/qml/genericqml/LeftDrawerAndroid.qml new file mode 100644 index 0000000..cdcdea9 --- /dev/null +++ b/source-linux/qml/genericqml/LeftDrawerAndroid.qml @@ -0,0 +1,41 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + +import QtQuick 2.0 +import QtQuick.Controls 2.12 +import "qrc:/qml/configqml" + +Drawer{ + id: leftDrawer + width: root.fontFactor*osSettings.systemFontSize*10 + height: root.height + LeftDrawerScrollview{} +} diff --git a/source-linux/qml/genericqml/LeftDrawerLinux.qml b/source-linux/qml/genericqml/LeftDrawerLinux.qml new file mode 100644 index 0000000..68166b3 --- /dev/null +++ b/source-linux/qml/genericqml/LeftDrawerLinux.qml @@ -0,0 +1,55 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + +import QtQuick 2.0 +import QtQuick.Controls 2.12 +import "qrc:/qml/configqml" + +Rectangle{ +// id: leftDrawer +// width: osSettings.systemFontSize*30 +// height: root.height-bar.height + //y: bar.height + signal opened() + + LeftDrawerScrollview{ + width:parent.width-mm + height:parent.height + x:mm + } + Rectangle{ + width: 1 + height: leftDrawer.height + anchors.right: leftDrawer.right + color: "#EEEEEE" + } + Component.onCompleted: {opened();} +} diff --git a/source-linux/qml/genericqml/MButton.qml b/source-linux/qml/genericqml/MButton.qml index b6cb841..74c1803 100644 --- a/source-linux/qml/genericqml/MButton.qml +++ b/source-linux/qml/genericqml/MButton.qml @@ -32,10 +32,11 @@ import QtQuick 2.6 import QtQuick.Controls 2.12 Button{ id: mButton - width: Math.max(text.width+2*mm,8*mm) + property alias color: bg.color + width: Math.max(text.width+2*mm,2*root.fontFactor*osSettings.bigFontSize) //radius: mm - height: 6*mm + height: 2*root.fontFactor*osSettings.bigFontSize //color: Material.grey - font.pixelSize: 3*mm - background: Rectangle{color:"#F8F8F8";radius: 0.5*mm} + font.pointSize: osSettings.bigFontSize + background: Rectangle{id:bg;color:"#F3F3F3";radius: 0.5*mm} } diff --git a/source-linux/qml/genericqml/Search.qml b/source-linux/qml/genericqml/Search.qml index 6046ad1..eafa617 100644 --- a/source-linux/qml/genericqml/Search.qml +++ b/source-linux/qml/genericqml/Search.qml @@ -41,7 +41,7 @@ Rectangle { id:searchComponent Rectangle{ - color: "white" + color: "#EEEEEE" radius:0.5*mm anchors.left: parent.left anchors.leftMargin:mm @@ -53,7 +53,7 @@ Rectangle { TextInput { id: searchText focus: true - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize wrapMode: Text.Wrap anchors.fill: parent selectByMouse: true diff --git a/source-linux/qml/newsqml/ContactPage.qml b/source-linux/qml/newsqml/ContactPage.qml index 778682c..e0b3bcb 100644 --- a/source-linux/qml/newsqml/ContactPage.qml +++ b/source-linux/qml/newsqml/ContactPage.qml @@ -33,154 +33,290 @@ import QtQuick 2.0 import QtQuick.Controls 2.12 import "qrc:/js/helper.js" as Helperjs +import "qrc:/js/news.js" as Newsjs +import "qrc:/js/service.js" as Service import "qrc:/qml/genericqml" -Rectangle { + +Page { id:contactList - color: "white" property var contact:({}) property string profileimagesource:contact.profile_image - ListView { - id: contactView - x:mm - y:9*mm - width: contactList.width-4*mm - height:contactList.height-10*mm - clip: true - spacing: 0 - header: contactHeader - model: contactModel - delegate: Newsitem{} - } + + //function backRequested(){pageStack.pop()} + + function getDateDiffString (seconds){ + var timestring=""; + if (seconds<60) {timestring= Math.round(seconds) + " " +qsTr("seconds");} + else if (seconds<90){timestring= Math.round(seconds/60) + " " +qsTr("minute") ;} + else if (seconds<3600){timestring= Math.round(seconds/60) + " " +qsTr("minutes");} + else if (seconds<5400){timestring= Math.round(seconds/3600) + " " +qsTr("hour");} + else if (seconds<86400){timestring= Math.round(seconds/3600) + " " +qsTr("hours");} + else if (seconds<129600){timestring= Math.round(seconds/86400) + " " +qsTr("day");} + else if (seconds<3888000){timestring= Math.round(seconds/86400) + " " +qsTr("days");} + else if (seconds<5832000){timestring= Math.round(seconds/3888000) + " " +qsTr("month");} + else if (seconds<69984000){timestring= Math.round(seconds/3888000) + " " +qsTr("months");} + else {timestring= Math.round(seconds/46656000) + " " + qsTr("years");} + + return timestring; + } + + function getActivitiesView(newsitemobject){ + var likeText="";var dislikeText="";var attendyesText="";var attendnoText="";var attendmaybeText=""; var self={}; + try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_activities')){ + if (newsitemobject.friendica_activities.like.length>0){ + if (newsitemobject.friendica_activities.like.length==1){likeText= newsitemobject.friendica_activities.like[0].name+" "+ qsTr("likes this.")} + else {likeText= newsitemobject.friendica_activities.like.length+" "+ qsTr("like this.")} + } + if (newsitemobject.friendica_activities.dislike.length>0){ + if (newsitemobject.friendica_activities.dislike.length==1){dislikeText= newsitemobject.friendica_activities.dislike[0].name+" "+ qsTr("doesn't like this.")} + else {dislikeText= newsitemobject.friendica_activities.dislike.length+" "+ qsTr("don't like this.")} + } + if (newsitemobject.friendica_activities.attendyes.length>0){ + if (newsitemobject.friendica_activities.attendyes.length==1){attendyesText=newsitemobject.friendica_activities.attendyes[0].name+" "+ qsTr("will attend.")} + else {attendyesText= newsitemobject.friendica_activities.attendyes.length+" "+ qsTr("persons will attend.")} + } + if (newsitemobject.friendica_activities.attendno.length>0){ + if (newsitemobject.friendica_activities.attendno.length==1){attendnoText= newsitemobject.friendica_activities.attendno[0].name+" "+ qsTr("will not attend.")} + else {attendnoText= newsitemobject.friendica_activities.attendno.length+" "+ qsTr("persons will not attend.")} + } + if (newsitemobject.friendica_activities.attendmaybe.length>0){ + if (newsitemobject.friendica_activities.attendmaybe.length==1){attendmaybeText= newsitemobject.friendica_activities.attendmaybe[0].name+" "+ qsTr("may attend.")} + else {attendmaybeText= newsitemobject.friendica_activities.attendmaybe.length+" "+ qsTr("persons may attend.")} + } + //var friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self); + }} catch(e){print("Activities "+e+ " "+JSON.stringify(newsitemobject.friendica_activities))} + return {likeText:likeText,dislikeText:dislikeText,attendyesText:attendyesText,attendnoText:attendnoText,attendmaybeText:attendmaybeText} + } + + function showConversation(conversationIndex,newsitemobject){ + 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.setParam("id",newsitemobject.id) + xhr.get(); + } + else{ + xhr.clearParams(); + xhr.setLogin(login.username+":"+Qt.atob(login.password)); + xhr.setUrl(login.server); + xhr.setApi("/api/direct_messages/conversation"); + xhr.setParam("uri",newsitemobject.statusnet_conversation_id) + xhr.get(); + } + } + + Timer {id:contacttimer; interval: 50; running: false; repeat: false + onTriggered: { + root.newContacts=Newsjs.findNewContacts(root.news,root.contactlist); + root.onNewContactsChanged(root.newContacts); + Newsjs.storeNews(login,db,root.news,root) + } + } + + ListView { + id: contactView + x:mm + y:4*root.fontFactor*osSettings.bigFontSize + width: contactList.width-2*mm + height:contactList.height-7*root.fontFactor*osSettings.bigFontSize + clip: true + spacing: 0 + property string viewtype: "conversation" + header: contactHeader + model: contactModel + delegate: Newsitem{} + } + BusyIndicator{ - id: contactBusy - anchors.centerIn:parent - width:10*mm - height: 10*mm - running: true - } + id: contactBusy + anchors.centerIn:parent + width:10*mm + height: 10*mm + running: true + } - Component { id: contactHeader - Rectangle{ - border.color: "#EEEEEE" - border.width: 1 - color:"white" - width:contactView.width - height: profileImage.height+namelabel.height+detailtext.height+7*mm - //height: wrapper.height - property var createdAtDate: new Date(contact.created_at) - property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( ""+qsTr("Connect")+"
") + Component { id: contactHeader + Rectangle{ + border.color: "#EEEEEE" + border.width: 1 + color:"white" + width:contactView.width + height: contactView.width<35*root.fontFactor*osSettings.systemFontSize?(profileImage.height+namelabel.height+detailtext.height+7*mm):Math.max(profileImage.height,(buttonflow.height+namelabel.height+detailtext.height))+7*mm + //height: wrapper.height + property var createdAtDate: new Date(contact.created_at) + property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( ""+qsTr("Connect")+"
") - Image { - id: profileImage - x:mm - y:mm - width: contactView.width/2 - height:width - source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url - onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} - Connections{ - target:contactList - onProfileimagesourceChanged:profileImage.source=profileimagesource - } - } - Column{id:buttoncolumn - anchors.right: parent.right - anchors.rightMargin: mm - y: mm - spacing:4 + Image { + id: profileImage + x:mm + y:mm + width: Math.min(15*root.fontFactor*osSettings.bigFontSize,contactView.width/2) //contactView.width/2 + height:width + source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url + onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} + Connections{ + target:contactList + onProfileimagesourceChanged:profileImage.source=profileimagesource + } + } + Flow{id:buttonflow + anchors.right: parent.right + anchors.rightMargin: mm + width: contactView.width - (profileImage.width+3*mm) + height: (contact.hasOwnProperty("acct"))?21*mm:15*mm//profileImage.height + y: mm + spacing:4 - MButton{ - id:photobutton - height: 6*mm - width: 8*mm - text: "\uf03e" // "Photos" - //font.pixelSize: 3*mm - visible:(contact.network=="dfrn") - onClicked:{ - rootstack.currentIndex=2; - bar.currentIndex=2; - fotostab.phototabstatus="Contact"; + BlueButton{ + id:photobutton + height: 6*mm + width: 8*mm + text: "\uf03e" // "Photos" + visible:(contact.network=="dfrn") + onClicked:{ + rootstack.currentIndex=2; + bar.currentIndex=2; + fotostab.phototabstatus="Contact"; - //fotostab.active=true; - fotoSignal(root.login,contact) ; - newsStack.pop(); - } - } + //fotostab.active=true; + fotoSignal(root.login,contact) ; + rootstackView.pop(); + } + } - MButton{ - id:dmbutton - height: 6*mm - width: 8*mm - visible: (contact.following=="true") - text: "\uf040" //"DM" - //font.pixelSize: 3*mm - onClicked:{ - rootstack.currentIndex=0; - newsSwipeview.currentIndex=2; - directmessageSignal(contact) - } - } + BlueButton{ + id:dmbutton + height: 6*mm + width: 8*mm + visible: (contact.following=="true") + text: "\uf040" //"DM" + onClicked:{ + rootstack.currentIndex=0; + newsSwipeview.currentIndex=2; + directmessageSignal(contact) + } + } - MButton{ - id:eventbutton - visible:(contact.network=="dfrn") - height: 6*mm - width: 8*mm - text:"\uf073" - //font.pixelSize: 3*mm - onClicked:{ - rootstack.currentIndex=3; - bar.currentIndex=3; - calendartab.calendartabstatus="Friend" - eventSignal(contact); - newsStack.pop() - } - } + BlueButton{ + id:eventbutton + visible:(contact.network=="dfrn") + height: 6*mm + width: 8*mm + text:"\uf073" + onClicked:{ + rootstack.currentIndex=3; + bar.currentIndex=3; + calendartab.calendartabstatus="Friend" + eventSignal(contact); + rootstackView.pop() + } + } + BlueButton{ + id:approvebutton + visible:(contact.hasOwnProperty("acct")) + height: 6*mm + //width: implicitContentWidth+2*mm//8*mm + text:qsTr("Approve") + onClicked:{ - }//Column end - Label { - id: namelabel - x:mm - width: contactView.width-2*mm - height: implicitHeight - text:contact.name+" (@"+contact.screen_name+")" - wrapMode: Text.Wrap//elide:Text.ElideRight - color: "#303030" - font.pixelSize: 4*mm - anchors.top: profileImage.bottom - anchors.topMargin: mm - } - Text{ - id:detailtext - anchors.top: namelabel.bottom - anchors.topMargin: 2*mm - x:mm - width: contactView.width-2*mm - height: implicitHeight - font.pixelSize: 2.5*mm - textFormat:Text.RichText - wrapMode: Text.Wrap - text:""+qsTr("Description")+": "+contact.description+"
"+qsTr("Location")+": "+contact.location+"
"+qsTr("Posts")+": "+contact.statuses_count+ - "
"+qsTr("URL")+": "+contact.url+"
"+ - connectUrl+ ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale()) - onLinkActivated: { + Helperjs.friendicaPostRequest(login,"/api/v1/follow_requests/" + contact.id + "/authorize",'',"POST",root,function(returnvalue){ + Helperjs.deleteData(db,"friendshiprequests",login.username,function(){},"id", contact.id) + }) + root.friendsSignal(); + rootstackView.pop() + } + } + BlueButton{ + id:rejectbutton + visible:(contact.hasOwnProperty("acct")) + height: 6*mm + //width: implicitContentWidth+2*mm//8*mm + text:qsTr("Reject") + onClicked:{ + Helperjs.friendicaPostRequest(login,"/api/v1/follow_requests/" + contact.id + "/reject",'',"POST",root,function(returnvalue){ + Helperjs.deleteData(db,"friendshiprequests",login.username,function(){},"id", contact.id) + }) + root.friendsSignal(); + rootstackView.pop() + } + } + BlueButton{ + id:ignorebutton + visible:(contact.hasOwnProperty("acct")) + height: 6*mm + //width: implicitContentWidth+2*mm//8*mm + text:qsTr("Ignore") + onClicked:{ + Helperjs.friendicaPostRequest(login,"/api/v1/follow_requests/" + contact.id + "/ignore",'',"POST",root,function(returnvalue){ + Helperjs.deleteData(db,"friendshiprequests",login.username,function(){},"id", contact.id) + }); + root.friendsSignal(); + rootstackView.pop() + } + } + }//Flow end + Label { + id: namelabel + //x:mm + width: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.width-2*mm:contactView.width-17*root.fontFactor*osSettings.bigFontSize + height: implicitHeight + text:contact.name+" (@"+contact.screen_name+")" + wrapMode: Text.Wrap//elide:Text.ElideRight + color: "#303030" + font.pointSize: 1.2*osSettings.bigFontSize + font.family: "Noto Sans" + anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom + anchors.margins: mm + anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right + } + Text{ + id:detailtext + anchors.top: namelabel.bottom + anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right + anchors.margins: 2*mm + //x:mm + width: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.width-2*mm:contactView.width-17*root.fontFactor*osSettings.bigFontSize + height: implicitHeight + font.pointSize: osSettings.systemFontSize + font.family: "Noto Sans" + textFormat:Text.RichText + wrapMode: Text.Wrap + text:""+qsTr("Description")+": "+contact.description+"
"+qsTr("Location")+": "+contact.location+"
"+qsTr("Posts")+": "+contact.statuses_count+ + "
"+qsTr("URL")+": "+contact.url+"
"+ + connectUrl+ ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale()) + onLinkActivated: { Qt.openUrlExternally(link)} - } + } - //} - } + //} + } + + }//Component end - }//Component end Connections{ - target:newstab + target:xhr + function onError(data,url,api,code){ + if (data !="contactlist"){Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);} + contactBusy.running=false; + } + function onSuccess(data,api){ + Service.processNews(api,data) + replySignal("") + } + } + + Connections{ + target:root function onContactpostsChanged(){ - if (newstab.contactposts.length>0){profileimagesource=newstab.contactposts[0].user.profile_image_url_large} + if (root.contactposts.length>0&&root.contactposts[0]!=null){profileimagesource=root.contactposts[0].user.profile_image_url_large} contactBusy.running=false; contactModel.clear(); var currentTime= new Date(); - var msg = {'currentTime': currentTime, 'model': contactModel,'news':newstab.contactposts, 'options':globaloptions}; + var msg = {'currentTime': currentTime, 'model': contactModel,'news':root.contactposts, 'options':globaloptions}; contactWorker.sendMessage(msg) } } @@ -193,25 +329,26 @@ Rectangle { } MButton { - id: closeButton - height: 6*mm - width: 8*mm - anchors.top: parent.top - anchors.topMargin: 1*mm - anchors.right: parent.right - anchors.rightMargin: 1*mm - text: "\uf057" - //font.pixelSize: 3*mm - onClicked: { - newsStack.pop() - } + id: closeButton + anchors.top: parent.top + anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize + anchors.right: parent.right + anchors.rightMargin: 1*mm + width: 2*root.fontFactor*osSettings.bigFontSize; + text: "\uf057" + //font.pixelSize: 3*mm + onClicked: { + rootstackView.pop() + } } Component.onCompleted: { - xhr.clearParams(); - xhr.setLogin(login.username+":"+Qt.atob(login.password)); - xhr.setUrl(login.server); - xhr.setApi("/api/statuses/user_timeline"); - xhr.setParam("user_id",contact.id) - xhr.get(); + xhr.clearParams(); + xhr.setLogin(login.username+":"+Qt.atob(login.password)); + xhr.setUrl(login.server); + if(contact.isFriend==1 || contact.hasOwnProperty("acct")){ + xhr.setApi("/api/statuses/user_timeline");} + else{xhr.setApi("/api/users/show");} + xhr.setParam("user_id",contact.id) + xhr.get(); } } diff --git a/source-linux/qml/newsqml/Conversation.qml b/source-linux/qml/newsqml/Conversation.qml index 9b4fff5..a511617 100644 --- a/source-linux/qml/newsqml/Conversation.qml +++ b/source-linux/qml/newsqml/Conversation.qml @@ -36,19 +36,66 @@ import "qrc:/js/helper.js" as Helperjs import "qrc:/qml/genericqml" import "qrc:/qml/newsqml" -Rectangle { +Page { id:conversationList property var news:[] - color: "white" +// color: "white" + //function backRequested(){pageStack.pop()} +// width:root.width +// height: root.height-7*mm + + function getDateDiffString (seconds){ + var timestring=""; + if (seconds<60) {timestring= Math.round(seconds) + " " +qsTr("seconds");} + else if (seconds<90){timestring= Math.round(seconds/60) + " " +qsTr("minute") ;} + else if (seconds<3600){timestring= Math.round(seconds/60) + " " +qsTr("minutes");} + else if (seconds<5400){timestring= Math.round(seconds/3600) + " " +qsTr("hour");} + else if (seconds<86400){timestring= Math.round(seconds/3600) + " " +qsTr("hours");} + else if (seconds<129600){timestring= Math.round(seconds/86400) + " " +qsTr("day");} + else if (seconds<3888000){timestring= Math.round(seconds/86400) + " " +qsTr("days");} + else if (seconds<5832000){timestring= Math.round(seconds/3888000) + " " +qsTr("month");} + else if (seconds<69984000){timestring= Math.round(seconds/3888000) + " " +qsTr("months");} + else {timestring= Math.round(seconds/46656000) + " " + qsTr("years");} + + return timestring; + } + + function getActivitiesView(newsitemobject){ + var likeText="";var dislikeText="";var attendyesText="";var attendnoText="";var attendmaybeText=""; var self={}; + try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_activities')){ + if (newsitemobject.friendica_activities.like.length>0){ + if (newsitemobject.friendica_activities.like.length==1){likeText= newsitemobject.friendica_activities.like[0].name+" "+ qsTr("likes this.")} + else {likeText= newsitemobject.friendica_activities.like.length+" "+ qsTr("like this.")} + } + if (newsitemobject.friendica_activities.dislike.length>0){ + if (newsitemobject.friendica_activities.dislike.length==1){dislikeText= newsitemobject.friendica_activities.dislike[0].name+" "+ qsTr("doesn't like this.")} + else {dislikeText= newsitemobject.friendica_activities.dislike.length+" "+ qsTr("don't like this.")} + } + if (newsitemobject.friendica_activities.attendyes.length>0){ + if (newsitemobject.friendica_activities.attendyes.length==1){attendyesText=newsitemobject.friendica_activities.attendyes[0].name+" "+ qsTr("will attend.")} + else {attendyesText= newsitemobject.friendica_activities.attendyes.length+" "+ qsTr("persons will attend.")} + } + if (newsitemobject.friendica_activities.attendno.length>0){ + if (newsitemobject.friendica_activities.attendno.length==1){attendnoText= newsitemobject.friendica_activities.attendno[0].name+" "+ qsTr("will not attend.")} + else {attendnoText= newsitemobject.friendica_activities.attendno.length+" "+ qsTr("persons will not attend.")} + } + if (newsitemobject.friendica_activities.attendmaybe.length>0){ + if (newsitemobject.friendica_activities.attendmaybe.length==1){attendmaybeText= newsitemobject.friendica_activities.attendmaybe[0].name+" "+ qsTr("may attend.")} + else {attendmaybeText= newsitemobject.friendica_activities.attendmaybe.length+" "+ qsTr("persons may attend.")} + } + //var friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self); + }} catch(e){print("Activities "+e+ " "+JSON.stringify(newsitemobject.friendica_activities))} + return {likeText:likeText,dislikeText:dislikeText,attendyesText:attendyesText,attendnoText:attendnoText,attendmaybeText:attendmaybeText} + } ListView { id: conversationView property string viewtype: "conversation" - x:3*mm - y:8*mm - width: conversationList.width-4*mm - height:conversationList.height-10*mm + //x:3*mm + //y:8*mm + width: conversationList.width//-4*mm + height:conversationList.height//-20*mm clip: true spacing: 0 footer: MessageSend{conversation:true} @@ -58,7 +105,7 @@ Rectangle { BusyIndicator{ id: conversationBusy anchors.horizontalCenter: conversationView.horizontalCenter - anchors.top:conversationList.top + anchors.top:conversationView.top anchors.topMargin: 2*mm width:10*mm height: 10*mm @@ -69,7 +116,7 @@ Rectangle { target:newstab onConversationChanged:{ if(newstab.conversation.length==0){ - newsStack.pop() + rootstackView.pop() } else { conversationBusy.running=false; conversationModel.clear(); var currentTime= new Date(); @@ -88,16 +135,16 @@ Rectangle { MButton { id: closeButton - height: 6*mm - width: 8*mm anchors.top: parent.top anchors.topMargin: 1*mm anchors.right: parent.right anchors.rightMargin: 1*mm + width: 2*root.fontFactor*osSettings.bigFontSize; text: "\uf057" onClicked: { //newsView.positionViewAtIndex(newsStack.conversationIndex,ListView.Beginning); newstab.conversation=[]; + if (rootstackView.depth>1){ rootstackView.pop()} } } diff --git a/source-linux/qml/newsqml/FriendicaActivities.qml b/source-linux/qml/newsqml/FriendicaActivities.qml index f39063e..0fdc91e 100644 --- a/source-linux/qml/newsqml/FriendicaActivities.qml +++ b/source-linux/qml/newsqml/FriendicaActivities.qml @@ -74,7 +74,7 @@ Rectangle { onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} } Text{ - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize anchors.left: contactImage.right anchors.margins: 1*mm text:contact.name @@ -86,9 +86,8 @@ Rectangle { } }} - BlueButton { + MButton { id: closeButton - //width:10*mm anchors.top: parent.top anchors.topMargin: 1*mm anchors.right: parent.right diff --git a/source-linux/qml/newsqml/Hashtag.qml b/source-linux/qml/newsqml/Hashtag.qml index 711a10c..47602c5 100644 --- a/source-linux/qml/newsqml/Hashtag.qml +++ b/source-linux/qml/newsqml/Hashtag.qml @@ -46,6 +46,6 @@ Rectangle { } MouseArea{ anchors.fill: parent - onClicked:{search(hashtagText.text.replace("#",""))} + onClicked:{root.searchSignal(hashtagText.text.replace("#",""))} } } diff --git a/source-linux/qml/newsqml/MessageSend.qml b/source-linux/qml/newsqml/MessageSend.qml index 9be7e66..1cd98bb 100644 --- a/source-linux/qml/newsqml/MessageSend.qml +++ b/source-linux/qml/newsqml/MessageSend.qml @@ -43,9 +43,9 @@ import "qrc:/qml/genericqml" Rectangle{ color:"#EEEEEE" width:parent.width - height: (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0 + height: conversation || (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0 id:messageSend - visible:(newsSwipeview.stacktype!="Notifications")?true:false + visible:conversation || (newsSwipeview.stacktype!="Notifications")||(newstab.newstabstatus!="Search")?true:false property string parentId: "" property bool textfocus: false //property var parentObject:({}) @@ -61,14 +61,12 @@ Rectangle{ property var group_allow:login.hasOwnProperty("permissions")?login.permissions[2]:[] property var group_deny:login.hasOwnProperty("permissions")?login.permissions[3]:[] - function directmessagePrepare(friend){ messageSend.state="active"; reply_to_user=friend.screen_name; receiverLabel.text=friend.screen_name; } - function sendUrls(urls){ if((urls.length==1 && attachImageURLs.length==0)){ attachImage(urls); @@ -87,15 +85,13 @@ Rectangle{ } } - - function attachImage(url){ imageAttachment.source=url.toString(); } function statusUpdate(title,status,in_reply_to_status_id,attachImageURL) { //xhr.url= login.server + "/api/statuses/update.json"; - newsBusy.running=true; + try{newsBusy.running=true;}catch(e){conversationBusy.running=true} xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setUrl(login.server); xhr.setApi("/api/statuses/update"); @@ -116,7 +112,7 @@ Rectangle{ }; xhr.post(); Newsjs.storeHashtags(login,db,status,root) - } + } function dmUpdate(title,text,replyto,screen_name,attachImageURL) { newsBusy.running=true; @@ -139,7 +135,7 @@ Rectangle{ reply_to_user=newsitemobject.user.screen_name; parentId=newsitemobject.id } else { - messageSend.state=""; + messageSend.state=null; reply_to_user=""; parentId=""; bodyField.text=""; @@ -152,6 +148,9 @@ Rectangle{ Newsjs.listFriends(login,db,function(contacts){ contactModel.clear(); for (var i=0;i1) onVisibleChanged: if ((visible==true)&&(conversation==true)){ @@ -211,21 +229,22 @@ Rectangle{ TextArea { id: bodyField property string contactprefix:"" + property string placeholder: osSettings.osType=="Linux"? qsTr(" Drop your Content here."):"" anchors.fill: parent - font.pixelSize: 3*mm + font.pointSize: osSettings.systemFontSize font.family: "Noto Sans" wrapMode: Text.Wrap selectByMouse: true - placeholderText: conversation?"": qsTr("What's on your mind?") + placeholderText: conversation?"": (qsTr("What's on your mind?")+placeholder) textFormat: TextEdit.RichText //TextEdit.PlainText onLineCountChanged: (conversation==true)?conversationView.contentY=conversationView.contentY+3*mm:newsView.contentY=newsView.contentY+3*mm onLinkActivated:{Qt.openUrlExternally(link)} - onActiveFocusChanged:{ + onActiveFocusChanged:{//print(placeholder) if (activeFocus==true){ if (conversation==true){ - setParent(conversationModel.get(0).newsitemobject); + if(parentId==""){setParent(conversationModel.get(0).newsitemobject);} messageSend.state="conversation"; - conversationView.contentY=conversationView.contentY+20*mm + try{conversationView.contentY=conversationView.contentY+20*mm}catch(e){} } else if (textfocus==false){ messageSend.state="active"; newsView.positionViewAtBeginning(); @@ -347,18 +366,18 @@ Rectangle{ height: 12*mm x: 0.5*mm MButton{id:permButton - visible: (newsSwipeview.stacktype!=="DirectMessages") - height: 6*mm - width: 7*mm + visible: !conversation && (newsSwipeview.stacktype!=="DirectMessages") + height: 2*root.fontFactor*osSettings.bigFontSize + width: 2*root.fontFactor*osSettings.bigFontSize text: ((contact_allow.length==0)&&(contact_deny.length==0)&&(group_allow.length==0)&&(group_deny.length==0))?"\uf09c":"\uf023" onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}} } MButton { id: attachButton - height: 6*mm - width: 7*mm + height: 2*root.fontFactor*osSettings.bigFontSize + width: 2*root.fontFactor*osSettings.bigFontSize text: "\uf03e" - visible:(newsSwipeview.stacktype!="DirectMessages") + visible:!conversation?(newsSwipeview.stacktype!="DirectMessages"):true onClicked: { if (attachImageURLs.length>0){//Server currently accepts only one attachment Helperjs.showMessage( qsTr("Error"),qsTr("Only one attachment supported at the moment.\n Remove other attachment first!"), messageColumn) @@ -376,23 +395,23 @@ Rectangle{ MButton{ id:smileyButton text: "\uf118" - height: 6*mm - width: 7*mm + height: 2*root.fontFactor*osSettings.bigFontSize + width: 2*root.fontFactor*osSettings.bigFontSize onClicked: {if (smileyDialog.visible==false){smileyDialog.visible=true} else{smileyDialog.visible=false}} } MButton{ id:hastagButton text: "\uf292" - height: 6*mm - width: 7*mm + height: 2*root.fontFactor*osSettings.bigFontSize + width: 2*root.fontFactor*osSettings.bigFontSize onClicked: {if (tagSelector.visible==false){hashtagmenu()} else{tagSelector.visible=false}} } MButton { id: cancelButton - height: 6*mm - width: 7*mm + height: 2*root.fontFactor*osSettings.bigFontSize + width: 2*root.fontFactor*osSettings.bigFontSize text: "\uf057" onClicked: { if (textfocus==true){messageSend.destroy()} @@ -409,21 +428,21 @@ Rectangle{ } MButton { id: sendButton - height: 6*mm - width: 7*mm + height: 2*root.fontFactor*osSettings.bigFontSize + width: 2*root.fontFactor*osSettings.bigFontSize text: "\uf1d9" onClicked: { var title=titleField.text.replace("\"","\'"); var body=bodyField.getFormattedText(0,bodyField.length); var dmbody=bodyField.getText(0,bodyField.length); - if (newsSwipeview.stacktype!=="DirectMessages"){ + if (conversation || newsSwipeview.stacktype!=="DirectMessages"){ statusUpdate(title,body,parentId,attachImageURLs)} else { if (reply_to_user!=""){dmUpdate(title,dmbody,parentId,reply_to_user)} else{Helperjs.showMessage(qsTr("Error"),qsTr("No receiver supplied!"),root)} } if (conversation==true){ - newstab.newstabstatus=root.globaloptions.newsViewType; newsStack.pop(null) + newstab.newstabstatus=root.globaloptions.newsViewType; rootstackView.pop(null) } } } @@ -432,7 +451,7 @@ Rectangle{ SmileyDialog{id:smileyDialog;x:mm;visible: false} } Component.onCompleted:{ - newsStack.replySignal.connect(setParent); + root.replySignal.connect(setParent); root.directmessageSignal.connect(directmessagePrepare); root.uploadSignal.connect(sendUrls); root.sendtextSignal.connect(sendtext); @@ -464,7 +483,7 @@ Rectangle{ target: buttonRow; visible:true } PropertyChanges { - target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages") + target: titleField; visible:(!conversation&&newsSwipeview.stacktype!="DirectMessages") } }, @@ -482,6 +501,9 @@ Rectangle{ PropertyChanges { target: bodyField; placeholderText:"";focus:true } + PropertyChanges { + target: stackTypeDescription; visible:false + } } ] } diff --git a/source-linux/qml/newsqml/MoreComments.qml b/source-linux/qml/newsqml/MoreComments.qml index d7b8d86..9a7f03c 100644 --- a/source-linux/qml/newsqml/MoreComments.qml +++ b/source-linux/qml/newsqml/MoreComments.qml @@ -49,7 +49,6 @@ Rectangle{ width: contentWidth height: contentHeight font.family:fontAwesome.name - //font.pixelSize: 3*mm text: qsTr("Show all comments")+" (" +comments + ")" //"\uf0dc" } MouseArea{ diff --git a/source-linux/qml/newsqml/NewsImage.qml b/source-linux/qml/newsqml/NewsImage.qml index ebfe6f9..e754d57 100644 --- a/source-linux/qml/newsqml/NewsImage.qml +++ b/source-linux/qml/newsqml/NewsImage.qml @@ -32,19 +32,26 @@ import QtQuick 2.9 AnimatedImage {id:gif; width:toprow.width; - property string mimetype:"" + //property string mimetype:"" fillMode: Image.PreserveAspectFit; - onStatusChanged: playing = (status == AnimatedImage.Ready); - MouseArea {anchors.fill:parent; - onClicked:{ - if (mimetype!="image/gif"){ - var attachcomponent = Qt.createQmlObject('import QtQuick 2.0; '+ - 'Rectangle{id:recfullscreen;color:"white";width:root.width;height:root.height;'+ - 'MouseArea {anchors.fill:parent;onClicked:{recfullscreen.destroy()}}'+ - 'AnimatedImage {id:giffullscreen;source: "'+gif.source+ - '";anchors.centerIn:parent; width:root.width;height:root.height;fillMode: Image.PreserveAspectFit; onStatusChanged: playing = (status == AnimatedImage.Ready);'+ - '}}',root,"Attachmentlarge") - } + onStatusChanged: playing = (status == AnimatedImage.Ready) + Rectangle{ + visible: (model.newsitemobject.imageAttachmentList.length>1)&&(gif.status==Image.Ready) + opacity: 0.5 + color: "black" + width:imageCountText.contentWidth+mm + height: imageCountText.contentHeight+mm + x: (gif.width-gif.paintedWidth)/2+gif.paintedWidth-width + anchors.bottom: parent.bottom + Text { + anchors.centerIn: parent + id: imageCountText + text: "+ " + (model.newsitemobject.imageAttachmentList.length-1).toString() + color: "white" } } + MouseArea {anchors.fill:parent; + onClicked:{ + rootstackView.push("qrc:/qml/newsqml/NewsPhotolist.qml",{"photolistarray": model.newsitemobject.imageAttachmentList})} + } } diff --git a/source-linux/qml/newsqml/NewsPhotolist.qml b/source-linux/qml/newsqml/NewsPhotolist.qml new file mode 100644 index 0000000..62ca124 --- /dev/null +++ b/source-linux/qml/newsqml/NewsPhotolist.qml @@ -0,0 +1,134 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2020 Marco R. +// +// 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 . + + +import QtQuick 2.9 +import QtQuick.Controls 2.12 +import "qrc:/qml/genericqml" + +Page{ + id:photolistview + width:root.width; + height:root.height//-7*mm + property var photolistarray: [] + + Rectangle{ + anchors.fill: newsphotolistView + color: "black" + } + ListView{ + id: newsphotolistView + anchors.fill: parent + orientation: Qt.Horizontal + highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem + model:photolistModel + delegate: photoWrapper + } + + ListModel{ + id: photolistModel + } + + MButton { + id: closeButton + z:2 + anchors.top: parent.top + anchors.topMargin: 1*mm + anchors.right: parent.right + anchors.rightMargin: 1*mm + text: "\uf057" + onClicked: {if (rootstackView.depth>1){ rootstackView.pop()} + } + } + Component { + id: photoWrapper + + AnimatedImage { + id: realImage; + width: photolistview.width; height: photolistview.height + antialiasing: true; + asynchronous: true + autoTransform:true + cache: false + fillMode: Image.PreserveAspectFit; + onStatusChanged: playing = (status == AnimatedImage.Ready); + source: url + BusyIndicator{ + running: realImage.status==Image.Loading + anchors.centerIn: parent + } + } + +// PinchArea { +// id:imagePinch +// pinch.target: realImage +// anchors.fill: realImage +// pinch.minimumScale: 0.1 +// pinch.maximumScale: 10 +// enabled: false +// } + } + + + BlueButton{ + width: 5*mm + height:photolistview.height + anchors.left: newsphotolistView.left + visible: newsphotolistView.currentIndex!=0 + text:"\uf053" + fontColor:"grey" + border.color: "transparent" + color:"transparent" + radius:0 + onClicked: {newsphotolistView.currentIndex=newsphotolistView.currentIndex-1} + } + + BlueButton{ + width: 5*mm + height:photolistview.height + anchors.right: newsphotolistView.right + visible: newsphotolistView.currentIndex!=photolistarray.length-1 + text:"\uf054" + fontColor:"grey" + border.color: "transparent" + color:"transparent" + radius:0 + onClicked: {newsphotolistView.currentIndex=newsphotolistView.currentIndex+1} + } + + Component.onCompleted: { + if (photolistarray.length>0){ + photolistarray.forEach(function(photo){ + photolistModel.append(photo) + }) + } + } +} diff --git a/source-linux/qml/newsqml/NewsStack.qml b/source-linux/qml/newsqml/NewsStack.qml index 12facca..fc3d4ad 100644 --- a/source-linux/qml/newsqml/NewsStack.qml +++ b/source-linux/qml/newsqml/NewsStack.qml @@ -35,292 +35,315 @@ import "qrc:/js/news.js" as Newsjs import "qrc:/js/helper.js" as Helperjs import "qrc:/js/service.js" as Service -StackView{ +Rectangle{ id: newsStack - anchors.fill: parent + //anchors.fill: parent + width: parent.width + height: parent.height property string updateMethodNews: "refresh" property var allchats: ({}) - signal replySignal(var newsobject) property int lastnewsid:0 + property string newstabstatus: "" - function newstypeHandling(newstype){ - newsBusy.running=true; - replySignal(""); - //messagesend.state=""; - newsModel.clear(); - switch(newstype){ - case "timeline": - newstab.newstabstatus="Timeline"; - try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){ - lastnewsid=lastid; - showNews(dbnews) - })}catch(e){Helperjs.showMessage("Error",e,root)}; - break; - case "conversation": - newstab.newstabstatus="Conversations"; - Newsjs.chatsfromdb(root.db,root.login,0,function(news,lastid){ - lastnewsid=lastid; - showNews(news)}); - break; - case "favorites": - newsStack.updateMethodNews="refresh"; - newstab.newstabstatus="Favorites"; - Service.updateView("Favorites"); - break; - case "replies": - newsStack.updateMethodNews="refresh"; - newstab.newstabstatus="Replies"; - Service.updateView("Replies"); - break; - case "publictimeline": - newsStack.updateMethodNews="refresh"; - newstab.newstabstatus="Public Timeline"; - Service.updateView("Public Timeline"); - break; - case "groupnews": - newsStack.updateMethodNews="refresh"; - Service.showGroups(); - break; - case "search": - newsView.anchors.topMargin=7*mm; - newsBusy.running=false; - var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml"); - var searchItem = component.createObject(newsStack,{y:mm,width:root.width,height: 5*mm}); - break; - case "refresh": - if (newstab.newstabstatus=="Timeline"){ - newsStack.updateMethodNews="append" - } else {newsStack.updateMethodNews="refresh"} - //root.contactLoadType="news"; - if (newsSwipeview.stacktype=="Home"){ - Service.updateView(newstab.newstabstatus) - } - else if (newsSwipeview.stacktype=="DirectMessage"){ - Service.updateView("Direct Messages") - } - else if (newsSwipeview.stacktype=="Notifications"){ - Service.updateView("Notifications") - } - break; - default: - if (newstab.newstabstatus=="Timeline"){ - newsStack.updateMethodNews="append" - } else {newsStack.updateMethodNews="refresh"} - //root.contactLoadType="news"; - if (newsSwipeview.stacktype=="Home"){ - Service.updateView(newstab.newstabstatus) - } - else if (newsSwipeview.stacktype=="Directmessage"){ - Service.updateView("Direct Messages") - } - else if (newsSwipeview.stacktype=="Notifications"){ - Service.updateView("Notifications") - } - } - } + BusyIndicator{ + id: newsBusy + //visible: false + anchors.horizontalCenter: parent.horizontalCenter + anchors.top:parent.top + anchors.topMargin: 2*mm + width:10*mm + height: 10*mm + z:2 + running: false + } + + function newstypeHandling(newstype){ + newsBusy.running=true; + replySignal(""); + //messagesend.state=""; + newsModel.clear(); + switch(newstype){ + case "timeline": + newstab.newstabstatus="Timeline"; + try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){ + lastnewsid=lastid; + showNews(dbnews) + })}catch(e){Helperjs.showMessage("Error",e,root)}; + break; + case "conversation": + newstab.newstabstatus="Conversations"; + Newsjs.chatsfromdb(root.db,root.login,0,function(news,lastid){ + lastnewsid=lastid; + showNews(news)}); + break; + case "favorites": + newsStack.updateMethodNews="refresh"; + newstab.newstabstatus="Favorites"; + Service.updateView("Favorites"); + break; + case "replies": + newsStack.updateMethodNews="refresh"; + newstab.newstabstatus="Replies"; + Service.updateView("Replies"); + break; + case "publictimeline": + newsStack.updateMethodNews="refresh"; + newstab.newstabstatus="Public Timeline"; + Service.updateView("Public Timeline"); + break; + case "groupnews": + newsStack.updateMethodNews="refresh"; + newstab.newstabstatus="Groupnews"; + Service.showGroups(); + break; + case "search": + newsView.anchors.topMargin=7*mm; + newstab.newstabstatus="Search"; + newsBusy.running=false; + var leftoffset=osSettings.osType=="Android"?3*osSettings.bigFontSize:0 + var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml"); + var searchItem = component.createObject(newsStack,{y:mm,x:leftoffset,width:root.width-leftoffset,height: 5*mm}); + break; + case "refresh": + if (newstab.newstabstatus=="Timeline"){ + newsStack.updateMethodNews="append" + } else {newsStack.updateMethodNews="refresh"} + //print("Refresh "+newsSwipeview.stacktype+newstab.newstabstatus) + if (newsSwipeview.stacktype=="Home"){ + Service.updateView(newstab.newstabstatus) + } + else if (newsSwipeview.stacktype=="DirectMessage"){ + Service.updateView("Direct Messages") + } + else if (newsSwipeview.stacktype=="Notifications"){ + Service.updateView("Notifications") + } + break; + default: + if (newstab.newstabstatus=="Timeline"){ + newsStack.updateMethodNews="append" + } else {newsStack.updateMethodNews="refresh"} + //root.contactLoadType="news"; + if (newsSwipeview.stacktype=="Home"){ + Service.updateView(newstab.newstabstatus) + } + else if (newsSwipeview.stacktype=="Directmessage"){ + Service.updateView("Direct Messages") + } + else if (newsSwipeview.stacktype=="Notifications"){ + Service.updateView("Notifications") + } + } + } - function showNews(newsToShow){ - try{if (newsStack.depth>1){newsStack.pop()}}catch(e){} - newsBusy.running=false; - var currentTime= new Date(); - // downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now(); - //print("appendnews "+JSON.stringify(newsToShow)) - if (newsToShow.length==1){var method="refresh"}else{var method = newsStack.updateMethodNews} - var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':method, 'options':globaloptions}; - newsWorker.sendMessage(msg); - //newsStack.appendNews=false - } + function showNews(newsToShow){ + try{if (rootstackView.depth>1){rootstackView.pop()}}catch(e){} + newsBusy.running=false; + var currentTime= new Date(); + // downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now(); + //print("appendnews "+JSON.stringify(newsToShow)) + if (newsToShow.length==1){var method="refresh"}else{var method = newsStack.updateMethodNews} + var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':method, 'options':globaloptions}; + newsWorker.sendMessage(msg); + //newsStack.appendNews=false + } - function showContact(contact){ //print(JSON.stringify(contact)); - //newstab.newstabstatus="Contact"; - newsStack.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact}); - } - function search(term){//print("Search "+term) - if (term!=""){ - newstab.newstabstatus="Search"; - newsBusy.running=true; - newsStack.updateMethodNews="refresh"; - xhr.setLogin(login.username+":"+Qt.atob(login.password)); - xhr.setUrl(login.server); - xhr.setApi("/api/search"); - xhr.clearParams(); - xhr.setParam("q",term) - xhr.get();} - newsView.anchors.topMargin=mm - } - function getOldNews(){ + function search(term){//print("Search "+term) + if (term!=""){ + //newstab.newstabstatus="Search"; + newstabstatus="Search"; + newsBusy.running=true; + newsStack.updateMethodNews="refresh"; + xhr.setLogin(login.username+":"+Qt.atob(login.password)); + xhr.setUrl(login.server); + xhr.setApi("/api/search"); + xhr.clearParams(); + xhr.setParam("q",term) + xhr.get();} + newsView.anchors.topMargin=mm + } + + function getOldNews(){print("newstab.newstabstatus" +newstab.newstabstatus) var currentTime= new Date(); try{var lastnews_id=newsModel.get(newsModel.count-1).newsitemobject.created_at;} catch(e){var lastnews_id=99999999999999 } - var messagetype=0; - switch(newsSwipeview.stacktype){ - case "Home":messagetype=0;break; - case "DirectMessages": messagetype=1;break; - case "Notifications":messagetype=2;break; - case "Replies":messagetype=3;break; - default:messagetype=0; - } - if(newstab.newstabstatus=="Timeline"){//print("lastnewsid "+lastnews_id); + var messagetype=0; + switch(newsSwipeview.stacktype){ + case "Home":messagetype=0;break; + case "DirectMessages": messagetype=1;break; + case "Notifications":messagetype=2;break; + case "Replies":messagetype=3;break; + default:messagetype=0; + } + //if(newstab.newstabstatus=="Timeline"){//print("lastnewsid "+lastnews_id); + if(newstabstatus=="Timeline"){ Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){ var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions}; newsWorker.sendMessage(msg); },false,lastnews_id)} - else if(newstab.newstabstatus=="Conversations"){ + //else if(newstab.newstabstatus=="Conversations"){ + else if(newstabstatus=="Conversations"){ Newsjs.chatsfromdb(root.db,root.login, messagetype,function(news){ var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions}; newsWorker.sendMessage(msg); },lastnews_id)} - else if (newstab.newstabstatus=="Notifications"){} + //else if (newstab.newstabstatus=="Notifications"){} + else if (newstabstatus=="Notifications"){} else{ + switch(newsSwipeview.stacktype){ + case "Home":messagetype=0;break; + case "DirectMessages": messagetype=1;break; + case "Notifications":messagetype=2;break; + case "Replies":messagetype=3;break; + default:messagetype=0; + } //newsStack.appendNews=true; try{xhr.setParam("max_id",newsModel.get(newsModel.count-1).newsitemobject.id-1);}catch(e){} xhr.get() } } Connections{ - target:xhr - function onError(data,url,api,code){ - if (data !="contactlist"){Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);} - newsBusy.running=false; - } - function onSuccess(data,api){ - // downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now(); - Service.processNews(api,data) - replySignal("") - } - } - - Timer {id:replytimer; interval: 1000; running: false; repeat: false - onTriggered: {"replytimer triggered"; - newsBusy.running=true; - if(newstab.newstabstatus=="Conversation"){ - showConversation(newsStack.timelineIndex-1,newsModel.get(0).newsitemobject)} - else{ - if (newstab.newstabstatus=="Timeline"){ - newsStack.updateMethodNews="append" - } else {newsStack.updateMethodNews="refresh"} - if (newsSwipeview.stacktype=="Home"){ - Service.updateView(newstab.newstabstatus) - } - else if (newsSwipeview.stacktype=="DirectMessages"){ - Service.updateView("Direct Messages") - } - else if (newsSwipeview.stacktype=="Replies"){ - Service.updateView("Replies") - } - replySignal("") - //Service.updateView(newstab.newstabstatus) - } - } - } - - initialItem: Rectangle { - id:newslistRectangle - y:1 - color: "white" - //anchors.fill:parent - - Component { id:footerComponent - Rectangle{ - border.color: "#EEEEEE" - border.width: 1 - width:newsView.width - height:6*mm - Text{ - font.pixelSize: 1.5*mm - anchors.centerIn: parent - text:qsTr("More") - } - MouseArea{ - anchors.fill:parent - onClicked:{ - if (newsModel.count==0){ - if (newsSwipeview.stacktype=="Home"){ - Service.updateView(newstab.newstabstatus) - } - else if (newsSwipeview.stacktype=="DirectMessages"){ - Service.updateView("Direct Messages") - } - else if (newsSwipeview.stacktype=="Notifications"){ - Service.updateView("Notifications") - } - else if (newsSwipeview.stacktype=="Replies"){ - Service.updateView("Replies") - } - } - else {getOldNews();} - } - } - } + target:xhr + function onError(data,url,api,code){ + if (data !="contactlist"){Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);} + newsBusy.running=false; } + function onSuccess(data,api){ + // downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now(); + Service.processNews(api,data) + replySignal("") + } + } - ListView { - id: newsView - property real oldContentY:0 - property bool viewdragged: false - property bool viewdraggedpositive: false - property string viewtype: "news" - anchors.fill: parent - anchors.margins: mm - clip: true - spacing: 0 - header: MessageSend{id:messagesend;onHeightChanged: newsView.positionViewAtBeginning()} - footer: footerComponent - model: newsModel - delegate: Newsitem{} - onDragStarted: oldContentY=contentY - onDragEnded: { - if(verticalOvershoot<-5*mm){ + Timer {id:replytimer; interval: 1000; running: false; repeat: false + onTriggered: {"replytimer triggered"; + newsBusy.running=true; + if(newstab.newstabstatus=="Conversation"){ + showConversation(newsStack.timelineIndex-1,newsModel.get(0).newsitemobject)} + else{ + if (newstab.newstabstatus=="Timeline"){ + newsStack.updateMethodNews="append" + } else {newsStack.updateMethodNews="refresh"} + if (newsSwipeview.stacktype=="Home"){ + Service.updateView(newstab.newstabstatus) + } + else if (newsSwipeview.stacktype=="DirectMessages"){ + Service.updateView("Direct Messages") + } + else if (newsSwipeview.stacktype=="Replies"){ + Service.updateView("Replies") + } + replySignal("") + //Service.updateView(newstab.newstabstatus) + } + } + } + + Component { id:footerComponent + Rectangle{ + border.color: "#EEEEEE" + border.width: 1 + width:newsView.width + height:6*mm + Text{ + font.pointSize: osSettings.systemFontSize + anchors.centerIn: parent + text:qsTr("More") + } + MouseArea{ + anchors.fill:parent + onClicked:{ + if (newsModel.count==0){ + if (newsSwipeview.stacktype=="Home"){ + Service.updateView(newstab.newstabstatus) + } + else if (newsSwipeview.stacktype=="DirectMessages"){ + Service.updateView("Direct Messages") + } + else if (newsSwipeview.stacktype=="Notifications"){ + Service.updateView("Notifications") + } + else if (newsSwipeview.stacktype=="Replies"){ + Service.updateView("Replies") + } + } + else {print("Footer newstab.newstabstatus "+newstab.newstabstatus);getOldNews();} + } + } + } + } + + ListView { + id: newsView + property real oldContentY:0 + property bool viewdragged: false + property bool viewdraggedpositive: false + property string viewtype: "news" + width: parent.width + height: parent.height-3*mm + //anchors.fill: parent + anchors.margins: 0.5*mm + clip: true + spacing: 0 + header: + MessageSend{id:messagesend;onHeightChanged: newsView.positionViewAtBeginning()} + + footer: footerComponent + model: newsModel + delegate: Newsitem{} + onDragStarted: oldContentY=contentY + onDragEnded: { + if(verticalOvershoot<-5*mm){ viewdragged=true - } - else if (verticalOvershoot>5*mm){ + } + else if (verticalOvershoot>5*mm){ viewdraggedpositive=true - } - else{ + } + else{ if((contentY-oldContentY)>15*mm){ - swipeIndicator.visible=false; - newsSwipeview.height=rootStackItem.height; - newsSwipeview.y=0; - rootStackItem.state="fullscreen" + //swipeIndicator.visible=false; + //newsSwipeview.height=rootstack.height; + //newsSwipeview.y=0; + //rootStackItem.state="fullscreen" } else if ((contentY-oldContentY)<-15*mm){ - swipeIndicator.visible=true; - newsSwipeview.height=rootStackItem.height-12*mm; - newsSwipeview.y=5*mm; - rootStackItem.state="" + //swipeIndicator.visible=true; + //newsSwipeview.height=rootstack.height-12*mm; + //newsSwipeview.y=5*mm; + //rootStackItem.state="" } - } - } - onViewdraggedChanged: { - if (viewdragged){ - var onlynew=true; - newsBusy.running=true; - viewdragged=false - if (newstab.newstabstatus=="Timeline"){ - newsStack.updateMethodNews="append" - } else {newsStack.updateMethodNews="refresh"} + } + } + onViewdraggedChanged: { + if (viewdragged){ + var onlynew=true; + newsBusy.running=true; + viewdragged=false + if (newstab.newstabstatus=="Timeline"){ + newsStack.updateMethodNews="append" + } else {newsStack.updateMethodNews="refresh"} //root.contactLoadType="news"; - if (newsSwipeview.stacktype=="Home"){ - Newsjs.getLastNews(root.login,root.db,function(currentlastnews){ - if (currentlastnews>lastnewsid){ - if(newstab.newstabstatus=="Timeline"){ - try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){ - lastnewsid=lastid; - showNews(dbnews) - })}catch(e){Helperjs.showMessage("Error",e,root)}; - } - if(newstab.newstabstatus=="Conversations"){ - Newsjs.chatsfromdb(db,root.login,0,function(news,lastid){ - lastnewsid=lastid; - showNews(news)}); - } - } else { - Service.updateView(newstab.newstabstatus) + if (newsSwipeview.stacktype=="Home"){ + Newsjs.getLastNews(root.login,root.db,function(currentlastnews){ + if (currentlastnews>lastnewsid){ + if(newstab.newstabstatus=="Timeline"){ + try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){ + lastnewsid=lastid; + showNews(dbnews) + })}catch(e){Helperjs.showMessage("Error",e,root)}; } - }); - } + if(newstab.newstabstatus=="Conversations"){ + Newsjs.chatsfromdb(db,root.login,0,function(news,lastid){ + lastnewsid=lastid; + showNews(news)}); + } + } else { + Service.updateView(newstab.newstabstatus) + } + }); + } else if (newsSwipeview.stacktype=="DirectMessages"){ Service.updateView("Direct Messages") } @@ -331,87 +354,82 @@ StackView{ Service.updateView("Replies") } - } - } - onViewdraggedpositiveChanged: { - if (viewdraggedpositive){ + } + } + onViewdraggedpositiveChanged: { + if (viewdraggedpositive){print("listview dragged newstab.newstabstatus "+newstab.newstabstatus) getOldNews(); viewdraggedpositive=false - } - } - } - - ListModel{id: newsModel} - - WorkerScript { - id: newsWorker - source: "qrc:/js/newsworker.js" - } - - BusyIndicator{ - id: newsBusy - anchors.horizontalCenter: parent.horizontalCenter - anchors.top:parent.top - anchors.topMargin: 2*mm - width:10*mm - height: 10*mm - running: false - } - Rectangle{ - id:downloadNotice - property alias text: noticeText.text - color:"white" - border.color:"grey" - z:1 - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom:parent.bottom - anchors.bottomMargin: 2*mm - width: noticeText.width+2*mm - height: noticeText.height+2*mm - visible: (downloadNotice.text!="") - - Text{ - id:noticeText - color: "grey" - anchors.centerIn: parent - width: contentWidth - height: contentHeight - font.pixelSize: 2*mm - text:"" - } - } - - Component.onCompleted: { - root.newstypeSignal.connect(newstypeHandling); - root.messageSignal.connect(onFriendsMessages); - root.contactdetailsSignal.connect(showContact); - root.newsSignal.connect(showNews); - - try{newsModel.clear()} catch(e){} - swipeIndicator.visible=true; - newsSwipeview.height=rootStackItem.height-12*mm; - newsSwipeview.y=5*mm; - rootStackItem.state="" - root.globaloptions.hasOwnProperty("newsViewType")?newstab.newstabstatus=root.globaloptions.newsViewType:newstab.newstabstatus="Conversations"; - var messagetype=0; - switch(newsSwipeview.stacktype){ - case "Home":messagetype=0;break; - case "DirectMessages": messagetype=1;break; - case "Notifications":messagetype=2;break; - case "Replies":messagetype=3;break; - default:messagetype=0; } - if((newstab.newstabstatus=="Conversations")&&(newsSwipeview.stacktype=="Home")){ - Newsjs.chatsfromdb(db,login,messagetype,function(dbnews,lastid){ - lastnewsid=lastid; - showNews(dbnews); - }) - } - else{ - Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){ - lastnewsid=lastid; - showNews(dbnews) - })} + } + ScrollBar.vertical: ScrollBar { } + } + + ListModel{id: newsModel} + + WorkerScript { + id: newsWorker + source: "qrc:/js/newsworker.js" + } + + + Rectangle{ + id:downloadNotice + property alias text: noticeText.text + color:"white" + border.color:"grey" + z:1 + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom:parent.bottom + anchors.bottomMargin: 2*mm + width: noticeText.width+2*mm + height: noticeText.height+2*mm + visible: (downloadNotice.text!="") + + Text{ + id:noticeText + color: "grey" + anchors.centerIn: parent + width: contentWidth + height: contentHeight + font.pointSize: osSettings.systemFontSize + text:"" } } + + Component.onCompleted: { + root.newstypeSignal.connect(newstypeHandling); + root.contactdetailsSignal.connect(showContact); + root.newsSignal.connect(showNews); + root.searchSignal.connect(search); + try{newsModel.clear()} catch(e){} + swipeIndicator.visible=true; + //newsSwipeview.height=rootstack.height//-12*mm; + //newsSwipeview.y=5*mm; + //rootStackItem.state="" + root.globaloptions.hasOwnProperty("newsViewType")?newstab.newstabstatus=root.globaloptions.newsViewType:newstab.newstabstatus="Conversations"; + newstabstatus=newstab.newstabstatus; + var messagetype=0; + switch(newsSwipeview.stacktype){ + case "Home":messagetype=0;break; + case "DirectMessages": messagetype=1;break; + case "Notifications":messagetype=2;break; + case "Replies":messagetype=3;break; + default:messagetype=0; + } + + //if((newstab.newstabstatus=="Conversations")&&(newsSwipeview.stacktype=="Home")){ + if((newstabstatus=="Conversations")&&(newsSwipeview.stacktype=="Home")){ + Newsjs.chatsfromdb(db,login,messagetype,function(dbnews,lastid){ + lastnewsid=lastid; + showNews(dbnews); + }) + } + else{ + Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){ + lastnewsid=lastid; + showNews(dbnews) + })} + } + //} } diff --git a/source-linux/qml/newsqml/NewsTab.qml b/source-linux/qml/newsqml/NewsTab.qml index ec7c8fa..f7b4cb6 100644 --- a/source-linux/qml/newsqml/NewsTab.qml +++ b/source-linux/qml/newsqml/NewsTab.qml @@ -31,20 +31,23 @@ import QtQuick 2.11 import QtQuick.Controls 2.12 -//import QtQuick.Controls.Styles 2.3 -//import QtQuick.Dialogs 1.3 import "qrc:/qml/newsqml" +import "qrc:/qml/genericqml" import "qrc:/js/news.js" as Newsjs import "qrc:/js/helper.js" as Helperjs import "qrc:/js/service.js" as Service -Item { +Rectangle{ + id:newstabitem + width:rootstack.width//-5*mm + height: rootstack.height-8*mm//rootstack.height-100*mm - onHeightChanged: {newsSwipeview.height=height-6*mm} + //anchors.fill: parent + //onHeightChanged: {newsSwipeview.height=height-5*mm} Timer {id:contacttimer; interval: 50; running: false; repeat: false onTriggered: { - // downloadNotice.text=downloadNotice.text + "\n contactTimer start "+ Date.now() root.newContacts=Newsjs.findNewContacts(root.news,root.contactlist); + root.onNewContactsChanged(root.newContacts); Newsjs.storeNews(login,db,root.news,root) } } @@ -56,6 +59,7 @@ Item { xhr.setUrl(login.server); xhr.setApi("/api/conversation/show"); xhr.setParam("id",newsitemobject.id) + xhr.setParam("count","200") xhr.get(); } else{ @@ -113,51 +117,101 @@ Item { } - function onFriendsMessages(friend){ - newstab.newstabstatus="Contact" - Newsjs.newsfromdb(db,root.login.username, 0,function(dbnews){ - if (dbnews.length==0){ - Newsjs.newsfromdb(db,login.username,0,function(forumnews){ - showNews(forumnews) - },friend.url) - } - else showNews(dbnews) - },friend.id) + +// CalendarTab{ +// visible: wideScreen&&rootstackView.depth<2 +// width: newstabitem.width/3 +// x: newsSwipeview.width +// //anchors.left: newsSwipeview.right +// //anchors.fill: null +// } +// Rectangle{ +// color: "#F8F8F8" +// height: parent.height +// width: 0.5*mm +// anchors.left: newsSwipeview.right +// } + BlueButton{ + x:mm + y:mm + z:2 + visible: !wideScreen + fontColor: "grey" + border.color: "transparent" + text: "\uf0c9" + font.pointSize: osSettings.bigFontSize + onClicked:{ + leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()} } - Label{ - text:"\uf0c9 " - font.pixelSize: 5* mm - anchors.left: parent.left - anchors.margins: mm - color: "#B0BEC5" - MouseArea{ - anchors.fill: parent - onClicked:{ - leftDrawer.open() - } - } + LeftDrawerLinux{ + id:leftDrawer + property var newstabstatus: newstab.newstabstatus + visible: wideScreen&&rootstackView.depth<2 + width: visible?root.fontFactor*osSettings.systemFontSize*15:0 + height: root.height-bar.height } - Label{ - text:qsTr(newsSwipeview.stacktype) - font.pixelSize: 3* mm - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: 2*mm + + LeftDrawerAndroid{ + id: leftDrawerAndroid } +// BlueButton{ +// z:2 +// anchors.left: newsSwipeview.left +// anchors.verticalCenter: newsSwipeview.verticalCenter//anchors.bottom: newsSwipeview.bottom +// anchors.margins: mm +// visible: wideScreen && newsSwipeview.currentIndex!=0 +// text:"\uf053" +// fontColor:"grey" +// border.color: "transparent" +// color:"transparent" +// radius:0 +// onClicked: {newsSwipeview.currentIndex=newsSwipeview.currentIndex-1} +// } + +// BlueButton{ +// z:2 +// anchors.right: newsSwipeview.right +// anchors.verticalCenter: newsSwipeview.verticalCenter//anchors.bottom: newsSwipeview.bottom +// anchors.margins: mm +// visible: wideScreen && newsSwipeview.currentIndex!=3 +// text:"\uf054" +// fontColor:"grey" +// border.color: "transparent" +// color:"transparent" +// radius:0 +// onClicked: {newsSwipeview.currentIndex=newsSwipeview.currentIndex+1} +// } + SwipeView{ id: newsSwipeview property string stacktype:"Home" currentIndex: 0 - width: parent.width - height: parent.height-6*mm - y: 5*mm + width: wideScreen&&rootstackView.depth<2?newstabitem.width-leftDrawer.width-mm:newstabitem.width-mm//newstabitem.width/3*2:newstabitem.width + height: newstabitem.height-4*mm + x: leftDrawer.width function onDirectMessage(friend){currentIndex=2} - transitions: Transition { - PropertyAnimation { properties: "height"; - easing.type: Easing.InOutQuad - duration: 1000 - } - } +// transitions: Transition { +// PropertyAnimation { properties: "height"; +// easing.type: Easing.InOutQuad +// duration: 1000 +// } +// } + + +// Label{ +// text:"\uf0c9 " +// font.pixelSize: 5* mm +// anchors.left: parent.left +// anchors.margins: mm +// color: "#B0BEC5" +// MouseArea{ +// anchors.fill: parent +// onClicked:{ +// leftDrawer.open() +// } +// } +// } onCurrentIndexChanged: { switch(currentIndex){ @@ -168,6 +222,7 @@ Item { default: stacktype="Home"; } } + //anchors.fill: parent Loader{ id: friendstimeline @@ -192,16 +247,17 @@ Item { source:(newsSwipeview.currentIndex==3)? "qrc:/qml/newsqml/NewsStack.qml":"" //onLoaded: newsSwipeview.stacktype="Notifications" } - Component.onCompleted: {root.directmessageSignal.connect(onDirectMessage)} } - PageIndicator { id: swipeIndicator + z:5 + height: root.fontFactor*osSettings.bigFontSize + font.pointSize: osSettings.systemFontSize count: newsSwipeview.count currentIndex: newsSwipeview.currentIndex - anchors.bottom: newsSwipeview.bottom anchors.horizontalCenter: parent.horizontalCenter } + Component.onCompleted: {root.directmessageSignal.connect(newsSwipeview.onDirectMessage)} } diff --git a/source-linux/qml/newsqml/NewsVideo.qml b/source-linux/qml/newsqml/NewsVideo.qml index cffd63c..2e7d899 100644 --- a/source-linux/qml/newsqml/NewsVideo.qml +++ b/source-linux/qml/newsqml/NewsVideo.qml @@ -50,9 +50,9 @@ Rectangle{ MouseArea {anchors.fill:parent; onClicked:{ if(attachment.mimetype=="video/youtube"){ - root.push("qrc:/qml/newsqml/NewsYplayer.qml",{"ytcode":attachment.url,"mimetype":attachment.mimetype}); + rootstackView.push("qrc:/qml/newsqml/NewsYplayer.qml",{"ytcode":attachment.url,"mimetype":attachment.mimetype}); } else { - root.push("qrc:/qml/newsqml/NewsVideoLarge.qml",{"source": attachment.url,"mimetype": attachment.mimetype}); + rootstackView.push("qrc:/qml/newsqml/NewsVideoLarge.qml",{"source": attachment.url,"mimetype": attachment.mimetype}); } } } diff --git a/source-linux/qml/newsqml/NewsVideoLarge.qml b/source-linux/qml/newsqml/NewsVideoLarge.qml index a78e5a0..e6cdda6 100644 --- a/source-linux/qml/newsqml/NewsVideoLarge.qml +++ b/source-linux/qml/newsqml/NewsVideoLarge.qml @@ -33,12 +33,13 @@ import QtMultimedia 5.8 import QtQuick 2.9 import QtQuick.Controls 2.12 -Rectangle{ + +Page{ id:newsvideofullscreen - color:"black" + //color:"black" //border.color: "light grey" width:root.width; - height:root.height + height:root.height-3*root.fontFactor*osSettings.bigFontSize property alias source:video.source Text{ id:noticeText @@ -46,7 +47,7 @@ Rectangle{ color:"light grey" width:parent.width/2 wrapMode: Text.Wrap - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize x:parent.width/2-parent.height/4 y:parent.height/5 visible: video.playbackState!=MediaPlayer.PlayingState @@ -55,7 +56,7 @@ Rectangle{ Video {id:video; anchors.fill:parent property string mimetype:"" - onErrorChanged:{noticeText.font.pixelSize=3*mm;noticeText.text=errorString;} + onErrorChanged:{noticeText.font.pointSize=osSettings.bigFontSize;noticeText.text=errorString;} fillMode: Image.PreserveAspectFit; autoLoad: true autoPlay: true @@ -63,7 +64,7 @@ Rectangle{ MouseArea { anchors.fill:parent; onClicked:{ - root.pop() + rootstackView.pop() } } } @@ -76,6 +77,7 @@ Rectangle{ z:2 visible:video.playbackState!=MediaPlayer.StoppedState value: video.position/video.duration + MouseArea { anchors.fill:parent; onClicked:{ diff --git a/source-linux/qml/newsqml/NewsYplayer.qml b/source-linux/qml/newsqml/NewsYplayer.qml index 2657862..fff2b1f 100644 --- a/source-linux/qml/newsqml/NewsYplayer.qml +++ b/source-linux/qml/newsqml/NewsYplayer.qml @@ -32,14 +32,16 @@ // along with this program. If not, see . import QtQuick 2.8 +import QtQuick.Controls 2.12 import "qrc:/js/helper.js" as Helperjs import QtWebView 1.1 -Rectangle{ + +Page { id:newsYplayer - color:"black" + //color:"black" width:root.width; - height:root.height + height:root.height-7*mm property string url:"" property string ytcode:"" diff --git a/source-linux/qml/newsqml/Newsitem.qml b/source-linux/qml/newsqml/Newsitem.qml index f56b520..3ae3431 100644 --- a/source-linux/qml/newsqml/Newsitem.qml +++ b/source-linux/qml/newsqml/Newsitem.qml @@ -37,7 +37,7 @@ import "qrc:/qml/genericqml" Item { id: newsitem - width: newsView.width //parent.width + width: newsitemobject.hasOwnProperty("indent")&&newsitemobject.indent>0?parent.width:newsitem.ListView.view.width//parent.width//newsView.width // height:toprow.height+friendicaActivities.height+controlrow.height+conversationColumn.height+1//Math.max((itemMessage.height+topFlow.height+friendicaActivities.height+4*mm),profileImage.height+user_name.height+mm) property int itemindex: index property var newsitemobject:model.newsitemobject @@ -45,7 +45,7 @@ Item { property var friendica_activities_view: getActivitiesView(model.newsitemobject) onAttendingChanged: {attendLabel.visible=true; - attendLabel.text= qsTr("attending")+": "+ qsTr(attending)} + attendLabel.text= qsTr("attending")+": "+ qsTr(attending)} signal replyto(string parent_id) @@ -54,425 +54,416 @@ Item { var imagedialog = component.createObject(friendicaActivities,{"activitymembers": contacts}); } - - function pushConversation(){ if (model.newsitemobject.hasOwnProperty("currentconversation")){ - newsStack.push("qrc:/qml/newsqml/Conversation.qml",{"news": model.newsitemobject.currentconversation})} - else{newsStack.push("qrc:/qml/newsqml/Conversation.qml")}; + rootstackView.push("qrc:/qml/newsqml/Conversation.qml",{"news": model.newsitemobject.currentconversation})} + //newsStack.push("qrc:/qml/newsqml/Conversation.qml",{"news": model.newsitemobject.currentconversation})} + //else{newsStack.push("qrc:/qml/newsqml/Conversation.qml")}; + else{rootstackView.push("qrc:/qml/newsqml/Conversation.qml")}; showConversation(index,newsitemobject) } - Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom; color:"light grey"} Rectangle{ - width:newsitem.width - height:newsitem.height-1 - color: "white"//(newsitemobject.messagetype==1)?"#ffe6e6" : "white" + width:newsitem.width + height:newsitem.height-1 + color: "white" - Column { - id:toprow //newscolumn - width: newsitemobject.hasOwnProperty("indent")?newsitem.width-(newsitem.width/20 *(newsitemobject.indent+1)):newsitem.width//-8*mm - x:newsitemobject.hasOwnProperty("indent")?newsitem.width/20*(newsitemobject.indent):0 - Item{ - height: Math.max(profileImage.height+mm,topFlow.implicitHeight+mm) - width: parent.width - MouseArea{ - anchors.fill: parent - onClicked:{ - showContact(newsitemobject.user)} - } - Image { - id:profileImage - source: ((newsitemobject.user.profile_image!="") && (typeof(newsitemobject.user.profile_image)=="string"))? "file://"+newsitemobject.user.profile_image : newsitemobject.user.profile_image_url - x:1 - y:1 - width: 7*mm - height: 7*mm - //radius:mm - onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} - } - Flow{ - id:topFlow - spacing: mm - width:parent.width-8*mm - anchors.left: profileImage.right - anchors.margins: mm - Label { - id:user_name - //color: "grey" - width:parent.width - font.bold: true - font.pixelSize: 2.5*mm - wrapMode: Text.WrapAtWordBoundaryOrAnywhere - text: newsitemobject.user.name+" (@"+newsitemobject.user.screen_name+")"+newsitemobject.forumname + Column { + id:toprow //newscolumn + width: newsitemobject.hasOwnProperty("indent")?newsitem.width-(newsitem.width/20 *(newsitemobject.indent+1)):newsitem.width//-8*mm + x:newsitemobject.hasOwnProperty("indent")?newsitem.width/20*(newsitemobject.indent):0 + height: newsitemobject.nsfw?5*mm:Math.min(itemHeader.height+itemBody.height,3/4*root.height) + clip: true + Item{id:itemHeader + height: Math.max(profileImage.height+mm,topFlow.implicitHeight+mm) + width: parent.width + MouseArea{ + anchors.fill: parent + onClicked:{ + showContact(newsitemobject.user)} } + Image { + id:profileImage + source: ((newsitemobject.user.profile_image!="") && (typeof(newsitemobject.user.profile_image)=="string"))? "file://"+newsitemobject.user.profile_image : newsitemobject.user.profile_image_url + x:1 + y:1 + width: 2*root.fontFactor*osSettings.bigFontSize + height: 2*root.fontFactor*osSettings.bigFontSize + //radius:mm + onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} + } + Flow{ + id:topFlow + spacing: 0.5*mm + width:parent.width-8*mm + anchors.left: profileImage.right + anchors.margins: mm + Label { + id:user_name + //color: "grey" + width:parent.width + font.bold: true + font.pointSize: osSettings.systemFontSize + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + text: newsitemobject.user.name+" (@"+newsitemobject.user.screen_name+")"+newsitemobject.forumname + } - Label { - id:messageTypeLabel - color: "grey" - text: if (newsitemobject.messagetype==1){ qsTr("Direct Message")} else if(newsitemobject.messagetype==2) {" Notification"} else {qsTr("Source: ")+newsitemobject.source} - font.pixelSize: 1.5*mm - } - Label { - id:createdAtLabel - color: "grey" - font.pixelSize: 1.5*mm - horizontalAlignment: Label.AlignRight - text: getDateDiffString(newsitemobject.dateDiff) + " " +qsTr("ago") - } - Label { - id:replytoLabel - color: "grey" - font.pixelSize: 1.5*mm - font.family: "Noto Sans" - horizontalAlignment: Label.AlignRight - text: try {qsTr("In reply to ")+newsitemobject.reply_user.screen_name - }catch(e){" "} + Label { + id:messageTypeLabel + color: "grey" + text: if (newsitemobject.messagetype==1){ qsTr("Direct Message")} else if(newsitemobject.messagetype==2) {" Notification"} else {qsTr("Source: ")+newsitemobject.source} + font.pointSize: 0.6*osSettings.systemFontSize + } + Label { + id:createdAtLabel + color: "grey" + font.pointSize: 0.6*osSettings.systemFontSize + horizontalAlignment: Label.AlignRight + text: " \u00B7 "+getDateDiffString(newsitemobject.dateDiff) + " " +qsTr("ago") + } + Label { + id:replytoLabel + color: "grey" + font.pointSize: 0.6*osSettings.systemFontSize + font.family: "Noto Sans" + horizontalAlignment: Label.AlignRight + text: try {" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name + }catch(e){" "} + } } + //Component.onCompleted:print("Newsitemwidth "+newsitem.width+ " Indent "+newsitemobject.indent) } - } - MouseArea{ - width: toprow.width-2 - height: itemMessage.height - onPressAndHold: { - pushConversation(); - } - Text { - color: "#404040" - linkColor: "light green" - id: itemMessage - textFormat: Text.RichText - font.family: "Noto Sans" - text: newsitemobject.statusnet_html//newsitemobject.attachmentList.length>0?newsitemobject.text : newsitemobject.statusnet_html + MouseArea{id: itemBody width: toprow.width-2 - height:newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height) - //height: implicitHeight - wrapMode: Text.Wrap - clip:true - onLinkActivated:{ - Qt.openUrlExternally(link)} - Component.onCompleted:{ - if (newsitemobject.messagetype==0){ - var hashtags=[]; - hashtags=Newsjs.findTags(newsitemobject.text); - var component = Qt.createComponent("qrc:/qml/newsqml/Hashtag.qml"); - for (var tags in hashtags){ - var hashtagQml = component.createObject(friendicaActivities,{"text":hashtags[tags].trim()}); - }} - - if (newsitemobject.attachmentList.length>0){ - for(var attachments in newsitemobject.attachmentList){// (newsitemobject.attachmentList[attachments].url); - if(newsitemobject.attachmentList[attachments].mimetype.substring(0,5)=="image"){ - var component = Qt.createComponent("qrc:/qml/newsqml/NewsImage.qml"); - var imageQml = component.createObject(toprow,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype}); - } - else if(newsitemobject.attachmentList[attachments].mimetype=="text/html"){ - var component = Qt.createComponent("qrc:/qml/newsqml/NewsLink.qml"); - var linkQml = component.createObject(toprow,{"url":newsitemobject.attachmentList[attachments].url}); - } - else { - var component = Qt.createComponent("qrc:/qml/newsqml/NewsVideo.qml"); - //var videoQml = component.createObject(messageColumn,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype}); - var videoQml = component.createObject(toprow,{"attachment":newsitemobject.attachmentList[attachments]}); + height: itemMessage.height + onPressAndHold: {pushConversation()} + Text { + color: "#404040" + linkColor: "light green" + id: itemMessage + textFormat: Text.RichText + font.family: "Noto Sans" + font.pointSize: osSettings.systemFontSize + text: newsitemobject.statusnet_html + width: toprow.width-2 + //height:newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height) + height: implicitHeight + wrapMode: Text.Wrap + clip:true + onLinkActivated:{Qt.openUrlExternally(link)} + Component.onCompleted:{ + if (newsitemobject.messagetype==0){ + var hashtags=[]; + hashtags=Newsjs.findTags(newsitemobject.text); + var component = Qt.createComponent("qrc:/qml/newsqml/Hashtag.qml"); + for (var tags in hashtags){ + var hashtagQml = component.createObject(friendicaActivities,{"text":hashtags[tags].trim()}); } } - } - if (newsitemobject.hasOwnProperty("lastcomment")){ - var moreComponent = Qt.createComponent("qrc:/qml/newsqml/MoreComments.qml"); - var conversationQml = moreComponent.createObject(conversationColumn,{"comments":newsitemobject.newscount-1}); + if (newsitemobject.imageAttachmentList.length>0){ + if(newsitemobject.imageAttachmentList[0].mimetype.substring(0,5)=="image"){ + var component = Qt.createComponent("qrc:/qml/newsqml/NewsImage.qml"); + var imageQml = component.createObject(toprow,{"source":newsitemobject.imageAttachmentList[0].url}); + } + } - var commentComponent = Qt.createComponent("qrc:/qml/newsqml/Newsitem.qml"); - var conversationQml = commentComponent.createObject(conversationColumn,{"newsitemobject":newsitemobject.lastcomment}); + if (newsitemobject.videoAttachmentList.length>0){ + var component = Qt.createComponent("qrc:/qml/newsqml/NewsVideo.qml"); + //var videoQml = component.createObject(messageColumn,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype}); + var videoQml = component.createObject(toprow,{"attachment":newsitemobject.videoAttachmentList[0]}); + } + + if (newsitemobject.hasOwnProperty("lastcomment")){ + var moreComponent = Qt.createComponent("qrc:/qml/newsqml/MoreComments.qml"); + var conversationQml = moreComponent.createObject(conversationColumn,{"comments":newsitemobject.newscount-1}); + + var commentComponent = Qt.createComponent("qrc:/qml/newsqml/Newsitem.qml"); + var conversationQml = commentComponent.createObject(conversationColumn,{"newsitemobject":newsitemobject.lastcomment}); + } } - } - }} + }} + + } + BlueButton{ - width: newsitem.width-8*mm-2 + width: newsitem.width-2 height:5*mm - //anchors.bottom: messageColumn.bottom//itemMessage.bottom - visible: itemMessage.implicitHeight>3/4*root.height || newsitemobject.nsfw//messageColumn.implicitHeight>3/4*root.height || newsitemobject.nsfw//itemMessage.implicitHeight>3/4*root.height + anchors.bottom: toprow.bottom//itemMessage.bottom + visible: toprow.implicitHeight>3/4*root.height || newsitemobject.nsfw//messageColumn.implicitHeight>3/4*root.height || newsitemobject.nsfw//itemMessage.implicitHeight>3/4*root.height text:"\uf078" fontColor:"grey" border.color: "transparent" color:"white" -// gradient: Gradient { -// GradientStop { position: 0.0; color: "transparent" } -// GradientStop { position: 0.5; color: "white" } -// } + // gradient: Gradient { + // GradientStop { position: 0.0; color: "transparent" } + // GradientStop { position: 0.5; color: "white" } + // } radius:0 onClicked: { if (text=="\uf078"){ - itemMessage.height=itemMessage.implicitHeight+10*mm;text="\uf077" + toprow.height=toprow.implicitHeight+6*mm;text="\uf077" } else { - itemMessage.height=Math.min(itemMessage.implicitHeight,3/4*root.height); + toprow.height=Math.min(toprow.implicitHeight,3/4*root.height); text="\uf078"; newsView.positionViewAtIndex(index,ListView.Beginning); } } } - } - // Bottom row for activities - Flow{ - id:friendicaActivities - anchors.top:toprow.bottom - width:parent.width - spacing:mm + // Bottom row for activities + Flow{ + id:friendicaActivities + anchors.top:toprow.bottom + width:parent.width + spacing:mm - Label{color: "grey" - height:3.5*mm - font.pixelSize: 1.5*mm - text: friendica_activities_view.likeText - MouseArea{ - anchors.fill: parent - onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)} - } - } - Label{color: "grey" - height:3.5*mm - font.pixelSize: 1.5*mm - text: friendica_activities_view.dislikeText - MouseArea{ - anchors.fill: parent - onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)} - } - } - Label{color: "grey" - height:3.5*mm - font.pixelSize: 1.5*mm - text: friendica_activities_view.attendyesText - MouseArea{ - anchors.fill: parent - onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)} - }} - Label{color: "grey" - height:3.5*mm - font.pixelSize: 1.5*mm - text: friendica_activities_view.attendnoText - MouseArea{ - anchors.fill: parent - onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)} - } - } - Label{color: "grey" - height:3.5*mm - font.pixelSize: 1.5*mm - text: friendica_activities_view.attendmaybeText - MouseArea{ - anchors.fill: parent - onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendmaybe)} - } - } - Label{ - id:attendLabel - color: "grey" - height:3.5*mm - font.pixelSize: 1.5*mm - horizontalAlignment: Label.AlignRight - text: (newsitemobject.friendica_activities_view.self.attending)?(qsTr("Attending: ")+ qsTr(newsitemobject.friendica_activities_view.self.attending)):"" - } - } - - //Bottom row for buttons - Row{id:controlrow - anchors.top:friendicaActivities.bottom - height: 4*mm - CheckBox{ - id:likeCheckbox - width:newsitem.width/5 //10*mm - height: parent.height - visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false - checked:(model.newsitemobject.friendica_activities_view.self.liked==1)?true:false - indicator: Rectangle{ - implicitWidth: newsitem.width/5 //10*mm - implicitHeight:4*mm - Text{ - anchors.centerIn: parent - font.pixelSize: 3*mm - font.family:fontAwesome.name - color:likeCheckbox.checked?"black": "grey" - text:likeCheckbox.checked?"\uf118"+"!":"\uf118" + Label{color: "grey" + height:3.5*mm + font.pointSize: 0.75*osSettings.systemFontSize + text: friendica_activities_view.likeText + MouseArea{ + anchors.fill: parent + onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)} } } - onClicked: { - if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false; - newsitemobject.friendica_activities_view.self.liked=1; - newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject}); + Label{color: "grey" + height:3.5*mm + font.pointSize: 0.75*osSettings.systemFontSize + text: friendica_activities_view.dislikeText + MouseArea{ + anchors.fill: parent + onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)} } - else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.id,root); - newsitemobject.friendica_activities_view.self.liked=0; - newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject}); - }} + } + Label{color: "grey" + height:3.5*mm + font.pointSize: 0.75*osSettings.systemFontSize + text: friendica_activities_view.attendyesText + MouseArea{ + anchors.fill: parent + onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)} + }} + Label{color: "grey" + height:3.5*mm + font.pointSize: 0.75*osSettings.systemFontSize + text: friendica_activities_view.attendnoText + MouseArea{ + anchors.fill: parent + onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)} + } + } + Label{color: "grey" + height:3.5*mm + font.pointSize: 0.75*osSettings.systemFontSize + text: friendica_activities_view.attendmaybeText + MouseArea{ + anchors.fill: parent + onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendmaybe)} + } + } + Label{ + id:attendLabel + color: "grey" + height:3.5*mm + font.pointSize: 0.75*osSettings.systemFontSize + horizontalAlignment: Label.AlignRight + text: (newsitemobject.friendica_activities_view.self.attending)?(qsTr("Attending: ")+ qsTr(newsitemobject.friendica_activities_view.self.attending)):"" + } } - CheckBox{ - id: dislikeCheckbox - width:newsitem.width/5 //10*mm - height: parent.height - visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false - checked: (newsitemobject.friendica_activities_view.self.disliked==1)?true:false - indicator: Rectangle{ - implicitWidth: newsitem.width/5 //10*mm - implicitHeight:4*mm - Text{ - anchors.centerIn: parent - font.pixelSize: 3*mm - font.family:fontAwesome.name - color:dislikeCheckbox.checked?"black": "grey" - text: dislikeCheckbox.checked?"\uf119"+"!":"\uf119" + + //Bottom row for buttons + Row{id:controlrow + anchors.top:friendicaActivities.bottom + height: root.fontFactor*osSettings.bigFontSize + CheckBox{ + id:likeCheckbox + width:newsitem.width/5 //10*mm + height: parent.height + visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false + checked:(model.newsitemobject.friendica_activities_view.self.liked==1)?true:false + indicator: Rectangle{ + implicitWidth: newsitem.width/5 //10*mm + implicitHeight:root.fontFactor*osSettings.bigFontSize + Text{ + anchors.centerIn: parent + font.pointSize: osSettings.systemFontSize + font.family:fontAwesome.name + color:likeCheckbox.checked?"black": "grey" + text:likeCheckbox.checked?"\uf118"+"!":"\uf118" } } - onClicked: { - if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false; - newsitemobject.friendica_activities_view.self.disliked=1; - newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject}); + onClicked: { + if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false; + newsitemobject.friendica_activities_view.self.liked=1; + newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject}); + } + else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.id,root); + newsitemobject.friendica_activities_view.self.liked=0; + newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject}); + }} + } + CheckBox{ + id: dislikeCheckbox + width:newsitem.width/5 //10*mm + height: parent.height + visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false + checked: (newsitemobject.friendica_activities_view.self.disliked==1)?true:false + indicator: Rectangle{ + implicitWidth: newsitem.width/5 //10*mm + implicitHeight:root.fontFactor*osSettings.bigFontSize + Text{ + anchors.centerIn: parent + font.pointSize: osSettings.systemFontSize + font.family:fontAwesome.name + color:dislikeCheckbox.checked?"black": "grey" + text: dislikeCheckbox.checked?"\uf119"+"!":"\uf119" + } } - else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.id,root); - newsitemobject.friendica_activities_view.self.disliked=0; - newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject}); - }} - } + onClicked: { + if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false; + newsitemobject.friendica_activities_view.self.disliked=1; + newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject}); + } + else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.id,root); + newsitemobject.friendica_activities_view.self.disliked=0; + newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject}); + }} + } - CheckBox { - id:favoritedCheckbox - visible:((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3)) - width: newsitem.width/5 // 10*mm - height: parent.height - indicator:Rectangle{ - implicitWidth: newsitem.width/5 //10*mm - implicitHeight:4*mm + CheckBox { + id:favoritedCheckbox + visible:((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3)) + width: newsitem.width/5 // 10*mm + height: parent.height + indicator:Rectangle{ + implicitWidth: newsitem.width/5 //10*mm + implicitHeight:root.fontFactor*osSettings.bigFontSize + Text{ + anchors.centerIn: parent + font.pointSize: osSettings.systemFontSize + font.family:fontAwesome.name + color: favoritedCheckbox.checked?"black":"grey" + text:"\uf005" + } + } + checked:(newsitemobject.favorited>0) + onClicked:{ + if(favoritedCheckbox.checkState==Qt.Checked){ + Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1} + else if(favoritedCheckbox.checkState==Qt.Unchecked){ + Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0} + } + } + Rectangle{ + width: newsitem.width/5 //10*mm + height: parent.height + visible:(newsitemobject.messagetype!==2) + color:"transparent" Text{ + id:newsmenusymbol + color: "grey" anchors.centerIn: parent - font.pixelSize: 3*mm + font.pointSize: osSettings.systemFontSize font.family:fontAwesome.name - color: favoritedCheckbox.checked?"black":"grey" - text:"\uf005" + text: "\uf142" } - } - checked:(newsitemobject.favorited>0) - onClicked:{ - if(favoritedCheckbox.checkState==Qt.Checked){ - Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1} - else if(favoritedCheckbox.checkState==Qt.Unchecked){ - Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0} - } - } - Rectangle{ - width: newsitem.width/5 //10*mm - height: parent.height - visible:(newsitemobject.messagetype!==2) - color:"transparent" - Text{ - id:newsmenusymbol - color: "grey" - anchors.centerIn: parent - font.pixelSize: 3*mm - font.family:fontAwesome.name - text: "\uf142" - } - MouseArea{ - anchors.fill:parent - onClicked: {newsmenu.popup()}} - } - } - - Menu { - id:newsmenu - width: 30*mm - delegate: MenuItem{ - contentItem: Text{ - font.pixelSize: 3*mm - text: parent.text - } - } - Action{ - text: qsTr("Reply") - onTriggered: { - var directmessage=0; - if (newsitemobject.messagetype==1){ directmessage=1} - var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml"); - var conversation;newsitem.ListView.view.viewtype=="conversation"?true:false; - var reply=replycomp.createObject(friendicaActivities,{parentId:newsitemobject.id,reply_to_user:newsitemobject.user.screen_name, state:"reply",conversation:conversation,textfocus:true}) - } - } - Action { - text: qsTr("DM") - onTriggered: { - root.directmessageSignal(newsitemobject.user.screen_name); - } - } - Action { - text: qsTr("Repost") - onTriggered: { - Newsjs.retweetNews(root.login,db,newsitemobject.id,root,function(reply){ - Helperjs.showMessage("Repost",qsTr("Success!"),root) - }) - } - } - Action { - text: qsTr("Conversation") - onTriggered: { - pushConversation(); + MouseArea{ + anchors.fill:parent + onClicked: {newsmenu.popup()}} } } - Menu{ - title: qsTr("Attending") - width: 20*mm + Menu { + id:newsmenu + width: 18*osSettings.FontSize delegate: MenuItem{ contentItem: Text{ - font.pixelSize: 3*mm + font.pointSize: osSettings.systemFontSize text: parent.text } } Action{ - text:qsTr("yes") - onTriggered: {Newsjs.attend(root.login,db,"yes",newsitemobject.id,root,function(){ - model.newsitemobject.friendica_activities_view.self.attending="yes";attending="yes"}) + text: qsTr("Reply") + onTriggered: { + var directmessage=0; + if (newsitemobject.messagetype==1){ directmessage=1} + var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml"); + var conversation; + if (newsitem.ListView.view.viewtype=="conversation"){conversation=true} + else{conversation=false}; + var reply=replycomp.createObject(friendicaActivities,{parentId:newsitemobject.id,reply_to_user:newsitemobject.user.screen_name, state:"reply",conversation:conversation,textfocus:true}) } } - Action{text:qsTr("maybe") - onTriggered: {Newsjs.attend(root.login,db,"maybe",newsitemobject.id,root,function(){ - model.newsitemobject.friendica_activities_view.self.attending="maybe";attending="maybe"}) + Action { + text: qsTr("DM") + onTriggered: { + root.directmessageSignal(newsitemobject.user.screen_name); } } - Action{text:qsTr("no") - onTriggered: {Newsjs.attend(root.login,db,"no",newsitemobject.id,root,function(){ - model.newsitemobject.friendica_activities_view.self.attending="no";attending="no"})} + Action { + text: qsTr("Repost") + onTriggered: { + Newsjs.retweetNews(root.login,db,newsitemobject.id,root,function(reply){ + Helperjs.showMessage("Repost",qsTr("Success!"),root) + }) + } } - } - - Action { - text: qsTr("Delete") - onTriggered: { - Newsjs.deleteNews(root.login,root.db,newsitemobject.id,newsitemobject.messagetype,root,function(reply){ - var msg = {'deleteId': index, 'model': newsModel}; - newsWorker.sendMessage(msg); - }) + Action { + text: qsTr("Conversation") + onTriggered: { + pushConversation(); + } } - } - Action { - text: qsTr("Show height") - onTriggered: { - Helperjs.showMessage("Height",itemMessage.height + "toprow: "+ toprow.height,root) + Menu{ + title: qsTr("Attending") + width: 10*osSettings.systemFontSize + delegate: MenuItem{ + contentItem: Text{ + font.pointSize: osSettings.systemFontSize + text: parent.text + } + } + Action{ + text:qsTr("yes") + onTriggered: {Newsjs.attend(root.login,db,"yes",newsitemobject.id,root,function(){ + model.newsitemobject.friendica_activities_view.self.attending="yes";attending="yes"}) + } + } + Action{text:qsTr("maybe") + onTriggered: {Newsjs.attend(root.login,db,"maybe",newsitemobject.id,root,function(){ + model.newsitemobject.friendica_activities_view.self.attending="maybe";attending="maybe"}) + } + } + Action{text:qsTr("no") + onTriggered: {Newsjs.attend(root.login,db,"no",newsitemobject.id,root,function(){ + model.newsitemobject.friendica_activities_view.self.attending="no";attending="no"})} + } } + + Action { + text: qsTr("Delete") + onTriggered: { + Newsjs.deleteNews(root.login,root.db,newsitemobject.id,newsitemobject.messagetype,root,function(reply){ + var msg = {'deleteId': index, 'model': newsModel}; + newsWorker.sendMessage(msg); + }) + } + } + + //MenuItem{ + // text:qsTr("Show on website") + // onTriggered:Qt.openUrlExternally(login.server+"/display/"+newsitemobject + //} + } + Column{ + id:conversationColumn + anchors.top:controlrow.bottom + width: newsitem.width } - - - //MenuItem{ - // text:qsTr("Show on website") - // onTriggered:Qt.openUrlExternally(login.server+"/display/"+newsitemobject - //} - } - Column{ - id:conversationColumn - anchors.top:controlrow.bottom - //anchors.right: parent.right - width: newsitem.width } } -} diff --git a/source-linux/qml/newsqml/SmileyDialog.qml b/source-linux/qml/newsqml/SmileyDialog.qml index 22e88da..d2ca2a9 100644 --- a/source-linux/qml/newsqml/SmileyDialog.qml +++ b/source-linux/qml/newsqml/SmileyDialog.qml @@ -42,10 +42,8 @@ Rectangle{ width: messageColumn.width-5*mm height:root.height/2 - Button{ + MButton{ id:closeButton - height: 6*mm - width: 8*mm anchors.top: parent.top anchors.topMargin: 1*mm anchors.right: parent.right @@ -62,20 +60,20 @@ Rectangle{ position:TabBar.Header TabButton { text:qsTr("Unicode") - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize } TabButton { text: qsTr("Standard") - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize } TabButton { text: qsTr("Addon") - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize } TabButton { text: qsTr("Adult") - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize } } @@ -86,7 +84,7 @@ Rectangle{ anchors.top: closeButton.bottom anchors.topMargin: 1*mm width: smileyDialog.width-2*mm - height: smileyDialog.height-7*mm + height: smileyDialog.height-4*root.fontFactor*osSettings.bigFontSize Rectangle{ id: htmlGridTab GridView { @@ -177,10 +175,6 @@ Rectangle{ } } } - - - - } Component{ id:smileyItem @@ -207,7 +201,7 @@ Rectangle{ width:4.5*mm height: 4.5*mm textFormat:Text.RichText - font.pixelSize: 4*mm + font.pointSize: 1.2*osSettings.systemFontSize text: emoji MouseArea{ diff --git a/source-linux/qml/photoqml/ImageUploadDialog.qml b/source-linux/qml/photoqml/ImageUploadDialog.qml index 56a5a56..0208641 100644 --- a/source-linux/qml/photoqml/ImageUploadDialog.qml +++ b/source-linux/qml/photoqml/ImageUploadDialog.qml @@ -63,7 +63,7 @@ Rectangle{ } -function updateImage(){ + function updateImage(){ xhr.url= login.server + "/api/friendica/photo/update.json"; xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.clearParams(); @@ -119,7 +119,7 @@ function updateImage(){ anchors.rightMargin: 1*mm spacing:5*mm Text{ - font.pixelSize: 3.5*mm + font.pointSize: osSettings.bigFontSize font.bold: true text:qsTr("Upload to album") } @@ -132,17 +132,46 @@ function updateImage(){ // } // } - Button{ + MButton{ id:closeButton - height: 8*mm text: "\uf057" - font.pixelSize: 3*mm - onClicked:{photoStack.pop(); - //imageDialog.destroy() + width: 2.5*root.fontFactor*osSettings.bigFontSize + font.pointSize: osSettings.bigFontSize + onClicked:{photoStack.pop()} + } + } + + ComboBox{ + id: album + x: 3*mm + y: 3*root.fontFactor*osSettings.bigFontSize + width: root.width/2; + height: 2.5*root.fontFactor*osSettings.bigFontSize//5*mm; + font.pointSize: osSettings.bigFontSize + editable:true + model: albumModel + +// delegate: ItemDelegate { +// width: album.width +// contentItem: Text { +// //text: modelData +// color: "white" +// font: album.font +// font.pixelSize: album.font.pixelSize +// elide: Text.ElideRight +// verticalAlignment: Text.AlignVCenter +// } +// //highlighted: album.highlightedIndex === index +// } + onAccepted: { + if (find(currentText) === -1) { + albumModel.append({text: editText}) + currentIndex = find(editText) } } } + ListModel{id:albumModel} // Text { // text: qsTr("Album") // x: 4*mm; y: 10*mm @@ -161,16 +190,28 @@ function updateImage(){ ListView{ id: imageUploadView x:3*mm //23*mm - y:17*mm + y: 11*mm + album.height width: imageDialog.width-5*mm //25*mm - height: root.width/2 //25*mm + height: parent.height -(9*root.fontFactor*osSettings.bigFontSize)//root.width/2 //25*mm model: imageUploadModel delegate: imageDelegate footer: imageId==""?imageFooter:null clip:true orientation: ListView.Horizontal spacing: mm + DropArea{ + anchors.fill: parent + onDropped: { + if (drop.keys.includes('text/uri-list')){ + var urllist=drop.text.split('\n'); + for(var i=0;i< urllist.length;i++){ + attachImage(urllist[i]) + } + } + } + } } + BusyIndicator{ id: uploadBusy running: false @@ -180,6 +221,7 @@ function updateImage(){ width:10*mm height: 10*mm } + ListModel{ id: imageUploadModel } @@ -192,7 +234,7 @@ function updateImage(){ Image{ id: uploadImage width: root.width/2-mm //20*mm - height: imageUploadView.height-6*mm//height: 14*mm + height: imageUploadView.height-(3*root.fontFactor*osSettings.bigFontSize+2*mm) fillMode: Image.PreserveAspectFit source:imageUrl onVisibleChanged: descriptionInput.focus=true; @@ -207,18 +249,19 @@ function updateImage(){ } Rectangle{ - color: "light grey" + //color: "light grey" border.color: "grey" anchors.top: uploadImage.bottom anchors.topMargin: mm //x: mm; y: 15*mm; width: root.width/2-mm //Math.max(root.width/2-mm, descriptionInput.contentWidth); - height: 5*mm; + height: 2.5*root.fontFactor*osSettings.bigFontSize +2*mm //5*mm; TextField{ //TextInput { id: descriptionInput anchors.fill: parent - font.pixelSize: 3*mm + anchors.margins: mm + font.pointSize: osSettings.systemFontSize selectByMouse: true placeholderText: qsTr("Description") text:description!=""?description:"" @@ -248,44 +291,17 @@ function updateImage(){ } } } - ComboBox{ - id: album - x: 3*mm - y: 10*mm - width: root.width/2; - height: 5*mm; - font.pixelSize: 3*mm - editable:true - model: albumModel -// delegate: ItemDelegate { -// width: album.width -// contentItem: Text { -// //text: modelData -// color: "white" -// font: album.font -// font.pixelSize: album.font.pixelSize -// elide: Text.ElideRight -// verticalAlignment: Text.AlignVCenter -// } -// //highlighted: album.highlightedIndex === index -// } - onAccepted: { - if (find(currentText) === -1) { - albumModel.append({text: editText}) - currentIndex = find(editText) - } - } - } - - ListModel{id:albumModel} Button{ id:uploadButton - height: 8*mm - x:4*mm; y:root.width/2+18*mm //40*mm + height: 2*root.fontFactor*osSettings.bigFontSize + x:4*mm; + anchors.top:imageUploadView.bottom + anchors.topMargin: mm + //y:root.width/2+18*mm //40*mm text: imageId==""?qsTr("Upload"):qsTr("Change") - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize onClicked:{ if(album.currentText==""){Helperjs.showMessage(qsTr("Error"),qsTr(" No album name given"), imageDialog)} else if (imageId!=""){uploadBusy.running=true; updateImage()} diff --git a/source-linux/qml/photoqml/PhotoComponent.qml b/source-linux/qml/photoqml/PhotoComponent.qml index dd3e95c..5e67fe4 100644 --- a/source-linux/qml/photoqml/PhotoComponent.qml +++ b/source-linux/qml/photoqml/PhotoComponent.qml @@ -78,7 +78,7 @@ Package { width:15*mm anchors.bottom: photoWrapper.bottom color: "white" - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize wrapMode:Text.Wrap } MouseArea { diff --git a/source-linux/qml/photoqml/PhotoTab.qml b/source-linux/qml/photoqml/PhotoTab.qml index d556678..ff78708 100644 --- a/source-linux/qml/photoqml/PhotoTab.qml +++ b/source-linux/qml/photoqml/PhotoTab.qml @@ -152,6 +152,31 @@ StackView{ photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":urls}) } + BlueButton{ + x:mm + y:mm + z:2 + visible: !wideScreen + fontColor: "grey" + border.color: "transparent" + text: "\uf0c9" + font.pointSize: osSettings.bigFontSize + onClicked:{ + leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()} + } + + LeftDrawerLinux{ + id:leftDrawer + property var newstabstatus: newstab.newstabstatus + visible: wideScreen&&rootstackView.depth<2 + width: visible?osSettings.systemFontSize*15:0 + height: root.height-bar.height + } + + LeftDrawerAndroid{ + id: leftDrawerAndroid + } + ProgressBar{ id: newImagesProgress width: 15*mm @@ -169,8 +194,6 @@ StackView{ anchors.topMargin: 0.5*mm anchors.right:updatePhotolist.left anchors.rightMargin:mm - height: 6*mm - width: 8*mm text:"\uf0ee" onClicked: { photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml"); @@ -184,22 +207,20 @@ StackView{ anchors.topMargin: 0.5*mm anchors.right:phototabstatusButton.left anchors.rightMargin:mm - height: 6*mm - width: 8*mm text:"\uf0ed" Menu { id:photoupdatemenu - width:40*mm + width:8*root.fontFactor*osSettings.bigFontSize MenuItem { text: qsTr("All Images") - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize onTriggered: { Imagejs.requestList(root.login,root.db, false, fotostab,function(obj){fotorectangle.newimages=obj})} } MenuItem { text: qsTr("Only new") - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize onTriggered: { Imagejs.requestList(root.login,root.db, true,fotostab,function(obj){fotorectangle.newimages=obj})} } @@ -213,15 +234,14 @@ StackView{ anchors.topMargin: 0.5*mm anchors.right: parent.right anchors.rightMargin:2*mm - height: 6*mm - width: Math.max(10*mm,implicitWidth) + width: Math.max(8*root.fontFactor*osSettings.bigFontSize,implicitWidth) text: fotostab.phototabstatus=="Images"?qsTr("Own Images"):fotostab.phototabstatus Menu { id:phototabmenu - width: 40*mm + width: 20*root.fontFactor*osSettings.bigFontSize MenuItem { text: qsTr("Own Images") - font.pixelSize: 3*mm + font.pointSize: osSettings.bigFontSize onTriggered: { fotostab.phototabstatus="Images"; // phototabstatusButton.text=qsTr("Own images"); @@ -246,8 +266,10 @@ StackView{ id: albumgridview cellWidth: 17*mm cellHeight: 17*mm - x: mm;y:8*mm - width: parent.width-2*mm; height: parent.height-9*mm + x: leftDrawer.width//mm; + y:8*mm + width: wideScreen&&rootstackView.depth<2?parent.width-leftDrawer.width-mm:parent.width-mm //parent.width-2*mm; + height: parent.height-9*mm clip: true model: visualphotoModel.parts.album footer:Rectangle{ @@ -256,7 +278,7 @@ StackView{ width:12*mm height:6*mm Text{ - font.pixelSize: 1.5*mm + font.pointSize: 0.75*osSettings.systemFontSize anchors.centerIn: parent text:qsTr("More") } @@ -282,11 +304,9 @@ StackView{ MButton { id: backButton - height: 6*mm - width: 8*mm text: "\uf057" - x: parent.width - backButton.width - 3*mm - y: -backButton.height - 4*mm + x: parent.width - backButton.width - root.fontFactor*osSettings.bigFontSize + y: -backButton.height - root.fontFactor*osSettings.bigFontSize z:2 onClicked: {photoBackground.opacity=0} } diff --git a/source-linux/qml/photoqml/PhotogroupComponent.qml b/source-linux/qml/photoqml/PhotogroupComponent.qml index eb948f4..8796627 100644 --- a/source-linux/qml/photoqml/PhotogroupComponent.qml +++ b/source-linux/qml/photoqml/PhotogroupComponent.qml @@ -93,7 +93,7 @@ Package { wrapMode:Text.Wrap color: "white" font.family: "Monospace" - font.pixelSize: 2*mm + font.pointSize: osSettings.systemFontSize anchors.bottom: albumWrapper.bottom } @@ -125,7 +125,7 @@ Package { MouseArea { anchors.fill: parent onPressAndHold:{ - var menuString="import QtQuick.Controls 1.4; Menu {MenuItem{text:qsTr('Delete on client and server'); onTriggered: {deletepics('album',albumname);photogroupModel.remove(index)}}}"; + var menuString="import QtQuick.Controls 2.12; Menu {MenuItem{text:qsTr('Delete on client and server'); onTriggered: {deletepics('album',albumname);photogroupModel.remove(index)}}}"; var albummenuObject=Qt.createQmlObject(menuString,albumWrapper,"albummenuOutput") albummenuObject.popup() } diff --git a/source-linux/translations/friendiqa-de.qm b/source-linux/translations/friendiqa-de.qm index 173db705df65d8e4e8429494d10578a6381b1b50..41284529f29c1ed1fcee91a5e446266d6262d814 100644 GIT binary patch delta 3419 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 G)Bgb%@;|o# diff --git a/source-linux/translations/friendiqa-de.ts b/source-linux/translations/friendiqa-de.ts index ecd9fd8..41e100b 100644 --- a/source-linux/translations/friendiqa-de.ts +++ b/source-linux/translations/friendiqa-de.ts @@ -4,29 +4,29 @@ AccountPage - - - + + + User Name - + Server Server - + Nickname Kurzname - + Password Passwort - + Image dir. Bildverz. @@ -35,54 +35,54 @@ Anzeige - - - + + + Error Fehler - + Nicknames containing @ symbol currently not supported Kurznamen mit @ Zeichen werden derzeit nicht unterstützt. - + Confirm Bestätigen - + No server given! Kein Server angegeben! - + No nickname given! Kein Kurzname angegeben! - + No password given! Kein Passwort angegeben! - + No image directory given! Kein Verzeichnis für Bilder angegeben! - + Wrong password! Falsches Passwort! - + Success Bestätigt - + Name Name @@ -98,12 +98,12 @@ CalendarTab - + Events Termine - + Own Calendar Eigener Kalender @@ -134,7 +134,7 @@ Max. Nachr. - + Hide #nsfw? #nsfw minimieren? @@ -262,96 +262,409 @@ ContactDetailsComponent - Connect - Kontaktanfrage + Kontaktanfrage - Description - Beschreibung + Beschreibung - Location - Ort + Ort - Posts - Beiträge + Beiträge - URL - Profilseite + Profilseite - Created at - Erstellt + Erstellt ContactPage + + + seconds + Sekunden + + + + minute + Minute + + + + minutes + Minuten + + + + hour + Stunde + + + + hours + Stunden + + + + day + Tag + + + + days + Tage + + + + month + Monat + + + + months + Monate + + + + years + Jahre + + + + likes this. + mag das. + + + + like this. + mögen das. + + doesn't like this. + mag das nicht. + + + + don't like this. + mögen das nicht. + + + + will attend. + nehmen teil. + + + + persons will attend. + Personen nehmen teil. + + + + will not attend. + nimmt nicht teil. + + + + persons will not attend. + Personen nehmen nicht teil. + + + + may attend. + nimmt vielleicht teil. + + + + persons may attend. + Personen nehmen vielleicht teil. + + + Connect Kontaktanfrage - + + Approve + Erlauben + + + + Reject + Ablehnen + + + + Ignore + Ignorieren + + + Description Beschreibung - + Location Ort - + Posts Beiträge - + URL Profilseite - + Created at Erstellt + + + Network Error + Netzwerk-Fehler + + + + Conversation + + + seconds + Sekunden + + + + minute + Minute + + + + minutes + Minuten + + + + hour + Stunde + + + + hours + Stunden + + + + day + Tag + + + + days + Tage + + + + month + Monat + + + + months + Monate + + + + years + Jahre + + + + likes this. + mag das. + + + + like this. + mögen das. + + + + doesn't like this. + mag das nicht. + + + + don't like this. + mögen das nicht. + + + + will attend. + nehmen teil. + + + + persons will attend. + Personen nehmen teil. + + + + will not attend. + nimmt nicht teil. + + + + persons will not attend. + Personen nehmen nicht teil. + + + + may attend. + nimmt vielleicht teil. + + + + persons may attend. + Personen nehmen vielleicht teil. + + + + DrawerAccountComponent + + + Refresh + Aktualisieren + + + + Timeline + Chronologisch + + + + Conversations + Unterhaltungen + + + + Replies + Interaktionen + + + + Direct Messages + Direktnachrichten + + + + Favorites + Markierte News + + + + Public Timeline + öff. Timeline + + + + Group news + News Gruppe + + + + Search + Suche + + + + Notifications + Meldungen + + + + DrawerAccountComponentContacts + + + Profile + Profil + + + + Friends + Freunde + + + + Contacts + Kontakte + + + + Groups + Gruppen + EventList - + Location + Ort + + + + EventListItem + + Location Ort + + FriendsListTab + + + Friend Requests + Kontaktanfragen + + + + Friends + Kontakte + + FriendsTab - + Me Ich - + Friends Freunde - + Contacts Kontakte - + Groups Gruppen @@ -383,63 +696,86 @@ Bild - + Description Beschreibung - + Upload Hochladen - + Change Ändern - + Error Fehler - + No album name given Kein Albumname angegeben + + LeftDrawerScrollview + + + Settings + Einstellungen + + + + Accounts + Konten + + + + Quit + Schliessen + + MessageSend - + to: an: - + Title (optional) Überschrift (optional) - + + Drop your Content here. + Legen Sie Ihren Inhalt per Drag & Drop hier ab. + + + What's on your mind? Woran denkst du gerade? - - + + Error Fehler - + Only one attachment supported at the moment. Remove other attachment first! Nur ein Anhang derzeit unterstützt. Lösche zuerst den anderen Anhang! - + No receiver supplied! Kein Empfänger angegeben! @@ -447,7 +783,7 @@ MoreComments - + Show all comments Alle Kommentare @@ -455,12 +791,12 @@ NewsStack - + Network Error Netzwerk-Fehler - + More Mehr @@ -520,102 +856,102 @@ Schliessen - + seconds Sekunden - + minute Minute - + minutes Minuten - + hour Stunde - + hours Stunden - + day Tag - + days Tage - + month Monat - + months Monate - + years Jahre - + likes this. mag das. - + like this. mögen das. - + doesn't like this. mag das nicht. - + don't like this. mögen das nicht. - + will attend. nehmen teil. - + persons will attend. Personen nehmen teil. - + will not attend. nimmt nicht teil. - + persons will not attend. Personen nehmen nicht teil. - + may attend. nimmt vielleicht teil. - + persons may attend. Personen nehmen vielleicht teil. @@ -627,17 +963,17 @@ Teilnahme - + Source: Quelle: - + Direct Message Direktnachricht - + In reply to Antwort an @@ -651,65 +987,70 @@ partecipare - + ago her - + Attending: Teilnahme: - + Reply Antworten - + DM Direktnachricht - + Repost Teilen - + Success! Erledigt! - + Conversation Unterhaltung - + Attending Teilnahme - + yes ja - + maybe vielleicht - + no nein - + Delete Löschen + + + Show height + + PermissionDialog @@ -732,23 +1073,23 @@ s Bilder - + All Images Alle Bilder - + Only new Nur neue - - + + Own Images Eigene Bilder - + More Mehr @@ -941,37 +1282,37 @@ Homepage - + Update Aktualisieren - + profile id Profil-Nummer - + Description Beschreibung - + Location Ort - + Posts Beiträge - + URL Profilseite - + Created at Erstellt @@ -979,22 +1320,22 @@ SmileyDialog - + Unicode Unicode - + Standard Standard - + Addon Addon - + Adult XXX @@ -1028,59 +1369,48 @@ friendiqa - Refresh - Aktualisieren + Aktualisieren - Timeline - Chronologisch + Chronologisch - Conversations - Unterhaltungen + Unterhaltungen - Favorites - Markierte News + Markierte News - Replies - Interaktionen + Interaktionen - Public Timeline - öff. Timeline + öff. Timeline - Group news - News Gruppe + News Gruppe - Search - Suche + Suche - Settings - Einstellungen + Einstellungen - Accounts - Konten + Konten - Quit - Schliessen + Schliessen @@ -1188,22 +1518,20 @@ Fehler - Changelog - Änderungen + Änderungen - Setting view type of news has moved from account page to config page. - Die Einstellung der Ansichtsart von Nachrichten wurde von der Kontoseite auf die Konfigurationsseite verschoben. + Die Einstellung der Ansichtsart von Nachrichten wurde von der Kontoseite auf die Konfigurationsseite verschoben. - + Undefined Array Error Antwort-Array ungültig - + JSON status Error Server-Antwort: Fehler diff --git a/source-linux/translations/friendiqa-es.qm b/source-linux/translations/friendiqa-es.qm index eed8306999fb2bb9c843c4cacaa2f942e7fbbe0d..6918aee9c922d3c22c755a0a0ce60bac8354c553 100644 GIT binary patch delta 4992 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 ldBo}lxmFZiZnxYR2#IwruOx AccountPage - - - + + + User Usuario - + Server Servidor - + Nickname Usuario - + Password Contraseña - + Image dir. Dir. de imágenes @@ -35,54 +35,54 @@ Noticias como - - - + + + Error Error - + Nicknames containing @ symbol currently not supported No se admiten los apodos que contienen el símbolo @ actualmente - + Confirm Confirmar - + No server given! ¡Servidor no encontrado! - + No nickname given! ¡Usuario incorrecto! - + No password given! ¡Contraseña incorrecta! - + No image directory given! ¡No se ha encontrado el directorio de imágenes! - + Wrong password! ¡Contraseña incorrecta! - + Success éxito! - + Name Nombre @@ -98,12 +98,12 @@ CalendarTab - + Events Eventos - + Own Calendar Calendario propio @@ -134,7 +134,7 @@ Nº Max. de noticias. - + Hide #nsfw? Ocultar #nsfw? @@ -246,96 +246,409 @@ ContactDetailsComponent - Connect - Conectar + Conectar - Description - Descripción + Descripción - Location - Localización + Localización - Posts - Mensajes + Mensajes - URL - URL + URL - Created at - Creado en + Creado en ContactPage + + + seconds + Segundos + + + + minute + Minuto + + + + minutes + Minutos + + + + hour + Hora + + + + hours + Horas + + + + day + Dia + + + + days + Dias + + + + month + Mes + + + + months + Meses + + + + years + Años + + + + likes this. + le gusta esto. + + + + like this. + me gusta esto. + + doesn't like this. + no de ése. + + + + don't like this. + no me gusta. + + + + will attend. + asistirá. + + + + persons will attend. + Personas que asistirán. + + + + will not attend. + no asistirá. + + + + persons will not attend. + Personas que no asistirán. + + + + may attend. + Puede asistir. + + + + persons may attend. + Personas que pueden asistir. + + + Connect Conectar - + + Approve + Aprobar + + + + Reject + Rechazar + + + + Ignore + Ignorar + + + Description Descripción - + Location Localización - + Posts Mensajes - + URL URL - + Created at Creado en + + + Network Error + Fallo de red + + + + Conversation + + + seconds + Segundos + + + + minute + Minuto + + + + minutes + Minutos + + + + hour + Hora + + + + hours + Horas + + + + day + Dia + + + + days + Dias + + + + month + Mes + + + + months + Meses + + + + years + Años + + + + likes this. + le gusta esto. + + + + like this. + me gusta esto. + + + + doesn't like this. + no de ése. + + + + don't like this. + no me gusta. + + + + will attend. + asistirá. + + + + persons will attend. + Personas que asistirán. + + + + will not attend. + no asistirá. + + + + persons will not attend. + Personas que no asistirán. + + + + may attend. + Puede asistir. + + + + persons may attend. + Personas que pueden asistir. + + + + DrawerAccountComponent + + + Refresh + Actualizar + + + + Timeline + Cronología + + + + Conversations + Conversaciones + + + + Replies + Respuestas + + + + Direct Messages + Mensaje directo + + + + Favorites + Favoritos + + + + Public Timeline + Cronología pública + + + + Group news + Grupos + + + + Search + Busca + + + + Notifications + Notificaciones + + + + DrawerAccountComponentContacts + + + Profile + Perfil + + + + Friends + Amigos + + + + Contacts + Contactos + + + + Groups + Grupos + EventList - + Location + Localización + + + + EventListItem + + Location Localización + + FriendsListTab + + + Friend Requests + Solicitudes de contacto + + + + Friends + Amigos + + FriendsTab - + Me Yo - + Friends Amigos - + Contacts Contactos - + Groups Grupos @@ -356,63 +669,86 @@ imagen - + Description Descripción - + Upload Subir - + Change Cambiar - + Error Error - + No album name given ¡Nombre del álbum no encontrado! + + LeftDrawerScrollview + + + Settings + Ajustes + + + + Accounts + Cuentas + + + + Quit + Salida + + MessageSend - + to: a: - + Title (optional) Título (opcional) - + + Drop your Content here. + Deje caer su contenido aquí. + + + What's on your mind? ¿Qué tienes en mente? - - + + Error Error - + Only one attachment supported at the moment. Remove other attachment first! Solo se admite adjuntar un solo archivo en este momento. ¡Elimine y deje un archivo adjunto! - + No receiver supplied! No se ha suministrado ningún receptor! @@ -420,7 +756,7 @@ MoreComments - + Show all comments todos comentarios @@ -428,12 +764,12 @@ NewsStack - + Network Error Fallo de red - + More Mas @@ -489,102 +825,102 @@ Salida - + seconds Segundos - + minute Minuto - + minutes Minutos - + hour Hora - + hours Horas - + day Dia - + days Dias - + month Mes - + months Meses - + years Años - + likes this. le gusta esto. - + like this. me gusta esto. - + doesn't like this. no de ése. - + don't like this. no me gusta. - + will attend. asistirá. - + persons will attend. Personas que asistirán. - + will not attend. no asistirá. - + persons will not attend. Personas que no asistirán. - + may attend. Puede asistir. - + persons may attend. Personas que pueden asistir. @@ -596,17 +932,17 @@ Asistiendo: - + Source: Fuente: - + Direct Message Mensaje directo - + In reply to En respuesta a @@ -620,62 +956,62 @@ asistencia - + ago hace - + Attending: Asistiendo: - + Reply Respuesta - + DM Mensaje directo - + Repost Volver a publicar - + Success! éxito! - + Conversation Conversación - + Attending Asistiendo - + yes si - + maybe quizás - + no no - + Delete Borrar @@ -701,23 +1037,23 @@ s Imágenes - + All Images Todas las imagenes - + Only new Solo nueva - - + + Own Images Mis imágenes - + More Mas @@ -732,215 +1068,215 @@ is default - + es por defecto hide friends - + ocultar amigos profile photo - + foto de perfil profile thumb - + foto de perfil pequeña publish - + publicar publish in network - + publicar en la red description - + descripción date of birth - + fecha de nacimiento address - + dirección city - + ciudad region - + región postal code - + código postal country - + país hometown - + ciudad natal gender - + género marital status - + estado civil married with - + casado con married since - + casado desde sexual - + orientación sexual politics - + política religion - + religión public keywords - + palabras clave públicas private keywords - + palabras clave privadas likes - + le gusta dislikes - + no le gusta about - + sobre music - + música book - + libro tv - + tv film - + película interest - + interés romance - + romance work - + trabajo education - + educación social networks - + redes sociales homepage - + página web - + Update - + Actualización - + profile id profile id - + Description Descripción - + Location Localización - + Posts Mensajes - + URL URL - + Created at Creado en @@ -948,22 +1284,22 @@ SmileyDialog - + Unicode Unicode - + Standard Standard - + Addon Addon - + Adult XXX @@ -997,59 +1333,48 @@ friendiqa - Refresh - Actualizar + Actualizar - Timeline - Cronología + Cronología - Conversations - Conversaciones + Conversaciones - Favorites - Favoritos + Favoritos - Replies - Respuestas + Respuestas - Public Timeline - Cronología pública + Cronología pública - Group news - Grupos + Grupos - Search - Busca + Busca - Settings - Ajustes + Ajustes - Accounts - Cuentas + Cuentas - Quit - Salida + Salida @@ -1161,22 +1486,16 @@ Error - - Changelog - - - - Setting view type of news has moved from account page to config page. - 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. + 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. - + Undefined Array Error - + JSON status Error diff --git a/source-linux/translations/friendiqa-hu.qm b/source-linux/translations/friendiqa-hu.qm new file mode 100644 index 0000000000000000000000000000000000000000..8045dabf315733671fdd7c17516fdf94bb133976 GIT binary patch literal 15758 zcmcIr36LD+b$;5NduI=gR;$&)s)axoVi8z!5t&050txL(XeB|oLhnrPZfj?{hwh$T zR<;4#P}o5(Y$y{bWC|N&E*s-ec0n-44&ro-sgR^hhywycp-KoQ8|1{scE0!jGd

  • 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 literal 0 HcmV?d00001 diff --git a/source-linux/translations/friendiqa-hu.ts b/source-linux/translations/friendiqa-hu.ts new file mode 100644 index 0000000..a1a88a0 --- /dev/null +++ b/source-linux/translations/friendiqa-hu.ts @@ -0,0 +1,1534 @@ + + + + + AccountPage + + + + + User + Felhasználó + + + + Server + Kiszolgáló + + + + Nickname + Becenév + + + + Password + Jelszó + + + + Image dir. + Képkönyvtár + + + News as + Hírek mint + + + + + + Error + Hiba + + + + Nicknames containing @ symbol currently not supported + A @ szimbólumot tartalmazó becenevek jelenleg nem támogatottak + + + + Confirm + Megerősítés + + + + No server given! + Nincs kiszolgáló megadva! + + + + No nickname given! + Nincs becenév megadva! + + + + No password given! + Nincs jelszó megadva! + + + + No image directory given! + Nincs képkönyvtár megadva! + + + + Wrong password! + Hibás jelszó! + + + + Success + Sikeres + + + + Name + Név + + + Timeline + Idővonal + + + Conversations + Beszélgetések + + + + CalendarTab + + + Events + Események + + + + Own Calendar + Saját naptár + + + + ConfigPage + + + News as + Hírek mint + + + + + + Conversations + Beszélgetések + + + + + Timeline + Idővonal + + + + Max. News + Legtöbb hír + + + + Hide #nsfw? + A #NSFW elrejtése? + + + + Sync + Szinkronizálás + + + + ConfigTab + + User + Felhasználó + + + Server + Kiszolgáló + + + Nickname + Becenév + + + Password + Jelszó + + + Image dir. + Képkönyvtár + + + Max. News + Legtöbb hír + + + News as + Hírek mint + + + Interval (0=None) + Időköz (0 = nincs) + + + Error + Hiba + + + Nickname not registered at given server! + A becenév nincs regisztrálva a megadott kiszolgálón! + + + Confirm + Megerősítés + + + No server given! + Nincs kiszolgáló megadva! + + + No nickname given! + Nincs becenév megadva! + + + Nickname not registered at given server! + A becenév nincs regisztrálva a megadott kiszolgálón! + + + No username given! + Nincs felhasználónév megadva! + + + Sync Interval (0=None) + Szinkronizálási időköz (0 = nincs) + + + Nicknames containing @ symbol currently not supported + A @ szimbólumot tartalmazó becenevek jelenleg nem támogatottak + + + Min. + Legkisebb + + + No password given! + Nincs jelszó megadva! + + + No image directory given! + Nincs képkönyvtár megadva! + + + No maximum news number given! + Nincs legtöbb hír szám megadva! + + + Wrong password! + Hibás jelszó! + + + Success + Sikeres + + + Name + Név + + + Timeline + Idővonal + + + Conversations + Beszélgetések + + + + ContactComponent + + + Connect + Kapcsolódás + + + + ContactDetailsComponent + + Connect + Kapcsolódás + + + Description + Leírás + + + Location + Hely + + + Posts + Bejegyzések + + + URL + URL + + + Created at + Létrehozva + + + + ContactPage + + + seconds + másodperc + + + + minute + perc + + + + minutes + perc + + + + hour + óra + + + + hours + óra + + + + day + nap + + + + days + nap + + + + month + hónap + + + + months + hónap + + + + years + év + + + + likes this. + kedveli ezt. + + + + like this. + kedveli ezt. + + + + doesn't like this. + nem kedveli ezt. + + + + don't like this. + nem kedveli ezt. + + + + will attend. + részt vesz. + + + + persons will attend. + személy részt vesz. + + + + will not attend. + nem vesz részt. + + + + persons will not attend. + személy nem vesz részt. + + + + may attend. + talán részt vesz. + + + + persons may attend. + személy talán részt vesz. + + + + Connect + Kapcsolódás + + + + Approve + Jóváhagyja + + + + Reject + Visszautasítás + + + + Ignore + Ne törődj a + + + + Description + Leírás + + + + Location + Hely + + + + Posts + Bejegyzések + + + + URL + URL + + + + Created at + Létrehozva + + + + Network Error + Hálózati hiba + + + + Conversation + + + seconds + másodperc + + + + minute + perc + + + + minutes + perc + + + + hour + óra + + + + hours + óra + + + + day + nap + + + + days + nap + + + + month + hónap + + + + months + hónap + + + + years + év + + + + likes this. + kedveli ezt. + + + + like this. + kedveli ezt. + + + + doesn't like this. + nem kedveli ezt. + + + + don't like this. + nem kedveli ezt. + + + + will attend. + részt vesz. + + + + persons will attend. + személy részt vesz. + + + + will not attend. + nem vesz részt. + + + + persons will not attend. + személy nem vesz részt. + + + + may attend. + talán részt vesz. + + + + persons may attend. + személy talán részt vesz. + + + + DrawerAccountComponent + + + Refresh + Frissítés + + + + Timeline + Idővonal + + + + Conversations + Beszélgetések + + + + Replies + Válaszok + + + + Direct Messages + Közvetlen üzenetek + + + + Favorites + Kedvencek + + + + Public Timeline + Nyilvános idővonal + + + + Group news + Csoporthírek + + + + Search + Keresés + + + + Notifications + Értesítések + + + + DrawerAccountComponentContacts + + + Profile + Profil + + + + Friends + Ismerősök + + + + Contacts + Partnerek + + + + Groups + Csoportok + + + + EventList + + Location + Hely + + + + EventListItem + + + Location + Hely + + + + FriendsListTab + + + Friend Requests + Barátkérések + + + + Friends + Ismerősök + + + + FriendsTab + + + Me + Én + + + + Friends + Ismerősök + + + + Contacts + Partnerek + + + + Groups + Csoportok + + + + GroupComponent + + Error + Hiba + + + No name given + Nincs név megadva + + + + ImageUploadDialog + + + Upload to album + Feltöltés albumba + + + Album + Album + + + Image + Kép + + + + Description + Leírás + + + + Upload + Feltöltés + + + + Change + Változtatás + + + + Error + Hiba + + + + No album name given + Nincs albumnév megadva + + + + LeftDrawerScrollview + + + Settings + Beállítások + + + + Accounts + Fiókok + + + + Quit + Kilépés + + + + MessageSend + + + to: + címzett: + + + + Title (optional) + Cím (elhagyható) + + + + Drop your Content here. + Tegye le itt a Tartalmát. + + + + What's on your mind? + Mire gondol? + + + + + Error + Hiba + + + + Only one attachment supported at the moment. + Remove other attachment first! + Csak egyetlen melléklet támogatott jelenleg. + Először távolítsa el a másik mellékletet. + + + + No receiver supplied! + Nincs fogadó megadva! + + + + MoreComments + + + Show all comments + Összes hozzászólás megjelenítése + + + + NewsStack + + + Network Error + Hálózati hiba + + + + More + Több + + + + NewsTab + + Download profile image for + Profilkép letöltése ennél: + + + More + Több + + + Timeline + Idővonal + + + Error + Hiba + + + Favorites + Kedvencek + + + Conversations + Beszélgetések + + + Network Error + Hálózati hiba + + + Replies + Válaszok + + + Public timeline + Nyilvános idővonal + + + Direct Messages + Közvetlen üzenetek + + + Notifications + Értesítések + + + Group news + Csoporthírek + + + Quit + Kilépés + + + + seconds + másodperc + + + + minute + perc + + + + minutes + perc + + + + hour + óra + + + + hours + óra + + + + day + nap + + + + days + nap + + + + month + hónap + + + + months + hónap + + + + years + év + + + + likes this. + kedveli ezt. + + + + like this. + kedveli ezt. + + + + doesn't like this. + nem kedveli ezt. + + + + don't like this. + nem kedveli ezt. + + + + will attend. + részt vesz. + + + + persons will attend. + személy részt vesz. + + + + will not attend. + nem vesz részt. + + + + persons will not attend. + személy nem vesz részt. + + + + may attend. + talán részt vesz. + + + + persons may attend. + személy talán részt vesz. + + + + Newsitem + + attending: + részvétel: + + + + Source: + Forrás: + + + + Direct Message + Közvetlen üzenet + + + + In reply to + Válaszul erre: + + + comments + hozzászólás + + + + attending + részvétel + + + + ago + óta + + + + Attending: + Részvétel: + + + + Reply + Válasz + + + + DM + DM + + + + Repost + Újraküldés + + + + Success! + Sikeres! + + + + Conversation + Beszélgetés + + + + Attending + Részvétel + + + + yes + igen + + + + maybe + talán + + + + no + nem + + + + Delete + Törlés + + + + PermissionDialog + + + Friends + Ismerősök + + + + Groups + Csoportok + + + + PhotoTab + + + 's images + képei + + + + All Images + Összes kép + + + + Only new + Csak újak + + + + + Own Images + Saját képek + + + + More + Több + + + + ProfileComponent + + + profile name + profilnév + + + + is default + alapértelmezett + + + + hide friends + ismerősök elrejtése + + + + profile photo + profilfénykép + + + + profile thumb + profilbélyegkép + + + + publish + közzététel + + + + publish in network + közzététel hálózaton + + + + description + leírás + + + + date of birth + születési dátum + + + + address + cím + + + + city + település + + + + region + régió + + + + postal code + irányítószám + + + + country + ország + + + + hometown + szülőváros + + + + gender + nem + + + + marital status + családi állapot + + + + married with + házas vele + + + + married since + házas ekkortól + + + + sexual + szexuális + + + + politics + politika + + + + religion + vallás + + + + public keywords + nyilvános kulcsszavak + + + + private keywords + személyes kulcsszavak + + + + likes + kedvelések + + + + dislikes + nem kedvelések + + + + about + névjegy + + + + music + zene + + + + book + könyv + + + + tv + TV + + + + film + film + + + + interest + érdeklődés + + + + romance + romantika + + + + work + munka + + + + education + oktatás + + + + social networks + közösségi hálózatok + + + + homepage + honlap + + + + Update + Frissítés + + + + profile id + profilazonosító + + + + Description + Leírás + + + + Location + Hely + + + + Posts + Bejegyzések + + + + URL + URL + + + + Created at + Létrehozva + + + + SmileyDialog + + + Unicode + Unicode + + + + Standard + Szabványos + + + + Addon + Bővítmény + + + + Adult + Felnőtt + + + + SyncComponent + + + sync + szinkronizálás + + + + notify + értesítés + + + + SyncConfig + + + Sync Interval (0=None) + Szinkronizálási időköz (0 = nincs) + + + + Min. + Legkisebb + + + + friendiqa + + Refresh + Frissítés + + + Timeline + Idővonal + + + Conversations + Beszélgetések + + + Favorites + Kedvencek + + + Replies + Válaszok + + + Public Timeline + Nyilvános idővonal + + + Group news + Csoporthírek + + + Search + Keresés + + + Settings + Beállítások + + + Accounts + Fiókok + + + Quit + Kilépés + + + + newsworker + + likes this. + kedveli ezt. + + + like this. + kedveli ezt. + + + doesn't like this. + nem kedveli ezt. + + + don't like this. + nem kedveli ezt. + + + will attend. + részt vesz. + + + persons will attend. + személy részt vesz. + + + will not attend. + nem vesz részt. + + + persons will not attend. + személy nem vesz részt. + + + may attend. + talán részt vesz. + + + persons may attend. + személy talán részt vesz. + + + + yes + igen + + + + no + nem + + + + maybe + talán + + + seconds + másodperc + + + ago + óta + + + minute + perc + + + minutes + perc + + + hour + óra + + + hours + óra + + + day + nap + + + days + nap + + + month + hónap + + + months + hónap + + + + service + + Error + Hiba + + + Changelog + Változásnapló + + + Setting view type of news has moved from account page to config page. + A hírek nézettípusának beállítása át lett helyezve a fiókoldalról a beállítási oldalra. + + + + Undefined Array Error + Meghatározatlan tömbhiba + + + + JSON status Error + JSON-állapothiba + + + diff --git a/source-linux/translations/friendiqa-it.qm b/source-linux/translations/friendiqa-it.qm index eca65731c8315da0d3ae8932da533fb81481f01e..b61cd3cd47c02c032f172e119aa94a1418a3abe1 100644 GIT binary patch literal 15773 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 delta 1821 zcmaJ<4{Q^46#i)M+Pkh@VIBL|vR(Nj3~-ysKw+DM!2rR5Ab&C$p|rQIq`Q{&HV}jY zg9v5>l7k3g5J84+{8JZkhzlSaj70{7pcq66YJ!1;O+aD<=DQxz;*7c6efQq){oeQ9 z_uj4*)lmZ!(DR6w|)12(S%gzHX&^%z36`&Sg@jA9Jgd1c=|w{OS+U zNP`+Cg)OYXb{a??#2UK?&jU(<$Btd{A^GpHHC6jaky-5a0}}1Q z1r7P!r+8Vz5#4Q;y?Ql1Tlj`37**!G7} zKT9Ek3C6w|vuWm2j6>Is11xFA{Q1;bpF_sN;(MgTi^e%ez9Wg>G_Jfs9rk``Y&u2~ zI-OjR`E%;Lgj1a9v~1~I!%sgG@lNhY2hH9%MnmqThRGhTxu%VH+PSlt3c~2u&7GSb zOGIVdZ#Tn~U?p!K98aAm@b-6AA`kzX_X#Cht0DJD!SjW&PKovOhDghwn~ib`M{A)`%WHch++~d|i$ND&nxx6+21^TC|hf= zv5HEV<_pP30*wFuhrSZ|2Q@xbAPN#`4t?-GG$G60#Sj}Uj%|j{AN1I(K z3_9@ZkCg;Ft^S*spv^mQ0jJeG5Oz;`!OVPnIELqWJQ_h-fl0FUvD1!?Uyb$3> z0A7yVFwn~vl({6Y=nr^}WEn$ZMU~GjDx-5VX{+!A(=Zr5lp{#DLXauTaG`jF{zwjqvZ?pgylT!{^r}o=SAXojzFxX2Jv~ty6yT1ODAQN?pIEh2x6C>I2m+a0KsWFhGCih>*v+ySZ7=Z%;d%Dmi(e*w)4?V$hw diff --git a/source-linux/translations/friendiqa-it.ts b/source-linux/translations/friendiqa-it.ts index 4cd39a1..0c14705 100644 --- a/source-linux/translations/friendiqa-it.ts +++ b/source-linux/translations/friendiqa-it.ts @@ -4,29 +4,29 @@ AccountPage - - - + + + User Utente - + Server Server - + Nickname Utente - + Password Password - + Image dir. Directory immagini @@ -35,54 +35,54 @@ News come - - - + + + Error Errore - + Nicknames containing @ symbol currently not supported I soprannomi contenenti il simbolo @ attualmente non sono supportati - + Confirm Conferma - + No server given! Nessun server inserito! - + No nickname given! Nessun utente inserito! - + No password given! Nessuna password inserita! - + No image directory given! Nessuna directory immagini inserita! - + Wrong password! Password sbagliata! - + Success Ha funzionato! - + Name Nome @@ -98,12 +98,12 @@ CalendarTab - + Events Eventi - + Own Calendar Calendario @@ -134,7 +134,7 @@ Nº Max. di notizie - + Hide #nsfw? Nascondere #nsfw? @@ -234,96 +234,409 @@ ContactDetailsComponent - Connect - Connetti + Connetti - Description - Descrizione + Descrizione - Location - Località + Località - Posts - Messaggi + Messaggi - URL - URL + URL - Created at - Creato il + Creato il ContactPage + + + seconds + secondi + + + + minute + minuti + + + + minutes + minuti + + + + hour + ora + + + + hours + ore + + + + day + giorno + + + + days + giorni + + + + month + mese + + + + months + mesi + + + + years + anni + + + + likes this. + mi piace. + + + + like this. + mi piace. + + doesn't like this. + non mi piace. + + + + don't like this. + non mi piace. + + + + will attend. + attendere. + + + + persons will attend. + Persone che attendono. + + + + will not attend. + non aspettare. + + + + persons will not attend. + Persone che non aspettano. + + + + may attend. + puoi attendere. + + + + persons may attend. + Persone che possono attendere. + + + Connect Connetti - + + Approve + Approvare + + + + Reject + Rifiutare + + + + Ignore + Ignorare + + + Description Descrizione - + Location Località - + Posts Messaggi - + URL URL - + Created at Creato il + + + Network Error + Errore di rete + + + + Conversation + + + seconds + secondi + + + + minute + minuti + + + + minutes + minuti + + + + hour + ora + + + + hours + ore + + + + day + giorno + + + + days + giorni + + + + month + mese + + + + months + mesi + + + + years + anni + + + + likes this. + mi piace. + + + + like this. + mi piace. + + + + doesn't like this. + non mi piace. + + + + don't like this. + non mi piace. + + + + will attend. + attendere. + + + + persons will attend. + Persone che attendono. + + + + will not attend. + non aspettare. + + + + persons will not attend. + Persone che non aspettano. + + + + may attend. + puoi attendere. + + + + persons may attend. + Persone che possono attendere. + + + + DrawerAccountComponent + + + Refresh + Aggiorna + + + + Timeline + Cronologia + + + + Conversations + Conversazioni + + + + Replies + Risposte + + + + Direct Messages + Messaggio diretto + + + + Favorites + Favoriti + + + + Public Timeline + Cronologia pubblica + + + + Group news + Notizie del gruppo + + + + Search + Cerca + + + + Notifications + Notifiche + + + + DrawerAccountComponentContacts + + + Profile + Profilo + + + + Friends + Amici + + + + Contacts + Contatti + + + + Groups + Gruppi + EventList - + Location + Località + + + + EventListItem + + Location Località + + FriendsListTab + + + Friend Requests + Richieste di contatto + + + + Friends + Amici + + FriendsTab - + Me Me - + Friends Amici - + Contacts Contatti - + Groups Gruppi @@ -344,63 +657,86 @@ Immagine - + Description Descrizione - + Upload Carica - + Change Modifica - + Error Errore - + No album name given Nessun nome album inserito! + + LeftDrawerScrollview + + + Settings + Configurazione + + + + Accounts + Conti + + + + Quit + Chiudi + + MessageSend - + to: a: - + Title (optional) Titolo (opzionale) - + + Drop your Content here. + Lascia qui il tuo contenuto. + + + What's on your mind? A cosa stai pensando? - - + + Error Errore - + Only one attachment supported at the moment. Remove other attachment first! Solo un allegato è attualmente supportato. Rimuovere prima gli altri allegati! - + No receiver supplied! Nessun ricevitore in dotazione! @@ -408,7 +744,7 @@ MoreComments - + Show all comments Tutti commenti @@ -416,12 +752,12 @@ NewsStack - + Network Error Errore di rete - + More Ancora @@ -465,102 +801,102 @@ Gruppi - + seconds secondi - + minute minuti - + minutes minuti - + hour ora - + hours ore - + day giorno - + days giorni - + month mese - + months mesi - + years anni - + likes this. mi piace. - + like this. mi piace. - + doesn't like this. non mi piace. - + don't like this. non mi piace. - + will attend. attendere. - + persons will attend. Persone che attendono. - + will not attend. non aspettare. - + persons will not attend. Persone che non aspettano. - + may attend. puoi attendere. - + persons may attend. Persone che possono attendere. @@ -572,17 +908,17 @@ attendere: - + Source: Codice: - + Direct Message Messaggio diretto - + In reply to In risposta a @@ -596,62 +932,62 @@ partecipare - + ago fa - + Attending: Attendi: - + Reply Risposta - + DM Messaggio diretto - + Repost Condividi - + Success! Ha funzionato! - + Conversation Conversazione - + Attending Attendi - + yes si - + maybe potrebbe - + no no - + Delete Cancella @@ -677,23 +1013,23 @@ Immagini - + All Images Tutte immagini - + Only new Solo nuovo - - + + Own Images Mie immagini - + More Ancora @@ -703,220 +1039,220 @@ profile name - + nome del profilo is default - + è predefinito hide friends - + nascondere gli amici profile photo - + foto del profilo profile thumb - + piccola foto di profilo publish - + pubblicare publish in network - + pubblicare in rete description - + descrizione date of birth - + data di nascita address - + indirizzo city - + città region - + regione postal code - + codice postale country - + paese hometown - + città natale gender - + genere marital status - + stato civile married with - + sposato con married since - + sposato da quando sexual - + orientamento sessuale politics - + politica religion - + religione public keywords - + parole chiave pubbliche private keywords - + parole chiave private likes - + ama dislikes - + non piace about - + su music - + musica book - + libro tv - + tv film - + film interest - + interesse romance - + romanticismo work - + lavoro education - + educazione social networks - + reti sociali homepage - + homepage - + Update - + Aggiornare - + profile id - + profilo id - + Description Descrizione - + Location Località - + Posts Messaggi - + URL URL - + Created at Creato il @@ -924,22 +1260,22 @@ SmileyDialog - + Unicode Unicode - + Standard Standard - + Addon Addon - + Adult XXX @@ -973,59 +1309,48 @@ friendiqa - Refresh - Aggiorna + Aggiorna - Timeline - Cronologia + Cronologia - Conversations - Conversazioni + Conversazioni - Favorites - Favoriti + Favoriti - Replies - Risposte + Risposte - Public Timeline - Cronologia pubblica + Cronologia pubblica - Group news - Notizie del gruppo + Notizie del gruppo - Search - Cerca + Cerca - Settings - Configurazione + Configurazione - Accounts - Conti + Conti - Quit - Chiudi + Chiudi @@ -1137,22 +1462,20 @@ Errore - Changelog - Changelog + Changelog - Setting view type of news has moved from account page to config page. - L'impostazione del tipo di visualizzazione delle notizie è stata spostata dalla pagina del conto alla pagina di configurazione. + L'impostazione del tipo di visualizzazione delle notizie è stata spostata dalla pagina del conto alla pagina di configurazione. - + Undefined Array Error - + JSON status Error