v0.6.3 Dark Mode

This commit is contained in:
LubuWest 2021-10-28 21:56:00 +02:00
parent 06499466be
commit 66e5c33b00
56 changed files with 1869 additions and 1283 deletions

View file

@ -1,11 +1,21 @@
## v0.6.3
* Dark theme
* Account Page: list of largest servers for server field
* Settings page: Tabs for different settings
* Conversation opens on short click on news item
* Linux: Option to Autostart on System start
## v0.6.2 ## v0.6.2
* Follow and Unfollow contacts (Friendica 2021.07 required) * Follow and Unfollow contacts (Friendica 2021.07 required)
* Linux: App stays in systemtray after close, syncs in background * Linux: App stays in systemtray after close, syncs in background
* bugfix for bulk image upload and download of public images * bugfix for bulk image upload and download of public images
* bugfix for conversations in timeline * bugfix for conversations in timeline
## v0.6.1 ## v0.6.1
* Add requestLegacyExternalStorage in AndroidManifest for attachment permissions * Add requestLegacyExternalStorage in AndroidManifest for attachment permissions
* Refresh timeline on start for Linux * Refresh timeline on start for Linux
* DropArea bugfix for Flatpak * DropArea bugfix for Flatpak

View file

@ -1,23 +1,17 @@
## Friendiqa ## ## Friendiqa
QML based client for the Friendica Social Network. QML based client for the Friendica Social Network. Tabs for news (incl. Direct Messages), friends, photos and events. OS: currently Linux and Android (4.3 Jelly Bean, 5.1 for background sync). Source code is a QtCreator project.
Tabs for news (incl. Direct Messages), friends, photos and events.
OS: currently Linux and Android (4.3 Jelly Bean, 5.1 for background sync).
Source code is a QtCreator project.
## Screenshots ## ## Screenshots
![Newstab](Screenshots/NewsTab.jpg) ![Newstab](Screenshots/NewsTab.jpg) ![Friendstab](Screenshots/FriendsTab.jpg) ![Photostab](Screenshots/PhotoTab.jpg) ![Eventstab](Screenshots/EventsTab.jpg) ![Configtab](Screenshots/ConfigTab.jpg)
![Friendstab](Screenshots/FriendsTab.jpg)
![Photostab](Screenshots/PhotoTab.jpg)
![Eventstab](Screenshots/EventsTab.jpg)
![Configtab](Screenshots/ConfigTab.jpg)
## Features
## Features ## # News
# News #
Currently supported: Currently supported:
* Shows Posts from friends, replies, Direct Messages and notifications (in swipe view), selected group, replies, favorited messages, public timeline * Shows Posts from friends, replies, Direct Messages and notifications (in swipe view), selected group, replies, favorited messages, public timeline
* Background sync with configurable interval of 15 min to 2h for active user for friends timeline, replies and DMs (Android 5.1 required) * Background sync with configurable interval of 15 min to 2h for active user for friends timeline, replies and DMs (Android 5.1 required)
* Android notifications or Dbus notification (Linux) for new items in friends timeline, replies and DMs * Android notifications or Dbus notification (Linux) for new items in friends timeline, replies and DMs
@ -29,6 +23,7 @@ Currently supported:
* Open links in external browser * Open links in external browser
* Click on contact photo for contact details and last news * Click on contact photo for contact details and last news
* Click on like text for additional contact info * Click on like text for additional contact info
* Click on post text opens conversation
* Deletion, Reposting, Answering of Posts * Deletion, Reposting, Answering of Posts
* Expand truncated news items * Expand truncated news items
* Liking, disliking, favoriting * Liking, disliking, favoriting
@ -41,13 +36,15 @@ Currently supported:
* Native Android image dialog * Native Android image dialog
ToDo: ToDo:
* Videos and other binary data as attachment (sending, not supported in API) * Videos and other binary data as attachment (sending, not supported in API)
* More than one attachment * More than one attachment
* Attachments for Direct messages (currently not supported in API) * Attachments for Direct messages (currently not supported in API)
# Friends
# Friends #
Currently supported: Currently supported:
* Tabs for own profiles, friends, other contacts and groups * Tabs for own profiles, friends, other contacts and groups
* Show profile(s) of user and change profile picture * Show profile(s) of user and change profile picture
* List of all known contacts with locally downloaded pictures * List of all known contacts with locally downloaded pictures
@ -61,14 +58,14 @@ Currently supported:
* Clean other contacts with no news * Clean other contacts with no news
ToDo: ToDo:
* More information for contact from description page, possibly private information for friends
(needs API change)
* Groups: create, change, delete
(needs API change)
* More information for contact from description page, possibly private information for friends (needs API change)
* Groups: create, change, delete (needs API change)
# Images
# Images #
Currently supported: Currently supported:
* Download public own images to local directory * Download public own images to local directory
* Upload public picture to album with descriptions, send from gallery * Upload public picture to album with descriptions, send from gallery
* Delete own pictures and albums on client and server * Delete own pictures and albums on client and server
@ -78,51 +75,60 @@ Currently supported:
* Pinch to zoom, swipe to scroll * Pinch to zoom, swipe to scroll
ToDo: ToDo:
* Upload private images * Upload private images
# Events
# Events #
Currently supported: Currently supported:
* Show own events * Show own events
* Show public events of Friendica contacts * Show public events of Friendica contacts
* List view of events of selected date * List view of events of selected date
* Click on event to show details * Click on event to show details
ToDo ToDo
* Create events (needs API) * Create events (needs API)
# Config/Accounts
# Config/Accounts #
Currently supported: Currently supported:
* Multiple accounts * Multiple accounts
* View mode for news (tree or timeline) * Dark Mode
* View mode for news (conversation tree or timeline)
* Maximum news (deleted after use of Quit button) * Maximum news (deleted after use of Quit button)
* Sync home timeline, replies, DM, Events, friend requests; Notify yes/no * Sync home timeline, replies, DM, Events, friend requests; Notify yes/no
* Hide #nsfw * Hide #nsfw
ToDo ToDo
* OAuth? * OAuth?
# Other
# Other #
* on Linux: App stays in systemtray and syncs in background * on Linux: App stays in systemtray and syncs in background
* Autostart minimized in systray possible
ToDo ToDo
* Video tab * Video tab
* Translation * Translation
* Blingbling * Blingbling
# Translations
# Translations #
* German, Spanish, Italian, Hungarian * 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. * 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 # # 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
* F-Droid binary repository: <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> To include repo in Fdroid: Open config --> package sources --> plus symbol --> paste url
* [Google Playstore](https://play.google.com/store/apps/details?id=org.qtproject.friendiqa) * [Google Playstore](https://play.google.com/store/apps/details?id=org.qtproject.friendiqa)
* Arch User Repository: [https://aur.archlinux.org/packages/friendiqa/](https://aur.archlinux.org/packages/friendiqa/) * Arch User Repository: <https://aur.archlinux.org/packages/friendiqa/>
* Flatpak: [https://friendiqa.ma-nic.de/friendiqa.flatpakref](https://friendiqa.ma-nic.de/friendiqa.flatpakref) * Flatpak: <https://friendiqa.ma-nic.de/friendiqa.flatpakref>
## License
## License ##
Pubished under the [GPL v3](http://gplv3.fsf.org) with the exception of the Openssl library, which is published under OpenSSL License. Pubished under the [GPL v3](http://gplv3.fsf.org) with the exception of the Openssl library, which is published under OpenSSL License.

View file

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

View file

@ -33,6 +33,7 @@ import QtQuick 2.5
import QtQuick.LocalStorage 2.0 import QtQuick.LocalStorage 2.0
import QtQuick.Window 2.0 import QtQuick.Window 2.0
import QtQuick.Controls 2.4 import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.11 import QtQuick.Layouts 1.11
import "qrc:/js/news.js" as Newsjs import "qrc:/js/news.js" as Newsjs
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
@ -70,6 +71,8 @@ ApplicationWindow{
//property string contactLoadType: "" //property string contactLoadType: ""
property bool imagePicking: false property bool imagePicking: false
Material.theme: Material.System
function onLoginChanged(login){ function onLoginChanged(login){
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")} if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
else{//rootstackView.push(rootstack) else{//rootstackView.push(rootstack)
@ -138,13 +141,13 @@ ApplicationWindow{
onClosing: { onClosing: {
if (rootstack.currentIndex==0){ if (rootstack.currentIndex==0){
newstab.active=true; newstab.active=true;
if (newstab.newstabstatus!=globaloptions.newsViewType){ if ((newstab.newstabstatus!="") && (newstab.newstabstatus!=globaloptions.newsViewType)&&(globaloptions.newsViewType!=null)){
newstab.newstabstatus=globaloptions.newsViewType; newstab.newstabstatus=globaloptions.newsViewType;
if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){ if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews) newsSignal(dbnews)
})} })}
else{ else{
Newsjs.chatsfromdb(db,login.username,function(dbnews){ Newsjs.chatsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews) newsSignal(dbnews)
})} })}
close.accepted=false; close.accepted=false;
@ -154,8 +157,9 @@ ApplicationWindow{
newstab.conversation=[]; newstab.conversation=[];
close.accepted=false close.accepted=false
} }
else if (root.depth>1){ else if (rootstackView.depth>1){
root.pop(); rootstackView.pop();
roottoolbar.visible=true;
close.accepted=false close.accepted=false
} }
else{ else{
@ -168,17 +172,17 @@ ApplicationWindow{
close.accepted=true close.accepted=true
} }
} }
else if (rootstack.currentIndex==2){fotoSignal(login.username,"backButton");print("close rootstack currentindex==2");close.accepted=false} else if (rootstack.currentIndex==2){fotoSignal(login.username,"backButton");bar.currentIndex=0;close.accepted=false}
else {rootstack.currentIndex=0;close.accepted=false} else {rootstack.currentIndex=0;bar.currentIndex=0;close.accepted=false}
} }
footer:ToolBar{ footer:ToolBar{id:roottoolbar
background: Rectangle{ background: Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE"//"#F8F8F8" color: Material.backgroundDimColor//"#EEEEEE"//"#F8F8F8"
} }
TabBar { TabBar {
@ -190,7 +194,7 @@ ApplicationWindow{
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
background:Rectangle{ background:Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE" color: Material.backgroundDimColor
} }
} }
TabButton { TabButton {
@ -198,7 +202,7 @@ ApplicationWindow{
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
background:Rectangle{ background:Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE" color: Material.backgroundDimColor
} }
} }
TabButton { TabButton {
@ -206,7 +210,7 @@ ApplicationWindow{
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
background:Rectangle{ background:Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE" color: Material.backgroundDimColor
} }
} }
TabButton { TabButton {
@ -214,7 +218,7 @@ ApplicationWindow{
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
background:Rectangle{ background:Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE" color: Material.backgroundDimColor
} }
} }
} }
@ -267,6 +271,9 @@ ApplicationWindow{
Component.onCompleted: { Component.onCompleted: {
onLoginChanged(login); onLoginChanged(login);
globaloptions=Service.readGO(db); globaloptions=Service.readGO(db);
if(globaloptions.view_darkmode==1){Material.theme=Material.Dark}
else if (globaloptions.view_darkmode==2){Material.theme=Material.Light}
else {Material.theme=Material.System}
//forceActiveFocus(); //forceActiveFocus();
if(osSettings.osType=="Android"){ if(osSettings.osType=="Android"){
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml"); var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");

View file

@ -250,5 +250,7 @@
<file>translations/friendiqa-hu.ts</file> <file>translations/friendiqa-hu.ts</file>
<file>images/Friendiqa.png</file> <file>images/Friendiqa.png</file>
<file>images/Friendica_monochrome.png</file> <file>images/Friendica_monochrome.png</file>
<file>qml/configqml/ConfigAppearancePage.qml</file>
<file>qml/configqml/ConfigStartPage.qml</file>
</qresource> </qresource>
</RCC> </RCC>

View file

@ -53,6 +53,19 @@ QString FILESYSTEM::Directory() const
return m_Directory; return m_Directory;
} }
void FILESYSTEM::setVisibility(bool Visibility)
{
if (Visibility!=m_Visibility) {
m_Visibility = Visibility;
emit visibilityChanged();
}
}
bool FILESYSTEM::Visibility()
{
return m_Visibility;
}
QString FILESYSTEM::homePath() const QString FILESYSTEM::homePath() const
{ {
//QDir dir(m_Directory); //QDir dir(m_Directory);
@ -135,3 +148,42 @@ QFileInfoList FILESYSTEM::fileList()
//qDebug() << "filelist " << m_Filelist; //qDebug() << "filelist " << m_Filelist;
return dir.entryInfoList(); return dir.entryInfoList();
} }
bool FILESYSTEM::isAutostart() {
QFileInfo check_file(QDir::homePath() + "/.config/autostart/friendiqa.desktop");
if (check_file.exists() && check_file.isFile()) {
qDebug()<<"autostart "<<true;
return true;
}
qDebug()<<"autostart "<<false;
return false;
}
void FILESYSTEM::setAutostart(bool autostart) {
QString path = QDir::homePath() + "/.config/autostart/";
QString name ="friendiqa.desktop";
QFile file(path+name);
file.remove();
if(autostart) {
QDir dir(path);
if(!dir.exists()) {
dir.mkpath(path);
}
if (file.open(QIODevice::ReadWrite)) {
QTextStream stream(&file);
stream << "[Desktop Entry]" << Qt::endl;
stream << "Name=Friendiqa" << Qt::endl;
stream << "Exec=friendiqa -background %u" << Qt::endl;
stream << "Terminal=false" << Qt::endl;
stream << "Icon=Friendiqa.svg" << Qt::endl;
stream << "Type=Application" << Qt::endl;
stream << "StartupNotify=false" << Qt::endl;
stream << "X-GNOME-Autostart-enabled=true" << Qt::endl;
}
}
}

View file

@ -43,8 +43,10 @@ class FILESYSTEM : public QObject//, public QAndroidActivityResultReceiver
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString Directory READ Directory WRITE setDirectory NOTIFY directoryChanged) Q_PROPERTY(QString Directory READ Directory WRITE setDirectory NOTIFY directoryChanged)
Q_PROPERTY(bool Visibility READ Visibility WRITE setVisibility NOTIFY visibilityChanged)
//Q_PROPERTY(bool direxist READ direxist) //Q_PROPERTY(bool direxist READ direxist)
Q_PROPERTY(QString homePath READ homePath) Q_PROPERTY(QString homePath READ homePath)
Q_PROPERTY(bool isAutostart READ isAutostart)
//Q_PROPERTY(QString cameraPath READ cameraPath) //Q_PROPERTY(QString cameraPath READ cameraPath)
@ -52,16 +54,21 @@ public:
static FILESYSTEM *instance(); static FILESYSTEM *instance();
explicit FILESYSTEM(QObject *parent = 0); explicit FILESYSTEM(QObject *parent = 0);
void setDirectory(QString Directory); void setDirectory(QString Directory);
void setVisibility(bool Visibility);
QString Directory() const; QString Directory() const;
QFileInfoList fileList(); QFileInfoList fileList();
//bool direxist(QString Directory); //bool direxist(QString Directory);
QString homePath() const; QString homePath() const;
bool Visibility();
bool isAutostart();
//QString cameraPath() const; //QString cameraPath() const;
// virtual void handleActivityResult(int receiverRequestCode, int resultCode, const QAndroidJniObject &data); // virtual void handleActivityResult(int receiverRequestCode, int resultCode, const QAndroidJniObject &data);
signals: signals:
//void imageselected(QString); //void imageselected(QString);
void directoryChanged(); void directoryChanged();
void visibilityChanged();
//void fileListContent(QList data); //void fileListContent(QList data);
void success(QString data); void success(QString data);
void error(QString data, int code); void error(QString data, int code);
@ -72,12 +79,14 @@ public slots:
void makePath(QString name); void makePath(QString name);
void rmDir(); void rmDir();
void rmFile(QString name); void rmFile(QString name);
void setAutostart(bool autostart);
//void searchImage(); //void searchImage();
//void fileList(); //void fileList();
private: private:
QString m_Directory; QString m_Directory;
QString homeDir; QString homeDir;
bool m_Visibility;
//QList m_Filelist; //QList m_Filelist;
}; };

