forked from lubuwest/Friendiqa
v0.6.3 Dark Mode
This commit is contained in:
parent
06499466be
commit
66e5c33b00
56 changed files with 1869 additions and 1283 deletions
|
@ -250,5 +250,7 @@
|
|||
<file>translations/friendiqa-hu.ts</file>
|
||||
<file>images/Friendiqa.png</file>
|
||||
<file>images/Friendica_monochrome.png</file>
|
||||
<file>qml/configqml/ConfigAppearancePage.qml</file>
|
||||
<file>qml/configqml/ConfigStartPage.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -53,6 +53,19 @@ QString FILESYSTEM::Directory() const
|
|||
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
|
||||
{
|
||||
//QDir dir(m_Directory);
|
||||
|
@ -135,3 +148,42 @@ QFileInfoList FILESYSTEM::fileList()
|
|||
//qDebug() << "filelist " << m_Filelist;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,8 +43,10 @@ class FILESYSTEM : public QObject//, public QAndroidActivityResultReceiver
|
|||
{
|
||||
Q_OBJECT
|
||||
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(QString homePath READ homePath)
|
||||
Q_PROPERTY(bool isAutostart READ isAutostart)
|
||||
//Q_PROPERTY(QString cameraPath READ cameraPath)
|
||||
|
||||
|
||||
|
@ -52,16 +54,21 @@ public:
|
|||
static FILESYSTEM *instance();
|
||||
explicit FILESYSTEM(QObject *parent = 0);
|
||||
void setDirectory(QString Directory);
|
||||
void setVisibility(bool Visibility);
|
||||
QString Directory() const;
|
||||
QFileInfoList fileList();
|
||||
//bool direxist(QString Directory);
|
||||
QString homePath() const;
|
||||
bool Visibility();
|
||||
bool isAutostart();
|
||||
|
||||
//QString cameraPath() const;
|
||||
// virtual void handleActivityResult(int receiverRequestCode, int resultCode, const QAndroidJniObject &data);
|
||||
|
||||
signals:
|
||||
//void imageselected(QString);
|
||||
void directoryChanged();
|
||||
void visibilityChanged();
|
||||
//void fileListContent(QList data);
|
||||
void success(QString data);
|
||||
void error(QString data, int code);
|
||||
|
@ -72,12 +79,14 @@ public slots:
|
|||
void makePath(QString name);
|
||||
void rmDir();
|
||||
void rmFile(QString name);
|
||||
void setAutostart(bool autostart);
|
||||
//void searchImage();
|
||||
//void fileList();
|
||||
|
||||
private:
|
||||
QString m_Directory;
|
||||
QString homeDir;
|
||||
bool m_Visibility;
|
||||
//QList m_Filelist;
|
||||
};
|
||||
|
||||
|
|
|
@ -53,6 +53,18 @@ QString FILESYSTEM::Directory() const
|
|||
{
|
||||
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
|
||||
{
|
||||
|
@ -113,3 +125,36 @@ QFileInfoList FILESYSTEM::fileList()
|
|||
dir.setSorting(QDir::Time | QDir::Reversed);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ int main(int argc, char *argv[]) {
|
|||
updatenews->setDatabase();
|
||||
updatenews->login();
|
||||
updatenews->startsync();
|
||||
|
||||
//app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
|
||||
//QtAndroid::androidService().callMethod<void>("stopSelf");
|
||||
//return app.exec();
|
||||
|
@ -94,6 +95,10 @@ int main(int argc, char *argv[]) {
|
|||
XHR* xhr = XHR::instance();
|
||||
view.rootContext()->setContextProperty("xhr", xhr);
|
||||
FILESYSTEM* filesystem = FILESYSTEM::instance();
|
||||
if (qstrcmp(argv[1],"-background")==0){
|
||||
filesystem->setVisibility(false);
|
||||
} else{filesystem->setVisibility(true);}
|
||||
|
||||
view.rootContext()->setContextProperty("filesystem", filesystem);
|
||||
ALARM* alarm = ALARM::instance();
|
||||
view.rootContext()->setContextProperty("alarm", alarm);
|
||||
|
|
|
@ -7,4 +7,4 @@ Terminal=false
|
|||
Name=Friendiqa
|
||||
GenericName=Social Media
|
||||
Comment= App for social network Friendica
|
||||
Categories=Network,Qt,News
|
||||
Categories=Network
|
||||
|
|
|
@ -64,19 +64,21 @@ function beautify(newsitemobject,msg){
|
|||
var attachArray=newsitemobject.attachments;
|
||||
for (var image in attachArray){
|
||||
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);
|
||||
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"}
|
||||
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 {attachhelper.url=attachArray[image].url}
|
||||
|
||||
// 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"}
|
||||
// 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 {
|
||||
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)
|
||||
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url,"")
|
||||
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(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),"")
|
||||
|
||||
imageAttachmentList.push(attachhelper)
|
||||
}
|
||||
|
@ -138,18 +140,19 @@ if(msg.deleteId!==undefined)
|
|||
msg.model.sync()
|
||||
}
|
||||
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()
|
||||
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]) {
|
||||
var newsitemobject=msg.news[j];
|
||||
newsitemobject=beautify(newsitemobject,msg);
|
||||
|
||||
if (newsitemobject.hasOwnProperty("currentconversation")&&(newsitemobject.currentconversation.length>0)){
|
||||
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg);
|
||||
newsitemobject.lastcomment.indent=1
|
||||
//print("Currentconversation" + newsitemobject.currentconversation.length+JSON.stringify(newsitemobject.lastcomment))
|
||||
}
|
||||
}
|
||||
|
||||
if (msg.method=="conversation"){
|
||||
if (j==0){newsitemobject.indent=0}else{
|
||||
|
@ -160,19 +163,17 @@ else{
|
|||
}
|
||||
}
|
||||
}}
|
||||
|
||||
var data=({"newsitemobject": newsitemobject})
|
||||
data=({"newsitemobject": newsitemobject})
|
||||
}
|
||||
|
||||
if(msg.method=="append") {
|
||||
msg.model.insert(j, data)}
|
||||
else{
|
||||
msg.model.append(data)
|
||||
}
|
||||
}
|
||||
|
||||
if (j==msg.news.length){
|
||||
|
||||
//if (j==msg.news.length){
|
||||
msg.model.sync()
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ function updateglobaloptions(database,key,value){
|
|||
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
||||
db.transaction( function(tx) {
|
||||
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+'"')
|
||||
} else {// use insert
|
||||
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);
|
||||
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)
|
||||
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);
|
||||
var deleters = tx.executeSql('DELETE from contacts WHERE username="'+login.username+'" AND url="'+result.rows.item(i).url+'"');
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls.Material 2.12
|
||||
//import QtQuick.Controls 2.4
|
||||
|
||||
Item {
|
||||
|
@ -50,7 +51,7 @@ Item {
|
|||
id:daytext
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 0.5*mm
|
||||
color:(model.month==monthgrid.month)?"black":"grey"
|
||||
color:(model.month==monthgrid.month)?Material.primaryTextColor:Material.secondaryTextColor
|
||||
wrapMode: Text.WrapAnywhere
|
||||
text: model.day
|
||||
font.bold: model.today
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQml 2.2
|
||||
import Qt.labs.calendar 1.0
|
||||
//import QtQuick.Layouts 1.3
|
||||
|
@ -45,7 +46,7 @@ Rectangle {
|
|||
width:parent.width//-mm
|
||||
height:parent.height//-5*mm
|
||||
// anchors.fill: parent
|
||||
color: '#fff'
|
||||
color: Material.backgroundColor//'#fff'
|
||||
property date currentTime: new Date()
|
||||
property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000
|
||||
property var events:[]
|
||||
|
@ -190,6 +191,7 @@ Rectangle {
|
|||
//Layout.fillWidth: true
|
||||
width: parent.width-root.fontFactor*osSettings.bigFontSize
|
||||
horizontalAlignment:Text.AlignHCenter
|
||||
color: Material.primaryTextColor
|
||||
text: model.year
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
}
|
||||
|
@ -197,6 +199,7 @@ Rectangle {
|
|||
width: parent.width-osSettings.bigFontSize
|
||||
text: Qt.locale().standaloneMonthName(model.month)
|
||||
//Layout.fillWidth: true
|
||||
color: Material.primaryTextColor
|
||||
horizontalAlignment:Text.AlignHCenter
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
@ -40,7 +41,7 @@ Rectangle{
|
|||
id:eventList
|
||||
// height: parent.height
|
||||
// width:parent.width
|
||||
|
||||
color: Material.backgroundColor
|
||||
//radius: 0.5*mm
|
||||
property var daylist:[]
|
||||
property int dayint: 0
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
@ -42,7 +43,8 @@ Rectangle{
|
|||
property var currEvent: event
|
||||
width:parent.width
|
||||
height:eventNameText.height+eventDetailsText.height+mm
|
||||
border.color: "light grey"
|
||||
border.color: Material.backgroundDimColor//"light grey"
|
||||
color: Material.backgroundColor
|
||||
border.width: 1
|
||||
radius: 0.5*mm
|
||||
Image {
|
||||
|
@ -61,6 +63,7 @@ Rectangle{
|
|||
x: 8*mm
|
||||
width:parent.width-8*mm
|
||||
height:contentHeight
|
||||
color: Material.primaryTextColor
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
text: new Date(event.start).toLocaleString(Qt.locale(),Locale.NarrowFormat)+ " - " +((event.end>0)&&(event.end!=null)?new Date(event.end).toLocaleString(Qt.locale(),Locale.NarrowFormat):"\u221E")+":\n"+event.title //+calendarrectangle.offsetTime
|
||||
wrapMode:Text.Wrap
|
||||
|
@ -72,6 +75,7 @@ Rectangle{
|
|||
z:4
|
||||
width: parent.width-8*mm
|
||||
height: contentHeight
|
||||
color: Material.primaryTextColor
|
||||
textFormat: Text.RichText
|
||||
text: status!="large"?"":Qt.atob(event.desc) + (event.location==""?"":"<br><br>"+qsTr("Location")+": "+event.location)//Qt.atob(event.html)
|
||||
anchors.top: eventNameText.bottom
|
||||
|
|
|
@ -33,6 +33,7 @@ import QtQuick 2.7
|
|||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQml.Models 2.15
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/layout.js" as Layoutjs
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
|
@ -40,53 +41,53 @@ import "qrc:/qml/configqml"
|
|||
import "qrc:/qml/genericqml"
|
||||
|
||||
Page{
|
||||
id:accountPage
|
||||
width: root.width
|
||||
height: root.height
|
||||
property var users:[]
|
||||
property var userdata: ({})
|
||||
property string imagestoredir: ""
|
||||
id:accountPage
|
||||
width: root.width
|
||||
height: root.height
|
||||
property var users:[]
|
||||
property var userdata: ({})
|
||||
property string imagestoredir: ""
|
||||
|
||||
|
||||
function setServericon(server){
|
||||
try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){
|
||||
function setServericon(server){
|
||||
if ((server!=null) && (server!="")){
|
||||
try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){
|
||||
var serverdata = JSON.parse(obj);
|
||||
servericon.visible=true;
|
||||
servericon.source=serverdata.site.logo})} catch(e){print(e)}
|
||||
servericon.source=serverdata.site.logo})
|
||||
} catch(e){print(e)}
|
||||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
id:userButton
|
||||
text:qsTr("User")
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
x: root.fontFactor*osSettings.bigFontSize
|
||||
y: root.fontFactor*osSettings.bigFontSize
|
||||
width: root.width/2 - 2*mm
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
visible: users.length>0
|
||||
|
||||
onClicked:{
|
||||
var useritems="";
|
||||
for (var i=0;i<accountPage.users.length;i++){
|
||||
|
||||
useritems=useritems+"MenuItem{font.pointSize: osSettings.bigFontSize;width:accountPage.width*2/3; text:'"+accountPage.users[i].username+
|
||||
"'; onTriggered: {Service.readConfig(db,function(obj){
|
||||
userButton.text=obj.username;
|
||||
servername.text=obj.server;
|
||||
accountPage.setServericon(obj.server);
|
||||
username.text= obj.username;
|
||||
password.text=Qt.atob(obj.password);
|
||||
imagestore.text=obj.imagestore;
|
||||
imagestoredir=obj.imagestore;
|
||||
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
|
||||
},'username','"+ accountPage.users[i].username+"')}}"
|
||||
}
|
||||
var menuString="import QtQuick.Controls 2.12;import 'qrc:/js/service.js' as Service;"+
|
||||
" Menu {width:8*root.fontFactor*osSettings.bigFontSize;"+useritems+"}";
|
||||
var userlistObject=Qt.createQmlObject(menuString,accountPage,"usermenuOutput")
|
||||
userlistObject.popup() }
|
||||
MButton{
|
||||
id:userButton
|
||||
text:qsTr("User")
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
x: root.fontFactor*osSettings.bigFontSize
|
||||
y: root.fontFactor*osSettings.bigFontSize
|
||||
width: root.width/2 - 2*mm
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
visible: users.length>0
|
||||
onClicked:{
|
||||
var useritems="";
|
||||
for (var i=0;i<accountPage.users.length;i++){
|
||||
useritems=useritems+"MenuItem{font.pointSize: osSettings.bigFontSize;width:accountPage.width*2/3; text:'"+accountPage.users[i].username+
|
||||
"'; onTriggered: {Service.readConfig(db,function(obj){
|
||||
userButton.text=obj.username;
|
||||
serverModel.insert(0,{text:obj.server})
|
||||
accountPage.setServericon(obj.server);
|
||||
username.text= obj.username;
|
||||
password.text=Qt.atob(obj.password);
|
||||
imagestore.text=obj.imagestore;
|
||||
imagestoredir=obj.imagestore;
|
||||
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
|
||||
},'username','"+ accountPage.users[i].username+"')}}"
|
||||
}
|
||||
|
||||
var menuString="import QtQuick.Controls 2.12;import 'qrc:/js/service.js' as Service;"+
|
||||
" Menu {width:8*root.fontFactor*osSettings.bigFontSize;"+useritems+"}";
|
||||
var userlistObject=Qt.createQmlObject(menuString,accountPage,"usermenuOutput")
|
||||
userlistObject.popup() }
|
||||
}
|
||||
|
||||
Image{
|
||||
id:servericon
|
||||
|
@ -115,18 +116,87 @@ Page{
|
|||
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 {
|
||||
id: servername
|
||||
x: 4*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize; width: root.width-18*mm; //height: 5*mm;
|
||||
placeholderText: qsTr("Server")
|
||||
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
|
||||
onEditingFinished: {
|
||||
if ((servername.text)==""){}
|
||||
else if((servername.text).substring(0,7) !=="https://"){
|
||||
servername.text= "https://"+text//(serverstring.text).substring(8)
|
||||
}
|
||||
accountPage.setServericon(servername.text)}
|
||||
text:"https://"
|
||||
onFocusChanged:{
|
||||
if (focus){servermenu.open()}
|
||||
else{
|
||||
if((servername.text).substring(0,11) =="https://http"){
|
||||
servername.text= (servername.text).substring(8)
|
||||
}
|
||||
if (servername.text!="https://"){
|
||||
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 {
|
||||
|
@ -155,7 +225,7 @@ Page{
|
|||
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText | Qt.ImhSensitiveData
|
||||
}
|
||||
|
||||
Text {
|
||||
Label {
|
||||
id: imagedirlabel
|
||||
visible: imagestore.text!=""
|
||||
text: qsTr("Image dir.")
|
||||
|
@ -210,8 +280,8 @@ Page{
|
|||
text: qsTr("Confirm")
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{
|
||||
accountBusy.running=true;
|
||||
var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""};
|
||||
accountBusy.running=true;//servername.displayText
|
||||
var userconfig={server: servername.displayText, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir, maxnews:"",interval: ""};
|
||||
var errormessage="";
|
||||
if (servername.text==""){errormessage=qsTr("No server given! ")}
|
||||
else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
|
||||
|
@ -274,23 +344,23 @@ Page{
|
|||
onClicked:{
|
||||
var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
|
||||
Service.deleteConfig(db,userconfig,function(){
|
||||
filesystem.Directory=imagestore.text+"contacts";
|
||||
filesystem.rmDir();
|
||||
filesystem.Directory=imagestore.text+"albums";
|
||||
filesystem.rmDir();
|
||||
servername.text="https://";
|
||||
servericon.visible=false;
|
||||
servericon.source="";
|
||||
username.text="";
|
||||
password.text="";
|
||||
imagestore.text="";
|
||||
filesystem.Directory=imagestore.text+"contacts";
|
||||
filesystem.rmDir();
|
||||
filesystem.Directory=imagestore.text+"albums";
|
||||
filesystem.rmDir();
|
||||
servername.text="https://";
|
||||
servericon.visible=false;
|
||||
servericon.source="";
|
||||
username.text="";
|
||||
password.text="";
|
||||
imagestore.text="";
|
||||
//maxNews.value=0;
|
||||
//newsTypeField.text="Conversations";
|
||||
//messageIntervalSlider.value=30;
|
||||
userButton.text=qsTr("User");
|
||||
Helperjs.readData(db,"config","",function(storedUsers){
|
||||
storedUsers.sort(function(obj1, obj2) {
|
||||
return obj1.isActive - obj2.isActive;
|
||||
userButton.text=qsTr("User");
|
||||
Helperjs.readData(db,"config","",function(storedUsers){
|
||||
storedUsers.sort(function(obj1, obj2) {
|
||||
return obj1.isActive - obj2.isActive;
|
||||
})
|
||||
accountPage.users=storedUsers;})
|
||||
})
|
||||
|
@ -339,6 +409,7 @@ Page{
|
|||
Service.readConfig(db,function(obj){
|
||||
userButton.text=obj.username;
|
||||
servername.text=obj.server;
|
||||
serverModel.insert(0,{text:obj.server})
|
||||
accountPage.setServericon(obj.server);
|
||||
username.text= obj.username;
|
||||
password.text=Qt.atob(obj.password);
|
||||
|
|
220
source-linux/qml/configqml/ConfigAppearancePage.qml
Normal file
220
source-linux/qml/configqml/ConfigAppearancePage.qml
Normal 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()}
|
||||
// }
|
||||
}
|
|
@ -31,8 +31,9 @@
|
|||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.11
|
||||
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"
|
||||
|
@ -42,122 +43,77 @@ Page{
|
|||
width:root.width
|
||||
height:root.height
|
||||
|
||||
Rectangle{
|
||||
x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize;
|
||||
width: parent.width - 6*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
color:"#F3F3F3"
|
||||
radius: 0.5*mm
|
||||
Text{
|
||||
anchors.fill: parent
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
text:qsTr("Sync")
|
||||
TabBar {
|
||||
id: configbar
|
||||
width: parent.width-3*root.fontFactor*osSettings.bigFontSize//osSettings.osType=="Android"?parent.width-3*root.fontFactor*osSettings.bigFontSize:parent.width
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
x: osSettings.osType=="Android"?2*osSettings.bigFontSize:0
|
||||
//visible: !wideScreen
|
||||
position:TabBar.Header
|
||||
currentIndex: 0
|
||||
TabButton {
|
||||
text: qsTr("Appearance")
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width:6*root.fontFactor*osSettings.bigFontSize
|
||||
}
|
||||
MouseArea{
|
||||
anchors.fill:parent
|
||||
onClicked:rootstackView.push("qrc:qml/configqml/SyncConfig.qml");
|
||||
TabButton {
|
||||
text: qsTr("Sync")
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width:10*root.fontFactor*osSettings.bigFontSize
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Start")
|
||||
visible:osSettings.osType=="Linux"
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width:10*root.fontFactor*osSettings.bigFontSize
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("News as")
|
||||
font.pointSize:osSettings.systemFontSize
|
||||
x: root.fontFactor*osSettings.bigFontSize; y: 8*root.fontFactor*osSettings.bigFontSize
|
||||
LeftDrawerLinux{
|
||||
id:leftDrawer
|
||||
visible: wideScreen&&rootstackView.depth<2
|
||||
width: visible?osSettings.systemFontSize*15:0
|
||||
height: root.height-bar.height
|
||||
}
|
||||
|
||||
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")
|
||||
LeftDrawerAndroid{
|
||||
id: leftDrawerAndroid
|
||||
}
|
||||
|
||||
StackLayout{
|
||||
id:configTabView
|
||||
//anchors.fill: parent
|
||||
width: wideScreen&&rootstackView.depth<2?parent.width-leftDrawer.width-mm:parent.width-mm//newstabitem.width/3*2:newstabitem.width
|
||||
x: leftDrawer.width
|
||||
y: configbar.height
|
||||
height: parent.height-configbar.height-mm
|
||||
currentIndex: configbar.currentIndex
|
||||
// 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":""
|
||||
}
|
||||
MouseArea{
|
||||
anchors.fill:parent
|
||||
onClicked:newstypemenu.popup()
|
||||
|
||||
Loader{
|
||||
id: syncLoader
|
||||
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
|
||||
}
|
||||
}
|
||||
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
|
||||
x: root.fontFactor*osSettings.bigFontSize; y:14*root.fontFactor*osSettings.bigFontSize
|
||||
}
|
||||
|
||||
Slider{ id: maxNews
|
||||
x:6*root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize;
|
||||
width: root.width/2;height:2*root.fontFactor*osSettings.bigFontSize
|
||||
from: 0;to:2000; stepSize: 100
|
||||
value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
color: "#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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
CheckBox{
|
||||
id: nsfwCheckbox
|
||||
x: root.fontFactor*osSettings.bigFontSize
|
||||
y: 20*root.fontFactor*osSettings.bigFontSize
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
text: qsTr("Hide #nsfw?")
|
||||
checked:(globaloptions["hide_nsfw"]==1)?true:false
|
||||
onClicked: {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MButton {
|
||||
anchors.right: closeButton.left; anchors.rightMargin: mm;
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin:root.fontFactor*osSettings.bigFontSize
|
||||
width: 2*root.fontFactor*osSettings.bigFontSize;
|
||||
text: "?"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{
|
||||
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
|
||||
Loader{
|
||||
id: startLoader
|
||||
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
|
@ -165,7 +121,7 @@ Page{
|
|||
// height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width: 2*root.fontFactor*osSettings.bigFontSize;
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin:root.fontFactor*osSettings.bigFontSize
|
||||
anchors.topMargin:2*root.fontFactor*osSettings.bigFontSize
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
text: "\uf057"
|
||||
|
|
82
source-linux/qml/configqml/ConfigStartPage.qml
Normal file
82
source-linux/qml/configqml/ConfigStartPage.qml
Normal 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;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Page{
|
||||
|
@ -43,8 +44,9 @@ Page{
|
|||
textFormat: Text.RichText
|
||||
width: root.width-mm
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
color:Material.primaryTextColor
|
||||
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>"+
|
||||
"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>"+
|
||||
|
|
|
@ -32,11 +32,12 @@
|
|||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/configqml"
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
||||
Rectangle{
|
||||
color: "#EEEEEE" //Material.Grey
|
||||
color: Material.dialogColor
|
||||
property string adapter: ""
|
||||
width: parent.width
|
||||
height: 4*root.fontFactor*osSettings.bigFontSize
|
||||
|
|
|
@ -31,17 +31,18 @@
|
|||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/configqml"
|
||||
import "qrc:/qml/genericqml"
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
||||
Rectangle{
|
||||
color:"white"
|
||||
Page{
|
||||
//color:"white"
|
||||
width:root.width
|
||||
height: root.height
|
||||
|
||||
//height:root.height
|
||||
Text {
|
||||
Label {
|
||||
text: qsTr("Sync Interval (0=None)")
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
//visible: false
|
||||
|
@ -58,11 +59,14 @@ Rectangle{
|
|||
Rectangle{
|
||||
x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize;
|
||||
width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize;
|
||||
color: Material.dialogColor
|
||||
radius: 0.5*mm
|
||||
TextEdit{
|
||||
id: messageIntervalField
|
||||
anchors.fill: parent
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
verticalAlignment:TextEdit.AlignRight
|
||||
color: Material.primaryTextColor
|
||||
text:messageIntervalSlider.value
|
||||
focus: 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;
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
text:qsTr("Min.")
|
||||
|
@ -99,15 +103,15 @@ Rectangle{
|
|||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
id:closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: osSettings.bigFontSize
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
width: 2*root.fontFactor*osSettings.bigFontSize;
|
||||
text: "\uf057"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{rootstackView.pop()}
|
||||
}
|
||||
// MButton{
|
||||
// id:closeButton
|
||||
// anchors.top: parent.top
|
||||
// anchors.topMargin: osSettings.bigFontSize
|
||||
// anchors.right: parent.right
|
||||
// anchors.rightMargin: 1*mm
|
||||
// width: 2*root.fontFactor*osSettings.bigFontSize;
|
||||
// text: "\uf057"
|
||||
// font.pointSize: osSettings.bigFontSize
|
||||
// onClicked:{rootstackView.pop()}
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.11
|
||||
import QtQuick.LocalStorage 2.0
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
|
@ -119,12 +120,13 @@ Item{
|
|||
Rectangle {
|
||||
width: friendsView.width
|
||||
height: childrenRect.height
|
||||
//color: "lightsteelblue"
|
||||
color: Material.dialogColor //color: "lightsteelblue"
|
||||
required property string section
|
||||
Text {
|
||||
color: Material.secondaryTextColor
|
||||
text: parent.section
|
||||
font.bold: true
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +136,7 @@ Item{
|
|||
x:mm
|
||||
y:updateFriendsButton.height+mm
|
||||
width:friendsGridTab.width-2*mm
|
||||
height:friendsGridTab.height-(updateFriendsButton.height+5*mm)
|
||||
height:friendsGridTab.height-(updateFriendsButton.height+7*mm)
|
||||
clip: true
|
||||
spacing: 2
|
||||
function processContactSelection(contactobject){showContactdetails(contactobject)}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.11
|
||||
import QtQuick.LocalStorage 2.0
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
|
@ -41,7 +42,7 @@ import "qrc:/qml/genericqml"
|
|||
|
||||
Rectangle {
|
||||
y:1
|
||||
color: "white"
|
||||
color: Material.backgroundColor//"white"
|
||||
|
||||
function showContactdetails(contact){
|
||||
// rootstack.currentIndex=0;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/js/news.js" as Newsjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
@ -55,7 +56,7 @@ Item {
|
|||
height: parent.height-mm
|
||||
radius: 0.5*mm
|
||||
border.color: "grey"
|
||||
color:"white"
|
||||
color:Material.backgroundColor//"white"
|
||||
|
||||
// Image {
|
||||
// id: photoImage
|
||||
|
@ -72,13 +73,14 @@ Item {
|
|||
width: wrapper.width-2
|
||||
height: 3*root.fontFactor*osSettings.bigFontSize
|
||||
//border.color: "light grey"
|
||||
TextInput {
|
||||
id: namelabel
|
||||
anchors.fill: parent
|
||||
readOnly: true
|
||||
text: group.new?"":group.groupname
|
||||
color: "#303030"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
color:Material.backgroundColor
|
||||
TextInput {
|
||||
id: namelabel
|
||||
anchors.fill: parent
|
||||
readOnly: true
|
||||
text: group.new?"":group.groupname
|
||||
color: Material.secondaryTextColor//"#303030"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,6 +130,7 @@ Item {
|
|||
Rectangle{
|
||||
id: detailsrectangle
|
||||
anchors.top: namelabelRect.bottom
|
||||
color: Material.backgroundColor
|
||||
//anchors.topMargin: mm
|
||||
x:mm
|
||||
width: parent.width-2*mm
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/genericqml"
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
||||
|
@ -38,7 +39,7 @@ Rectangle {
|
|||
// width:parent.width-2*mm
|
||||
// height:parent.height-14*mm
|
||||
anchors.fill:parent
|
||||
color:"white"
|
||||
color: Material.backgroundColor//color:"white"
|
||||
property var profile:({})
|
||||
property var attachImageURLs:[]
|
||||
property var createdAtDate: new Date(profile.friendica_owner.created_at)
|
||||
|
@ -196,7 +197,7 @@ Rectangle {
|
|||
anchors.topMargin: 0
|
||||
anchors.left: photoImage.left
|
||||
wrapMode: Text.Wrap
|
||||
color: "#303030"
|
||||
color: Material.secondaryTextColor//"#303030"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
anchors.top: photoImage.bottom
|
||||
}
|
||||
|
@ -207,12 +208,13 @@ Rectangle {
|
|||
Rectangle{
|
||||
id:profileRect
|
||||
width:profileView.width
|
||||
color: Material.backgroundColor
|
||||
height: 5*mm+profiletextfield.height
|
||||
Text{
|
||||
y:mm
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
text:"<b>"+qsTr("profile id")+": </b> "+profileid+"<br>"
|
||||
color:"black"
|
||||
color:Material.primaryTextColor//"black"
|
||||
}
|
||||
Text{
|
||||
id:profiletextfield
|
||||
|
@ -222,7 +224,7 @@ Rectangle {
|
|||
wrapMode: Text.Wrap
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
text:profiletext
|
||||
color:"black"
|
||||
color:Material.primaryTextColor//"black"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -230,6 +232,7 @@ Rectangle {
|
|||
id:textcomponent
|
||||
Text{
|
||||
id:namelabeltext
|
||||
color:Material.primaryTextColor
|
||||
width: namelabelflickable.width
|
||||
height: implicitHeight
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
|
|
|
@ -33,6 +33,7 @@ import QtQuick 2.5
|
|||
import QtQuick.LocalStorage 2.0
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.11
|
||||
import QSystemTrayIcon 1.0
|
||||
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)}
|
||||
width: globaloptions.hasOwnProperty("appWidth")?globaloptions.appWidth:osSettings.appWidth
|
||||
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 login: Service.readActiveConfig(db)
|
||||
property real fontFactor: root.font.pixelSize/root.font.pointSize
|
||||
|
@ -72,6 +73,10 @@ ApplicationWindow{
|
|||
property var contactposts:[]
|
||||
property bool imagePicking: false
|
||||
|
||||
|
||||
Material.theme: Material.System // globaloptions.view_darkmode==1?Material.Dark:Material.Light
|
||||
color: Material.backgroundColor
|
||||
|
||||
function onLoginChanged(login){
|
||||
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
|
||||
else{
|
||||
|
@ -138,14 +143,14 @@ ApplicationWindow{
|
|||
|
||||
onClosing: {
|
||||
if (rootstack.currentIndex==0){
|
||||
newstab.active=true;
|
||||
newstab.active=true;print("newstabstatus "+newstab.newstabstatus + " newsViewType " +globaloptions.newsViewType)
|
||||
if (newstab.newstabstatus!=globaloptions.newsViewType){
|
||||
newstab.newstabstatus=globaloptions.newsViewType;
|
||||
if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
|
||||
newsSignal(dbnews)
|
||||
})}
|
||||
else{
|
||||
Newsjs.chatsfromdb(db,login.username,function(dbnews){
|
||||
Newsjs.chatsfromdb(db,login.username,0,function(dbnews){
|
||||
newsSignal(dbnews)
|
||||
})}
|
||||
close.accepted=false;
|
||||
|
@ -159,13 +164,13 @@ ApplicationWindow{
|
|||
root.pop();
|
||||
close.accepted=false
|
||||
}
|
||||
else{
|
||||
Service.cleanNews(root.db,function(){
|
||||
Service.cleanHashtags(root.db,function(){
|
||||
Service.cleanContacts(root.login,root.db,function(){
|
||||
else{print("Closing");
|
||||
Service.cleanNews(root.db,function(){print("cleannews");
|
||||
Service.cleanHashtags(root.db,function(){print("cleanhashtags");
|
||||
Service.cleanContacts(root.login,root.db,function(){print("cleancontacts");
|
||||
if (osSettings.osType=="Android"){
|
||||
Qt.quit()}
|
||||
else{
|
||||
else{print("show systray")
|
||||
systemTray.show();
|
||||
systemTray.showMessage("",qsTr("Background Sync\n Rightclick or Middleclick to Quit"),"",5000)
|
||||
root.hide()
|
||||
|
@ -180,13 +185,16 @@ ApplicationWindow{
|
|||
}
|
||||
|
||||
|
||||
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundColor
|
||||
}
|
||||
|
||||
header: ToolBar{
|
||||
position: wideScreen?ToolBar.Header:ToolBar.Footer
|
||||
background: Rectangle{
|
||||
anchors.fill: parent
|
||||
color: "#EEEEEE"//"#F8F8F8"
|
||||
color: Material.backgroundDimColor//"#EEEEEE"//"#F8F8F8"
|
||||
}
|
||||
RowLayout{
|
||||
anchors.fill: parent
|
||||
|
@ -206,28 +214,28 @@ ApplicationWindow{
|
|||
text: "\uf03a"
|
||||
background:Rectangle{
|
||||
anchors.fill: parent
|
||||
color: "#EEEEEE"
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
}
|
||||
TabButton {
|
||||
text: "\uf0c0"
|
||||
background:Rectangle{
|
||||
anchors.fill: parent
|
||||
color: "#EEEEEE"
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
}
|
||||
TabButton {
|
||||
text: "\uf03e"
|
||||
background:Rectangle{
|
||||
anchors.fill: parent
|
||||
color: "#EEEEEE"
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
}
|
||||
TabButton {
|
||||
text: "\uf073"
|
||||
background:Rectangle{
|
||||
anchors.fill: parent
|
||||
color: "#EEEEEE"
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -287,10 +295,10 @@ StackView{id:rootstackView
|
|||
Qt.quit()
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
Component.onCompleted: {print("systray completed")
|
||||
icon = iconTray
|
||||
toolTip = qsTr("Click to open Friendiqa")
|
||||
hide()
|
||||
//&hide()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -298,6 +306,17 @@ StackView{id:rootstackView
|
|||
Component.onCompleted: {
|
||||
onLoginChanged(login);
|
||||
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"){
|
||||
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
|
||||
var IntentReceiverQml = component.createObject(root);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
Rectangle{
|
||||
id: blueButton
|
||||
width: Math.max(mainText.width+2*mm,5*mm)
|
||||
|
@ -65,7 +66,7 @@ Rectangle{
|
|||
|
||||
states: [
|
||||
State { name: "Pressed"
|
||||
PropertyChanges { target: blueButton; color: "white"} }
|
||||
PropertyChanges { target: blueButton; color: Material.buttonColor} }
|
||||
]
|
||||
transitions: [
|
||||
Transition { to:"*"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Item {
|
||||
|
@ -45,8 +46,8 @@ Item {
|
|||
width:parent.width
|
||||
height: parent.height//8*mm
|
||||
radius: 0.5*mm
|
||||
border.color: "grey"
|
||||
color:"white"
|
||||
border.color: Material.backgroundDimColor// "grey"
|
||||
color: Material.backgroundColor//"white"
|
||||
Image {
|
||||
id: photoImage
|
||||
x:0.5*mm
|
||||
|
@ -70,7 +71,7 @@ Item {
|
|||
height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm
|
||||
text: contact.name
|
||||
elide: contentWidth>wrapper.width-4*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
|
||||
color: "#303030"
|
||||
color: Material.secondaryTextColor//"#303030"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
Label {
|
||||
|
@ -79,7 +80,7 @@ Item {
|
|||
height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm
|
||||
text: "(@"+contact.screen_name+")"
|
||||
elide: contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
|
||||
color: "#303030"
|
||||
color: Material.secondaryTextColor//"#303030"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
Label {
|
||||
|
@ -88,7 +89,7 @@ Item {
|
|||
height: 2*root.fontFactor*osSettings.systemFontSize//2.5*mm
|
||||
text: Qt.atob(contact.description)!=""?contact.description:""
|
||||
elide:contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
|
||||
color: "#303030"
|
||||
color: Material.secondaryTextColor//"#303030"
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import Qt.labs.folderlistmodel 2.1
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
|
@ -40,6 +41,7 @@ Rectangle{
|
|||
id:imageDialog
|
||||
z:2
|
||||
border.color: "grey"
|
||||
color: Material.backgroundColor
|
||||
width: parent.width-4*mm
|
||||
height:parent.height-12*mm
|
||||
x:2*mm
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/configqml"
|
||||
|
||||
Rectangle{
|
||||
|
@ -39,6 +40,7 @@ Rectangle{
|
|||
// height: root.height-bar.height
|
||||
//y: bar.height
|
||||
signal opened()
|
||||
color: Material.backgroundColor
|
||||
|
||||
LeftDrawerScrollview{
|
||||
width:parent.width-mm
|
||||
|
@ -49,7 +51,7 @@ Rectangle{
|
|||
width: 1
|
||||
height: leftDrawer.height
|
||||
anchors.right: leftDrawer.right
|
||||
color: "#EEEEEE"
|
||||
color: Material.dialogColor//"#EEEEEE"
|
||||
}
|
||||
Component.onCompleted: {opened();}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import QtQuick 2.6
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
Button{
|
||||
id: mButton
|
||||
property alias color: bg.color
|
||||
|
@ -38,5 +39,7 @@ Button{
|
|||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
//color: Material.grey
|
||||
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}
|
||||
}
|
||||
|
|
|
@ -30,12 +30,14 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle{
|
||||
id:permissionDialog
|
||||
color: Material.backgroundColor
|
||||
// x: mm
|
||||
width: parent.width-5*mm
|
||||
height:root.height/3
|
||||
|
@ -63,6 +65,7 @@ Rectangle{
|
|||
Text{
|
||||
x:0.5*mm
|
||||
y:0.5*mm
|
||||
color: Material.primaryTextColor
|
||||
text: qsTr("Friends")
|
||||
}
|
||||
ListView {
|
||||
|
@ -82,18 +85,18 @@ Rectangle{
|
|||
id:contactItem
|
||||
Rectangle{
|
||||
id:contactitemRect
|
||||
color: Material.backgroundColor
|
||||
width:contactView.width
|
||||
height: 5*mm
|
||||
radius: 0.5*mm
|
||||
property string contactstatus
|
||||
onContactstatusChanged:{
|
||||
if(contactstatus=="positive"){contactitemRect.color="light green"}
|
||||
else if (contactstatus=="negative"){contactitemRect.color= "ffe6e6"}
|
||||
else{contactitemRect.color= "white"}}
|
||||
color: "white"
|
||||
border.color:"grey"
|
||||
else if (contactstatus=="negative"){contactitemRect.color= "red"}
|
||||
else{contactitemRect.color= Material.backgroundColor}}
|
||||
border.color:Material.frameColor
|
||||
Text{
|
||||
color:"grey"
|
||||
color: Material.primaryTextColor
|
||||
text:contact.screen_name
|
||||
}
|
||||
MouseArea{
|
||||
|
@ -122,6 +125,7 @@ Rectangle{
|
|||
}
|
||||
}
|
||||
Text{
|
||||
color: Material.primaryTextColor
|
||||
x:contactView.width+2*mm
|
||||
y:0.5*mm
|
||||
text: qsTr("Groups")
|
||||
|
@ -149,14 +153,14 @@ Rectangle{
|
|||
property string groupstatus:"neutral"
|
||||
onGroupstatusChanged:
|
||||
{if(groupstatus=="positive"){groupitemRect.color="light green"}
|
||||
else if (groupstatus=="negative"){groupitemRect.color= "#ffe6e6"}
|
||||
else{groupitemRect.color= "white"}}
|
||||
color: "white"
|
||||
border.color:"grey"
|
||||
Text{
|
||||
color:"grey"
|
||||
else if (groupstatus=="negative"){groupitemRect.color= "red"}
|
||||
else{groupitemRect.color= Material.backgroundColor}}
|
||||
color: Material.backgroundColor
|
||||
border.color: Material.frameColor
|
||||
Text{
|
||||
color: Material.primaryTextColor
|
||||
text:group.groupname
|
||||
}
|
||||
}
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked:{
|
||||
|
@ -188,7 +192,7 @@ Rectangle{
|
|||
var perms=[];
|
||||
perms.push(contact_allow,contact_deny,group_allow,group_deny);
|
||||
Service.savePermissions(db,perms)
|
||||
}
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
x:contactView.width+2*mm
|
||||
|
@ -207,7 +211,7 @@ Rectangle{
|
|||
if (contact_allow.indexOf(contacts[name].cid)>-1){contactstatus="positive"}
|
||||
else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"}
|
||||
contactModel.append({"contact":contacts[name],"contactstatus":contactstatus})
|
||||
}},"isFriend",1);
|
||||
}},"isFriend",1,"name");
|
||||
|
||||
Helperjs.readData(db,"groups",login.username,function(owngroups){
|
||||
for (var number in owngroups){
|
||||
|
|
|
@ -31,39 +31,30 @@
|
|||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
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 {
|
||||
id:searchComponent
|
||||
color: Material.backgroundColor
|
||||
radius:0.5*mm
|
||||
/* anchors.left: parent.left
|
||||
anchors.leftMargin:mm
|
||||
anchors.top:parent.top
|
||||
anchors.topMargin: 0.5*mm
|
||||
width:parent.width-2*mm
|
||||
height: 4*mm *///Math.max( searchText.contentHeight,5*mm)
|
||||
|
||||
Rectangle{
|
||||
color: "#EEEEEE"
|
||||
radius:0.5*mm
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin:mm
|
||||
anchors.top:parent.top
|
||||
anchors.topMargin: 0.5*mm
|
||||
width:parent.width-2*mm
|
||||
height: 4*mm //Math.max( searchText.contentHeight,5*mm)
|
||||
|
||||
TextInput {
|
||||
id: searchText
|
||||
focus: true
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
wrapMode: Text.Wrap
|
||||
anchors.fill: parent
|
||||
selectByMouse: true
|
||||
cursorVisible: false
|
||||
onEditingFinished:{ if (displayText!=""){search(displayText)};searchComponent.destroy()}
|
||||
//onHeightChanged: newsView.contentY+=4.5*mm
|
||||
|
||||
}
|
||||
Component.onCompleted: searchText.forceActiveFocus()
|
||||
|
||||
TextInput {
|
||||
id: searchText
|
||||
color: Material.primaryTextColor
|
||||
focus: true
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
wrapMode: Text.Wrap
|
||||
anchors.fill: parent
|
||||
selectByMouse: true
|
||||
cursorVisible: false
|
||||
onEditingFinished:{ if (displayText!=""){search(displayText)};searchComponent.destroy()}
|
||||
}
|
||||
|
||||
Component.onCompleted: searchText.forceActiveFocus()
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/js/news.js" as Newsjs
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
@ -140,9 +141,9 @@ Page {
|
|||
|
||||
Component { id: contactHeader
|
||||
Rectangle{
|
||||
border.color: "#EEEEEE"
|
||||
border.color: Material.backgroundDimColor//"#EEEEEE"
|
||||
border.width: 1
|
||||
color:"white"
|
||||
color: Material.backgroundColor//"white"
|
||||
width:contactView.width
|
||||
height: contactView.width<35*root.fontFactor*osSettings.systemFontSize?(profileImage.height+namelabel.height+detailtext.height+7*mm):Math.max(profileImage.height,(buttonflow.height+namelabel.height+detailtext.height))+7*mm
|
||||
//height: wrapper.height
|
||||
|
@ -170,7 +171,7 @@ Page {
|
|||
y: mm
|
||||
spacing:4
|
||||
|
||||
BlueButton{
|
||||
MButton{
|
||||
id:photobutton
|
||||
height: 6*mm
|
||||
width: 8*mm
|
||||
|
@ -187,7 +188,7 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
BlueButton{
|
||||
MButton{
|
||||
id:dmbutton
|
||||
height: 6*mm
|
||||
width: 8*mm
|
||||
|
@ -200,7 +201,7 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
BlueButton{
|
||||
MButton{
|
||||
id:eventbutton
|
||||
visible:(contact.network=="dfrn")
|
||||
height: 6*mm
|
||||
|
@ -214,7 +215,7 @@ Page {
|
|||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
BlueButton{
|
||||
MButton{
|
||||
id:approvebutton
|
||||
visible:(contact.hasOwnProperty("acct"))
|
||||
height: 6*mm
|
||||
|
@ -229,7 +230,7 @@ Page {
|
|||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
BlueButton{
|
||||
MButton{
|
||||
id:rejectbutton
|
||||
visible:(contact.hasOwnProperty("acct"))
|
||||
height: 6*mm
|
||||
|
@ -243,7 +244,7 @@ Page {
|
|||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
BlueButton{
|
||||
MButton{
|
||||
id:ignorebutton
|
||||
visible:(contact.hasOwnProperty("acct"))
|
||||
height: 6*mm
|
||||
|
@ -257,7 +258,7 @@ Page {
|
|||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
BlueButton{
|
||||
MButton{
|
||||
id:followbutton
|
||||
visible:(contact.isFriend==0)
|
||||
height: 6*mm
|
||||
|
@ -276,7 +277,7 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
BlueButton{
|
||||
MButton{
|
||||
id:unfollowbutton
|
||||
visible:(contact.isFriend==1)
|
||||
height: 6*mm
|
||||
|
@ -301,7 +302,7 @@ Page {
|
|||
height: implicitHeight
|
||||
text:contact.name+" (@"+contact.screen_name+")"
|
||||
wrapMode: Text.Wrap//elide:Text.ElideRight
|
||||
color: "#303030"
|
||||
color: Material.primaryTextColor//"#303030"
|
||||
font.pointSize: 1.2*osSettings.bigFontSize
|
||||
font.family: "Noto Sans"
|
||||
anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom
|
||||
|
@ -320,6 +321,7 @@ Page {
|
|||
font.family: "Noto Sans"
|
||||
textFormat:Text.RichText
|
||||
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+
|
||||
"<br> <b>"+qsTr("URL")+":</b> <a href='"+ contact.url+"'>"+contact.url+"</a><br>"+
|
||||
connectUrl+ "<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())
|
||||
|
@ -341,7 +343,7 @@ Page {
|
|||
}
|
||||
function onSuccess(data,api){
|
||||
Service.processNews(api,data)
|
||||
replySignal("")
|
||||
//replySignal("")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,9 +352,8 @@ Page {
|
|||
function onContactpostsChanged(){
|
||||
if (root.contactposts.length>0&&root.contactposts[0]!=null){profileimagesource=root.contactposts[0].friendica_author.profile_image_url_large}
|
||||
contactBusy.running=false;
|
||||
contactModel.clear();
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,14 +31,15 @@
|
|||
|
||||
// List of people from Friendica Activities
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle {
|
||||
id:activitiesRectangle
|
||||
property var activitymembers
|
||||
color: "white"
|
||||
border.color: "light grey"
|
||||
color: Material.dialogColor
|
||||
border.color: Material.frameColor
|
||||
radius:0.5*mm
|
||||
width:root.width/2
|
||||
height:Math.min(root.height/2,(10*mm+6*activitymembers.length*mm))
|
||||
|
@ -53,50 +54,54 @@ Rectangle {
|
|||
spacing: 0
|
||||
model: activitiesModel
|
||||
delegate: activitiesContact
|
||||
}
|
||||
}
|
||||
|
||||
ListModel{id: activitiesModel}
|
||||
ListModel{id: activitiesModel}
|
||||
|
||||
Component { id:activitiesContact
|
||||
Rectangle{
|
||||
border.color: "#EEEEEE"
|
||||
border.width: 1
|
||||
radius:0.5*mm
|
||||
width:parent.width
|
||||
height:6*mm
|
||||
Image {
|
||||
id: contactImage
|
||||
x:1
|
||||
y:1
|
||||
width: 5*mm
|
||||
height:5*mm
|
||||
source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
|
||||
onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
|
||||
}
|
||||
Text{
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
anchors.left: contactImage.right
|
||||
anchors.margins: 1*mm
|
||||
text:contact.name
|
||||
}
|
||||
Component {
|
||||
id:activitiesContact
|
||||
Rectangle{
|
||||
border.color: Material.frameColor
|
||||
color: Material.backgroundColor
|
||||
border.width: 1
|
||||
radius:0.5*mm
|
||||
width:parent.width
|
||||
height:6*mm
|
||||
Image {
|
||||
id: contactImage
|
||||
x:1
|
||||
y:1
|
||||
width: 5*mm
|
||||
height:5*mm
|
||||
source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
|
||||
onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
|
||||
}
|
||||
Text{
|
||||
color: Material.primaryTextColor
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
anchors.left: contactImage.right
|
||||
anchors.margins: 1*mm
|
||||
text:contact.name
|
||||
}
|
||||
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked:{showContact(contact)}
|
||||
}
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
MButton {
|
||||
id: closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
color:"white"
|
||||
text: "\uf057"// qsTr("Close")
|
||||
onClicked: {
|
||||
activitiesRectangle.destroy()
|
||||
}
|
||||
id: closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
//color:"white"
|
||||
text: "\uf057"
|
||||
onClicked: {
|
||||
activitiesRectangle.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
|
|
|
@ -30,17 +30,19 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
Rectangle {
|
||||
id:hasgtagRectangle
|
||||
color: "light grey"
|
||||
id:hashtagRectangle
|
||||
color:Material.dialogColor
|
||||
property alias text: hashtagText.text
|
||||
radius:0.3*mm
|
||||
width:hashtagText.contentWidth+mm
|
||||
height:2.5* mm
|
||||
height:root.fontFactor*osSettings.bigFontSize
|
||||
Text{
|
||||
id:hashtagText
|
||||
font.pixelSize: 1.5*mm
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
color: Material.secondaryTextColor
|
||||
anchors.centerIn: parent
|
||||
anchors.margins: 0.5*mm
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
// message with buttons
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
//import QtQuick.Dialogs 1.2
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/js/smiley.js" as Smileyjs
|
||||
|
@ -41,7 +42,7 @@ import "qrc:/qml/genericqml"
|
|||
|
||||
|
||||
Rectangle{
|
||||
color:"#EEEEEE"
|
||||
color:Material.dialogColor//"#EEEEEE"
|
||||
width:parent.width
|
||||
height: conversation || (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0
|
||||
id:messageSend
|
||||
|
@ -221,7 +222,7 @@ Rectangle{
|
|||
}
|
||||
|
||||
Rectangle{
|
||||
color: "white"
|
||||
color: Material.backgroundColor//"white"
|
||||
radius: 0.5*mm
|
||||
x:mm
|
||||
width: parent.width-2*mm
|
||||
|
@ -242,6 +243,8 @@ Rectangle{
|
|||
onLinkActivated:{Qt.openUrlExternally(link)}
|
||||
onActiveFocusChanged:{//print(placeholder)
|
||||
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(parentId==""){setParent(conversationModel.get(0).newsitemobject);}
|
||||
messageSend.state="conversation";
|
||||
|
|
|
@ -30,11 +30,12 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
Rectangle{
|
||||
id: moreComments
|
||||
width: parent.width
|
||||
height: 5*mm
|
||||
color:"white"
|
||||
color:Material.background//"white"
|
||||
property int comments:0
|
||||
// border.color:"grey"
|
||||
// border.width:1
|
||||
|
|
|
@ -54,6 +54,8 @@ AnimatedImage {id:gif;
|
|||
}
|
||||
MouseArea {anchors.fill:parent;
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,8 +30,9 @@
|
|||
// 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.Material 2.12
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Page{
|
||||
|
@ -64,8 +65,12 @@ Page{
|
|||
anchors.topMargin: 1*mm
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
color: Material.dialogColor
|
||||
text: "\uf057"
|
||||
onClicked: {if (rootstackView.depth>1){ rootstackView.pop()}
|
||||
onClicked: {
|
||||
if (rootstackView.depth>1){
|
||||
roottoolbar.visible=true;
|
||||
rootstackView.pop()}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
|
@ -85,16 +90,17 @@ Page{
|
|||
running: realImage.status==Image.Loading
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
PinchArea {
|
||||
id:imagePinch
|
||||
pinch.target: realImage
|
||||
anchors.fill: realImage
|
||||
pinch.minimumScale: 0.1
|
||||
pinch.maximumScale: 10
|
||||
enabled: 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
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/news.js" as Newsjs
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
@ -40,6 +41,7 @@ Rectangle{
|
|||
//anchors.fill: parent
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
color: Material.backgroundColor
|
||||
property string updateMethodNews: "refresh"
|
||||
property var allchats: ({})
|
||||
property int lastnewsid:0
|
||||
|
@ -101,9 +103,9 @@ Rectangle{
|
|||
newsView.anchors.topMargin=7*mm;
|
||||
newstab.newstabstatus="Search";
|
||||
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 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;
|
||||
case "refresh":
|
||||
if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){
|
||||
|
@ -173,8 +175,9 @@ Rectangle{
|
|||
|
||||
function getOldNews(){
|
||||
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;
|
||||
}else{
|
||||
var lastnews_id=oldnewsitemobject.created_at;
|
||||
|
@ -257,10 +260,12 @@ Rectangle{
|
|||
Component { id:footerComponent
|
||||
Rectangle{
|
||||
border.color: "#EEEEEE"
|
||||
color: Material.dialogColor
|
||||
border.width: 1
|
||||
width:newsView.width
|
||||
height:6*mm
|
||||
Text{
|
||||
color: Material.primaryTextColor
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
anchors.centerIn: parent
|
||||
text:qsTr("More")
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
import QtMultimedia 5.8
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Page{
|
||||
id:newsvideofullscreen
|
||||
|
@ -61,12 +61,12 @@ Page{
|
|||
autoLoad: true
|
||||
autoPlay: true
|
||||
audioRole: MediaPlayer.VideoRole
|
||||
MouseArea {
|
||||
anchors.fill:parent;
|
||||
onClicked:{
|
||||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
// MouseArea {
|
||||
// anchors.fill:parent;
|
||||
// onClicked:{
|
||||
// rootstackView.pop()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
ProgressBar{
|
||||
|
@ -96,6 +96,20 @@ Page{
|
|||
visible:video.playbackState!=MediaPlayer.StoppedState
|
||||
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
|
||||
// width: parent.width
|
||||
// height: 3*mm
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/news.js" as Newsjs
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
@ -63,12 +64,14 @@ Item {
|
|||
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{
|
||||
width:newsitem.width
|
||||
height:newsitem.height-1
|
||||
color: "white"
|
||||
color: Material.background//"white"
|
||||
|
||||
Column {
|
||||
id:toprow //newscolumn
|
||||
|
@ -112,20 +115,20 @@ Item {
|
|||
|
||||
Label {
|
||||
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}
|
||||
font.pointSize: 0.6*osSettings.systemFontSize
|
||||
}
|
||||
Label {
|
||||
id:createdAtLabel
|
||||
color: "grey"
|
||||
color: Material.secondaryTextColor//"grey"
|
||||
font.pointSize: 0.6*osSettings.systemFontSize
|
||||
horizontalAlignment: Label.AlignRight
|
||||
text: " \u00B7 "+getDateDiffString(newsitemobject.dateDiff) + " " +qsTr("ago")
|
||||
}
|
||||
Label {
|
||||
id:replytoLabel
|
||||
color: "grey"
|
||||
color: Material.secondaryTextColor//"grey"
|
||||
font.pointSize: 0.6*osSettings.systemFontSize
|
||||
font.family: "Noto Sans"
|
||||
horizontalAlignment: Label.AlignRight
|
||||
|
@ -138,10 +141,11 @@ Item {
|
|||
MouseArea{id: itemBody
|
||||
width: toprow.width-2
|
||||
height: itemMessage.height
|
||||
onPressAndHold: {pushConversation()}
|
||||
//onPressAndHold: {pushConversation()}
|
||||
onClicked: {pushConversation()}
|
||||
Text {
|
||||
color: "#404040"
|
||||
linkColor: "light green"
|
||||
color: Material.primaryTextColor//"#404040"
|
||||
linkColor: Material.accentColor//"light green"
|
||||
id: itemMessage
|
||||
textFormat: Text.RichText
|
||||
font.family: "Noto Sans"
|
||||
|
@ -194,9 +198,9 @@ Item {
|
|||
anchors.bottom: toprow.bottom//itemMessage.bottom
|
||||
visible: toprow.implicitHeight>3/4*root.height || newsitemobject.nsfw//messageColumn.implicitHeight>3/4*root.height || newsitemobject.nsfw//itemMessage.implicitHeight>3/4*root.height
|
||||
text:"\uf078"
|
||||
fontColor:"grey"
|
||||
fontColor: Material.secondaryTextColor//"grey"
|
||||
border.color: "transparent"
|
||||
color:"white"
|
||||
color: Material.backgroundColor//"white"
|
||||
// gradient: Gradient {
|
||||
// GradientStop { position: 0.0; color: "transparent" }
|
||||
// GradientStop { position: 0.5; color: "white" }
|
||||
|
@ -220,7 +224,7 @@ Item {
|
|||
width:parent.width
|
||||
spacing:mm
|
||||
|
||||
Label{color: "grey"
|
||||
Label{color: Material.secondaryTextColor//"grey"
|
||||
height:3.5*mm
|
||||
font.pointSize: 0.75*osSettings.systemFontSize
|
||||
text: friendica_activities_view.likeText
|
||||
|
@ -229,7 +233,7 @@ Item {
|
|||
onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
|
||||
}
|
||||
}
|
||||
Label{color: "grey"
|
||||
Label{color: Material.secondaryTextColor//"grey"
|
||||
height:3.5*mm
|
||||
font.pointSize: 0.75*osSettings.systemFontSize
|
||||
text: friendica_activities_view.dislikeText
|
||||
|
@ -238,7 +242,7 @@ Item {
|
|||
onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
|
||||
}
|
||||
}
|
||||
Label{color: "grey"
|
||||
Label{color: Material.secondaryTextColor//"grey"
|
||||
height:3.5*mm
|
||||
font.pointSize: 0.75*osSettings.systemFontSize
|
||||
text: friendica_activities_view.attendyesText
|
||||
|
@ -246,7 +250,7 @@ Item {
|
|||
anchors.fill: parent
|
||||
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)}
|
||||
}}
|
||||
Label{color: "grey"
|
||||
Label{color: Material.secondaryTextColor//"grey"
|
||||
height:3.5*mm
|
||||
font.pointSize: 0.75*osSettings.systemFontSize
|
||||
text: friendica_activities_view.attendnoText
|
||||
|
@ -255,7 +259,7 @@ Item {
|
|||
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)}
|
||||
}
|
||||
}
|
||||
Label{color: "grey"
|
||||
Label{color: Material.secondaryTextColor//"grey"
|
||||
height:3.5*mm
|
||||
font.pointSize: 0.75*osSettings.systemFontSize
|
||||
text: friendica_activities_view.attendmaybeText
|
||||
|
@ -266,7 +270,7 @@ Item {
|
|||
}
|
||||
Label{
|
||||
id:attendLabel
|
||||
color: "grey"
|
||||
color: Material.secondaryTextColor//"grey"
|
||||
height:3.5*mm
|
||||
font.pointSize: 0.75*osSettings.systemFontSize
|
||||
horizontalAlignment: Label.AlignRight
|
||||
|
@ -287,11 +291,12 @@ Item {
|
|||
indicator: Rectangle{
|
||||
implicitWidth: newsitem.width/5 //10*mm
|
||||
implicitHeight:root.fontFactor*osSettings.bigFontSize
|
||||
color:"transparent"
|
||||
Text{
|
||||
anchors.centerIn: parent
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
font.family:fontAwesome.name
|
||||
color:likeCheckbox.checked?"black": "grey"
|
||||
color:likeCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
|
||||
text:likeCheckbox.checked?"\uf118"+"!":"\uf118"
|
||||
}
|
||||
}
|
||||
|
@ -314,11 +319,12 @@ Item {
|
|||
indicator: Rectangle{
|
||||
implicitWidth: newsitem.width/5 //10*mm
|
||||
implicitHeight:root.fontFactor*osSettings.bigFontSize
|
||||
color:"transparent"
|
||||
Text{
|
||||
anchors.centerIn: parent
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
font.family:fontAwesome.name
|
||||
color:dislikeCheckbox.checked?"black": "grey"
|
||||
color:dislikeCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
|
||||
text: dislikeCheckbox.checked?"\uf119"+"!":"\uf119"
|
||||
}
|
||||
}
|
||||
|
@ -341,11 +347,12 @@ Item {
|
|||
indicator:Rectangle{
|
||||
implicitWidth: newsitem.width/5 //10*mm
|
||||
implicitHeight:root.fontFactor*osSettings.bigFontSize
|
||||
color:"transparent"
|
||||
Text{
|
||||
anchors.centerIn: parent
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
font.family:fontAwesome.name
|
||||
color: favoritedCheckbox.checked?"black":"grey"
|
||||
color: favoritedCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
|
||||
text:"\uf005"
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +371,7 @@ Item {
|
|||
color:"transparent"
|
||||
Text{
|
||||
id:newsmenusymbol
|
||||
color: "grey"
|
||||
color: Material.secondaryTextColor//"grey"
|
||||
anchors.centerIn: parent
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
font.family:fontAwesome.name
|
||||
|
@ -378,10 +385,11 @@ Item {
|
|||
|
||||
Menu {
|
||||
id:newsmenu
|
||||
width: 18*osSettings.FontSize
|
||||
width: 10*root.fontFactor*osSettings.systemFontSize
|
||||
delegate: MenuItem{
|
||||
contentItem: Text{
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
color: Material.secondaryTextColor
|
||||
text: parent.text
|
||||
}
|
||||
}
|
||||
|
@ -392,8 +400,15 @@ Item {
|
|||
if (newsitemobject.messagetype==1){ directmessage=1}
|
||||
var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml");
|
||||
var conversation;
|
||||
if (newsitem.ListView.view.viewtype=="conversation"){conversation=true}
|
||||
else{conversation=false};
|
||||
if (newsitem.ListView.view==null){conversation=true}
|
||||
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})
|
||||
}
|
||||
}
|
||||
|
@ -420,10 +435,11 @@ Item {
|
|||
|
||||
Menu{
|
||||
title: qsTr("Attending")
|
||||
width: 10*osSettings.systemFontSize
|
||||
width: 10*root.fontFactor*osSettings.systemFontSize
|
||||
delegate: MenuItem{
|
||||
contentItem: Text{
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
color: Material.secondaryTextColor
|
||||
text: parent.text
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.11
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/smiley.js" as Smileyjs
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
@ -41,6 +42,7 @@ Rectangle{
|
|||
x: mm
|
||||
width: messageColumn.width-5*mm
|
||||
height:root.height/2
|
||||
color: Material.backgroundColor
|
||||
|
||||
MButton{
|
||||
id:closeButton
|
||||
|
@ -87,6 +89,7 @@ Rectangle{
|
|||
height: smileyDialog.height-4*root.fontFactor*osSettings.bigFontSize
|
||||
Rectangle{
|
||||
id: htmlGridTab
|
||||
color: Material.backgroundColor
|
||||
GridView {
|
||||
id:htmlView
|
||||
anchors.fill: parent
|
||||
|
@ -109,6 +112,7 @@ Rectangle{
|
|||
|
||||
Rectangle{
|
||||
id: coreGridTab
|
||||
color: Material.backgroundColor
|
||||
GridView {
|
||||
id: coreSmileyView
|
||||
anchors.fill: parent
|
||||
|
@ -133,6 +137,7 @@ Rectangle{
|
|||
|
||||
Rectangle{
|
||||
id: addonGridTab
|
||||
color: Material.backgroundColor
|
||||
GridView {
|
||||
id: addonView
|
||||
anchors.fill: parent
|
||||
|
@ -156,6 +161,7 @@ Rectangle{
|
|||
|
||||
Rectangle{
|
||||
id: adultGridTab
|
||||
color: Material.backgroundColor
|
||||
GridView {
|
||||
id: adultView
|
||||
anchors.fill: parent
|
||||
|
@ -197,7 +203,7 @@ Rectangle{
|
|||
|
||||
Component{
|
||||
id:htmlItem
|
||||
Text{id:smileText
|
||||
Label{id:smileText
|
||||
width:4.5*mm
|
||||
height: 4.5*mm
|
||||
textFormat:Text.RichText
|
||||
|
|
|
@ -31,11 +31,12 @@
|
|||
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/js/image.js" as Imagejs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle{
|
||||
Page{
|
||||
id:imageDialog
|
||||
property var attachImageURLs: []
|
||||
property string imageId: ""
|
||||
|
@ -118,7 +119,7 @@ Rectangle{
|
|||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
spacing:5*mm
|
||||
Text{
|
||||
Label{
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
font.bold: true
|
||||
text:qsTr("Upload to album")
|
||||
|
@ -192,7 +193,7 @@ Rectangle{
|
|||
x:3*mm //23*mm
|
||||
y: 11*mm + album.height
|
||||
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
|
||||
delegate: imageDelegate
|
||||
footer: imageId==""?imageFooter:null
|
||||
|
@ -231,7 +232,8 @@ Rectangle{
|
|||
id: imageDelegate
|
||||
Rectangle{
|
||||
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{
|
||||
id: uploadImage
|
||||
width: root.width/2-mm //20*mm
|
||||
|
@ -250,7 +252,7 @@ Rectangle{
|
|||
}
|
||||
|
||||
Rectangle{
|
||||
//color: "light grey"
|
||||
color: Material.backgroundColor
|
||||
border.color: "grey"
|
||||
anchors.top: uploadImage.bottom
|
||||
anchors.topMargin: mm
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQml.Models 2.1
|
||||
import "qrc:/js/image.js" as Imagejs
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
|
@ -47,7 +48,7 @@ StackView{
|
|||
// y:1
|
||||
// width:root.width-mm
|
||||
// height:root.height-5*mm
|
||||
color: '#fff'
|
||||
color: Material.backgroundColor//'#fff'
|
||||
property var newimages:[]
|
||||
property int currentimageno: 0
|
||||
property bool remoteContact: false
|
||||
|
@ -169,7 +170,7 @@ StackView{
|
|||
y:mm
|
||||
z:2
|
||||
visible: !wideScreen
|
||||
fontColor: "grey"
|
||||
fontColor: Material.secondaryTextColor//"grey"
|
||||
border.color: "transparent"
|
||||
text: "\uf0c9"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
|
@ -285,7 +286,7 @@ StackView{
|
|||
clip: true
|
||||
model: visualphotoModel.parts.album
|
||||
footer:Rectangle{
|
||||
border.color: "#EEEEEE"
|
||||
border.color: Material.backgroundDimColor//"#EEEEEE"
|
||||
border.width: 1
|
||||
width:12*mm
|
||||
height:6*mm
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue