Theming fixes, icon fixes, .pro fixes, configqml simplification

This commit is contained in:
MorsMortium 2024-03-31 07:53:04 +02:00
parent 3c1c97d489
commit bd5971cf8e
49 changed files with 626 additions and 1073 deletions

View File

@ -22,11 +22,11 @@
<file>qml/photoqml/PhotogroupComponent.qml</file>
<file>qml/photoqml/PhotoTab.qml</file>
<file>qml/photoqml/ImageUploadDialog.qml</file>
<file>qml/genericqml/CloseButton.qml</file>
<file>qml/genericqml/ImagePicker.qml</file>
<file>qml/genericqml/ImagePickerLinux.qml</file>
<file>qml/genericqml/Search.qml</file>
<file>qml/genericqml/IntentReceiver.qml</file>
<file>qml/genericqml/MButton.qml</file>
<file>qml/genericqml/LinuxSync.qml</file>
<file>qml/genericqml/BlueButton.qml</file>
<file>qml/genericqml/ContactComponent.qml</file>

View File

@ -13,7 +13,7 @@
TEMPLATE = app
TARGET = friendiqa
CONFIG += release
QT += qml quick gui widgets sql webview dbus webengine
QT += qml quick gui widgets sql webview dbus webengine networkauth quickcontrols2
SOURCES += common/friendiqa.cpp \
common/uploadableimage.cpp \

View File