View file

@ -53,6 +53,18 @@ QString FILESYSTEM::Directory() const
{ {
return m_Directory; return m_Directory;
} }
void FILESYSTEM::setVisibility(bool Visibility)
{
if (Visibility!=m_Visibility) {
m_Visibility = Visibility;
emit visibilityChanged();
}
}
bool FILESYSTEM::Visibility()
{
return m_Visibility;
}
QString FILESYSTEM::homePath() const QString FILESYSTEM::homePath() const
{ {
@ -113,3 +125,36 @@ QFileInfoList FILESYSTEM::fileList()
dir.setSorting(QDir::Time | QDir::Reversed); dir.setSorting(QDir::Time | QDir::Reversed);
return dir.entryInfoList(); return dir.entryInfoList();
} }
bool FILESYSTEM::isAutostart() {
QFileInfo check_file(QDir::homePath() + "/.config/autostart/friendiqa.desktop");
if (check_file.exists() && check_file.isFile()) {
qDebug()<<"autostart "<<true;
return true;
}
qDebug()<<"autostart "<<false;
return false;
}
void FILESYSTEM::setAutostart(bool autostart) {
QString path = QDir::homePath() + "/.config/autostart/";
QString name ="friendiqa.desktop";
QFile file(path+name);
file.remove();
if(autostart) {
QDir dir(path);
if(!dir.exists()) {
dir.mkpath(path);
}
if (file.open(QIODevice::ReadWrite)) {
QTextStream stream(&file);
stream << "[Desktop Entry]" << Qt::endl;
stream << "Exec=friendiqa -background %u" << Qt::endl;
stream << "Type=Application" << Qt::endl;
}
}
}

View file

@ -75,6 +75,7 @@ int main(int argc, char *argv[]) {
updatenews->setDatabase(); updatenews->setDatabase();
updatenews->login(); updatenews->login();
updatenews->startsync(); updatenews->startsync();
//app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit())); //app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
//QtAndroid::androidService().callMethod<void>("stopSelf"); //QtAndroid::androidService().callMethod<void>("stopSelf");
//return app.exec(); //return app.exec();
@ -94,6 +95,10 @@ int main(int argc, char *argv[]) {
XHR* xhr = XHR::instance(); XHR* xhr = XHR::instance();
view.rootContext()->setContextProperty("xhr", xhr); view.rootContext()->setContextProperty("xhr", xhr);
FILESYSTEM* filesystem = FILESYSTEM::instance(); FILESYSTEM* filesystem = FILESYSTEM::instance();
if (qstrcmp(argv[1],"-background")==0){
filesystem->setVisibility(false);
} else{filesystem->setVisibility(true);}
view.rootContext()->setContextProperty("filesystem", filesystem); view.rootContext()->setContextProperty("filesystem", filesystem);
ALARM* alarm = ALARM::instance(); ALARM* alarm = ALARM::instance();
view.rootContext()->setContextProperty("alarm", alarm); view.rootContext()->setContextProperty("alarm", alarm);

View file

@ -7,4 +7,4 @@ Terminal=false
Name=Friendiqa Name=Friendiqa
GenericName=Social Media GenericName=Social Media
Comment= App for social network Friendica Comment= App for social network Friendica
Categories=Network,Qt,News Categories=Network

View file

@ -64,19 +64,21 @@ function beautify(newsitemobject,msg){
var attachArray=newsitemobject.attachments; var attachArray=newsitemobject.attachments;
for (var image in attachArray){ for (var image in attachArray){
var attachhelper={mimetype:attachArray[image].mimetype} var attachhelper={mimetype:attachArray[image].mimetype}
var attachhelperstring=Qt.btoa(attachArray[image].url) var attachhelperstring="<img" //Qt.btoa(attachArray[image].url)
var helperstringposition=newsitemobject.statusnet_html.indexOf(attachhelperstring); var helperstringposition=newsitemobject.statusnet_html.indexOf(attachhelperstring);
if (helperstringposition>-1){attachhelper.url=newsitemobject.statusnet_html.substring(newsitemobject.statusnet_html.lastIndexOf("http",helperstringposition),helperstringposition+attachhelperstring.length); // if (helperstringposition>-1){attachhelper.url=newsitemobject.statusnet_html.substring(newsitemobject.statusnet_html.lastIndexOf("http",helperstringposition),helperstringposition+attachhelperstring.length);
if (attachArray[image].mimetype=="image/jpeg"){attachhelper.url=attachhelper.url+".jpg"} // if (attachArray[image].mimetype=="image/jpeg"){attachhelper.url=attachhelper.url+".jpg"}
else if (attachArray[image].mimetype=="image/gif"){attachhelper.url=attachhelper.url+".gif"} // else if (attachArray[image].mimetype=="image/gif"){attachhelper.url=attachhelper.url+".gif"}
else if (attachArray[image].mimetype=="image/png"){attachhelper.url=attachhelper.url+".png"} // else if (attachArray[image].mimetype=="image/png"){attachhelper.url=attachhelper.url+".png"}
} // }
else {attachhelper.url=attachArray[image].url} // else {
attachhelper.url=attachArray[image].url
// }
if (helperstringposition>-1){var removeme=newsitemobject.statusnet_html.substring(helperstringposition,newsitemobject.statusnet_html.indexOf('">',helperstringposition)+2);}
//print("Attachhelper "+attachhelper.url) //print("Attachhelper "+attachhelper.url)
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url,"") newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(removeme,"")
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4)+".jpeg","") //newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4)+".jpeg","")
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4),"") //newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4),"")
imageAttachmentList.push(attachhelper) imageAttachmentList.push(attachhelper)
} }
@ -138,17 +140,18 @@ if(msg.deleteId!==undefined)
msg.model.sync() msg.model.sync()
} }
else{ else{
if(msg.method=="refresh" ||(msg.method=="conversation"&&msg.news.length>0)){msg.model.clear()}; if(msg.method=="refresh" || msg.method=="contact" ||(msg.method=="conversation"&&msg.news.length>0)){msg.model.clear()};
msg.model.sync() msg.model.sync()
for (var j=0;j<msg.news.length;j++){
//for (var j=0;j<msg.news.length;j++){
for (var j in msg.news){
let data=({})
if (msg.news[j]) { if (msg.news[j]) {
var newsitemobject=msg.news[j]; var newsitemobject=msg.news[j];
newsitemobject=beautify(newsitemobject,msg); newsitemobject=beautify(newsitemobject,msg);
if (newsitemobject.hasOwnProperty("currentconversation")&&(newsitemobject.currentconversation.length>0)){ if (newsitemobject.hasOwnProperty("currentconversation")&&(newsitemobject.currentconversation.length>0)){
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg); newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg);
newsitemobject.lastcomment.indent=1 newsitemobject.lastcomment.indent=1
//print("Currentconversation" + newsitemobject.currentconversation.length+JSON.stringify(newsitemobject.lastcomment))
} }
if (msg.method=="conversation"){ if (msg.method=="conversation"){
@ -160,10 +163,8 @@ else{
} }
} }
}} }}
data=({"newsitemobject": newsitemobject})
var data=({"newsitemobject": newsitemobject})
} }
if(msg.method=="append") { if(msg.method=="append") {
msg.model.insert(j, data)} msg.model.insert(j, data)}
else{ else{
@ -171,8 +172,8 @@ else{
} }
} }
if (j==msg.news.length){ //if (j==msg.news.length){
msg.model.sync() msg.model.sync()
} //}
} }
} }

View file