@ -30,7 +30,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11
//import QtQuick.Controls 2.4
import QtQuick.Controls 2.4
Item {
id: calendarDay
@ -46,7 +46,7 @@ Item {
anchors.fill:parent
radius: 0.5*mm
}
Text {
Label {
id:daytext
anchors.right: parent.right
anchors.margins: 0.5*mm

View File

@ -101,10 +101,12 @@ Rectangle {
BlueButton{
z:2
visible: !wideScreen
fontColor: "grey"
border.color: "transparent"
text: "\uf0c9"
font.pointSize: osSettings.bigFontSize
Label {
text: "\uf0c9"
anchors.centerIn: parent
font.family: fontAwesome.name
}
onClicked:{
leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()}
}
@ -121,14 +123,17 @@ Rectangle {
id: leftDrawerAndroid
}
MButton{
Button{
id: updateEvents
anchors.top: parent.top
anchors.topMargin: 0.5*mm
anchors.right:calendartabstatusButton.left
anchors.rightMargin:mm
//width: 2*root.fontFactor*osSettings.bigFontSize;
text:"\uf021"
Label {
text: "\uf021"
anchors.centerIn: parent
font.family: fontAwesome.name
}
onClicked: {
calBusy.running=true;
updatenews.setDatabase();
@ -162,7 +167,7 @@ Rectangle {
onRejected: {close()}
}
MButton{
Button{
id: createNewEvent
anchors.top: parent.top
anchors.topMargin: 0.5*mm
@ -188,7 +193,7 @@ Rectangle {
}
}
MButton{
Button{
id: calendartabstatusButton
anchors.top: parent.top
anchors.topMargin: 0.5*mm
@ -230,20 +235,18 @@ Rectangle {
Item{
width:Math.min(23*root.fontFactor*osSettings.bigFontSize,calendarView.width)
height: parent.height
Text{
Label{
font.bold: true
//Layout.fillWidth: true
width: parent.width-root.fontFactor*osSettings.bigFontSize
horizontalAlignment:Text.AlignHCenter
color: osSettings.primaryTextColor
text: model.year
font.pointSize: osSettings.systemFontSize
}
Text{y:1.5*root.fontFactor*osSettings.bigFontSize
Label{y:1.5*root.fontFactor*osSettings.bigFontSize
width: parent.width-osSettings.bigFontSize
text: Qt.locale().standaloneMonthName(model.month)
//Layout.fillWidth: true
color: osSettings.primaryTextColor
horizontalAlignment:Text.AlignHCenter
font.pointSize: osSettings.systemFontSize
}

View File

@ -56,7 +56,7 @@ Flickable{
width: root.width
height: textColumn.height + 6*root.fontFactor*osSettings.bigFontSize
color: osSettings.backgroundColor
MButton{
Button{
id:closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm
@ -72,8 +72,6 @@ Flickable{
width: 3*root.fontFactor*osSettings.bigFontSize
height: root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.systemFontSize
//verticalAlignment: TextInput.AlignBottom
color: osSettings.primaryTextColor
text:qsTr("Start")
}
@ -93,7 +91,7 @@ Flickable{
font.bold: true
}
MButton {
Button {
id: textStartDateDropdown
x: 9.5*root.fontFactor*osSettings.bigFontSize
y: root.fontFactor*osSettings.bigFontSize
@ -120,7 +118,7 @@ Flickable{
font.bold: true
}
MButton {
Button {
id: textStartTimeDropdown
x: 16.5*root.fontFactor*osSettings.bigFontSize
y: root.fontFactor*osSettings.bigFontSize
@ -138,7 +136,6 @@ Flickable{
width: 3*root.fontFactor*osSettings.bigFontSize
height: root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.systemFontSize
color: osSettings.primaryTextColor
text:qsTr("End")
}
TextField {
@ -155,7 +152,7 @@ Flickable{
font.bold: true
}
MButton {
Button {
id: textEndDateDropdown
x: 9.5*root.fontFactor*osSettings.bigFontSize
y: 3*root.fontFactor*osSettings.bigFontSize
@ -183,7 +180,7 @@ Flickable{
font.bold: true
}
MButton {
Button {
id: textEndTimeDropdown
x: 16.5*root.fontFactor*osSettings.bigFontSize
y: 3*root.fontFactor*osSettings.bigFontSize
@ -238,7 +235,7 @@ Flickable{
delegate: tumblerDelegateComponent
}
}
MButton {
Button {
id: timeInputfinished
width: 2*root.fontFactor*osSettings.bigFontSize
height: 2*root.fontFactor*osSettings.bigFontSize
@ -336,7 +333,7 @@ Flickable{
running: false
}
MButton{
Button{
id:createEventButton
text: qsTr("Create event")
onClicked:{
@ -390,7 +387,6 @@ Flickable{
Label {
text: formatText(Tumbler.tumbler.count, modelData)
opacity: 1.0 - Math.abs(Tumbler.displacement) / (Tumbler.tumbler.visibleItemCount / 2)
color: osSettings.primaryTextColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pointSize: osSettings.systemFontSize

View File

@ -43,18 +43,22 @@ Rectangle{
property int dayint: 0
property var events:[]
MButton{
Button{
id:closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm
anchors.right: parent.right
anchors.rightMargin: 1*mm
width: 2*root.fontFactor*osSettings.bigFontSize;
text: "\uf057"
width: height
Label {
text: "\uf057"
anchors.centerIn: parent
font.family: fontAwesome.name
}
onClicked:{rootstackView.pop()}
}
MButton{
Button{
id: createNewEvent
anchors.top: parent.top
anchors.topMargin: 1*mm

View File

@ -55,25 +55,23 @@ Rectangle{
height: 7*mm
onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
}
Text {
Label {
id:eventNameText
x: 8*mm
width:parent.width-8*mm
height:contentHeight
color: osSettings.primaryTextColor
textFormat: Text.RichText
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")+":<br>"+(status=="large"?"<b>"+event.title+"</b>":event.title)
wrapMode:Text.Wrap
}
Text {
Label {
id:eventDetailsText
x:8*mm
z:4
width: parent.width-8*mm
height: contentHeight
color: osSettings.primaryTextColor
textFormat: Text.RichText
text: status!="large"?"":Qt.atob(event.desc) + (event.location==""?"":"<br><br>"+qsTr("Location")+": "+event.location)
anchors.top: eventNameText.bottom
@ -84,7 +82,7 @@ Rectangle{
MouseArea{
anchors.fill: parent
MButton{
Button{
id: deleteEvent
anchors.top: parent.top
anchors.topMargin: 0.5*mm

View File

@ -34,9 +34,8 @@ import QtQuick.Controls 2.15
Dialog {
id: rulesDialog
height: parent.height/2
width: parent.width
anchors.centerIn: parent
height: root.height - 2 * mm
width: root.width - 2 * mm
title: qsTr("Accept instance rules")
property string rules: ""
standardButtons: Dialog.Yes | Dialog.No
@ -46,23 +45,18 @@ Dialog {
ruleButton.visible=false;
confirmationOAuth.visible=true
}
onRejected: {close()}
onRejected: {
close()
}
ScrollView{
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
width: root.width-2*root.fontFactor*osSettings.bigFontSize
height:parent.height
anchors.fill: parent
clip:true
Text {
x:1; y:1
width: root.width-4*root.fontFactor*osSettings.bigFontSize
wrapMode: TextEdit.Wrap
color: osSettings.primaryTextColor
linkColor: osSettings.secondaryTextColor
textFormat: Text.PlainText
font.family: "Noto Sans"
font.pointSize: osSettings.systemFontSize
text: rules
}
}
Label {
width: root.width - 4*root.fontFactor*osSettings.bigFontSize
wrapMode: TextEdit.Wrap
textFormat: Text.PlainText
text: rules
}
}
}

View File

@ -42,116 +42,66 @@ import "qrc:/qml/genericqml"
Page{
id:accountPage
width: root.width
height: root.height
anchors.fill: parent
anchors.margins: mm
property var users:[]
property var userdata: ({})
property string imagestoredir: ""
property var appdata: ({})
function setServericon(server){
if ((server!=null) && (server!="")){
xhr.setUrl(server);
xhr.setApi("/api/statusnet/config");
xhr.clearParams();
xhr.get();
}
}
function verify(userconfig){
Helperjs.friendicaRequest(userconfig,"/api/v1/accounts/verify_credentials",root,function(obj){
accountBusy.running=false;
try{var credentials=JSON.parse(obj);
if (credentials.hasOwnProperty('error')){print("error "+credentials.error);
Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)
}
else{
if (users.length==0){Service.setDefaultOptions(db);}
if (userconfig.hasOwnProperty("APIVersion")){userconfig.password=""}
if (imagestoredir==""){
imagestoredir=filesystem.homePath+"/"+credentials.username+"/";
userconfig.imagestore=imagestoredir
}
if(userconfig.imagestore == filesystem.homePath+"/"+credentials.username+"/")
{filesystem.makePath(filesystem.homePath+"/"+credentials.username);}
filesystem.Directory=imagestoredir;
filesystem.makeDir("contacts");
filesystem.makeDir("albums");
userconfig.accountId=credentials.id;
userconfig.username=credentials.username;
Service.storeConfig(db,userconfig);
Service.readConfig(db,function(userconfig){
Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive;
});
accountPage.users=storedUsers});
//reset values
login=userconfig;
news=[];
contactlist=[];
rootstack.currentIndex=0;
newstypeSignal("refresh");
},"isActive",0);
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.display_name+"\nScreen Name: "+credentials.username,root)
rootstackView.pop()
}
}catch(e){Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"+e),root)};
})
}
BusyIndicator{
id: accountBusy
anchors.centerIn: parent
width: 5*root.fontFactor*osSettings.bigFontSize
height: 5*root.fontFactor*osSettings.bigFontSize
running: false
}
ColumnLayout{
x: root.fontFactor*osSettings.bigFontSize
width: root.width - 2*mm
y: root.fontFactor*osSettings.bigFontSize
spacing: root.fontFactor*osSettings.bigFontSize
width: parent.width
Row{
spacing:0.5*mm
height: userButton.height
width: parent.width
MButton{
Button{
id:userButton
text:qsTr("User")
font.pointSize: osSettings.bigFontSize
visible: users.length>0
onClicked:{
var useritems="";
var users=[];
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;
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'}
if(obj.password!=''){accountPage.state='password'}
else if (obj.token!=''){accountPage.state='oauth'}
},'username','"+ accountPage.users[i].username+"')}}"
users.push(accountPage.users[i].username);
}
var menuString="import QtQuick.Controls 2.15;import 'qrc:/js/service.js' as Service;"+
" Menu {width:8*root.fontFactor*osSettings.bigFontSize;"+useritems+"}";
var userlistObject=Qt.createQmlObject(menuString,accountPage,"usermenuOutput")
userlistObject.popup() }
userMenuRepeater.model = users;
userMenu.popup()
}
}
Menu {
id:userMenu
Repeater {
id: userMenuRepeater
MenuItem{
required property string modelData
text:modelData
onTriggered: {
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);
imagestore.text=obj.imagestore;
imagestoredir=obj.imagestore;
userButton.font.bold=obj.isActive==0?'true':'false';
if(obj.password!=''){accountPage.state='password';}
else if (obj.token!=''){accountPage.state='oauth';}
},'username',text);
}
}
}
}
MButton {
Button {
visible: users.length>0
width: height
text: "-"
font.pointSize: osSettings.bigFontSize
onClicked:{
var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
@ -188,10 +138,10 @@ Page{
})
}}
MButton {
Button {
visible: users.length>0
width: height
text: "+"
font.pointSize: osSettings.bigFontSize
onClicked:{
servername.text="https://"
servericon.visible=false;
@ -204,110 +154,89 @@ Page{
}
}
MButton {
text: "?"
font.pointSize: osSettings.bigFontSize
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
Button {
Label {
anchors.centerIn: parent
font.family: fontAwesome.name
text: "\uf150"
}
}
MButton {
text: "\uf150"
font.family: fontAwesome.name
font.pointSize: osSettings.bigFontSize
Menu {
id:authMethodMenu
width: 10*root.fontFactor*osSettings.systemFontSize
MenuItem {
text: qsTr("OAuth")
font.pointSize: osSettings.systemFontSize
font.bold:accountPage.state=="oauth"
onTriggered: {accountPage.state="oauth"}
}
MenuItem {
text: qsTr("Password")
font.pointSize: osSettings.systemFontSize
font.bold:accountPage.state=="password"
onTriggered: {accountPage.state="password"}
}
}
onClicked: {authMethodMenu.popup()}
}
MButton{
Button {
text: "?"
width: height
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
}
}
Button{
id:closeButton
visible: users.length>0
text: "\uf057"
font.pointSize: osSettings.bigFontSize
onClicked:{rootstackView.pop()}
Label {
anchors.centerIn: parent
font.family: fontAwesome.name
text: "\uf057"
}
onClicked:{
rootstackView.pop()
}
}
}
Row{
spacing:0.5*mm
height: 3*root.fontFactor*osSettings.bigFontSize
RowLayout{
width: parent.width
Image{
id:servericon
width:2.5*root.fontFactor*osSettings.bigFontSize; height: 2.5*root.fontFactor*osSettings.bigFontSize
width:2.5*root.fontFactor*osSettings.bigFontSize
height: width
visible: false
source:""
property var serverconfig:({})
MouseArea{
anchors.fill:parent
onClicked:{
let serverConfigString="import QtQuick 2.0; import QtQuick.Dialogs 6.3; MessageDialog{ visible: true; title:'Server';buttons: MessageDialog.Ok;text: 'Name: "+
serverDialog.open()
}
}
MessageDialog {
id: serverDialog
title: qsTr("Server")
buttons: MessageDialog.Ok
text: "Name: "+
servericon.serverconfig.site.name+"\nLanguage: "+servericon.serverconfig.site.language+
"\nEmail: "+servericon.serverconfig.site.email+"\nTimezone: "+servericon.serverconfig.site.timezone+"\nClosed: "+servericon.serverconfig.site.closed+
"\nText limit: "+servericon.serverconfig.site.textlimit+"\nShort Url length: "+servericon.serverconfig.site.shorturllength+
"\nFriendica version: "+servericon.serverconfig.site.friendica.FRIENDICA_VERSION+
"\nDB Update version: "+servericon.serverconfig.site.friendica.DB_UPDATE_VERSION+"'}";
var serverconfigObject=Qt.createQmlObject(serverConfigString,accountPage,"serverconfigOutput");
}
"\nDB Update version: "+servericon.serverconfig.site.friendica.DB_UPDATE_VERSION
}
}
FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"}
MButton{
Button{
id:serverSearchButton
width: 3*root.fontFactor*osSettings.bigFontSize; height: 2.5*root.fontFactor*osSettings.bigFontSize
//text:"\uf002"
icon.name: "search"
font.pointSize: osSettings.bigFontSize
visible: servericon.visible?false:true
visible: !servericon.visible
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
width: root.width-5*root.fontFactor*osSettings.bigFontSize
height: 2.5*root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.systemFontSize
Layout.fillWidth: true
text:"https://"
onFocusChanged:{
if (focus){servermenu.open()}
@ -322,7 +251,6 @@ Page{
}
Menu {
id:servermenu
width: 13*root.fontFactor*osSettings.bigFontSize
Instantiator{
model:serverModel
MenuItem{
@ -356,13 +284,11 @@ Page{
ListElement{text:"https://venera.social"}
}
}
MButton {
Button {
id: ruleButton
width: parent.width
Layout.fillWidth: true
visible: (osSettings.osType=="Android") && (userButton.text== qsTr("User"))
height: 2*root.fontFactor*osSettings.bigFontSize;
text: qsTr("Instance rules")
font.pointSize: osSettings.bigFontSize
onClicked:{
xhr.setUrl(servername.text);
xhr.setApi("/api/v1/instance/rules");
@ -373,10 +299,7 @@ Page{
TextField {
id: username
width: root.width-5*root.fontFactor*osSettings.bigFontSize
height: 2.5*root.fontFactor*osSettings.bigFontSize;
Layout.leftMargin: 3*root.fontFactor*osSettings.bigFontSize;
font.pointSize: osSettings.systemFontSize
Layout.fillWidth: true
visible: (osSettings.osType=="Android")?(text!= ""):true
placeholderText: qsTr("Nickname")
selectByMouse: true
@ -390,9 +313,7 @@ Page{
TextField {
id: password
width: root.width-9*mm; height: 2.5*root.fontFactor*osSettings.bigFontSize;
Layout.leftMargin: 3*root.fontFactor*osSettings.bigFontSize;
font.pointSize: osSettings.systemFontSize
Layout.fillWidth: true
visible: (osSettings.osType=="Android")?(userButton.text!= qsTr("User")):true
selectByMouse: true
echoMode: TextInput.Password
@ -400,33 +321,25 @@ Page{
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText | Qt.ImhSensitiveData
}
Row{
spacing:0.5*mm
height: 3*root.fontFactor*osSettings.bigFontSize
width: parent.width
RowLayout{
Label {
id: imagedirlabel
visible: imagestore.text!=""
text: qsTr("Image dir.")
font.pointSize: osSettings.systemFontSize
}
TextField {
id: imagestore
width: root.width-17*mm;
height: 2.5*root.fontFactor*osSettings.bigFontSize;
visible:imagestore.text!=""
font.pointSize: osSettings.systemFontSize
Layout.fillWidth: true
visible:text!=""
selectByMouse: true
text: ""
wrapMode: TextEdit.NoWrap
onTextChanged: imagestoredir=imagestore.text
}
MButton {
Button {
visible:imagestore.text!=""
text: "..."
font.pointSize: osSettings.bigFontSize
onClicked:{imagestoreDialog.open()}
}
@ -434,7 +347,6 @@ Page{
id: imagestoreDialog
title: "Please choose a directory"
currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
//selectFolder: true
onAccepted: {
var imagestoreString=imagestoreDialog.selectedFolder.toString();
imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
@ -443,12 +355,10 @@ Page{
}
}
MButton {
Button {
id:confirmationOAuth
width: parent.width
Layout.fillWidth: true
text: qsTr("Connect")
font.pointSize: osSettings.bigFontSize
visible: (osSettings.osType=="Android")?userButton.text!= qsTr("User"):true
onClicked:{
if (servername.text==""){Helperjs.showMessage(qsTr("Error"), qsTr("No server given!"),root)}
@ -517,12 +427,10 @@ Page{
}
}
MButton {
Button {
id:confirmation
width: 10*root.fontFactor*osSettings.bigFontSize;
text: qsTr("Confirm")
font.pointSize: osSettings.bigFontSize
visible: false// (osSettings.osType=="Android")?userButton.text!= qsTr("User"):true
visible: false
onClicked:{
accountBusy.running=true;
var userconfig={server: servername.displayText, username: username.text, password:Qt.btoa(password.text), imagestore:imagestoredir,interval:""};
@ -536,11 +444,10 @@ Page{
else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
}}
MButton {
Button {
id: setDefault
width: 10*root.fontFactor*osSettings.bigFontSize;
Layout.fillWidth: true
text: qsTr("Set as default")
font.pointSize: osSettings.bigFontSize
visible: false
onClicked:{
accountBusy.running=true;
@ -559,6 +466,58 @@ Page{
}
}
}
function setServericon(server){
if ((server!=null) && (server!="")){
xhr.setUrl(server);
xhr.setApi("/api/statusnet/config");
xhr.clearParams();
xhr.get();
}
}
function verify(userconfig){
Helperjs.friendicaRequest(userconfig,"/api/v1/accounts/verify_credentials",root,function(obj){
accountBusy.running=false;
try{var credentials=JSON.parse(obj);
if (credentials.hasOwnProperty('error')){print("error "+credentials.error);
Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)
}
else{
if (users.length==0){Service.setDefaultOptions(db);}
if (userconfig.hasOwnProperty("APIVersion")){userconfig.password=""}
if (imagestoredir==""){
imagestoredir=filesystem.homePath+"/"+credentials.username+"/";
userconfig.imagestore=imagestoredir
}
if(userconfig.imagestore == filesystem.homePath+"/"+credentials.username+"/")
{filesystem.makePath(filesystem.homePath+"/"+credentials.username);}
filesystem.Directory=imagestoredir;
filesystem.makeDir("contacts");
filesystem.makeDir("albums");
userconfig.accountId=credentials.id;
userconfig.username=credentials.username;
Service.storeConfig(db,userconfig);
Service.readConfig(db,function(userconfig){
Helperjs.readData(db,"config","",function(storedUsers){
storedUsers.sort(function(obj1, obj2) {
return obj1.isActive - obj2.isActive;
});
accountPage.users=storedUsers});
//reset values
login=userconfig;
news=[];
contactlist=[];
rootstack.currentIndex=0;
newstypeSignal("refresh");
},"isActive",0);
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.display_name+"\nScreen Name: "+credentials.username,root)
rootstackView.pop()
}
}catch(e){Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"+e),root)};
})
}
states: [
State {
name: "new_oauth"

View File

@ -30,227 +30,125 @@
// 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.Layouts 1.11
import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
Page{
width: parent.width
height: parent.height
ScrollView{
anchors.fill: parent
contentHeight: 40*root.fontFactor*osSettings.bigFontSize
contentWidth: root.width
clip:true
Label {
text: qsTr("News as")
font.pointSize:osSettings.systemFontSize
x: root.fontFactor*osSettings.bigFontSize; y: 2*root.fontFactor*osSettings.bigFontSize
ColumnLayout{
anchors.fill: parent
Label {
text: qsTr("News as")
font.pointSize: osSettings.bigFontSize
}
ComboBox {
Layout.minimumWidth:root.width - mm * 3 - closeButton.width
model: [ qsTr("Timeline"), qsTr("Conversations") ]
currentIndex: globaloptions["newsViewType"] == "Timeline"?0:1
onCurrentIndexChanged: {
Service.updateglobaloptions(root.db,"newsViewType",currentText);
}
}
Rectangle{
x: root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize;
width: newsTypeField.contentWidth+2*mm; height: 2*root.fontFactor*osSettings.bigFontSize
color: osSettings.backgroundDimColor//"#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.bigFontSize
}
Row{
TextField {
id:maxNewsText
text:maxNews.value
onTextChanged: {
Service.updateglobaloptions(root.db,"max_news",text);
maxNews.value = text;
}
}
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
Slider{
id: maxNews
width: root.width - maxNewsText.width - mm * 2 - closeButton.width
from: 0;to:2000; stepSize: 100
value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
}
Rectangle{
color: osSettings.backgroundDimColor
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: osSettings.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("Default News Tabs")
font.pointSize: osSettings.systemFontSize
}
Repeater{id:newstypeRepeater
model: 4
delegate:ComboBox{
required property int index
model: ["Home", "Replies", "DirectMessages","Favorites","Public Timeline","Notifications"]
currentIndex: model.indexOf(globaloptions.defaultNewsTypes[index])
onCurrentTextChanged: {
if (currentText !== globaloptions.defaultNewsTypes[index]){
globaloptions.defaultNewsTypes.splice(index,1,currentText);
Service.updateglobaloptions(root.db,"defaultNewsTypes",globaloptions.defaultNewsTypes)
root.globaloptionsChanged()
}
}
}
}
}
Column{
//visible: osSettings.osType=="Android"
x: root.fontFactor*osSettings.bigFontSize
y: 26*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: 3*root.fontFactor*osSettings.bigFontSize
//width: 2*root.fontFactor*osSettings.bigFontSize;
text: "?"
font.pointSize: osSettings.bigFontSize
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
onMoved: {
Service.updateglobaloptions(root.db,"max_news",value);
}
}
}
// 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()}
// }
Label{
text: qsTr("#nsfw")
font.pointSize: osSettings.bigFontSize
}
CheckBox{
id: nsfwCheckbox
text: qsTr("Hide")
checked:globaloptions["hide_nsfw"]==1
onClicked: {
Service.updateglobaloptions(root.db,"hide_nsfw",checked?1:0);
}
}
Label{
text: qsTr("Default News Tabs")
font.pointSize: osSettings.bigFontSize
}
Repeater{id:newstypeRepeater
model: 4
delegate:ComboBox{
required property int index
model: ["Home", "Replies", "DirectMessages","Favorites","Public Timeline","Notifications"]
currentIndex: model.indexOf(globaloptions.defaultNewsTypes[index])
onCurrentTextChanged: {
if (currentText !== globaloptions.defaultNewsTypes[index]){
globaloptions.defaultNewsTypes.splice(index,1,currentText);
Service.updateglobaloptions(root.db,"defaultNewsTypes",globaloptions.defaultNewsTypes)
root.globaloptionsChanged()
}
}
}
}
Label{
text: qsTr("Dark Mode")
font.pointSize: osSettings.bigFontSize
}
RadioButton{
text: qsTr("System")
checked: globaloptions["view_darkmode"]==0 || globaloptions["view_darkmode"]==undefined
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
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
onClicked: {
if(checked==true){
Service.updateglobaloptions(root.db,"view_darkmode",2);
root.Material.theme=Material.Light
}
}
}
}

View File

@ -30,7 +30,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.11
//import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.11
import QtQuick.Controls 2.12
import "qrc:/js/service.js" as Service
@ -38,36 +37,54 @@ import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
Page{
//anchors.fill: parent
width:root.width
height:root.height
width: parent.width
height: parent.height
ColumnLayout{
anchors.fill: parent
TabBar {
id: configbar
position:TabBar.Header
currentIndex: 0
TabButton {
text: qsTr("Appearance")
font.pointSize: osSettings.systemFontSize
width:root.width/3
}
TabButton {
text: qsTr("Sync")
font.pointSize: osSettings.systemFontSize
width:root.width/3
}
TabButton {
text: qsTr("Start")
visible:osSettings.osType=="Linux"
font.pointSize: osSettings.systemFontSize
width:root.width/3
}
}
StackLayout{
Layout.fillWidth:true
Layout.fillHeight:true
Layout.leftMargin: mm
id:configTabView
currentIndex: configbar.currentIndex
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
}
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
Loader{
id: appearanceLoader
source:(configTabView.currentIndex==0)? "qrc:/qml/configqml/ConfigAppearancePage.qml":""
}
Loader{
id: syncLoader
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
}
Loader{
id: startLoader
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
}
}
}
@ -81,50 +98,21 @@ Page{
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":""
}
Loader{
id: syncLoader
source:(configTabView.currentIndex==1)? "qrc:/qml/configqml/SyncConfig.qml":""
}
Loader{
id: startLoader
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
}
}
MButton{
id:closeButton
// height: 2*root.fontFactor*osSettings.bigFontSize
//width: 2*root.fontFactor*osSettings.bigFontSize;
anchors.top: parent.top
anchors.topMargin:2*root.fontFactor*osSettings.bigFontSize
Column {
anchors.right: parent.right
anchors.rightMargin: 1*mm
text: "\uf057"
font.pointSize: osSettings.bigFontSize
onClicked:{rootstackView.pop()}
anchors.top: parent.top
anchors.topMargin: configbar.height + mm
spacing: mm
CloseButton {id: closeButton}
Button {
anchors.left: closeButton.left
width: height
text: "?"
onClicked:{
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
}
}
}
}

View File

@ -32,49 +32,20 @@
import QtQuick 2.11
import QtQuick.Controls 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 {
Column{
anchors.fill: parent
Label {
text: qsTr("Autostart")
font.pointSize: osSettings.bigFontSize
}
CheckBox{
id: autostartCheckbox
checked:filesystem.isAutostart
text: qsTr("Enable")
onClicked: {
toggle();
if(autostartCheckbox.checked==true){
filesystem.setAutostart(false);
autostartCheckbox.checked=false;
}
else{
filesystem.setAutostart(true);
autostartCheckbox.checked=true;
}
filesystem.setAutostart(checked);
}
}
// CheckBox{
// id: minimizeCheckbox
// x: mm
// y: 3*root.fontFactor*osSettings.bigFontSize
// width: 10*root.fontFactor*osSettings.bigFontSize
// enabled: autostartCheckbox.checked==true
// checked:(globaloptions["notify_"+adapter]==1)?true:false
// text: qsTr("Start Minimized")
// font.pointSize: osSettings.bigFontSize
// onClicked: {
// toggle();
// if(notifyCheckbox.checked==true){
// Service.updateglobaloptions(root.db,"notify_"+adapter,0);notifyCheckbox.checked=false;
// }
// else{
// Service.updateglobaloptions(root.db,"notify_"+adapter,1);notifyCheckbox.checked=true;
// }
// }
// }
}

View File

@ -34,13 +34,13 @@ import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"
Page{
Text{id:infoBoxText
anchors.top:closeButton.bottom
anchors.topMargin: mm
Label{
id:infoBoxText
anchors.left: parent.left
anchors.right: parent.right
anchors.top: closeButton.bottom
anchors.leftMargin: mm
textFormat: Text.RichText
width: root.width-mm
font.pointSize: osSettings.systemFontSize
color: osSettings.primaryTextColor
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: "<b>Friendiqa v0.6.9 </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>"+
@ -52,16 +52,10 @@ Page{
"AndroidNative by <a href='https://github.com/benlau/androidnative.pri'>Ben Lau</a><br>"+
"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href='http://www.openssl.org/'>http://www.openssl.org/</a>)"
onLinkActivated:{
Qt.openUrlExternally(link)}
Qt.openUrlExternally(link)
}
}
MButton{
id:closeButton
CloseButton {
anchors.top: parent.top
anchors.topMargin: root.fontFactor*osSettings.bigFontSize
anchors.right: parent.right
anchors.rightMargin: 1*mm
text: "\uf057"
font.pointSize: osSettings.bigFontSize
onClicked:{rootstackView.pop()}
}
}

View File

@ -37,46 +37,47 @@ import "qrc:/js/service.js" as Service
ScrollView{
id:leftDrawerScrollviewId
clip: true
width:parent.width-mm
height: parent.height
contentHeight: leftDrawerColumn.height
anchors.fill: parent
anchors.margins: mm
property string currentnewstabstatus:root.globaloptions.hasOwnProperty("newsViewType")?root.globaloptions.newsViewType:"Conversations";
Column{
id:leftDrawerColumn
x:mm
y:0.5*root.fontFactor*osSettings.bigFontSize
width:parent.width-2*mm
height: 4*root.fontFactor*osSettings.bigFontSize
width:parent.width
spacing: 0.7*root.fontFactor*osSettings.bigFontSize
Label{
width:implicitWidth
width:parent.width
font.family: fontAwesome.name
font.pointSize: osSettings.systemFontSize
text: "\uf085 "+ qsTr("Settings")
MouseArea{
anchors.fill:parent
onClicked:{rootstackView.push("qrc:qml/configqml/ConfigPage.qml");
if(!wideScreen){leftDrawerAndroid.close()}
onClicked:{
rootstackView.push("qrc:qml/configqml/ConfigPage.qml");
if(!wideScreen){
leftDrawerAndroid.close();
}
}
}
}
Label{y: 2*root.fontFactor*osSettings.bigFontSize
width:implicitWidth
Label{
width:parent.width
font.family: fontAwesome.name
font.pointSize: osSettings.systemFontSize
text: "\uf2bb " + qsTr("Accounts")
MouseArea{
anchors.fill:parent
onClicked:{rootstackView.push("qrc:qml/configqml/AccountPage.qml");
if(!wideScreen){leftDrawerAndroid.close()}
onClicked:{
rootstackView.push("qrc:qml/configqml/AccountPage.qml");
if(!wideScreen){
leftDrawerAndroid.close();
}
}
}
}
Label{y: 4*root.fontFactor*osSettings.bigFontSize
width:implicitWidth
Label{width:parent.width
font.family: fontAwesome.name
font.pointSize: osSettings.systemFontSize
text: "\uf08b " +qsTr("Quit")
@ -86,8 +87,10 @@ ScrollView{
Service.cleanNews(root.db,function(){
Service.cleanHashtags(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){
Qt.quit()})
})})
Qt.quit();
});
});
});
}
}
}
@ -99,7 +102,6 @@ ScrollView{
}
ListView{
id:accountList
y: 6.5*root.fontFactor*osSettings.bigFontSize
width:parent.width
height: contentHeight
model: accountModel
@ -109,16 +111,9 @@ ScrollView{
Component.onCompleted:{
Service.readAllLogins(db,function(accounts){
if (accounts.length>0 && bar.currentIndex==0){
leftDrawerColumn.height=6.5*root.fontFactor*osSettings.bigFontSize+accounts.length*17*root.fontFactor*osSettings.bigFontSize
for(var account in accounts) {
accountModel.append({"account":accounts[account]})
}
}else if(accounts.length>0 && bar.currentIndex==1){
leftDrawerColumn.height=6.5*root.fontFactor*osSettings.bigFontSize+accounts.length*8*root.fontFactor*osSettings.bigFontSize
for(var account in accounts) {
accountModel.append({"account":accounts[account]})
}
for(var account in accounts) {
accountModel.append({"account":accounts[account]})
}
})}
})
}
}

View File

@ -40,10 +40,7 @@ QtObject{
property string osType: "Linux"
property int systemFontSize: root.font.pointSize*1.1
property int bigFontSize: systemFontSize*1.5
//property string attachImageDir:filesystem.homePath+"/Pictures/"
property string imagePickQml: "ImagePickerLinux"
//SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active }
//property SystemPalette name: value
property color backgroundColor: palette.window
property color backgroundDimColor: palette.button
property color primaryTextColor: palette.windowText

View File

@ -32,55 +32,33 @@
import QtQuick 2.11
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
import "qrc:/qml/configqml"
import "qrc:/js/service.js" as Service
Rectangle{
color: osSettings.dialogColor
Column {
property string adapter: ""
width: parent.width
height: 4*root.fontFactor*osSettings.bigFontSize
Label{
x: mm
y: 0.5*mm
font.pointSize: osSettings.systemFontSize
text: qsTr(adapter)
}
CheckBox{
id: syncCheckbox
x: mm
y: root.fontFactor*osSettings.bigFontSize
width: 10*root.fontFactor*osSettings.bigFontSize
checked:(globaloptions["sync_"+adapter]==1)?true:false
//style: CheckBoxStyle {
text: qsTr("sync")
font.pointSize: osSettings.bigFontSize
onClicked: {
toggle();
if(syncCheckbox.checked==true){
Service.updateglobaloptions(root.db,"sync_"+adapter,0);syncCheckbox.checked=false;
}
else{
Service.updateglobaloptions(root.db,"sync_"+adapter,1);syncCheckbox.checked=true;
Row {
CheckBox{
width: root.width/2
id: syncCheckbox
checked:globaloptions["sync_"+adapter]==1
text: qsTr("sync")
onClicked: {
Service.updateglobaloptions(root.db,"sync_"+adapter,checked?1:0);
}
}
}
CheckBox{
CheckBox{
width: parent.width / 2
id: notifyCheckbox
x: 10*root.fontFactor*osSettings.bigFontSize
y: root.fontFactor*osSettings.bigFontSize
width: 10*root.fontFactor*osSettings.bigFontSize
enabled: adapter!="Notifications"
checked:(globaloptions["notify_"+adapter]==1)?true:false
checked:globaloptions["notify_"+adapter]==1
text: qsTr("notify")
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;
Service.updateglobaloptions(root.db,"notify_"+adapter,checked?1:0);
}
}
}

View File

@ -31,44 +31,23 @@
import QtQuick 2.11
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
import "qrc:/js/service.js" as Service
Page{
//color:"white"
width:root.width
height: root.height
//height:root.height
ColumnLayout {
anchors.fill: parent
Label {
text: qsTr("Sync Interval (0=None)")
font.pointSize: osSettings.bigFontSize
//visible: false
x: root.fontFactor*osSettings.bigFontSize; y: root.fontFactor*osSettings.bigFontSize; //width:35*mm;wrapMode: Text.Wrap
}
Slider{ id: messageIntervalSlider
x:8*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize;
width: root.width-10*root.fontFactor*osSettings.bigFontSize;
height:2*root.fontFactor*osSettings.bigFontSize
value: globaloptions.hasOwnProperty("syncinterval")?globaloptions.syncinterval:0
from: 0;to:120; stepSize: 15
}
Rectangle{
x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize;
width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize;
color: osSettings.dialogColor
radius: 0.5*mm
TextEdit{
id: messageIntervalField
anchors.fill: parent
font.pointSize: osSettings.bigFontSize
verticalAlignment:TextEdit.AlignRight
color: osSettings.primaryTextColor
Row {
TextField {
id:messageIntervalField
text:messageIntervalSlider.value
focus: true
selectByMouse: true
onTextChanged: {
Service.updateglobaloptions(root.db,"syncinterval",text);
if(osSettings.osType=="Android"){
@ -76,41 +55,35 @@ Page{
} else if(osSettings.osType=="Linux" && text !=0){
root.updateSyncinterval(parseInt(text))
}
messageIntervalSlider.value = text;
}
}
Slider{
id: messageIntervalSlider
width: root.width - messageIntervalField.width - mm * 3 - closeButton.width
from: 0;to:120; stepSize: 15
value: globaloptions.hasOwnProperty("syncinterval")?globaloptions.syncinterval:0
onMoved: {
Service.updateglobaloptions(root.db,"syncinterval",value);
if(osSettings.osType=="Android"){
alarm.setAlarm(value);
} else if(osSettings.osType=="Linux" && value !=0){
root.updateSyncinterval(parseInt(value))
}
}
}
}
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
Label{
text:qsTr("Min.")
font.pointSize: osSettings.bigFontSize
}
ScrollView{
width: root.width
height: root.height - 10*root.fontFactor*osSettings.bigFontSize;
y:7*root.fontFactor*osSettings.bigFontSize
clip:true
Column{
width: parent.width
spacing:mm
SyncComponent{adapter:"Timeline"}
SyncComponent{adapter:"Replies"}
SyncComponent{ adapter:"DirectMessages"}
SyncComponent{ adapter:"Notifications"}
SyncComponent{ adapter: "Events"}
SyncComponent{adapter: "FriendRequests"}
}
}
// 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()}
// }
SyncComponent{adapter:"Timeline"}
SyncComponent{adapter:"Replies"}
SyncComponent{ adapter:"DirectMessages"}
SyncComponent{ adapter:"Notifications"}
SyncComponent{ adapter: "Events"}
SyncComponent{adapter: "FriendRequests"}
}

View File

@ -76,13 +76,13 @@ Rectangle {
source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
}
Text{
Label{
font.pointSize: osSettings.bigFontSize
anchors.left: contactImage.right
anchors.margins: 1*mm
text:Qt.atob(contact.name)
}
Text {
Label {
id:selected
anchors.right:parent.right
visible: contactlist.indexOf(contact)>-1
@ -110,7 +110,7 @@ Rectangle {
}
}
MButton {
Button {
id: closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm

View File

@ -96,7 +96,7 @@ Page{
}
}
MButton {
Button {
id: closeButton
anchors.top: parent.top
anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize
@ -133,7 +133,7 @@ Page{
height: childrenRect.height
color: osSettings.backgroundColor
required property string section
Text {
Label {
color: osSettings.secondaryTextColor
text: parent.section
font.bold: true

View File

@ -111,7 +111,7 @@ Item{
}
}
MButton {
Button {
id: updateFriendsButton
text: "\uf021"
anchors.top: parent.top
@ -195,7 +195,7 @@ Item{
height: childrenRect.height
color: osSettings.backgroundColor
required property string section
Text {
Label {
color: osSettings.secondaryTextColor
text: parent.section
font.bold: true
@ -211,8 +211,7 @@ Item{
color: osSettings.dialogColor
width:friendsView.width
height:6*mm
Text{
color: osSettings.primaryTextColor
Label{
font.family: fontAwesome.name
font.pointSize: osSettings.bigFontSize
anchors.centerIn: parent

View File

@ -75,7 +75,7 @@ Item {
}
}
MButton{
Button{
id: closeButton
visible: false
anchors.right: parent.right
@ -88,7 +88,7 @@ Item {
}
}
MButton{
Button{
id:infobutton
text:"?"
font.pointSize: osSettings.bigFontSize

View File

@ -72,7 +72,7 @@ Item{
}
}
}
// MButton {//requestGroups() not working with Friendica 02/2022
// Button {//requestGroups() not working with Friendica 02/2022
// id: updateGroupsButton
// text: "\uf021"
// anchors.top: parent.top

View File

@ -112,7 +112,7 @@ Rectangle {
callback(profiletext)
}
MButton {
Button {
id: update
anchors.top: parent.top
anchors.topMargin: mm
@ -172,7 +172,7 @@ Rectangle {
anchors.top: photoImage.top
anchors.right: photoImage.right
}
Text {
Label {
id:phototext
z:4
font.family: fontAwesome.name
@ -184,7 +184,7 @@ Rectangle {
font.pointSize: 1.2*osSettings.bigFontSize
}
MButton{
Button{
id:updatebutton
width: 8*root.fontFactor*osSettings.bigFontSize
visible: "file://"+profile.friendica_owner.profile_image!= photoImage.source
@ -219,13 +219,12 @@ Rectangle {
width:profileView.width
color: osSettings.backgroundColor
height: 5*mm+profiletextfield.height
Text{
Label{
y:mm
font.pointSize: osSettings.systemFontSize
text:"<b>"+qsTr("profile id")+": </b> "+profileid+"<br>"
color:osSettings.primaryTextColor
}
Text{
Label{
id:profiletextfield
x:2*mm
y:4.5*mm
@ -233,16 +232,14 @@ Rectangle {
wrapMode: Text.Wrap
font.pointSize: osSettings.systemFontSize
text:profiletext
color: osSettings.primaryTextColor
onLinkActivated: Qt.openUrlExternally(link)
}
}
}
Component{
id:textcomponent
Text{
Label{
id:namelabeltext
color: osSettings.primaryTextColor
width: namelabelflickable.width
height: implicitHeight
font.pointSize: osSettings.bigFontSize

View File

@ -179,69 +179,52 @@ ApplicationWindow{
else {rootstack.currentIndex=0;close.accepted=false}
}
Rectangle{
anchors.fill: parent
color: osSettings.backgroundColor
}
footer: ToolBar{
id: roottoolbar
footer: TabBar{
width:root.width
background: Rectangle{
anchors.fill: parent
color: osSettings.backgroundDimColor
id: bar
onCurrentIndexChanged: {
rootstack.currentIndex=bar.currentIndex;
try{while(rootstackView.depth>1){rootstackView.pop()}}catch(e){}
}
RowLayout{
anchors.fill: parent
TabBar {
id: bar
Layout.fillWidth: true
onCurrentIndexChanged: {
rootstack.currentIndex=bar.currentIndex;
try{while(rootstackView.depth>1){rootstackView.pop()}}catch(e){}
}
TabButton {
font.family: fontAwesome.name
text: "\uf03a"
background:Rectangle{
anchors.fill: parent
color: osSettings.backgroundDimColor
}
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Posts")
onDoubleClicked: {newstypeSignal("refresh")}
}
TabButton {
font.family: fontAwesome.name
text: "\uf0c0"
background:Rectangle{
anchors.fill: parent
color: osSettings.backgroundDimColor
}
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Contacts")
}
TabButton {
font.family: fontAwesome.name
text: "\uf03e"
background:Rectangle{
anchors.fill: parent
color: osSettings.backgroundDimColor
}
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Photos")
}
TabButton {
font.family: fontAwesome.name
text: "\uf073"
background:Rectangle{
anchors.fill: parent
color: osSettings.backgroundDimColor
}
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Calendar")
}
TabButton {
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Posts")
width: root.width/4
Label {
text: "\uf03a"
anchors.centerIn: parent
font.family: fontAwesome.name
}
onDoubleClicked: {newstypeSignal("refresh")}
}
TabButton {
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Contacts")
width: root.width/4
Label {
text: "\uf0c0"
anchors.centerIn: parent
font.family: fontAwesome.name
}
}
TabButton {
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Photos")
width: root.width/4
Label {
text: "\uf03e"
anchors.centerIn: parent
font.family: fontAwesome.name
}
}
TabButton {
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr("Calendar")
width: root.width/4
Label {
text: "\uf073"
anchors.centerIn: parent
font.family: fontAwesome.name
}
}
}
@ -250,7 +233,7 @@ ApplicationWindow{
//y:roottoolbar.height
//anchors.fill: parent
width:root.width
height: root.height-roottoolbar.contentHeight
height: root.height-bar.contentHeight
initialItem: StackLayout{
id:rootstack
width:rootstackView.width

View File

@ -30,6 +30,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0
import QtQuick.Controls 2.12
Rectangle{
id: blueButton
width: Math.max(mainText.width+2*mm,5*mm)
@ -45,9 +47,8 @@ Rectangle{
signal clicked
state:""
Text{
Label{
id:mainText
color: osSettings.primaryTextColor
anchors.centerIn: parent
width: contentWidth
height: contentHeight

View File

@ -28,18 +28,23 @@
//
// 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.9
import QtQuick.Controls 6.3
import QtQuick 2.0
import QtQuick.Controls 2.12
Button{
id: mButton
property alias color: bg.color
width: Math.max(implicitContentWidth+2*mm,3*root.fontFactor*osSettings.bigFontSize)
//radius: mm
height: 2.5*root.fontFactor*osSettings.bigFontSize
//color: Material.foreground
font.family: fontAwesome.name
font.pointSize: osSettings.bigFontSize
//highlighted:true
background: Rectangle{id:bg;color: osSettings.dialogColor;
radius: 0.5*mm}
id: closeButton
width: height
anchors.topMargin: mm
anchors.right: parent.right
anchors.rightMargin: mm
onClicked: {
rootstackView.pop()
}
Label {
anchors.centerIn: parent
font.family: fontAwesome.name
text: "\uf057"
}
}

View File

@ -40,43 +40,12 @@ import "qrc:/qml/genericqml"
Item{
id:imageDialog
z:2
// border.color: "grey"
// color: Material.backgroundColor
// width: parent.width-root.fontFactor*osSettings.bigFontSize
// height: parent.height-3*root.fontFactor*osSettings.bigFontSize
// x: 0.5*root.fontFactor*osSettings.bigFontSize
// y: 2*root.fontFactor*osSettings.bigFontSize
property string directory: ""
property bool multiple: false
property string imageUrl: ""
//property var imageUrls: []
signal ready();
function pickImage() {imageFileDialog.open()}
// Text{
// id:directoryText
// anchors.bottom: parent.bottom
//// x:0.5*mm
//// y:0.5*mm
// width: imageDialog.width-3.5*root.fontFactor*osSettings.bigFontSize
// height:contentHeight
// font.pointSize: osSettings.bigFontSize
// wrapMode: Text.Wrap
// text: directory
// color: Material.primaryTextColor
// }
// Button{
// id:closeButton
// height: 2*root.fontFactor*osSettings.bigFontSize
// anchors.top: parent.top
// anchors.topMargin: 0.5*mm
// anchors.right: parent.right
// anchors.rightMargin: 1*mm
// text: "\uf057"
// onClicked:{
// ready();imageDialog.destroy()
// }
// }
FileDialog {
id: imageFileDialog
title: "Please choose a file"
@ -89,120 +58,4 @@ Item{
ready();
}
}
// ListView {
// id: imageView
// x:0.5*mm
// y: 2.5*root.fontFactor*osSettings.bigFontSize//Math.max(directoryText.height, closeButton.height)+mm
// width: parent.width-2*mm
// height: parent.height-3*root.fontFactor*osSettings.bigFontSize
// boundsBehavior:Flickable.StopAtBounds
// clip: true
// model: imageModel
// delegate: imageItem
// ScrollBar.vertical: ScrollBar { }
// }
// FolderListModel{
// id: imageModel
// nameFilters: ["*.png", "*.jpg",".jpeg","*.JPG","*.gif"]
// sortField: FolderListModel.Time
// sortReversed:false
// showDotAndDotDot: true
// showDirs: true
// showDirsFirst: true
// folder:directory
// }
// BusyIndicator{
// id: imageBusy
// anchors.horizontalCenter: imageView.horizontalCenter
// anchors.top:imageView.top
// anchors.topMargin: 2*mm
// width: 2*root.fontFactor*osSettings.bigFontSize
// height: 2*root.fontFactor*osSettings.bigFontSize
// running:false
// }
// Component{
// id:imageItem
// Item{
// width:imageView.width
// height: Math.max(fileImage.height,1.5*root.fontFactor*osSettings.bigFontSize)+2*mm
// Rectangle{
// id:imagetextRectangle
// color:"black"
// x:mm
// z:3
// opacity: fileIsDir?0:0.5
// width:imagetext.contentWidth
// height: imagetext.contentHeight
// anchors.bottom: fileImage.bottom
// }
// Text {
// id:imagetext
// x: mm//fileIsDir?11*mm:mm
// z:4
// text: fileIsDir?"\uf07b "+fileName:fileName
// width: fileIsDir?parent.width - 2.5*root.fontFactor*osSettings.bigFontSize :imageView.width-mm
// anchors.bottom: fileImage.bottom
// color: fileIsDir?Material.primaryTextColor:"white"
// font.pointSize: osSettings.bigFontSize
// wrapMode:Text.Wrap
// }
// Text {
// id:selected
// anchors.right:parent.right
// visible: attachImageURLs.indexOf(fileURL)>-1
// z:4
// text: "\u2713"
// width: 2*root.fontFactor*osSettings.bigFontSize
// anchors.top: fileImage.top
// color: "green"
// font.pointSize: 3*osSettings.bigFontSize
// }
// Image{id:fileImage
// width: imageView.width-mm
// fillMode:Image.PreserveAspectFit
// source:fileIsDir?"":fileURL
// }
// MouseArea{
// anchors.fill: parent
// onClicked:{
// if (fileName==".."){
// imageModel.folder=imageModel.parentFolder;
// directory=imageModel.parentFolder
// }
// else if (fileIsDir){
// imageModel.folder=fileURL;
// directory=fileURL
// }
// else{
// if (multiple!=true){
// //attachImageURLs.push(fileURL);
// //attachImage(fileURL);
// imageUrls.push(fileURL);
// imageUrl=fileURL;
// ready();
// imageDialog.destroy()
// }
// else {
// if(selected.visible==true){
// imageUrls.splice(imageUrls.indexOf(fileURL,1))
// selected.visible=false
// }
// else{
// imageUrls.push(fileURL);
// selected.visible=true;
// }
// imageUrl=fileURL
// }
// }
// }
// }
// }
// }
// Component.onCompleted: imageFileDialog.open()
}

View File

@ -62,10 +62,9 @@ Rectangle{
}
}
Text{ //cid not working in Friendica 02/2022
Label{ //cid not working in Friendica 02/2022
x:0.5*mm
y:0.5*mm
color: osSettings.primaryTextColor
text: qsTr("Friends")
}
ListView {
@ -95,8 +94,7 @@ Rectangle{
else if (contactstatus=="negative"){contactitemRect.color= "red"}
else{contactitemRect.color= osSettings.backgroundColor}}
//border.color:Material.frameColor
Text{
color: osSettings.primaryTextColor
Label{
text:contact.screen_name
}
MouseArea{
@ -124,8 +122,7 @@ Rectangle{
else {contactstatus="neutral"} }
}
}
Text{
color: osSettings.primaryTextColor
Label{
x:contactView.width+2*mm
y:0.5*mm
text: qsTr("Groups")
@ -157,8 +154,7 @@ Rectangle{
else{groupitemRect.color= osSettings.backgroundColor}}
color: osSettings.backgroundColor
//border.color: Material.frameColor
Text{
color: osSettings.primaryTextColor
Label{
text:group.groupname
}
MouseArea{
@ -182,7 +178,7 @@ Rectangle{
else {groupstatus="neutral"} }
}
}
MButton{
Button{
x:0.5*mm
anchors.bottom: parent.bottom
anchors.bottomMargin:1
@ -194,7 +190,7 @@ Rectangle{
Service.savePermissions(db,perms)
}
}
MButton{
Button{
x:contactView.width+2*mm
anchors.bottom: parent.bottom
anchors.bottomMargin:1

View File

@ -162,7 +162,7 @@ Page {
y: mm
spacing:4
MButton{
Button{
id:photobutton
height: 6*mm
width: 8*mm
@ -179,7 +179,7 @@ Page {
}
}
MButton{
Button{
id:dmbutton
height: 6*mm
width: 8*mm
@ -192,7 +192,7 @@ Page {
}
}
MButton{
Button{
id:eventbutton
visible:(contact.network=="dfrn")
height: 6*mm
@ -206,7 +206,7 @@ Page {
rootstackView.pop()
}
}
MButton{
Button{
id:approvebutton
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
height: 6*mm
@ -220,7 +220,7 @@ Page {
rootstackView.pop()
}
}
MButton{
Button{
id:rejectbutton
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
height: 6*mm
@ -234,7 +234,7 @@ Page {
rootstackView.pop()
}
}
MButton{
Button{
id:ignorebutton
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
height: 6*mm
@ -248,7 +248,7 @@ Page {
rootstackView.pop()
}
}
MButton{
Button{
id:followbutton
visible:(contact.isFriend==0 || !contact.hasOwnProperty("isFriend"))
height: 6*mm
@ -264,7 +264,7 @@ Page {
}
}
MButton{
Button{
id:unfollowbutton
visible:(contact.isFriend==1)
height: 6*mm
@ -279,7 +279,7 @@ Page {
}
}
MButton{
Button{
id: blockbutton
visible:(contact.statusnet_blocking!=1)
height: 6*mm
@ -295,7 +295,7 @@ Page {
}
}
MButton{
Button{
id: unblockbutton
visible:(contact.statusnet_blocking==1)
height: 6*mm
@ -318,14 +318,13 @@ Page {
height: implicitHeight
text:contact.name+" (@"+contact.screen_name+")"
wrapMode: Text.Wrap
color: osSettings.primaryTextColor
font.pointSize: 1.2*osSettings.bigFontSize
font.family: "Noto Sans"
anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom
anchors.margins: mm
anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right
}
Text{
Label{
id:detailtext
anchors.top: namelabel.bottom
anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right
@ -336,7 +335,6 @@ Page {
font.family: "Noto Sans"
textFormat:Text.RichText
wrapMode: Text.Wrap
color: osSettings.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>"+
"<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())+"<br>"+
@ -383,7 +381,7 @@ Page {
source: "qrc:/js/newsworker.js"
}
MButton {
Button {
id: closeButton
anchors.top: parent.top
anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize

View File

@ -142,7 +142,7 @@ Page {
source: "qrc:/js/newsworker.js"
}
MButton {
Button {
id: closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm

View File

@ -1,4 +1,4 @@
// This file is part of Friendiqa
s// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
//
@ -75,8 +75,7 @@ Rectangle {
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: osSettings.primaryTextColor
Label{
font.pointSize: osSettings.bigFontSize
anchors.left: contactImage.right
anchors.margins: 1*mm
@ -90,7 +89,7 @@ Rectangle {
}
}
MButton {
Button {
id: closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm

View File

@ -38,7 +38,7 @@ Rectangle {
radius:0.3*mm
width:hashtagText.contentWidth+mm
height:root.fontFactor*osSettings.bigFontSize
Text{
Label{
id:hashtagText
font.pointSize: osSettings.systemFontSize
color: osSettings.secondaryTextColor

View File

@ -195,7 +195,7 @@ Page{
anchors.right: uploadImage.right
color: "black"
opacity: 0.5
Text{anchors.centerIn:parent;font.family: fontAwesome.name;text: "\uf01e";color: "white"}
Label{anchors.centerIn:parent;font.family: fontAwesome.name;text: "\uf01e";color: "white"}
MouseArea{
anchors.fill:parent;
onClicked:{
@ -214,7 +214,7 @@ Page{
anchors.left: uploadImage.left
color: "black"
opacity: 0.5
Text{anchors.centerIn:parent;font.family: fontAwesome.name; text: "\uf00d";color: "white"}
Label{anchors.centerIn:parent;font.family: fontAwesome.name; text: "\uf00d";color: "white"}
MouseArea{
anchors.fill:parent;
onClicked:{
@ -223,7 +223,7 @@ Page{
}
}
Text {
Label {
id:uploadedArrow
anchors.right:uploadImage.right
visible: imageUploaded

View File

@ -379,7 +379,7 @@ Window{
bodyField.cursorPosition=bodyField.cursorPosition+hashtag.length+1
tagSelector.visible=false
}
delegate: MButton {text:tag;onClicked: tagSelector.processTagSelection(tag)}
delegate: Button {text:tag;onClicked: tagSelector.processTagSelection(tag)}
}
ListModel{id:tagModel}
Row{
@ -388,7 +388,7 @@ Window{
spacing: mm
height: 3.5*root.fontFactor*osSettings.bigFontSize
x: 0.5*mm
MButton {
Button {
id: boldButton
text: "\uf032" // icon-bold
ToolTip.delay: 500
@ -404,7 +404,7 @@ Window{
bodyField.forceActiveFocus()
}
}
MButton {
Button {
id: italicButton
text: "\uf033" // icon-italic
ToolTip.delay: 500
@ -417,7 +417,7 @@ Window{
onClicked: {document.italic = !document.italic;bodyField.forceActiveFocus()}
}
MButton {
Button {
id: liststyleButton
text: "\uf03a" // icon-align-justify
ToolTip.delay: 500
@ -428,7 +428,7 @@ Window{
// checked: document.alignment == Qt.AlignJustify
onClicked: {document.liststyle = !document.liststyle;bodyField.forceActiveFocus()}
}
MButton {
Button {
id: codeblockButton
text: "\uf121" // icon-code
ToolTip.delay: 500
@ -439,7 +439,7 @@ Window{
// checked: document.alignment == Qt.AlignJustify
onClicked: {document.codeblock = !document.codeblock;bodyField.forceActiveFocus()}
}
MButton {
Button {
id: plainButton
text: bodyField.textFormat==TextEdit.PlainText?qsTr("Rendered"):qsTr("MD") // icon-code
ToolTip.delay: 500
@ -466,7 +466,7 @@ Window{
height: 3.5*root.fontFactor*osSettings.bigFontSize
x: 0.5*mm
// MButton{id:permButton //Permissions not working in Friendica 02/2022
// Button{id:permButton //Permissions not working in Friendica 02/2022
// visible: !conversation && (newsSwipeview.stacktype!=="DirectMessages")
// height: 2*root.fontFactor*osSettings.bigFontSize
// width: 2*root.fontFactor*osSettings.bigFontSize
@ -474,7 +474,7 @@ Window{
// onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}}
// }
MButton{
Button{
id:smileyButton
text: "\uf118"
ToolTip.delay: 500
@ -485,7 +485,7 @@ Window{
onClicked: {if (smileyDialog.visible==false){smileyDialog.visible=true} else{smileyDialog.visible=false}}
}
MButton{
Button{
id:hastagButton
text: "\uf292"
ToolTip.delay: 500
@ -495,7 +495,7 @@ Window{
width: 3*root.fontFactor*osSettings.bigFontSize
onClicked: {if (tagSelector.visible==false){hashtagmenu()} else{tagSelector.visible=false}}
}
MButton{
Button{
id:imagesButton
visible:(newsSwipeview.stacktype!="DirectMessages")
text: "\uf03e"
@ -512,7 +512,7 @@ Window{
else{imageUploadDialog.visible=false}}
}
MButton {
Button {
id: cancelButton
ToolTip.delay: 500
ToolTip.visible: pressed || hovered
@ -522,7 +522,7 @@ Window{
text: "\uf057"
onClicked: {messageSend.close()}
}
MButton {
Button {
id: formatButton
ToolTip.delay: 500
ToolTip.visible: pressed || hovered
@ -532,7 +532,7 @@ Window{
text: "\uf031"
onClicked: {formatRow.visible?formatRow.visible=false:formatRow.visible=true}
}
MButton {
Button {
id: sendButton
ToolTip.delay: 500
ToolTip.visible: pressed || hovered

View File

@ -42,7 +42,7 @@ Rectangle{
signal clicked
state:""
Text{
Label{
id:mainText
color: "grey"
anchors.right: parent.right

View File

@ -45,7 +45,7 @@ AnimatedImage {id:gif;
height: imageCountText.contentHeight+mm
x: (gif.width-gif.paintedWidth)/2+gif.paintedWidth-width
anchors.bottom: parent.bottom
Text {
Label {
anchors.centerIn: parent
id: imageCountText
text: "+ " + (model.newsitemobject.imageAttachmentList.length-1).toString()

View File

@ -58,7 +58,7 @@ Page{
id: photolistModel
}
MButton {
Button {
id: closeButton
z:2
anchors.top: parent.top

View File

@ -335,8 +335,7 @@ Rectangle{
border.width: 1
width:newsView.width
height:6*mm
Text{
color: osSettings.primaryTextColor
Label{
font.pointSize: osSettings.systemFontSize
anchors.centerIn: parent
text:qsTr("More")
@ -482,7 +481,7 @@ Rectangle{
source: "qrc:/js/newsworker.js"
}
Text {
Label {
id: closeButton
//Svisible: !(globaloptions.defaultNewsTypes.indexOf(newsSwipeview.stacktype)>-1)
anchors.top: parent.top
@ -523,7 +522,7 @@ Rectangle{
height: noticeText.height+2*mm
visible: (downloadNotice.text!="")
Text{
Label{
id:noticeText
color: "grey"
anchors.centerIn: parent

View File

@ -129,7 +129,7 @@ Page{
function getIcon(typerequest){
switch (typerequest){
case "Home": return "\uf015"
case "Home": return "\uf015";
case "Favorites": return "\uf005";
case "Replies": return "\uf0ec";
case "DirectMessages": return "\uf0e0";
@ -173,14 +173,17 @@ Page{
leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()}
}
MButton{
Button{
z:2
anchors.right: parent.right
anchors.bottom: parent.bottom
// fontColor: "grey"
// border.color: "transparent"
text: "\uf040"
font.pointSize: osSettings.bigFontSize
Label {
anchors.centerIn: parent
font.family: fontAwesome.name
text: "\uf040"
}
onClicked:{
if (newsSwipeview.stacktype=="DirectMessages"){openMessageSend("directmessage","")}
else {openMessageSend("active","")}
@ -225,6 +228,7 @@ Page{
onCurrentIndexChanged: {
if(newstypes[currentIndex]){stacktype=newstypes[currentIndex]}
else{stacktype="Home"}
newstabbar.currentIndex=newsSwipeview.currentIndex;
}
Loader{

View File

@ -34,18 +34,17 @@ import QtQuick.Controls 6.3
TabButton {
id: tabbutton
font.family: fontAwesome.name
font.pointSize : osSettings.bigFontSize
width: newstabbar.width/5
property string buttontype: ""
text: getIcon(buttontype)
background:Rectangle{
anchors.fill: parent
color: osSettings.backgroundDimColor
border.color: newstypes[newsSwipeview.currentIndex]==buttontype?osSettings.accentColor:color
}
ToolTip.delay: 500
ToolTip.visible: pressed || hovered
ToolTip.text: qsTr(buttontype)
onDoubleClicked: {newstypeSignal(buttontype)}
Label {
anchors.centerIn: parent
font.family: fontAwesome.name
text: getIcon(buttontype)
}
}

View File

@ -36,7 +36,7 @@ Rectangle{
width:toprow.width/2;
height:toprow.width/3//video.hasVideo?newscolumn.width/4*3:10*mm
property var attachment:({})
Text{
Label{
id:noticeText
text:"\uf144";
color:"light grey"

View File

@ -41,7 +41,7 @@ Page{
width:root.width;
height:root.height-3*root.fontFactor*osSettings.bigFontSize
property alias source:video.source
Text{
Label{
id:noticeText
text:""
color:"light grey"
@ -92,7 +92,7 @@ Page{
value: video.bufferProgress
}
MButton {
Button {
id: closeButton
z:2
anchors.top: parent.top

View File

@ -138,8 +138,7 @@ Item {
width: toprow.width-2
height: itemMessage.height
onClicked: {pushConversation()}
Text {
color: osSettings.primaryTextColor
Label {
linkColor: osSettings.accentColor
id: itemMessage
textFormat: Text.RichText
@ -284,7 +283,7 @@ Item {
implicitWidth: newsitem.width/5
implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{
Label{
anchors.centerIn: parent
font.pointSize: osSettings.bigFontSize
font.family:fontAwesome.name
@ -313,7 +312,7 @@ Item {
implicitWidth: newsitem.width/5
implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{
Label{
anchors.centerIn: parent
font.pointSize: osSettings.bigFontSize
font.family:fontAwesome.name
@ -342,7 +341,7 @@ Item {
implicitWidth: newsitem.width/5
implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{
Label{
anchors.centerIn: parent
font.pointSize: osSettings.bigFontSize
font.family:fontAwesome.name
@ -363,7 +362,7 @@ Item {
height: parent.height
visible:(newsitemobject.messagetype!==2)
color:"transparent"
Text{
Label{
id:replysymbol
color: osSettings.secondaryTextColor
anchors.centerIn: parent
@ -399,7 +398,7 @@ Item {
height: parent.height
visible:(newsitemobject.messagetype!==2)
color:"transparent"
Text{
Label{
id:newsmenusymbol
color: osSettings.secondaryTextColor
anchors.centerIn: parent
@ -417,7 +416,7 @@ Item {
id:newsmenu
width: 10*root.fontFactor*osSettings.systemFontSize
delegate: MenuItem{
contentItem: Text{
contentItem: Label{
font.pointSize: osSettings.systemFontSize
color: osSettings.secondaryTextColor
text: parent.text
@ -484,7 +483,7 @@ Item {
title: qsTr("Attending")
width: 10*root.fontFactor*osSettings.systemFontSize
delegate: MenuItem{
contentItem: Text{
contentItem: Label{
font.pointSize: osSettings.systemFontSize
color: osSettings.secondaryTextColor
text: parent.text

View File

@ -61,7 +61,7 @@ Rectangle{
else{permButton.text="\uf023"}
}}
Text{
Label{
x:0.5*mm
y:0.5*mm
text: qsTr("Friends")
@ -94,7 +94,7 @@ Rectangle{
else{contactitemRect.color= "white"}}
color: "white"
border.color:"grey"
Text{
Label{
color:"grey"
text:contact.screen_name
font.pixelSize: 2*mm
@ -124,7 +124,7 @@ Rectangle{
else {contactstatus="neutral"} }
}
}
Text{
Label{
x:contactView.width+2*mm
y:0.5*mm
text: qsTr("Groups")
@ -157,7 +157,7 @@ Rectangle{
else{groupitemRect.color= "white"}}
color: "white"
border.color:"grey"
Text{
Label{
color:"grey"
text:group.groupname
font.pixelSize: 2*mm
@ -183,7 +183,7 @@ Rectangle{
else {groupstatus="neutral"} }
}
}
MButton{
Button{
x:0.5*mm
height: 6*mm
width: 8*mm
@ -197,7 +197,7 @@ Rectangle{
Service.savePermissions(db,perms)
}
}
MButton{
Button{
x:contactView.width+2*mm
height: 6*mm
width: 8*mm

View File

@ -43,7 +43,7 @@ Rectangle{
height:root.height/2
color: osSettings.backgroundColor
MButton{
Button{
id:closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm

View File

@ -136,7 +136,7 @@ Page{
// }
// }
MButton{
Button{
id:closeButton
text: "\uf057"
width: 2.5*root.fontFactor*osSettings.bigFontSize
@ -155,18 +155,6 @@ Page{
editable:true
model: albumModel
// delegate: ItemDelegate {
// width: album.width
// contentItem: Text {
// //text: modelData
// color: "white"
// font: album.font
// font.pixelSize: album.font.pixelSize
// elide: Text.ElideRight
// verticalAlignment: Text.AlignVCenter
// }
// //highlighted: album.highlightedIndex === index
// }
onAccepted: {
if (find(currentText) === -1) {
albumModel.append({text: editText})
@ -176,20 +164,6 @@ Page{
}
ListModel{id:albumModel}
// Text {
// text: qsTr("Album")
// x: 4*mm; y: 10*mm
// }
// Text {
// text: qsTr("Image")
// x: 4*mm; y: 17*mm
// }
// Text {
// text: qsTr("Description")
// x: 4*mm; y: 33*mm
// }
ListView{
id: imageUploadView

View File

@ -71,7 +71,7 @@ Package {
height: phototext.contentHeight
anchors.bottom: photoWrapper.bottom
}
Text {
Label {
id:phototext
z:4
text: photoDescription.trim()

View File

@ -204,7 +204,7 @@ StackView{
value: fotorectangle.currentimageno/fotorectangle.newimages.length
}
MButton{
Button{
id: uploadPhoto
anchors.top: parent.top
anchors.topMargin: 0.5*mm
@ -214,7 +214,7 @@ StackView{
onClicked: {photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml")}
}
MButton{
Button{
id: updatePhotolist
anchors.top: parent.top
anchors.topMargin: 0.5*mm
@ -241,7 +241,7 @@ StackView{
onClicked: {photoupdatemenu.popup()}
}
MButton{
Button{
id: phototabstatusButton
anchors.top: parent.top
anchors.topMargin: 0.5*mm
@ -291,8 +291,7 @@ StackView{
color: osSettings.dialogColor
width:12*mm
height:6*mm
Text{
color: osSettings.primaryTextColor
Label{
font.pointSize: 0.75*osSettings.systemFontSize
anchors.centerIn: parent
text:qsTr("More")
@ -317,7 +316,7 @@ StackView{
ListView { width: parent.width; height:parent.height; model: visualphotoModel.parts.browser; interactive: false }
MButton {
Button {
id: backButton
text: "\uf057"
x: parent.width - backButton.width - root.fontFactor*osSettings.bigFontSize

View File

@ -85,7 +85,7 @@ Package {
height: albumtext.contentHeight
anchors.bottom: albumWrapper.bottom
}
Text {
Label {
id:albumtext
text: albumname
width:albumWrapper.width-1*mm