@ -350,7 +350,7 @@ function updateglobaloptions(database,key,value){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) { db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from globaloptions where k="'+key+'"'); // check for key var result = tx.executeSql('SELECT * from globaloptions where k="'+key+'"'); // check for key
if(result.rows.length === 1) {// use update if(result.rows.length > 0) {// use update
result = tx.executeSql('UPDATE globaloptions SET v="'+value+'" WHERE k="'+key+'"') result = tx.executeSql('UPDATE globaloptions SET v="'+value+'" WHERE k="'+key+'"')
} else {// use insert } else {// use insert
result = tx.executeSql('INSERT INTO globaloptions (k,v) VALUES (?,?)', [key,value]) result = tx.executeSql('INSERT INTO globaloptions (k,v) VALUES (?,?)', [key,value])
@ -412,7 +412,7 @@ function cleanContacts(login,database,callback){
//print(login.username+" älteste news: "+ oldestnewsTime); //print(login.username+" älteste news: "+ oldestnewsTime);
var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge<'+oldestnewsTime); // check for friends var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge<'+oldestnewsTime); // check for friends
//print ("Contact result length: "+ result.rows.length) //print ("Contact result length: "+ result.rows.length)
for (var i=0;i<result.rows.length;i++){ for (var i=0;i<result.rows.length;i++){//print("rm "+result.rows.item(i).profile_image)
filesystem.rmFile(result.rows.item(i).profile_image); filesystem.rmFile(result.rows.item(i).profile_image);
var deleters = tx.executeSql('DELETE from contacts WHERE username="'+login.username+'" AND url="'+result.rows.item(i).url+'"'); var deleters = tx.executeSql('DELETE from contacts WHERE username="'+login.username+'" AND url="'+result.rows.item(i).url+'"');
} }

View file

@ -30,6 +30,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls.Material 2.12
//import QtQuick.Controls 2.4 //import QtQuick.Controls 2.4
Item { Item {
@ -50,7 +51,7 @@ Item {
id:daytext id:daytext
anchors.right: parent.right anchors.right: parent.right
anchors.margins: 0.5*mm anchors.margins: 0.5*mm
color:(model.month==monthgrid.month)?"black":"grey" color:(model.month==monthgrid.month)?Material.primaryTextColor:Material.secondaryTextColor
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
text: model.day text: model.day
font.bold: model.today font.bold: model.today

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQml 2.2 import QtQml 2.2
import Qt.labs.calendar 1.0 import Qt.labs.calendar 1.0
//import QtQuick.Layouts 1.3 //import QtQuick.Layouts 1.3
@ -45,7 +46,7 @@ Rectangle {
width:parent.width//-mm width:parent.width//-mm
height:parent.height//-5*mm height:parent.height//-5*mm
// anchors.fill: parent // anchors.fill: parent
color: '#fff' color: Material.backgroundColor//'#fff'
property date currentTime: new Date() property date currentTime: new Date()
property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000 property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000
property var events:[] property var events:[]
@ -190,6 +191,7 @@ Rectangle {
//Layout.fillWidth: true //Layout.fillWidth: true
width: parent.width-root.fontFactor*osSettings.bigFontSize width: parent.width-root.fontFactor*osSettings.bigFontSize
horizontalAlignment:Text.AlignHCenter horizontalAlignment:Text.AlignHCenter
color: Material.primaryTextColor
text: model.year text: model.year
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
} }
@ -197,6 +199,7 @@ Rectangle {
width: parent.width-osSettings.bigFontSize width: parent.width-osSettings.bigFontSize
text: Qt.locale().standaloneMonthName(model.month) text: Qt.locale().standaloneMonthName(model.month)
//Layout.fillWidth: true //Layout.fillWidth: true
color: Material.primaryTextColor
horizontalAlignment:Text.AlignHCenter horizontalAlignment:Text.AlignHCenter
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
} }

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
@ -40,7 +41,7 @@ Rectangle{
id:eventList id:eventList
// height: parent.height // height: parent.height
// width:parent.width // width:parent.width
color: Material.backgroundColor
//radius: 0.5*mm //radius: 0.5*mm
property var daylist:[] property var daylist:[]
property int dayint: 0 property int dayint: 0

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
@ -42,7 +43,8 @@ Rectangle{
property var currEvent: event property var currEvent: event
width:parent.width width:parent.width
height:eventNameText.height+eventDetailsText.height+mm height:eventNameText.height+eventDetailsText.height+mm
border.color: "light grey" border.color: Material.backgroundDimColor//"light grey"
color: Material.backgroundColor
border.width: 1 border.width: 1
radius: 0.5*mm radius: 0.5*mm
Image { Image {
@ -61,6 +63,7 @@ Rectangle{
x: 8*mm x: 8*mm
width:parent.width-8*mm width:parent.width-8*mm
height:contentHeight height:contentHeight
color: Material.primaryTextColor
font.pointSize: osSettings.systemFontSize 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 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 wrapMode:Text.Wrap
@ -72,6 +75,7 @@ Rectangle{
z:4 z:4
width: parent.width-8*mm width: parent.width-8*mm
height: contentHeight height: contentHeight
color: Material.primaryTextColor
textFormat: Text.RichText textFormat: Text.RichText
text: status!="large"?"":Qt.atob(event.desc) + (event.location==""?"":"<br><br>"+qsTr("Location")+": "+event.location)//Qt.atob(event.html) text: status!="large"?"":Qt.atob(event.desc) + (event.location==""?"":"<br><br>"+qsTr("Location")+": "+event.location)//Qt.atob(event.html)
anchors.top: eventNameText.bottom anchors.top: eventNameText.bottom

View file

@ -33,6 +33,7 @@ import QtQuick 2.7
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import QtQml.Models 2.15
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
import "qrc:/js/layout.js" as Layoutjs import "qrc:/js/layout.js" as Layoutjs
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
@ -49,10 +50,13 @@ Page{
function setServericon(server){ function setServericon(server){
if ((server!=null) && (server!="")){
try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){ try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){
var serverdata = JSON.parse(obj); var serverdata = JSON.parse(obj);
servericon.visible=true; servericon.visible=true;
servericon.source=serverdata.site.logo})} catch(e){print(e)} servericon.source=serverdata.site.logo})
} catch(e){print(e)}
}
} }
MButton{ MButton{
@ -64,15 +68,13 @@ Page{
width: root.width/2 - 2*mm width: root.width/2 - 2*mm
height: 2*root.fontFactor*osSettings.bigFontSize height: 2*root.fontFactor*osSettings.bigFontSize
visible: users.length>0 visible: users.length>0
onClicked:{ onClicked:{
var useritems=""; var useritems="";
for (var i=0;i<accountPage.users.length;i++){ for (var i=0;i<accountPage.users.length;i++){
useritems=useritems+"MenuItem{font.pointSize: osSettings.bigFontSize;width:accountPage.width*2/3; text:'"+accountPage.users[i].username+ useritems=useritems+"MenuItem{font.pointSize: osSettings.bigFontSize;width:accountPage.width*2/3; text:'"+accountPage.users[i].username+
"'; onTriggered: {Service.readConfig(db,function(obj){ "'; onTriggered: {Service.readConfig(db,function(obj){
userButton.text=obj.username; userButton.text=obj.username;
servername.text=obj.server; serverModel.insert(0,{text:obj.server})
accountPage.setServericon(obj.server); accountPage.setServericon(obj.server);
username.text= obj.username; username.text= obj.username;
password.text=Qt.atob(obj.password); password.text=Qt.atob(obj.password);
@ -87,7 +89,6 @@ Page{
userlistObject.popup() } userlistObject.popup() }
} }
Image{ Image{
id:servericon id:servericon
x:root.fontFactor*osSettings.bigFontSize;y:3*root.fontFactor*osSettings.bigFontSize x:root.fontFactor*osSettings.bigFontSize;y:3*root.fontFactor*osSettings.bigFontSize
@ -115,19 +116,88 @@ Page{
onClicked:{Qt.openUrlExternally(Qt.resolvedUrl("https://dir.friendica.social/servers"))} onClicked:{Qt.openUrlExternally(Qt.resolvedUrl("https://dir.friendica.social/servers"))}
} }
// ComboBox{
// id: servername
// x: 4*root.fontFactor*osSettings.bigFontSize
// y: 3.5*root.fontFactor*osSettings.bigFontSize
// width: root.width-5*root.fontFactor*osSettings.bigFontSize
// height: 2.5*root.fontFactor*osSettings.bigFontSize//5*mm;
// font.pointSize: osSettings.systemFontSize
// editable:true
// model: serverModel
// onAccepted: {
// let cleanText =currentText;if(currentText==""){cleanText=editText}
// if((cleanText).substring(0,8) !=="https://"){
// cleanText="https://"+cleanText
// }
// if (find(cleanText) === -1) {
// serverModel.append({text: cleanText})
// currentIndex = find(cleanText)
// displayText=cleanText
// }
// if (cleanText!=""){accountPage.setServericon(cleanText)}
// }
// onFocusChanged: {
// if(focus==false){
// onAccepted()
// }
// }
// }
TextField { TextField {
id: servername id: servername
x: 4*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; width: root.width-18*mm; //height: 5*mm; x: 4*root.fontFactor*osSettings.bigFontSize
placeholderText: qsTr("Server") y: 3.5*root.fontFactor*osSettings.bigFontSize
width: root.width-5*root.fontFactor*osSettings.bigFontSize
height: 2.5*root.fontFactor*osSettings.bigFontSize//5*mm;
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
onEditingFinished: { text:"https://"
if ((servername.text)==""){} onFocusChanged:{
else if((servername.text).substring(0,7) !=="https://"){ if (focus){servermenu.open()}
servername.text= "https://"+text//(serverstring.text).substring(8) else{
if((servername.text).substring(0,11) =="https://http"){
servername.text= (servername.text).substring(8)
} }
if (servername.text!="https://"){
accountPage.setServericon(servername.text)} accountPage.setServericon(servername.text)}
} }
}
}
Menu {
id:servermenu
width: 13*root.fontFactor*osSettings.bigFontSize
x: 4*root.fontFactor*osSettings.bigFontSize
y: 5*root.fontFactor*osSettings.bigFontSize
Instantiator{
model:serverModel
MenuItem{
text: modelData
onTriggered: {servername.text=modelData}
}
onObjectAdded: servermenu.insertItem(index,object)
onObjectRemoved: servermenu.removeItem(object)
}
}
ListModel{id:serverModel
ListElement{text:"https://asaps-sm.lafayettegroup.com"}
ListElement{text:"https://f.freinetz.ch"}
ListElement{text:"https://friendica.chilemasto.casa"}
ListElement{text:"https://friendica.utzer.de"}
ListElement{text:"https://friendica.vrije-mens.org"}
ListElement{text:"https://friendicarg.nsupdate.info.de"}
ListElement{text:"https://friends.nogafam.es"}
ListElement{text:"https://libranet.de"}
ListElement{text:"https://loma.ml"}
ListElement{text:"https://social.trom.tf"}
ListElement{text:"https://motley.club"}
ListElement{text:"https://nerdica.net"}
ListElement{text:"https://noovi.org"}
ListElement{text:"https://nsfw.wnymathguy.com"}
ListElement{text:"https://opensocial.at"}
ListElement{text:"https://social.isurf.ca"}
ListElement{text:"https://squeet.me"}
ListElement{text:"https://venera.social"}
}
TextField { TextField {
id: username id: username
@ -155,7 +225,7 @@ Page{
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText | Qt.ImhSensitiveData inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText | Qt.ImhSensitiveData
} }
Text { Label {
id: imagedirlabel id: imagedirlabel
visible: imagestore.text!="" visible: imagestore.text!=""
text: qsTr("Image dir.") text: qsTr("Image dir.")
@ -210,8 +280,8 @@ Page{
text: qsTr("Confirm") text: qsTr("Confirm")
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
onClicked:{ onClicked:{
accountBusy.running=true; accountBusy.running=true;//servername.displayText
var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""}; var userconfig={server: servername.displayText, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""};
var errormessage=""; var errormessage="";
if (servername.text==""){errormessage=qsTr("No server given! ")} if (servername.text==""){errormessage=qsTr("No server given! ")}
else if (username.text==""){errormessage+=qsTr("No nickname given! ")} else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
@ -339,6 +409,7 @@ Page{
Service.readConfig(db,function(obj){ Service.readConfig(db,function(obj){
userButton.text=obj.username; userButton.text=obj.username;
servername.text=obj.server; servername.text=obj.server;
serverModel.insert(0,{text:obj.server})
accountPage.setServericon(obj.server); accountPage.setServericon(obj.server);
username.text= obj.username; username.text= obj.username;
password.text=Qt.atob(obj.password); password.text=Qt.atob(obj.password);

View file

@ -0,0 +1,220 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11
import QtQuick.Dialogs 1.2
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/service.js" as Service
import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
Page{
//anchors.fill: parent
width:root.width
height:root.height
Label {
text: qsTr("News as")
font.pointSize:osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y: 2*root.fontFactor*osSettings.bigFontSize
}
Rectangle{
x: root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize;
width: newsTypeField.contentWidth+2*mm; height: 2*root.fontFactor*osSettings.bigFontSize
color: Material.dialogColor//"#F3F3F3"
radius: 0.5*mm
Label{
id: newsTypeField
anchors.fill: parent
font.pointSize:osSettings.bigFontSize
text:qsTr("Conversations")
}
MouseArea{
anchors.fill:parent
onClicked:newstypemenu.popup()
}
}
Menu {
id:newstypemenu
width:12*root.fontFactor*osSettings.bigFontSize
MenuItem {
font.pointSize: osSettings.bigFontSize
text: qsTr("Timeline")
onTriggered: {newsTypeField.text=qsTr("Timeline");
Service.updateglobaloptions(root.db,"newsViewType","Timeline");}
}
MenuItem {
font.pointSize: osSettings.bigFontSize
text: qsTr("Conversations")
onTriggered: {newsTypeField.text=qsTr("Conversations");
Service.updateglobaloptions(root.db,"newsViewType","Conversations");}
}
}
Label {
text: qsTr("Max. News")
font.pointSize: osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y:8*root.fontFactor*osSettings.bigFontSize
}
Slider{ id: maxNews
x:6*root.fontFactor*osSettings.bigFontSize; y: 10*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: Material.dialogColor
x: root.fontFactor*osSettings.bigFontSize; y: 10*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.pointSize: osSettings.bigFontSize
verticalAlignment:TextEdit.AlignRight
color: Material.primaryTextColor
text:maxNews.value
selectByMouse: true
onTextChanged: {
Service.updateglobaloptions(root.db,"max_news",text);
}
}
}
CheckBox{
id: nsfwCheckbox
x: root.fontFactor*osSettings.bigFontSize
y: 14*root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.bigFontSize
text: qsTr("Hide #nsfw?")
checked:(globaloptions["hide_nsfw"]==1)?true:false
onClicked: {
toggle();
if(nsfwCheckbox.checked==true){
Service.updateglobaloptions(root.db,"hide_nsfw",0);nsfwCheckbox.checked=false;
}
else{
Service.updateglobaloptions(root.db,"hide_nsfw",1);nsfwCheckbox.checked=true;
}
}
}
// CheckBox{
// id: darkmodeCheckbox
// tristate:true
// x: root.fontFactor*osSettings.bigFontSize
// y: 24*root.fontFactor*osSettings.bigFontSize
// font.pointSize: osSettings.bigFontSize
// text: qsTr("Dark Mode")
// checked:(globaloptions["view_darkmode"]==1)?true:false
// onClicked: {
// toggle();
// if(darkmodeCheckbox.checked==true){
// Service.updateglobaloptions(root.db,"view_darkmode",0);darkmodeCheckbox.checked=false;
// root.Material.theme=Material.Light
// }
// else{
// Service.updateglobaloptions(root.db,"view_darkmode",1);darkmodeCheckbox.checked=true;
// root.Material.theme=Material.Dark
// }
// }
// }
Column{
x: root.fontFactor*osSettings.bigFontSize
y: 18*root.fontFactor*osSettings.bigFontSize
Label{
text: qsTr("Dark Mode")
font.pointSize: osSettings.systemFontSize}
RadioButton{
text: qsTr("System")
checked: (globaloptions["view_darkmode"]==0 || globaloptions["view_darkmode"]==undefined)?true:false
font.pointSize: osSettings.bigFontSize
onClicked: {
if(checked==true){
Service.updateglobaloptions(root.db,"view_darkmode",0);
root.Material.theme=Material.System
}
}
}
RadioButton{
text: qsTr("Dark")
checked: (globaloptions["view_darkmode"]==1)?true:false
font.pointSize: osSettings.bigFontSize
onClicked: {
if(checked==true){
Service.updateglobaloptions(root.db,"view_darkmode",1);
root.Material.theme=Material.Dark
}
}
}
RadioButton{
text: qsTr("Light")
checked: (globaloptions["view_darkmode"]==2)?true:false
font.pointSize: osSettings.bigFontSize
onClicked: {
if(checked==true){
Service.updateglobaloptions(root.db,"view_darkmode",2);
root.Material.theme=Material.Light
}
}
}
}
MButton {
anchors.right: parent.right; //anchors.rightMargin: mm;
anchors.top: parent.top
anchors.topMargin: 2*root.fontFactor*osSettings.bigFontSize
width: 2*root.fontFactor*osSettings.bigFontSize;
text: "?"
font.pointSize: osSettings.bigFontSize
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
}
}
// MButton{
// 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()}
// }
}

View file

@ -31,8 +31,9 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
import "qrc:/qml/configqml" import "qrc:/qml/configqml"
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
@ -42,122 +43,77 @@ Page{
width:root.width width:root.width
height:root.height height:root.height
Rectangle{ TabBar {
x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize; id: configbar
width: parent.width - 6*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize width: parent.width-3*root.fontFactor*osSettings.bigFontSize//osSettings.osType=="Android"?parent.width-3*root.fontFactor*osSettings.bigFontSize:parent.width
color:"#F3F3F3" height: 2*root.fontFactor*osSettings.bigFontSize
radius: 0.5*mm x: osSettings.osType=="Android"?2*osSettings.bigFontSize:0
Text{ //visible: !wideScreen
anchors.fill: parent position:TabBar.Header
font.pointSize: osSettings.bigFontSize currentIndex: 0
text:qsTr("Sync") TabButton {
} text: qsTr("Appearance")
MouseArea{
anchors.fill:parent
onClicked:rootstackView.push("qrc:qml/configqml/SyncConfig.qml");
}
}
Text {
text: qsTr("News as")
font.pointSize:osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y: 8*root.fontFactor*osSettings.bigFontSize
}
Rectangle{
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
onClicked:newstypemenu.popup()
}
}
Menu {
id:newstypemenu
width:8*root.fontFactor*osSettings.bigFontSize
MenuItem {
font.pointSize: osSettings.bigFontSize
text: qsTr("Timeline")
onTriggered: {newsTypeField.text=qsTr("Timeline");
Service.updateglobaloptions(root.db,"newsViewType","Timeline");}
}
MenuItem {
font.pointSize: osSettings.bigFontSize
text: qsTr("Conversations")
onTriggered: {newsTypeField.text=qsTr("Conversations");
Service.updateglobaloptions(root.db,"newsViewType","Conversations");}
}
}
Text {
text: qsTr("Max. News")
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y:14*root.fontFactor*osSettings.bigFontSize height: 2*root.fontFactor*osSettings.bigFontSize
width:6*root.fontFactor*osSettings.bigFontSize
} }
TabButton {
Slider{ id: maxNews text: qsTr("Sync")
x:6*root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize; font.pointSize: osSettings.systemFontSize
width: root.width/2;height:2*root.fontFactor*osSettings.bigFontSize height: 2*root.fontFactor*osSettings.bigFontSize
from: 0;to:2000; stepSize: 100 width:10*root.fontFactor*osSettings.bigFontSize
value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
}
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.pointSize: osSettings.bigFontSize
verticalAlignment:TextEdit.AlignRight
text:maxNews.value
selectByMouse: true
onTextChanged: {
Service.updateglobaloptions(root.db,"max_news",text);
} }
TabButton {
text: qsTr("Start")
visible:osSettings.osType=="Linux"
font.pointSize: osSettings.systemFontSize
height: 2*root.fontFactor*osSettings.bigFontSize
width:10*root.fontFactor*osSettings.bigFontSize
} }
} }
LeftDrawerLinux{
id:leftDrawer
CheckBox{ visible: wideScreen&&rootstackView.depth<2
id: nsfwCheckbox width: visible?osSettings.systemFontSize*15:0
x: root.fontFactor*osSettings.bigFontSize height: root.height-bar.height
y: 20*root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.bigFontSize
text: qsTr("Hide #nsfw?")
checked:(globaloptions["hide_nsfw"]==1)?true:false
onClicked: {
toggle();
if(nsfwCheckbox.checked==true){
Service.updateglobaloptions(root.db,"hide_nsfw",0);nsfwCheckbox.checked=false;
}
else{
Service.updateglobaloptions(root.db,"hide_nsfw",1);nsfwCheckbox.checked=true;
}
}
} }
LeftDrawerAndroid{
id: leftDrawerAndroid
}
MButton { StackLayout{
anchors.right: closeButton.left; anchors.rightMargin: mm; id:configTabView
anchors.top: parent.top //anchors.fill: parent
anchors.topMargin:root.fontFactor*osSettings.bigFontSize width: wideScreen&&rootstackView.depth<2?parent.width-leftDrawer.width-mm:parent.width-mm//newstabitem.width/3*2:newstabitem.width
width: 2*root.fontFactor*osSettings.bigFontSize; x: leftDrawer.width
text: "?" y: configbar.height
font.pointSize: osSettings.bigFontSize height: parent.height-configbar.height-mm
onClicked:{ currentIndex: configbar.currentIndex
rootstackView.push("qrc:/qml/configqml/InfoBox.qml"); // onCurrentIndexChanged:{
// if (currentIndex==1){
// contactsSignal("")
// }
// else if (currentIndex==2){
// contactsSignal("")
// }
// else if (currentIndex==3){groupsSignal(root.login.username)}
// }
Loader{
id: appearanceLoader
source:(configTabView.currentIndex==0)? "qrc:/qml/configqml/ConfigAppearancePage.qml":""
}
Loader{
id: syncLoader
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
}
Loader{
id: startLoader
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
} }
} }
MButton{ MButton{
@ -165,7 +121,7 @@ Page{
// height: 2*root.fontFactor*osSettings.bigFontSize // height: 2*root.fontFactor*osSettings.bigFontSize
width: 2*root.fontFactor*osSettings.bigFontSize; width: 2*root.fontFactor*osSettings.bigFontSize;
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin:root.fontFactor*osSettings.bigFontSize anchors.topMargin:2*root.fontFactor*osSettings.bigFontSize
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 1*mm anchors.rightMargin: 1*mm
text: "\uf057" text: "\uf057"

View file

@ -0,0 +1,82 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
Page{
//anchors.fill: parent
width:root.width
height:root.height-6*root.fontFactor*osSettings.bigFontSize
CheckBox{
id: autostartCheckbox
x: mm
y: root.fontFactor*osSettings.bigFontSize
width: 10*root.fontFactor*osSettings.bigFontSize
checked:filesystem.isAutostart
//style: CheckBoxStyle {
text: qsTr("Autostart")
font.pointSize: osSettings.bigFontSize
onClicked: {
toggle();
if(autostartCheckbox.checked==true){
filesystem.setAutostart(false);
autostartCheckbox.checked=false;
}
else{
filesystem.setAutostart(true);
autostartCheckbox.checked=true;
}
}
}
// CheckBox{
// id: minimizeCheckbox
// x: mm
// y: 3*root.fontFactor*osSettings.bigFontSize
// width: 10*root.fontFactor*osSettings.bigFontSize
// enabled: autostartCheckbox.checked==true
// checked:(globaloptions["notify_"+adapter]==1)?true:false
// text: qsTr("Start Minimized")
// font.pointSize: osSettings.bigFontSize
// onClicked: {
// toggle();
// if(notifyCheckbox.checked==true){
// Service.updateglobaloptions(root.db,"notify_"+adapter,0);notifyCheckbox.checked=false;
// }
// else{
// Service.updateglobaloptions(root.db,"notify_"+adapter,1);notifyCheckbox.checked=true;
// }
// }
// }
}

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Page{ Page{
@ -43,8 +44,9 @@ Page{
textFormat: Text.RichText textFormat: Text.RichText
width: root.width-mm width: root.width-mm
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
color:Material.primaryTextColor
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: "<b>Friendiqa v0.6.2 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+ text: "<b>Friendiqa v0.6.3 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
"Website <a href='https://friendiqa.ma-nic.de'>https://friendiqa.ma-nic.de</a><br>"+ "Website <a href='https://friendiqa.ma-nic.de'>https://friendiqa.ma-nic.de</a><br>"+
"Sourcecode: <a href='https://git.friendi.ca/LubuWest/Friendiqa'>https://git.friendi.ca/LubuWest/Friendiqa</a><br>"+ "Sourcecode: <a href='https://git.friendi.ca/LubuWest/Friendiqa'>https://git.friendi.ca/LubuWest/Friendiqa</a><br>"+
"Privacy Policy: <a href='https://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md'>http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md</a><br>"+ "Privacy Policy: <a href='https://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md'>http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md</a><br>"+

View file

@ -32,11 +32,12 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/configqml" import "qrc:/qml/configqml"
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
Rectangle{ Rectangle{
color: "#EEEEEE" //Material.Grey color: Material.dialogColor
property string adapter: "" property string adapter: ""
width: parent.width width: parent.width
height: 4*root.fontFactor*osSettings.bigFontSize height: 4*root.fontFactor*osSettings.bigFontSize

View file

@ -31,17 +31,18 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/configqml" import "qrc:/qml/configqml"
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
Rectangle{ Page{
color:"white" //color:"white"
width:root.width width:root.width
height: root.height height: root.height
//height:root.height //height:root.height
Text { Label {
text: qsTr("Sync Interval (0=None)") text: qsTr("Sync Interval (0=None)")
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
//visible: false //visible: false
@ -58,11 +59,14 @@ Rectangle{
Rectangle{ Rectangle{
x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize; x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize;
width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize; width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize;
color: Material.dialogColor
radius: 0.5*mm
TextEdit{ TextEdit{
id: messageIntervalField id: messageIntervalField
anchors.fill: parent anchors.fill: parent
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
verticalAlignment:TextEdit.AlignRight verticalAlignment:TextEdit.AlignRight
color: Material.primaryTextColor
text:messageIntervalSlider.value text:messageIntervalSlider.value
focus: true focus: true
selectByMouse: true selectByMouse: true
@ -76,7 +80,7 @@ Rectangle{
} }
} }
} }
Text{x: 6*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; Label{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; width: 2*root.fontFactor*osSettings.bigFontSize; height: 1.5*root.fontFactor*osSettings.bigFontSize;
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
text:qsTr("Min.") text:qsTr("Min.")
@ -99,15 +103,15 @@ Rectangle{
} }
} }
MButton{ // MButton{
id:closeButton // id:closeButton
anchors.top: parent.top // anchors.top: parent.top
anchors.topMargin: osSettings.bigFontSize // anchors.topMargin: osSettings.bigFontSize
anchors.right: parent.right // anchors.right: parent.right
anchors.rightMargin: 1*mm // anchors.rightMargin: 1*mm
width: 2*root.fontFactor*osSettings.bigFontSize; // width: 2*root.fontFactor*osSettings.bigFontSize;
text: "\uf057" // text: "\uf057"
font.pointSize: osSettings.bigFontSize // font.pointSize: osSettings.bigFontSize
onClicked:{rootstackView.pop()} // onClicked:{rootstackView.pop()}
} // }
} }

View file

@ -31,6 +31,7 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.11 import QtQuick.Layouts 1.11
import QtQuick.LocalStorage 2.0 import QtQuick.LocalStorage 2.0
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
@ -119,9 +120,10 @@ Item{
Rectangle { Rectangle {
width: friendsView.width width: friendsView.width
height: childrenRect.height height: childrenRect.height
//color: "lightsteelblue" color: Material.dialogColor //color: "lightsteelblue"
required property string section required property string section
Text { Text {
color: Material.secondaryTextColor
text: parent.section text: parent.section
font.bold: true font.bold: true
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
@ -134,7 +136,7 @@ Item{
x:mm x:mm
y:updateFriendsButton.height+mm y:updateFriendsButton.height+mm
width:friendsGridTab.width-2*mm width:friendsGridTab.width-2*mm
height:friendsGridTab.height-(updateFriendsButton.height+5*mm) height:friendsGridTab.height-(updateFriendsButton.height+7*mm)
clip: true clip: true
spacing: 2 spacing: 2
function processContactSelection(contactobject){showContactdetails(contactobject)} function processContactSelection(contactobject){showContactdetails(contactobject)}

View file

@ -31,6 +31,7 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.11 import QtQuick.Layouts 1.11
import QtQuick.LocalStorage 2.0 import QtQuick.LocalStorage 2.0
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
@ -41,7 +42,7 @@ import "qrc:/qml/genericqml"
Rectangle { Rectangle {
y:1 y:1
color: "white" color: Material.backgroundColor//"white"
function showContactdetails(contact){ function showContactdetails(contact){
// rootstack.currentIndex=0; // rootstack.currentIndex=0;

View file

@ -31,6 +31,7 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/news.js" as Newsjs import "qrc:/js/news.js" as Newsjs
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
@ -55,7 +56,7 @@ Item {
height: parent.height-mm height: parent.height-mm
radius: 0.5*mm radius: 0.5*mm
border.color: "grey" border.color: "grey"
color:"white" color:Material.backgroundColor//"white"
// Image { // Image {
// id: photoImage // id: photoImage
@ -72,12 +73,13 @@ Item {
width: wrapper.width-2 width: wrapper.width-2
height: 3*root.fontFactor*osSettings.bigFontSize height: 3*root.fontFactor*osSettings.bigFontSize
//border.color: "light grey" //border.color: "light grey"
color:Material.backgroundColor
TextInput { TextInput {
id: namelabel id: namelabel
anchors.fill: parent anchors.fill: parent
readOnly: true readOnly: true
text: group.new?"":group.groupname text: group.new?"":group.groupname
color: "#303030" color: Material.secondaryTextColor//"#303030"
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
} }
} }
@ -128,6 +130,7 @@ Item {
Rectangle{ Rectangle{
id: detailsrectangle id: detailsrectangle
anchors.top: namelabelRect.bottom anchors.top: namelabelRect.bottom
color: Material.backgroundColor
//anchors.topMargin: mm //anchors.topMargin: mm
x:mm x:mm
width: parent.width-2*mm width: parent.width-2*mm

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
@ -38,7 +39,7 @@ Rectangle {
// width:parent.width-2*mm // width:parent.width-2*mm
// height:parent.height-14*mm // height:parent.height-14*mm
anchors.fill:parent anchors.fill:parent
color:"white" color: Material.backgroundColor//color:"white"
property var profile:({}) property var profile:({})
property var attachImageURLs:[] property var attachImageURLs:[]
property var createdAtDate: new Date(profile.friendica_owner.created_at) property var createdAtDate: new Date(profile.friendica_owner.created_at)
@ -196,7 +197,7 @@ Rectangle {
anchors.topMargin: 0 anchors.topMargin: 0
anchors.left: photoImage.left anchors.left: photoImage.left
wrapMode: Text.Wrap wrapMode: Text.Wrap
color: "#303030" color: Material.secondaryTextColor//"#303030"
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
anchors.top: photoImage.bottom anchors.top: photoImage.bottom
} }
@ -207,12 +208,13 @@ Rectangle {
Rectangle{ Rectangle{
id:profileRect id:profileRect
width:profileView.width width:profileView.width
color: Material.backgroundColor
height: 5*mm+profiletextfield.height height: 5*mm+profiletextfield.height
Text{ Text{
y:mm y:mm
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
text:"<b>"+qsTr("profile id")+": </b> "+profileid+"<br>" text:"<b>"+qsTr("profile id")+": </b> "+profileid+"<br>"
color:"black" color:Material.primaryTextColor//"black"
} }
Text{ Text{
id:profiletextfield id:profiletextfield
@ -222,7 +224,7 @@ Rectangle {
wrapMode: Text.Wrap wrapMode: Text.Wrap
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
text:profiletext text:profiletext
color:"black" color:Material.primaryTextColor//"black"
} }
} }
} }
@ -230,6 +232,7 @@ Rectangle {
id:textcomponent id:textcomponent
Text{ Text{
id:namelabeltext id:namelabeltext
color:Material.primaryTextColor
width: namelabelflickable.width width: namelabelflickable.width
height: implicitHeight height: implicitHeight
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize

View file

@ -33,6 +33,7 @@ import QtQuick 2.5
import QtQuick.LocalStorage 2.0 import QtQuick.LocalStorage 2.0
import QtQuick.Window 2.0 import QtQuick.Window 2.0
import QtQuick.Controls 2.4 import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.11 import QtQuick.Layouts 1.11
import QSystemTrayIcon 1.0 import QSystemTrayIcon 1.0
import "qrc:/js/news.js" as Newsjs import "qrc:/js/news.js" as Newsjs
@ -47,7 +48,7 @@ ApplicationWindow{
property QtObject osSettings: {var tmp=Qt.createComponent("qrc:/qml/configqml/OSSettingsLinux.qml");return tmp.createObject(root)} property QtObject osSettings: {var tmp=Qt.createComponent("qrc:/qml/configqml/OSSettingsLinux.qml");return tmp.createObject(root)}
width: globaloptions.hasOwnProperty("appWidth")?globaloptions.appWidth:osSettings.appWidth width: globaloptions.hasOwnProperty("appWidth")?globaloptions.appWidth:osSettings.appWidth
height:globaloptions.hasOwnProperty("appHeight")?globaloptions.appHeight:osSettings.appHeight height:globaloptions.hasOwnProperty("appHeight")?globaloptions.appHeight:osSettings.appHeight
visible: true visible: filesystem.Visibility// true
property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000] property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000]
property var login: Service.readActiveConfig(db) property var login: Service.readActiveConfig(db)
property real fontFactor: root.font.pixelSize/root.font.pointSize property real fontFactor: root.font.pixelSize/root.font.pointSize
@ -72,6 +73,10 @@ ApplicationWindow{
property var contactposts:[] property var contactposts:[]
property bool imagePicking: false property bool imagePicking: false
Material.theme: Material.System // globaloptions.view_darkmode==1?Material.Dark:Material.Light
color: Material.backgroundColor
function onLoginChanged(login){ function onLoginChanged(login){
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")} if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
else{ else{
@ -138,14 +143,14 @@ ApplicationWindow{
onClosing: { onClosing: {
if (rootstack.currentIndex==0){ if (rootstack.currentIndex==0){
newstab.active=true; newstab.active=true;print("newstabstatus "+newstab.newstabstatus + " newsViewType " +globaloptions.newsViewType)
if (newstab.newstabstatus!=globaloptions.newsViewType){ if (newstab.newstabstatus!=globaloptions.newsViewType){
newstab.newstabstatus=globaloptions.newsViewType; newstab.newstabstatus=globaloptions.newsViewType;
if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){ if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews) newsSignal(dbnews)
})} })}
else{ else{
Newsjs.chatsfromdb(db,login.username,function(dbnews){ Newsjs.chatsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews) newsSignal(dbnews)
})} })}
close.accepted=false; close.accepted=false;
@ -159,13 +164,13 @@ ApplicationWindow{
root.pop(); root.pop();
close.accepted=false close.accepted=false
} }
else{ else{print("Closing");
Service.cleanNews(root.db,function(){ Service.cleanNews(root.db,function(){print("cleannews");
Service.cleanHashtags(root.db,function(){ Service.cleanHashtags(root.db,function(){print("cleanhashtags");
Service.cleanContacts(root.login,root.db,function(){ Service.cleanContacts(root.login,root.db,function(){print("cleancontacts");
if (osSettings.osType=="Android"){ if (osSettings.osType=="Android"){
Qt.quit()} Qt.quit()}
else{ else{print("show systray")
systemTray.show(); systemTray.show();
systemTray.showMessage("",qsTr("Background Sync\n Rightclick or Middleclick to Quit"),"",5000) systemTray.showMessage("",qsTr("Background Sync\n Rightclick or Middleclick to Quit"),"",5000)
root.hide() root.hide()
@ -180,13 +185,16 @@ ApplicationWindow{
} }
Rectangle{
anchors.fill: parent
color: Material.backgroundColor
}
header: ToolBar{ header: ToolBar{
position: wideScreen?ToolBar.Header:ToolBar.Footer position: wideScreen?ToolBar.Header:ToolBar.Footer
background: Rectangle{ background: Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE"//"#F8F8F8" color: Material.backgroundDimColor//"#EEEEEE"//"#F8F8F8"
} }
RowLayout{ RowLayout{
anchors.fill: parent anchors.fill: parent
@ -206,28 +214,28 @@ ApplicationWindow{
text: "\uf03a" text: "\uf03a"
background:Rectangle{ background:Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE" color: Material.backgroundDimColor
} }
} }
TabButton { TabButton {
text: "\uf0c0" text: "\uf0c0"
background:Rectangle{ background:Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE" color: Material.backgroundDimColor
} }
} }
TabButton { TabButton {
text: "\uf03e" text: "\uf03e"
background:Rectangle{ background:Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE" color: Material.backgroundDimColor
} }
} }
TabButton { TabButton {
text: "\uf073" text: "\uf073"
background:Rectangle{ background:Rectangle{
anchors.fill: parent anchors.fill: parent
color: "#EEEEEE" color: Material.backgroundDimColor
} }
} }
} }
@ -287,10 +295,10 @@ StackView{id:rootstackView
Qt.quit() Qt.quit()
} }
} }
Component.onCompleted: { Component.onCompleted: {print("systray completed")
icon = iconTray icon = iconTray
toolTip = qsTr("Click to open Friendiqa") toolTip = qsTr("Click to open Friendiqa")
hide() //&hide()
} }
} }
@ -298,6 +306,17 @@ StackView{id:rootstackView
Component.onCompleted: { Component.onCompleted: {
onLoginChanged(login); onLoginChanged(login);
globaloptions=Service.readGO(db); globaloptions=Service.readGO(db);
if(globaloptions.view_darkmode==1){Material.theme=Material.Dark}
else if (globaloptions.view_darkmode==2){Material.theme=Material.Light}
else {Material.theme=Material.System}
if(!filesystem.Visibility){
systemTray.icon = iconTray;
// systemTray.toolTip = qsTr("Click to open Friendiqa");
systemTray.visible=true
systemTray.show();
}
if(osSettings.osType=="Android"){ if(osSettings.osType=="Android"){
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml"); var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
var IntentReceiverQml = component.createObject(root); var IntentReceiverQml = component.createObject(root);

View file

@ -30,6 +30,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls.Material 2.12
Rectangle{ Rectangle{
id: blueButton id: blueButton
width: Math.max(mainText.width+2*mm,5*mm) width: Math.max(mainText.width+2*mm,5*mm)
@ -65,7 +66,7 @@ Rectangle{
states: [ states: [
State { name: "Pressed" State { name: "Pressed"
PropertyChanges { target: blueButton; color: "white"} } PropertyChanges { target: blueButton; color: Material.buttonColor} }
] ]
transitions: [ transitions: [
Transition { to:"*" Transition { to:"*"

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Item { Item {
@ -45,8 +46,8 @@ Item {
width:parent.width width:parent.width
height: parent.height//8*mm height: parent.height//8*mm
radius: 0.5*mm radius: 0.5*mm
border.color: "grey" border.color: Material.backgroundDimColor// "grey"
color:"white" color: Material.backgroundColor//"white"
Image { Image {
id: photoImage id: photoImage
x:0.5*mm x:0.5*mm
@ -70,7 +71,7 @@ Item {
height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm
text: contact.name text: contact.name
elide: contentWidth>wrapper.width-4*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone elide: contentWidth>wrapper.width-4*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
color: "#303030" color: Material.secondaryTextColor//"#303030"
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
} }
Label { Label {
@ -79,7 +80,7 @@ Item {
height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm
text: "(@"+contact.screen_name+")" text: "(@"+contact.screen_name+")"
elide: contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone elide: contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
color: "#303030" color: Material.secondaryTextColor//"#303030"
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
} }
Label { Label {
@ -88,7 +89,7 @@ Item {
height: 2*root.fontFactor*osSettings.systemFontSize//2.5*mm height: 2*root.fontFactor*osSettings.systemFontSize//2.5*mm
text: Qt.atob(contact.description)!=""?contact.description:"" text: Qt.atob(contact.description)!=""?contact.description:""
elide:contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone elide:contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
color: "#303030" color: Material.secondaryTextColor//"#303030"
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
} }
} }

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import Qt.labs.folderlistmodel 2.1 import Qt.labs.folderlistmodel 2.1
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
@ -40,6 +41,7 @@ Rectangle{
id:imageDialog id:imageDialog
z:2 z:2
border.color: "grey" border.color: "grey"
color: Material.backgroundColor
width: parent.width-4*mm width: parent.width-4*mm
height:parent.height-12*mm height:parent.height-12*mm
x:2*mm x:2*mm

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/configqml" import "qrc:/qml/configqml"
Rectangle{ Rectangle{
@ -39,6 +40,7 @@ Rectangle{
// height: root.height-bar.height // height: root.height-bar.height
//y: bar.height //y: bar.height
signal opened() signal opened()
color: Material.backgroundColor
LeftDrawerScrollview{ LeftDrawerScrollview{
width:parent.width-mm width:parent.width-mm
@ -49,7 +51,7 @@ Rectangle{
width: 1 width: 1
height: leftDrawer.height height: leftDrawer.height
anchors.right: leftDrawer.right anchors.right: leftDrawer.right
color: "#EEEEEE" color: Material.dialogColor//"#EEEEEE"
} }
Component.onCompleted: {opened();} Component.onCompleted: {opened();}
} }

View file

@ -30,6 +30,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.6 import QtQuick 2.6
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
Button{ Button{
id: mButton id: mButton
property alias color: bg.color property alias color: bg.color
@ -38,5 +39,7 @@ Button{
height: 2*root.fontFactor*osSettings.bigFontSize height: 2*root.fontFactor*osSettings.bigFontSize
//color: Material.grey //color: Material.grey
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
background: Rectangle{id:bg;color:"#F3F3F3";radius: 0.5*mm} //highlighted:true
background: Rectangle{id:bg;color: Material.dialogColor//"#F3F3F3";
radius: 0.5*mm}
} }

View file

@ -30,12 +30,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls.Material 2.12
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Rectangle{ Rectangle{
id:permissionDialog id:permissionDialog
color: Material.backgroundColor
// x: mm // x: mm
width: parent.width-5*mm width: parent.width-5*mm
height:root.height/3 height:root.height/3
@ -63,6 +65,7 @@ Rectangle{
Text{ Text{
x:0.5*mm x:0.5*mm
y:0.5*mm y:0.5*mm
color: Material.primaryTextColor
text: qsTr("Friends") text: qsTr("Friends")
} }
ListView { ListView {
@ -82,18 +85,18 @@ Rectangle{
id:contactItem id:contactItem
Rectangle{ Rectangle{
id:contactitemRect id:contactitemRect
color: Material.backgroundColor
width:contactView.width width:contactView.width
height: 5*mm height: 5*mm
radius: 0.5*mm radius: 0.5*mm
property string contactstatus property string contactstatus
onContactstatusChanged:{ onContactstatusChanged:{
if(contactstatus=="positive"){contactitemRect.color="light green"} if(contactstatus=="positive"){contactitemRect.color="light green"}
else if (contactstatus=="negative"){contactitemRect.color= "ffe6e6"} else if (contactstatus=="negative"){contactitemRect.color= "red"}
else{contactitemRect.color= "white"}} else{contactitemRect.color= Material.backgroundColor}}
color: "white" border.color:Material.frameColor
border.color:"grey"
Text{ Text{
color:"grey" color: Material.primaryTextColor
text:contact.screen_name text:contact.screen_name
} }
MouseArea{ MouseArea{
@ -122,6 +125,7 @@ Rectangle{
} }
} }
Text{ Text{
color: Material.primaryTextColor
x:contactView.width+2*mm x:contactView.width+2*mm
y:0.5*mm y:0.5*mm
text: qsTr("Groups") text: qsTr("Groups")
@ -149,12 +153,12 @@ Rectangle{
property string groupstatus:"neutral" property string groupstatus:"neutral"
onGroupstatusChanged: onGroupstatusChanged:
{if(groupstatus=="positive"){groupitemRect.color="light green"} {if(groupstatus=="positive"){groupitemRect.color="light green"}
else if (groupstatus=="negative"){groupitemRect.color= "#ffe6e6"} else if (groupstatus=="negative"){groupitemRect.color= "red"}
else{groupitemRect.color= "white"}} else{groupitemRect.color= Material.backgroundColor}}
color: "white" color: Material.backgroundColor
border.color:"grey" border.color: Material.frameColor
Text{ Text{
color:"grey" color: Material.primaryTextColor
text:group.groupname text:group.groupname
} }
MouseArea{ MouseArea{
@ -207,7 +211,7 @@ Rectangle{
if (contact_allow.indexOf(contacts[name].cid)>-1){contactstatus="positive"} if (contact_allow.indexOf(contacts[name].cid)>-1){contactstatus="positive"}
else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"} else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"}
contactModel.append({"contact":contacts[name],"contactstatus":contactstatus}) contactModel.append({"contact":contacts[name],"contactstatus":contactstatus})
}},"isFriend",1); }},"isFriend",1,"name");
Helperjs.readData(db,"groups",login.username,function(owngroups){ Helperjs.readData(db,"groups",login.username,function(owngroups){
for (var number in owngroups){ for (var number in owngroups){

View file

@ -31,27 +31,23 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/genericqml" 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
Rectangle { Rectangle {
id:searchComponent id:searchComponent
color: Material.backgroundColor
Rectangle{
color: "#EEEEEE"
radius:0.5*mm radius:0.5*mm
anchors.left: parent.left /* anchors.left: parent.left
anchors.leftMargin:mm anchors.leftMargin:mm
anchors.top:parent.top anchors.top:parent.top
anchors.topMargin: 0.5*mm anchors.topMargin: 0.5*mm
width:parent.width-2*mm width:parent.width-2*mm
height: 4*mm //Math.max( searchText.contentHeight,5*mm) height: 4*mm *///Math.max( searchText.contentHeight,5*mm)
TextInput { TextInput {
id: searchText id: searchText
color: Material.primaryTextColor
focus: true focus: true
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
wrapMode: Text.Wrap wrapMode: Text.Wrap
@ -59,11 +55,6 @@ Rectangle {
selectByMouse: true selectByMouse: true
cursorVisible: false cursorVisible: false
onEditingFinished:{ if (displayText!=""){search(displayText)};searchComponent.destroy()} onEditingFinished:{ if (displayText!=""){search(displayText)};searchComponent.destroy()}
//onHeightChanged: newsView.contentY+=4.5*mm
} }
Component.onCompleted: searchText.forceActiveFocus() Component.onCompleted: searchText.forceActiveFocus()
}
} }

View file

@ -32,6 +32,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/news.js" as Newsjs import "qrc:/js/news.js" as Newsjs
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
@ -140,9 +141,9 @@ Page {
Component { id: contactHeader Component { id: contactHeader
Rectangle{ Rectangle{
border.color: "#EEEEEE" border.color: Material.backgroundDimColor//"#EEEEEE"
border.width: 1 border.width: 1
color:"white" color: Material.backgroundColor//"white"
width:contactView.width 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: 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 //height: wrapper.height
@ -170,7 +171,7 @@ Page {
y: mm y: mm
spacing:4 spacing:4
BlueButton{ MButton{
id:photobutton id:photobutton
height: 6*mm height: 6*mm
width: 8*mm width: 8*mm
@ -187,7 +188,7 @@ Page {
} }
} }
BlueButton{ MButton{
id:dmbutton id:dmbutton
height: 6*mm height: 6*mm
width: 8*mm width: 8*mm
@ -200,7 +201,7 @@ Page {
} }
} }
BlueButton{ MButton{
id:eventbutton id:eventbutton
visible:(contact.network=="dfrn") visible:(contact.network=="dfrn")
height: 6*mm height: 6*mm
@ -214,7 +215,7 @@ Page {
rootstackView.pop() rootstackView.pop()
} }
} }
BlueButton{ MButton{
id:approvebutton id:approvebutton
visible:(contact.hasOwnProperty("acct")) visible:(contact.hasOwnProperty("acct"))
height: 6*mm height: 6*mm
@ -229,7 +230,7 @@ Page {
rootstackView.pop() rootstackView.pop()
} }
} }
BlueButton{ MButton{
id:rejectbutton id:rejectbutton
visible:(contact.hasOwnProperty("acct")) visible:(contact.hasOwnProperty("acct"))
height: 6*mm height: 6*mm
@ -243,7 +244,7 @@ Page {
rootstackView.pop() rootstackView.pop()
} }
} }
BlueButton{ MButton{
id:ignorebutton id:ignorebutton
visible:(contact.hasOwnProperty("acct")) visible:(contact.hasOwnProperty("acct"))
height: 6*mm height: 6*mm
@ -257,7 +258,7 @@ Page {
rootstackView.pop() rootstackView.pop()
} }
} }
BlueButton{ MButton{
id:followbutton id:followbutton
visible:(contact.isFriend==0) visible:(contact.isFriend==0)
height: 6*mm height: 6*mm
@ -276,7 +277,7 @@ Page {
} }
} }
BlueButton{ MButton{
id:unfollowbutton id:unfollowbutton
visible:(contact.isFriend==1) visible:(contact.isFriend==1)
height: 6*mm height: 6*mm
@ -301,7 +302,7 @@ Page {
height: implicitHeight height: implicitHeight
text:contact.name+" (@"+contact.screen_name+")" text:contact.name+" (@"+contact.screen_name+")"
wrapMode: Text.Wrap//elide:Text.ElideRight wrapMode: Text.Wrap//elide:Text.ElideRight
color: "#303030" color: Material.primaryTextColor//"#303030"
font.pointSize: 1.2*osSettings.bigFontSize font.pointSize: 1.2*osSettings.bigFontSize
font.family: "Noto Sans" font.family: "Noto Sans"
anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom
@ -320,6 +321,7 @@ Page {
font.family: "Noto Sans" font.family: "Noto Sans"
textFormat:Text.RichText textFormat:Text.RichText
wrapMode: Text.Wrap wrapMode: Text.Wrap
color: Material.primaryTextColor
text:"<b>"+qsTr("Description")+": </b> "+(Qt.atob(contact.description)!=""?contact.description:"")+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+ text:"<b>"+qsTr("Description")+": </b> "+(Qt.atob(contact.description)!=""?contact.description:"")+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+
"<br> <b>"+qsTr("URL")+":</b> <a href='"+ contact.url+"'>"+contact.url+"</a><br>"+ "<br> <b>"+qsTr("URL")+":</b> <a href='"+ contact.url+"'>"+contact.url+"</a><br>"+
connectUrl+ "<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale()) connectUrl+ "<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())
@ -341,7 +343,7 @@ Page {
} }
function onSuccess(data,api){ function onSuccess(data,api){
Service.processNews(api,data) Service.processNews(api,data)
replySignal("") //replySignal("")
} }
} }
@ -350,9 +352,8 @@ Page {
function onContactpostsChanged(){ function onContactpostsChanged(){
if (root.contactposts.length>0&&root.contactposts[0]!=null){profileimagesource=root.contactposts[0].friendica_author.profile_image_url_large} if (root.contactposts.length>0&&root.contactposts[0]!=null){profileimagesource=root.contactposts[0].friendica_author.profile_image_url_large}
contactBusy.running=false; contactBusy.running=false;
contactModel.clear();
var currentTime= new Date(); var currentTime= new Date();
var msg = {'currentTime': currentTime, 'model': contactModel,'news':root.contactposts, 'options':globaloptions}; var msg = {'currentTime': currentTime, 'model': contactModel,'news':root.contactposts, 'options':globaloptions, 'method':'contact'};
contactWorker.sendMessage(msg) contactWorker.sendMessage(msg)
} }
} }

View file

@ -31,14 +31,15 @@
// List of people from Friendica Activities // List of people from Friendica Activities
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls.Material 2.12
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Rectangle { Rectangle {
id:activitiesRectangle id:activitiesRectangle
property var activitymembers property var activitymembers
color: "white" color: Material.dialogColor
border.color: "light grey" border.color: Material.frameColor
radius:0.5*mm radius:0.5*mm
width:root.width/2 width:root.width/2
height:Math.min(root.height/2,(10*mm+6*activitymembers.length*mm)) height:Math.min(root.height/2,(10*mm+6*activitymembers.length*mm))
@ -57,9 +58,11 @@ Rectangle {
ListModel{id: activitiesModel} ListModel{id: activitiesModel}
Component { id:activitiesContact Component {
id:activitiesContact
Rectangle{ Rectangle{
border.color: "#EEEEEE" border.color: Material.frameColor
color: Material.backgroundColor
border.width: 1 border.width: 1
radius:0.5*mm radius:0.5*mm
width:parent.width width:parent.width
@ -74,6 +77,7 @@ Rectangle {
onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
} }
Text{ Text{
color: Material.primaryTextColor
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
anchors.left: contactImage.right anchors.left: contactImage.right
anchors.margins: 1*mm anchors.margins: 1*mm
@ -84,7 +88,8 @@ Rectangle {
anchors.fill: parent anchors.fill: parent
onClicked:{showContact(contact)} onClicked:{showContact(contact)}
} }
}} }
}
MButton { MButton {
id: closeButton id: closeButton
@ -92,8 +97,8 @@ Rectangle {
anchors.topMargin: 1*mm anchors.topMargin: 1*mm
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 1*mm anchors.rightMargin: 1*mm
color:"white" //color:"white"
text: "\uf057"// qsTr("Close") text: "\uf057"
onClicked: { onClicked: {
activitiesRectangle.destroy() activitiesRectangle.destroy()
} }

View file

@ -30,17 +30,19 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls.Material 2.12
Rectangle { Rectangle {
id:hasgtagRectangle id:hashtagRectangle
color: "light grey" color:Material.dialogColor
property alias text: hashtagText.text property alias text: hashtagText.text
radius:0.3*mm radius:0.3*mm
width:hashtagText.contentWidth+mm width:hashtagText.contentWidth+mm
height:2.5* mm height:root.fontFactor*osSettings.bigFontSize
Text{ Text{
id:hashtagText id:hashtagText
font.pixelSize: 1.5*mm font.pointSize: osSettings.systemFontSize
color: Material.secondaryTextColor
anchors.centerIn: parent anchors.centerIn: parent
anchors.margins: 0.5*mm anchors.margins: 0.5*mm
} }

View file

@ -33,6 +33,7 @@
// message with buttons // message with buttons
import QtQuick 2.4 import QtQuick 2.4
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
//import QtQuick.Dialogs 1.2 //import QtQuick.Dialogs 1.2
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/smiley.js" as Smileyjs import "qrc:/js/smiley.js" as Smileyjs
@ -41,7 +42,7 @@ import "qrc:/qml/genericqml"
Rectangle{ Rectangle{
color:"#EEEEEE" color:Material.dialogColor//"#EEEEEE"
width:parent.width width:parent.width
height: conversation || (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0 height: conversation || (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0
id:messageSend id:messageSend
@ -221,7 +222,7 @@ Rectangle{
} }
Rectangle{ Rectangle{
color: "white" color: Material.backgroundColor//"white"
radius: 0.5*mm radius: 0.5*mm
x:mm x:mm
width: parent.width-2*mm width: parent.width-2*mm
@ -242,6 +243,8 @@ Rectangle{
onLinkActivated:{Qt.openUrlExternally(link)} onLinkActivated:{Qt.openUrlExternally(link)}
onActiveFocusChanged:{//print(placeholder) onActiveFocusChanged:{//print(placeholder)
if (activeFocus==true){ if (activeFocus==true){
print("contenty "+messageSend.ListView.view.contentY)
if (messageSend.ListView.view.contentY==null){messageSend.parent.ListView.view.y=0}else{messageSend.ListView.view.contentY=messageSend.ListView.view.contentY+8*mm};
if (conversation==true){ if (conversation==true){
if(parentId==""){setParent(conversationModel.get(0).newsitemobject);} if(parentId==""){setParent(conversationModel.get(0).newsitemobject);}
messageSend.state="conversation"; messageSend.state="conversation";

View file

@ -30,11 +30,12 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls.Material 2.12
Rectangle{ Rectangle{
id: moreComments id: moreComments
width: parent.width width: parent.width
height: 5*mm height: 5*mm
color:"white" color:Material.background//"white"
property int comments:0 property int comments:0
// border.color:"grey" // border.color:"grey"
// border.width:1 // border.width:1

View file

@ -54,6 +54,8 @@ AnimatedImage {id:gif;
} }
MouseArea {anchors.fill:parent; MouseArea {anchors.fill:parent;
onClicked:{ onClicked:{
rootstackView.push("qrc:/qml/newsqml/NewsPhotolist.qml",{"photolistarray": model.newsitemobject.imageAttachmentList})} rootstackView.push("qrc:/qml/newsqml/NewsPhotolist.qml",{"photolistarray": model.newsitemobject.imageAttachmentList})
roottoolbar.visible=false
}
} }
} }

View file

@ -30,8 +30,9 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.9 import QtQuick 2.15
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Page{ Page{
@ -64,8 +65,12 @@ Page{
anchors.topMargin: 1*mm anchors.topMargin: 1*mm
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 1*mm anchors.rightMargin: 1*mm
color: Material.dialogColor
text: "\uf057" text: "\uf057"
onClicked: {if (rootstackView.depth>1){ rootstackView.pop()} onClicked: {
if (rootstackView.depth>1){
roottoolbar.visible=true;
rootstackView.pop()}
} }
} }
Component { Component {
@ -85,16 +90,17 @@ Page{
running: realImage.status==Image.Loading running: realImage.status==Image.Loading
anchors.centerIn: parent anchors.centerIn: parent
} }
PinchArea {
id:imagePinch
pinch.target: realImage
anchors.fill: realImage
pinch.minimumScale: 0.1
pinch.maximumScale: 10
enabled: true
}
} }
// PinchArea {
// id:imagePinch
// pinch.target: realImage
// anchors.fill: realImage
// pinch.minimumScale: 0.1
// pinch.maximumScale: 10
// enabled: false
// }
} }
@ -131,4 +137,5 @@ Page{
}) })
} }
} }
//onDestroyed: root.roottoolbar.visible=true
} }

View file

@ -31,6 +31,7 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/news.js" as Newsjs import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/service.js" as Service import "qrc:/js/service.js" as Service
@ -40,6 +41,7 @@ Rectangle{
//anchors.fill: parent //anchors.fill: parent
width: parent.width width: parent.width
height: parent.height height: parent.height
color: Material.backgroundColor
property string updateMethodNews: "refresh" property string updateMethodNews: "refresh"
property var allchats: ({}) property var allchats: ({})
property int lastnewsid:0 property int lastnewsid:0
@ -101,9 +103,9 @@ Rectangle{
newsView.anchors.topMargin=7*mm; newsView.anchors.topMargin=7*mm;
newstab.newstabstatus="Search"; newstab.newstabstatus="Search";
newsBusy.running=false; newsBusy.running=false;
var leftoffset=osSettings.osType=="Android"?3*osSettings.bigFontSize:0 var leftoffset=(osSettings.osType=="Android")?2*root.fontFactor*osSettings.bigFontSize:0
var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml"); 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}); var searchItem = component.createObject(newsStack,{y:mm,x:leftoffset,width:root.width-(leftoffset+mm),height: 1.5*root.fontFactor*osSettings.systemFontSize});
break; break;
case "refresh": case "refresh":
if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){ if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){
@ -173,8 +175,9 @@ Rectangle{
function getOldNews(){ function getOldNews(){
var currentTime= new Date(); var currentTime= new Date();
var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
try{ if(oldnewsitemobject.hasOwnProperty("lastcomment")){ try{var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
if(oldnewsitemobject.hasOwnProperty("lastcomment")){
var lastnews_id=oldnewsitemobject.lastcomment.created_at; var lastnews_id=oldnewsitemobject.lastcomment.created_at;
}else{ }else{
var lastnews_id=oldnewsitemobject.created_at; var lastnews_id=oldnewsitemobject.created_at;
@ -257,10 +260,12 @@ Rectangle{
Component { id:footerComponent Component { id:footerComponent
Rectangle{ Rectangle{
border.color: "#EEEEEE" border.color: "#EEEEEE"
color: Material.dialogColor
border.width: 1 border.width: 1
width:newsView.width width:newsView.width
height:6*mm height:6*mm
Text{ Text{
color: Material.primaryTextColor
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
anchors.centerIn: parent anchors.centerIn: parent
text:qsTr("More") text:qsTr("More")

View file

@ -32,7 +32,7 @@
import QtMultimedia 5.8 import QtMultimedia 5.8
import QtQuick 2.9 import QtQuick 2.9
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"
Page{ Page{
id:newsvideofullscreen id:newsvideofullscreen
@ -61,12 +61,12 @@ Page{
autoLoad: true autoLoad: true
autoPlay: true autoPlay: true
audioRole: MediaPlayer.VideoRole audioRole: MediaPlayer.VideoRole
MouseArea { // MouseArea {
anchors.fill:parent; // anchors.fill:parent;
onClicked:{ // onClicked:{
rootstackView.pop() // rootstackView.pop()
} // }
} // }
} }
ProgressBar{ ProgressBar{
@ -96,6 +96,20 @@ Page{
visible:video.playbackState!=MediaPlayer.StoppedState visible:video.playbackState!=MediaPlayer.StoppedState
value: video.bufferProgress value: video.bufferProgress
} }
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()}
}
}
// Slider{ id: videoSlider // Slider{ id: videoSlider
// width: parent.width // width: parent.width
// height: 3*mm // height: 3*mm

View file

@ -31,6 +31,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/news.js" as Newsjs import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
@ -63,12 +64,14 @@ Item {
showConversation(index,newsitemobject) showConversation(index,newsitemobject)
} }
Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom; color:"light grey"} Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom;
color: Material.backgroundDimColor//"light grey"
}
Rectangle{ Rectangle{
width:newsitem.width width:newsitem.width
height:newsitem.height-1 height:newsitem.height-1
color: "white" color: Material.background//"white"
Column { Column {
id:toprow //newscolumn id:toprow //newscolumn
@ -112,20 +115,20 @@ Item {
Label { Label {
id:messageTypeLabel id:messageTypeLabel
color: "grey" color: Material.secondaryTextColor//"grey"
text: if (newsitemobject.messagetype==1){ qsTr("Direct Message")} else if(newsitemobject.messagetype==2) {" Notification"} else {qsTr("Source: ")+newsitemobject.source} 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 font.pointSize: 0.6*osSettings.systemFontSize
} }
Label { Label {
id:createdAtLabel id:createdAtLabel
color: "grey" color: Material.secondaryTextColor//"grey"
font.pointSize: 0.6*osSettings.systemFontSize font.pointSize: 0.6*osSettings.systemFontSize
horizontalAlignment: Label.AlignRight horizontalAlignment: Label.AlignRight
text: " \u00B7 "+getDateDiffString(newsitemobject.dateDiff) + " " +qsTr("ago") text: " \u00B7 "+getDateDiffString(newsitemobject.dateDiff) + " " +qsTr("ago")
} }
Label { Label {
id:replytoLabel id:replytoLabel
color: "grey" color: Material.secondaryTextColor//"grey"
font.pointSize: 0.6*osSettings.systemFontSize font.pointSize: 0.6*osSettings.systemFontSize
font.family: "Noto Sans" font.family: "Noto Sans"
horizontalAlignment: Label.AlignRight horizontalAlignment: Label.AlignRight
@ -138,10 +141,11 @@ Item {
MouseArea{id: itemBody MouseArea{id: itemBody
width: toprow.width-2 width: toprow.width-2
height: itemMessage.height height: itemMessage.height
onPressAndHold: {pushConversation()} //onPressAndHold: {pushConversation()}
onClicked: {pushConversation()}
Text { Text {
color: "#404040" color: Material.primaryTextColor//"#404040"
linkColor: "light green" linkColor: Material.accentColor//"light green"
id: itemMessage id: itemMessage
textFormat: Text.RichText textFormat: Text.RichText
font.family: "Noto Sans" font.family: "Noto Sans"
@ -194,9 +198,9 @@ Item {
anchors.bottom: toprow.bottom//itemMessage.bottom 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 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" text:"\uf078"
fontColor:"grey" fontColor: Material.secondaryTextColor//"grey"
border.color: "transparent" border.color: "transparent"
color:"white" color: Material.backgroundColor//"white"
// gradient: Gradient { // gradient: Gradient {
// GradientStop { position: 0.0; color: "transparent" } // GradientStop { position: 0.0; color: "transparent" }
// GradientStop { position: 0.5; color: "white" } // GradientStop { position: 0.5; color: "white" }
@ -220,7 +224,7 @@ Item {
width:parent.width width:parent.width
spacing:mm spacing:mm
Label{color: "grey" Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.likeText text: friendica_activities_view.likeText
@ -229,7 +233,7 @@ Item {
onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)} onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
} }
} }
Label{color: "grey" Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.dislikeText text: friendica_activities_view.dislikeText
@ -238,7 +242,7 @@ Item {
onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)} onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
} }
} }
Label{color: "grey" Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.attendyesText text: friendica_activities_view.attendyesText
@ -246,7 +250,7 @@ Item {
anchors.fill: parent anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)} onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)}
}} }}
Label{color: "grey" Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.attendnoText text: friendica_activities_view.attendnoText
@ -255,7 +259,7 @@ Item {
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)} onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)}
} }
} }
Label{color: "grey" Label{color: Material.secondaryTextColor//"grey"
height:3.5*mm height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize font.pointSize: 0.75*osSettings.systemFontSize
text: friendica_activities_view.attendmaybeText text: friendica_activities_view.attendmaybeText
@ -266,7 +270,7 @@ Item {
} }
Label{ Label{
id:attendLabel id:attendLabel
color: "grey" color: Material.secondaryTextColor//"grey"
height:3.5*mm height:3.5*mm
font.pointSize: 0.75*osSettings.systemFontSize font.pointSize: 0.75*osSettings.systemFontSize
horizontalAlignment: Label.AlignRight horizontalAlignment: Label.AlignRight
@ -287,11 +291,12 @@ Item {
indicator: Rectangle{ indicator: Rectangle{
implicitWidth: newsitem.width/5 //10*mm implicitWidth: newsitem.width/5 //10*mm
implicitHeight:root.fontFactor*osSettings.bigFontSize implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{ Text{
anchors.centerIn: parent anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name font.family:fontAwesome.name
color:likeCheckbox.checked?"black": "grey" color:likeCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
text:likeCheckbox.checked?"\uf118"+"!":"\uf118" text:likeCheckbox.checked?"\uf118"+"!":"\uf118"
} }
} }
@ -314,11 +319,12 @@ Item {
indicator: Rectangle{ indicator: Rectangle{
implicitWidth: newsitem.width/5 //10*mm implicitWidth: newsitem.width/5 //10*mm
implicitHeight:root.fontFactor*osSettings.bigFontSize implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{ Text{
anchors.centerIn: parent anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name font.family:fontAwesome.name
color:dislikeCheckbox.checked?"black": "grey" color:dislikeCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
text: dislikeCheckbox.checked?"\uf119"+"!":"\uf119" text: dislikeCheckbox.checked?"\uf119"+"!":"\uf119"
} }
} }
@ -341,11 +347,12 @@ Item {
indicator:Rectangle{ indicator:Rectangle{
implicitWidth: newsitem.width/5 //10*mm implicitWidth: newsitem.width/5 //10*mm
implicitHeight:root.fontFactor*osSettings.bigFontSize implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{ Text{
anchors.centerIn: parent anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name font.family:fontAwesome.name
color: favoritedCheckbox.checked?"black":"grey" color: favoritedCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
text:"\uf005" text:"\uf005"
} }
} }
@ -364,7 +371,7 @@ Item {
color:"transparent" color:"transparent"
Text{ Text{
id:newsmenusymbol id:newsmenusymbol
color: "grey" color: Material.secondaryTextColor//"grey"
anchors.centerIn: parent anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name font.family:fontAwesome.name
@ -378,10 +385,11 @@ Item {
Menu { Menu {
id:newsmenu id:newsmenu
width: 18*osSettings.FontSize width: 10*root.fontFactor*osSettings.systemFontSize
delegate: MenuItem{ delegate: MenuItem{
contentItem: Text{ contentItem: Text{
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
color: Material.secondaryTextColor
text: parent.text text: parent.text
} }
} }
@ -392,8 +400,15 @@ Item {
if (newsitemobject.messagetype==1){ directmessage=1} if (newsitemobject.messagetype==1){ directmessage=1}
var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml"); var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml");
var conversation; var conversation;
if (newsitem.ListView.view.viewtype=="conversation"){conversation=true} if (newsitem.ListView.view==null){conversation=true}
else{conversation=false}; else if (newsitem.ListView.view.viewtype=="conversation"){
conversation=true
newsitem.ListView.view.currentIndex=itemindex
}
else{
conversation=false;
newsitem.ListView.view.currentIndex=itemindex
};
var reply=replycomp.createObject(friendicaActivities,{parentId:newsitemobject.id,reply_to_user:newsitemobject.user.screen_name, state:"reply",conversation:conversation,textfocus:true}) var reply=replycomp.createObject(friendicaActivities,{parentId:newsitemobject.id,reply_to_user:newsitemobject.user.screen_name, state:"reply",conversation:conversation,textfocus:true})
} }
} }
@ -420,10 +435,11 @@ Item {
Menu{ Menu{
title: qsTr("Attending") title: qsTr("Attending")
width: 10*osSettings.systemFontSize width: 10*root.fontFactor*osSettings.systemFontSize
delegate: MenuItem{ delegate: MenuItem{
contentItem: Text{ contentItem: Text{
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
color: Material.secondaryTextColor
text: parent.text text: parent.text
} }
} }

View file

@ -32,6 +32,7 @@
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11 import QtQuick.Layouts 1.11
import QtQuick.Controls.Material 2.12
import "qrc:/js/smiley.js" as Smileyjs import "qrc:/js/smiley.js" as Smileyjs
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
@ -41,6 +42,7 @@ Rectangle{
x: mm x: mm
width: messageColumn.width-5*mm width: messageColumn.width-5*mm
height:root.height/2 height:root.height/2
color: Material.backgroundColor
MButton{ MButton{
id:closeButton id:closeButton
@ -87,6 +89,7 @@ Rectangle{
height: smileyDialog.height-4*root.fontFactor*osSettings.bigFontSize height: smileyDialog.height-4*root.fontFactor*osSettings.bigFontSize
Rectangle{ Rectangle{
id: htmlGridTab id: htmlGridTab
color: Material.backgroundColor
GridView { GridView {
id:htmlView id:htmlView
anchors.fill: parent anchors.fill: parent
@ -109,6 +112,7 @@ Rectangle{
Rectangle{ Rectangle{
id: coreGridTab id: coreGridTab
color: Material.backgroundColor
GridView { GridView {
id: coreSmileyView id: coreSmileyView
anchors.fill: parent anchors.fill: parent
@ -133,6 +137,7 @@ Rectangle{
Rectangle{ Rectangle{
id: addonGridTab id: addonGridTab
color: Material.backgroundColor
GridView { GridView {
id: addonView id: addonView
anchors.fill: parent anchors.fill: parent
@ -156,6 +161,7 @@ Rectangle{
Rectangle{ Rectangle{
id: adultGridTab id: adultGridTab
color: Material.backgroundColor
GridView { GridView {
id: adultView id: adultView
anchors.fill: parent anchors.fill: parent
@ -197,7 +203,7 @@ Rectangle{
Component{ Component{
id:htmlItem id:htmlItem
Text{id:smileText Label{id:smileText
width:4.5*mm width:4.5*mm
height: 4.5*mm height: 4.5*mm
textFormat:Text.RichText textFormat:Text.RichText

View file

@ -31,11 +31,12 @@
import QtQuick 2.5 import QtQuick 2.5
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/image.js" as Imagejs import "qrc:/js/image.js" as Imagejs
import "qrc:/qml/genericqml" import "qrc:/qml/genericqml"
Rectangle{ Page{
id:imageDialog id:imageDialog
property var attachImageURLs: [] property var attachImageURLs: []
property string imageId: "" property string imageId: ""
@ -118,7 +119,7 @@ Rectangle{
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 1*mm anchors.rightMargin: 1*mm
spacing:5*mm spacing:5*mm
Text{ Label{
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
font.bold: true font.bold: true
text:qsTr("Upload to album") text:qsTr("Upload to album")
@ -192,7 +193,7 @@ Rectangle{
x:3*mm //23*mm x:3*mm //23*mm
y: 11*mm + album.height y: 11*mm + album.height
width: imageDialog.width-5*mm //25*mm width: imageDialog.width-5*mm //25*mm
height: parent.height -(9*root.fontFactor*osSettings.bigFontSize)//root.width/2 //25*mm height: parent.height -(12*root.fontFactor*osSettings.bigFontSize)//root.width/2 //25*mm
model: imageUploadModel model: imageUploadModel
delegate: imageDelegate delegate: imageDelegate
footer: imageId==""?imageFooter:null footer: imageId==""?imageFooter:null
@ -231,7 +232,8 @@ Rectangle{
id: imageDelegate id: imageDelegate
Rectangle{ Rectangle{
width:root.width/2 //Math.max(20*mm,descriptionInput.contentWidth) width:root.width/2 //Math.max(20*mm,descriptionInput.contentWidth)
height:imageUploadView.height-5*mm // 20*mm height:imageUploadView.height-3*root.fontFactor*osSettings.bigFontSize// 20*mm
color: Material.backgroundColor
Image{ Image{
id: uploadImage id: uploadImage
width: root.width/2-mm //20*mm width: root.width/2-mm //20*mm
@ -250,7 +252,7 @@ Rectangle{
} }
Rectangle{ Rectangle{
//color: "light grey" color: Material.backgroundColor
border.color: "grey" border.color: "grey"
anchors.top: uploadImage.bottom anchors.top: uploadImage.bottom
anchors.topMargin: mm anchors.topMargin: mm

View file

@ -31,6 +31,7 @@
import QtQuick 2.5 import QtQuick 2.5
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQml.Models 2.1 import QtQml.Models 2.1
import "qrc:/js/image.js" as Imagejs import "qrc:/js/image.js" as Imagejs
import "qrc:/js/helper.js" as Helperjs import "qrc:/js/helper.js" as Helperjs
@ -47,7 +48,7 @@ StackView{
// y:1 // y:1
// width:root.width-mm // width:root.width-mm
// height:root.height-5*mm // height:root.height-5*mm
color: '#fff' color: Material.backgroundColor//'#fff'
property var newimages:[] property var newimages:[]
property int currentimageno: 0 property int currentimageno: 0
property bool remoteContact: false property bool remoteContact: false
@ -169,7 +170,7 @@ StackView{
y:mm y:mm
z:2 z:2
visible: !wideScreen visible: !wideScreen
fontColor: "grey" fontColor: Material.secondaryTextColor//"grey"
border.color: "transparent" border.color: "transparent"
text: "\uf0c9" text: "\uf0c9"
font.pointSize: osSettings.bigFontSize font.pointSize: osSettings.bigFontSize
@ -285,7 +286,7 @@ StackView{
clip: true clip: true
model: visualphotoModel.parts.album model: visualphotoModel.parts.album
footer:Rectangle{ footer:Rectangle{
border.color: "#EEEEEE" border.color: Material.backgroundDimColor//"#EEEEEE"
border.width: 1 border.width: 1
width:12*mm width:12*mm
height:6*mm height:6*mm

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff