forked from lubuwest/Friendiqa
Native theme, qml slimming (settings, calendar, image), tabbing, warning fixes
This commit is contained in:
parent
e1c7694202
commit
8dc907e345
|
@ -0,0 +1,3 @@
|
|||
build-friendiqa-Desktop-Debug
|
||||
friendiqa.pro.user
|
||||
.directory
|
|
@ -8,4 +8,3 @@
|
|||
+ footer: ToolBar{
|
||||
background: Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundDimColor
|
||||
|
|
|
@ -28,7 +28,7 @@ Page {
|
|||
id: dialog
|
||||
anchors.centerIn: parent
|
||||
title: "Dialog"
|
||||
Text {
|
||||
Label {
|
||||
text: "Demo"
|
||||
}
|
||||
z: 20
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../source-linux/application.qrc
|
|
@ -0,0 +1 @@
|
|||
../source-linux/application.qrc
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/alarm.h
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/alarm.h
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/alarmandroid.cpp
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/alarmandroid.cpp
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/alarmlinux.cpp
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/alarmlinux.cpp
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/filesystem.cpp
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/filesystem.cpp
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/filesystem.h
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/filesystem.h
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/filesystemandroid.cpp
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/filesystemandroid.cpp
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/remoteauthasyncimageprovider.cpp
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/remoteauthasyncimageprovider.cpp
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/remoteauthasyncimageprovider.h
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/remoteauthasyncimageprovider.h
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/updatenews.cpp
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/updatenews.cpp
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/updatenews.h
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/updatenews.h
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/uploadableimage.cpp
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/uploadableimage.cpp
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/uploadableimage.h
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/uploadableimage.h
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/xhr.cpp
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/xhr.cpp
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/common/xhr.h
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/common/xhr.h
|
|
@ -1 +0,0 @@
|
|||
../source-linux/images
|
|
@ -0,0 +1 @@
|
|||
../source-linux/images
|
|
@ -1 +0,0 @@
|
|||
../source-linux/js
|
|
@ -0,0 +1 @@
|
|||
../source-linux/js
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/qml/calendarqml
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/qml/calendarqml
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/qml/configqml
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/qml/configqml
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/qml/contactqml
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/qml/contactqml
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/qml/genericqml
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/qml/genericqml
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/qml/newsqml
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/qml/newsqml
|
|
@ -1 +0,0 @@
|
|||
../../source-linux/qml/photoqml
|
|
@ -0,0 +1 @@
|
|||
../../source-linux/qml/photoqml
|
|
@ -1 +0,0 @@
|
|||
../source-linux/qtquickcontrols2.conf
|
|
@ -0,0 +1 @@
|
|||
../source-linux/qtquickcontrols2.conf
|
|
@ -1 +0,0 @@
|
|||
../source-linux/translations
|
|
@ -0,0 +1 @@
|
|||
../source-linux/translations
|
|
@ -26,9 +26,9 @@
|
|||
<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/CloseButton.qml</file>
|
||||
<file>qml/genericqml/ContactComponent.qml</file>
|
||||
<file>qml/genericqml/PermissionDialog.qml</file>
|
||||
<file>qml/calendarqml/CalendarTab.qml</file>
|
||||
|
@ -224,7 +224,6 @@
|
|||
<file>images/smileys/adult/finger.gif</file>
|
||||
<file>images/smileys/adult/sperm.gif</file>
|
||||
<file>images/smileys/adult/tits.gif</file>
|
||||
<file>images/addImage.png</file>
|
||||
<file>common/filesystem.cpp</file>
|
||||
<file>common/filesystem.h</file>
|
||||
<file>common/friendiqa.cpp</file>
|
||||
|
@ -246,7 +245,8 @@
|
|||
<file>translations/friendiqa-hu.qm</file>
|
||||
<file>translations/friendiqa-hu.ts</file>
|
||||
<file>images/Friendiqa.png</file>
|
||||
<file>images/Friendica_monochrome.png</file>
|
||||
<file>images/friendica-tray-black.svg</file>
|
||||
<file>images/friendica-tray-white.svg</file>
|
||||
<file>qml/configqml/ConfigAppearancePage.qml</file>
|
||||
<file>qml/configqml/ConfigStartPage.qml</file>
|
||||
<file>qml/contactqml/ContactsSearchPage.qml</file>
|
||||
|
|
|
@ -56,4 +56,4 @@ private:
|
|||
int m_time;
|
||||
};
|
||||
|
||||
#endif // UPDATENEWS_H
|
||||
#endif // ALARM_H
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
//#include <QQuickWidget>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QQmlContext>
|
||||
#include <QQuickStyle>
|
||||
|
||||
// Declare a user-defined data type to work with an icon in QML
|
||||
Q_DECLARE_METATYPE(QSystemTrayIcon::ActivationReason)
|
||||
|
@ -105,11 +106,16 @@ int main(int argc, char *argv[]) {
|
|||
ALARM* alarm = ALARM::instance();
|
||||
view.rootContext()->setContextProperty("alarm", alarm);
|
||||
UPDATENEWS* updatenews = UPDATENEWS::instance();
|
||||
updatenews->setDatabase();
|
||||
if(updatenews->getStyle() != 0){
|
||||
QQuickStyle::setStyle("Material");
|
||||
}
|
||||
view.rootContext()->setContextProperty("updatenews", updatenews);
|
||||
|
||||
qmlRegisterType<QSystemTrayIcon>("QSystemTrayIcon", 1, 0, "QSystemTrayIcon");
|
||||
qRegisterMetaType<QSystemTrayIcon::ActivationReason>("ActivationReason");
|
||||
view.rootContext()->setContextProperty("iconTray", QIcon(":/images/Friendica_monochrome.png"));
|
||||
view.rootContext()->setContextProperty("iconTrayBlack", QIcon(QPixmap(":/images/friendica-tray-black.svg")));
|
||||
view.rootContext()->setContextProperty("iconTrayWhite", QIcon(QPixmap(":/images/friendica-tray-white.svg")));
|
||||
view.rootContext()->setContextProperty("iconTrayAvailable", QSystemTrayIcon::isSystemTrayAvailable());
|
||||
|
||||
view.load(QUrl("qrc:/qml/friendiqa.qml"));
|
||||
|
|
|
@ -86,6 +86,16 @@ void UPDATENEWS::setDatabase()
|
|||
}
|
||||
}
|
||||
|
||||
int UPDATENEWS::getStyle()
|
||||
{
|
||||
QSqlQuery syncquery("SELECT * FROM globaloptions",m_db);
|
||||
while (syncquery.next()){
|
||||
if (syncquery.value(0).toString()=="view_darkmode"){
|
||||
return syncquery.value(1).toInt();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void UPDATENEWS::login()
|
||||
{
|
||||
|
|
|
@ -63,6 +63,7 @@ public slots:
|
|||
void setUrl(QString url);
|
||||
void setSyncAll(bool syncAll);
|
||||
void setDatabase();
|
||||
int getStyle();
|
||||
void login();
|
||||
void timeline();
|
||||
void replies();
|
||||
|
|
|
@ -317,7 +317,7 @@ void XHR::onRequestFinished()
|
|||
else if (m_downloadtype=="picturelist") {
|
||||
QJsonDocument jsonResponse = QJsonDocument::fromJson(buffer);
|
||||
QJsonObject jsonObject = jsonResponse.object();
|
||||
int arraystart=buffer.indexOf('{"data":"')+8;
|
||||
int arraystart=buffer.indexOf("{\"data\":\"")+8;
|
||||
int arraylength=buffer.indexOf('"',9)-arraystart;
|
||||
QByteArray b64=buffer.mid(arraystart,arraylength);
|
||||
QString helpfilename=jsonObject["filename"].toString();
|
||||
|
|
|
@ -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 quickcontrols2
|
||||
|
||||
SOURCES += common/friendiqa.cpp \
|
||||
common/uploadableimage.cpp \
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 722 B |
Binary file not shown.
Before Width: | Height: | Size: 371 B |
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
width="658.75421"
|
||||
height="657.44232"
|
||||
viewBox="-10 -5 851.43982 849.7442"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="friendica-tray-black.svg"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.67875"
|
||||
inkscape:cx="334.43831"
|
||||
inkscape:cy="259.30018"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="701"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
fill="#000000"
|
||||
d="m 140.74419,-5 q -37,0 -70.500004,18.5 -33.5,18.5 -54.5,50 -21,31.5 -24,68.5 v 1 q -1,113 -1,337 v 206 q -4,40 13.5,77.5 17.5,37.5 50.5,62 33,24.5 74.000004,27.5 h 1 q 112,1 337,1 h 206 q 40,4 77.5,-13.5 37.5,-17.5 62,-50.5 24.5,-33 27.5,-74 v -1 q 1,-113 1,-338 V 160 q 4,-41 -15,-79 -19,-38 -54,-61.5 -35,-23.5 -77,-24.5 z m 411,34 h 143 q 31,0 58,19 27,19 42,49 15,30 12,61 v 209 q 0,225 -1,337 -2,31 -21.5,56.5 -19.5,25.5 -49,39 -29.5,13.5 -60.5,10.5 h -395 V 606 h 272 l -1,-203 -271,1 V 232 h 272 z"
|
||||
id="path2" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
width="658.75421"
|
||||
height="657.44232"
|
||||
viewBox="-10 -5 851.43982 849.7442"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="friendica-tray-white.svg"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.67875"
|
||||
inkscape:cx="290.97606"
|
||||
inkscape:cy="377.1639"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="701"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
fill="#ffffff"
|
||||
d="m 140.74419,-5 q -37,0 -70.500004,18.5 -33.5,18.5 -54.5,50 -21,31.5 -24,68.5 v 1 q -1,113 -1,337 v 206 q -4,40 13.5,77.5 17.5,37.5 50.5,62 33,24.5 74.000004,27.5 h 1 q 112,1 337,1 h 206 q 40,4 77.5,-13.5 37.5,-17.5 62,-50.5 24.5,-33 27.5,-74 v -1 q 1,-113 1,-338 V 160 q 4,-41 -15,-79 -19,-38 -54,-61.5 -35,-23.5 -77,-24.5 z m 411,34 h 143 q 31,0 58,19 27,19 42,49 15,30 12,61 v 209 q 0,225 -1,337 -2,31 -21.5,56.5 -19.5,25.5 -49,39 -29.5,13.5 -60.5,10.5 h -395 V 606 h 272 l -1,-203 -271,1 V 232 h 272 z"
|
||||
id="path2" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -29,8 +29,8 @@
|
|||
// 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.Controls 2.12
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls.Material 2.12
|
||||
//import QtQuick.Controls 2.4
|
||||
|
||||
Item {
|
||||
|
@ -38,28 +38,27 @@ Item {
|
|||
width: root.fontFactor*osSettings.bigFontSize*2
|
||||
height: root.fontFactor*osSettings.bigFontSize*2
|
||||
property int dateInt: Math.floor(model.date.valueOf()/86400000)
|
||||
Rectangle {
|
||||
id: placeHolder
|
||||
color: model.today?'lightblue':'transparent';
|
||||
border.color: 'lightblue'
|
||||
border.width: 2
|
||||
antialiasing: true
|
||||
anchors.fill:parent
|
||||
radius: 0.5*mm
|
||||
}
|
||||
Text {
|
||||
opacity: (model.month==monthgrid.month)?1:0.2
|
||||
Label {
|
||||
id:daytext
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 0.5*mm
|
||||
color:(model.month==monthgrid.month)?Material.primaryTextColor:Material.secondaryTextColor
|
||||
wrapMode: Text.WrapAnywhere
|
||||
text: model.day
|
||||
font.bold: model.today
|
||||
font.pointSize: 1.2*osSettings.systemFontSize
|
||||
}
|
||||
Rectangle {
|
||||
id: placeHolder
|
||||
border.color: model.today?'red':daytext.color;
|
||||
color:"transparent"
|
||||
border.width: 2
|
||||
antialiasing: true
|
||||
anchors.fill:parent
|
||||
radius: 0.5*mm
|
||||
}
|
||||
Item {
|
||||
id:eventRect
|
||||
color:"grey"
|
||||
anchors.margins: 0.5*mm
|
||||
anchors.bottom: calendarDay.bottom
|
||||
width: parent.width-mm
|
||||
|
|
|
@ -31,21 +31,19 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQml 2.2
|
||||
import Qt.labs.calendar 1.0
|
||||
//import QtQuick.Layouts 1.3
|
||||
import QtQuick.Layouts 1.3
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/calendarqml"
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id:calendarrectangle
|
||||
// y:1
|
||||
width:parent.width
|
||||
height:parent.height
|
||||
color: Material.backgroundColor
|
||||
width: (parent != null)?parent.width:0
|
||||
height: (parent != null)?parent.height:0
|
||||
property date currentTime: new Date()
|
||||
property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000
|
||||
property var events:[]
|
||||
|
@ -68,7 +66,7 @@ Rectangle {
|
|||
eventdays=dayArray;
|
||||
calBusy.running=false
|
||||
var currentevents=events;
|
||||
var currentevents=events.filter(event=>(currentTime<=event.end));
|
||||
currentevents=events.filter(event=>(currentTime<=event.end));
|
||||
for (var i=0; i<Math.min(5,currentevents.length);i++){
|
||||
var liststate="";
|
||||
eventModel.append({"event":currentevents[i],"eventstatus":liststate});
|
||||
|
@ -102,10 +100,7 @@ Rectangle {
|
|||
BlueButton{
|
||||
z:2
|
||||
visible: !wideScreen
|
||||
fontColor: "grey"
|
||||
border.color: "transparent"
|
||||
text: "\uf0c9"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{
|
||||
leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()}
|
||||
}
|
||||
|
@ -122,7 +117,7 @@ Rectangle {
|
|||
id: leftDrawerAndroid
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id: updateEvents
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0.5*mm
|
||||
|
@ -165,7 +160,7 @@ Rectangle {
|
|||
onRejected: {close()}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id: createNewEvent
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0.5*mm
|
||||
|
@ -191,7 +186,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id: calendartabstatusButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0.5*mm
|
||||
|
@ -229,24 +224,21 @@ Rectangle {
|
|||
from: new Date()
|
||||
to: new Date(new Date().valueOf()+93312000000)
|
||||
}
|
||||
delegate:
|
||||
Item{
|
||||
width:Math.min(23*root.fontFactor*osSettings.bigFontSize,calendarView.width)
|
||||
height: parent.height
|
||||
Text{
|
||||
delegate: Item {
|
||||
width: (parent != null)?Math.min(23*root.fontFactor*osSettings.bigFontSize,parent.width):0
|
||||
height: (parent != null)?parent.height:0
|
||||
Label{
|
||||
font.bold: true
|
||||
//Layout.fillWidth: true
|
||||
width: parent.width-root.fontFactor*osSettings.bigFontSize
|
||||
horizontalAlignment:Text.AlignHCenter
|
||||
color: Material.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: Material.primaryTextColor
|
||||
horizontalAlignment:Text.AlignHCenter
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
}
|
||||
|
@ -255,6 +247,12 @@ Rectangle {
|
|||
locale: monthgrid.locale
|
||||
//Layout.fillWidth: true
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
|
||||
delegate: Label {
|
||||
text: model.shortName
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
MonthGrid {y:5*root.fontFactor*osSettings.bigFontSize
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls 1.4 as Oldcontrols
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
@ -42,9 +42,9 @@ Flickable{
|
|||
id:eventCreateBox
|
||||
property date startDate: new Date()
|
||||
property var eventInformation: ({})
|
||||
anchors.fill: parent
|
||||
width: (parent != null)?parent.width:0
|
||||
height: (parent != null)?parent.height:0
|
||||
|
||||
contentWidth: eventRect.width; contentHeight: eventRect.height
|
||||
function formatText(count, modelData) {
|
||||
var data = count === 12 ? modelData + 1 : modelData;
|
||||
return data.toString().length < 2 ? "0" + data : data;
|
||||
|
@ -52,17 +52,14 @@ Flickable{
|
|||
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: ScrollBar { }
|
||||
Rectangle{
|
||||
id: eventRect
|
||||
width: root.width
|
||||
height: textColumn.height + 6*root.fontFactor*osSettings.bigFontSize
|
||||
color: Material.backgroundColor
|
||||
MButton{
|
||||
|
||||
Button{
|
||||
id:closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
width: height
|
||||
text: "\uf057"
|
||||
onClicked: {rootstackView.pop()}
|
||||
}
|
||||
|
@ -73,8 +70,6 @@ Flickable{
|
|||
width: 3*root.fontFactor*osSettings.bigFontSize
|
||||
height: root.fontFactor*osSettings.bigFontSize
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
//verticalAlignment: TextInput.AlignBottom
|
||||
color: Material.primaryTextColor
|
||||
text:qsTr("Start")
|
||||
}
|
||||
|
||||
|
@ -94,7 +89,7 @@ Flickable{
|
|||
font.bold: true
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: textStartDateDropdown
|
||||
x: 9.5*root.fontFactor*osSettings.bigFontSize
|
||||
y: root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -121,7 +116,7 @@ Flickable{
|
|||
font.bold: true
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: textStartTimeDropdown
|
||||
x: 16.5*root.fontFactor*osSettings.bigFontSize
|
||||
y: root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -139,7 +134,6 @@ Flickable{
|
|||
width: 3*root.fontFactor*osSettings.bigFontSize
|
||||
height: root.fontFactor*osSettings.bigFontSize
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
color: Material.primaryTextColor
|
||||
text:qsTr("End")
|
||||
}
|
||||
TextField {
|
||||
|
@ -156,7 +150,7 @@ Flickable{
|
|||
font.bold: true
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: textEndDateDropdown
|
||||
x: 9.5*root.fontFactor*osSettings.bigFontSize
|
||||
y: 3*root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -184,7 +178,7 @@ Flickable{
|
|||
font.bold: true
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: textEndTimeDropdown
|
||||
x: 16.5*root.fontFactor*osSettings.bigFontSize
|
||||
y: 3*root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -198,7 +192,6 @@ Flickable{
|
|||
}
|
||||
|
||||
Column{
|
||||
id: textColumn
|
||||
x: 4*root.fontFactor*osSettings.bigFontSize
|
||||
y: 6*root.fontFactor*osSettings.bigFontSize
|
||||
width: parent.width-7*root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -217,6 +210,55 @@ Flickable{
|
|||
}
|
||||
cal.visible=false
|
||||
}
|
||||
style: CalendarStyle {
|
||||
dayDelegate: Rectangle {
|
||||
color:"transparent"
|
||||
opacity: styleData.visibleMonth ? 1 : 0.2
|
||||
anchors.fill: parent
|
||||
Label {
|
||||
id: daytext
|
||||
text: styleData.date.getDate()
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
border.width: 1
|
||||
border.color: styleData.selected?'red':daytext.color;
|
||||
}
|
||||
dayOfWeekDelegate:Item {
|
||||
height: root.fontFactor*osSettings.bigFontSize
|
||||
Label {
|
||||
text: control.__locale.dayName(styleData.dayOfWeek, control.dayOfWeekFormat)
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
background:Item {}
|
||||
navigationBar: Item {
|
||||
height: root.fontFactor*osSettings.bigFontSize
|
||||
ToolButton {
|
||||
height: parent.height
|
||||
id: previousMonth
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
icon.name: "go-previous"
|
||||
onClicked: control.showPreviousMonth()
|
||||
}
|
||||
Label {
|
||||
height: parent.height
|
||||
text: styleData.title
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: previousMonth.right
|
||||
anchors.right: nextMonth.left
|
||||
}
|
||||
ToolButton {
|
||||
height: parent.height
|
||||
id: nextMonth
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
icon.name: "go-next"
|
||||
onClicked: control.showNextMonth()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Frame {
|
||||
|
@ -239,7 +281,7 @@ Flickable{
|
|||
delegate: tumblerDelegateComponent
|
||||
}
|
||||
}
|
||||
MButton {
|
||||
Button {
|
||||
id: timeInputfinished
|
||||
width: 2*root.fontFactor*osSettings.bigFontSize
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -292,9 +334,7 @@ Flickable{
|
|||
placeholderText: qsTr("Title (required)")
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
color: Material.backgroundColor
|
||||
radius: 0.5*mm
|
||||
Item{
|
||||
width: parent.width-root.fontFactor*osSettings.bigFontSize
|
||||
height:Math.max(bodyField.contentHeight+root.fontFactor*osSettings.bigFontSize,2.5*root.fontFactor*osSettings.bigFontSize)
|
||||
TextArea {
|
||||
|
@ -305,8 +345,6 @@ Flickable{
|
|||
wrapMode: Text.Wrap
|
||||
selectByMouse: true
|
||||
placeholderText: qsTr("Event description (optional)")
|
||||
textFormat: TextEdit.PlainText
|
||||
text: eventInformation.hasOwnProperty("text")?eventInformation.text:""
|
||||
onLinkActivated:{Qt.openUrlExternally(link)}
|
||||
}
|
||||
}
|
||||
|
@ -327,64 +365,12 @@ Flickable{
|
|||
text: qsTr("Publish event?")
|
||||
}
|
||||
|
||||
BusyIndicator{
|
||||
id: eventCreateBusy
|
||||
anchors.horizontalCenter: eventCreateBox.horizontalCenter
|
||||
anchors.top:eventCreateBox.top
|
||||
anchors.topMargin: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width:3*root.fontFactor*osSettings.bigFontSize
|
||||
height: 3*root.fontFactor*osSettings.bigFontSize
|
||||
running: false
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:createEventButton
|
||||
text: qsTr("Create event")
|
||||
onClicked:{
|
||||
let startdatetext=textStartDate.getText(0,textStartDate.length);
|
||||
let startdate=new Date(startdatetext.substring(6,10)+"-"+startdatetext.substring(3,5)+"-"+startdatetext.substring(0,2)+"T"+textStartTime.text)
|
||||
|
||||
if (titleField.text==""){
|
||||
Helperjs.showMessage(qsTr("Error"),qsTr("No event name supplied"),eventCreateBox)
|
||||
}else{
|
||||
let startdatetext=textStartDate.getText(0,textStartDate.length);
|
||||
let startdate=new Date(startdatetext.substring(6,10)+"-"+startdatetext.substring(3,5)+"-"+startdatetext.substring(0,2)+"T"+textStartTime.text)
|
||||
eventCreateBusy.running=true;
|
||||
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||
xhr.setUrl(login.server);
|
||||
xhr.setApi("/api/friendica/event_create");
|
||||
xhr.clearParams();
|
||||
xhr.setParam("name", titleField.text);
|
||||
xhr.setParam("start_time",startdate.toISOString())
|
||||
if(!checkNoEndTime.checked){
|
||||
let enddatetext=textEndDate.getText(0,textEndDate.length);
|
||||
let enddate=new Date(enddatetext.substring(6,10)+"-"+enddatetext.substring(3,5)+"-"+enddatetext.substring(0,2)+"T"+textEndTime.text)
|
||||
xhr.setParam("end_time",enddate.toISOString())
|
||||
}
|
||||
xhr.setParam("name",titleField.text)
|
||||
if (bodyField.text!=""){xhr.setParam("desc",bodyField.text)}
|
||||
if (locationField.text!=""){xhr.setParam("place",locationField.text)}
|
||||
xhr.setParam("publish",chkbxPublish.checked)
|
||||
xhr.post();
|
||||
}
|
||||
}
|
||||
}
|
||||
Connections{
|
||||
target: xhr
|
||||
function onSuccess(text,api){
|
||||
if (api=="/api/friendica/event_create"){
|
||||
updatenews.setDatabase();
|
||||
updatenews.login();
|
||||
updatenews.setSyncAll(false);
|
||||
updatenews.events();
|
||||
try{while(rootstackView.depth>1){rootstackView.pop()}}catch(e){}
|
||||
}
|
||||
}
|
||||
function onError(text,api){
|
||||
if (api=="/api/friendica/event_create"){
|
||||
Helperjs.showMessage(qsTr("Error"),text,root)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -393,11 +379,18 @@ Flickable{
|
|||
Label {
|
||||
text: formatText(Tumbler.tumbler.count, modelData)
|
||||
opacity: 1.0 - Math.abs(Tumbler.displacement) / (Tumbler.tumbler.visibleItemCount / 2)
|
||||
color:Material.primaryTextColor
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BusyIndicator{
|
||||
id: eventCreateBusy
|
||||
anchors.centerIn: parent
|
||||
width:3*root.fontFactor*osSettings.bigFontSize
|
||||
height: 3*root.fontFactor*osSettings.bigFontSize
|
||||
running: false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,20 +31,19 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQml.Models 2.14
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
import "qrc:/qml/calendarqml"
|
||||
|
||||
Rectangle{
|
||||
Item{
|
||||
id:eventList
|
||||
color: Material.backgroundColor
|
||||
property var daylist:[]
|
||||
property int dayint: 0
|
||||
property var events:[]
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
|
@ -54,7 +53,7 @@ Rectangle{
|
|||
onClicked:{rootstackView.pop()}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id: createNewEvent
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
|
|
|
@ -31,22 +31,17 @@
|
|||
|
||||
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"
|
||||
import "qrc:/qml/calendarqml"
|
||||
|
||||
Rectangle{
|
||||
Item{
|
||||
id:eventItem
|
||||
property string status: eventstatus
|
||||
property var currEvent: event
|
||||
width:parent.width
|
||||
height:Math.max(eventNameText.height+eventDetailsText.height,profileImage.height)+mm
|
||||
border.color: Material.backgroundDimColor
|
||||
color: Material.backgroundColor
|
||||
border.width: 1
|
||||
radius: 0.5*mm
|
||||
Image {
|
||||
id:profileImage
|
||||
source: ((event.eventOwner.profile_image!="") && (typeof(event.eventOwner.profile_image)=="string"))? "file://"+event.eventOwner.profile_image : event.eventOwner.profile_image_url
|
||||
|
@ -56,25 +51,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: Material.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: Material.primaryTextColor
|
||||
textFormat: Text.RichText
|
||||
text: status!="large"?"":Qt.atob(event.desc) + (event.location==""?"":"<br><br>"+qsTr("Location")+": "+event.location)
|
||||
anchors.top: eventNameText.bottom
|
||||
|
@ -85,7 +78,7 @@ Rectangle{
|
|||
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
MButton{
|
||||
Button{
|
||||
id: deleteEvent
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0.5*mm
|
||||
|
|
|
@ -59,7 +59,7 @@ Page{
|
|||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:userButton
|
||||
text:qsTr("User")
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
|
@ -105,7 +105,7 @@ Page{
|
|||
}
|
||||
}
|
||||
FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"}
|
||||
MButton{
|
||||
Button{
|
||||
id:serverSearchButton
|
||||
text:"\uf002"
|
||||
icon.name: "search"
|
||||
|
@ -200,7 +200,7 @@ Page{
|
|||
ListElement{text:"https://venera.social"}
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: ruleButton
|
||||
x: root.fontFactor*osSettings.bigFontSize; y: 6*root.fontFactor*osSettings.bigFontSize; width: root.width-9*mm;
|
||||
visible: (osSettings.osType=="Android") && (userButton.text== qsTr("User"))
|
||||
|
@ -268,7 +268,7 @@ Page{
|
|||
onTextChanged: imagestoredir=imagestore.text
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
x: root.width-3*root.fontFactor*osSettings.bigFontSize; y: 13*root.fontFactor*osSettings.bigFontSize;
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize;
|
||||
visible:imagestore.text!=""
|
||||
|
@ -298,7 +298,7 @@ Page{
|
|||
running: false
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id:confirmation
|
||||
x: root.fontFactor*osSettings.bigFontSize; y: 16*root.fontFactor*osSettings.bigFontSize
|
||||
text: qsTr("Confirm")
|
||||
|
@ -312,19 +312,17 @@ Page{
|
|||
else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
|
||||
else if (password.text=="") {errormessage+=qsTr("No password given! ")}
|
||||
else if (imagestoredir=="") {errormessage+=qsTr("No image directory given!")}
|
||||
|
||||
else {errormessage=""}
|
||||
if (errormessage=="") {
|
||||
Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials.json?skip_status=true",root,function(obj){
|
||||
accountBusy.running=false;
|
||||
try{var credentials=JSON.parse(obj);
|
||||
try{
|
||||
var credentials=JSON.parse(obj);
|
||||
if (credentials.hasOwnProperty('error')){
|
||||
Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)
|
||||
}
|
||||
else{
|
||||
} else{
|
||||
if (users.length==0){Service.setDefaultOptions(db);}
|
||||
if(userconfig.imagestore == filesystem.homePath+"/"+username.text+"/")
|
||||
{
|
||||
if(userconfig.imagestore == filesystem.homePath+"/"+username.text+"/") {
|
||||
filesystem.makePath(filesystem.homePath+"/"+username.text);
|
||||
}
|
||||
filesystem.Directory=imagestoredir
|
||||
|
@ -337,7 +335,8 @@ Page{
|
|||
storedUsers.sort(function(obj1, obj2) {
|
||||
return obj1.isActive - obj2.isActive;
|
||||
});
|
||||
accountPage.users=storedUsers});
|
||||
accountPage.users=storedUsers
|
||||
});
|
||||
//reset values
|
||||
login=userconfig;
|
||||
news=[];
|
||||
|
@ -348,12 +347,15 @@ Page{
|
|||
Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.name+"\nScreen Name: "+credentials.screen_name,root)
|
||||
rootstackView.pop()
|
||||
}
|
||||
}catch(e){Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)};
|
||||
|
||||
})}
|
||||
else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
|
||||
}}
|
||||
|
||||
}catch(e){
|
||||
Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password or 2FA enabled!"),root)
|
||||
};
|
||||
})
|
||||
} else {
|
||||
Helperjs.showMessage(qsTr("Error"), errormessage,root)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row{
|
||||
spacing:0.5*mm
|
||||
|
@ -361,7 +363,7 @@ Page{
|
|||
anchors.topMargin: root.fontFactor*osSettings.bigFontSize
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
MButton {
|
||||
Button {
|
||||
width: 5*mm;
|
||||
visible: users.length>0
|
||||
text: "-"
|
||||
|
@ -391,7 +393,7 @@ Page{
|
|||
})
|
||||
}}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
width: 5*mm;
|
||||
visible: users.length>0
|
||||
text: "+"
|
||||
|
@ -407,7 +409,7 @@ Page{
|
|||
}
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
width: 5*mm;
|
||||
text: "?"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
|
@ -415,7 +417,7 @@ Page{
|
|||
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
Button{
|
||||
id:closeButton
|
||||
width: 5*mm;
|
||||
visible: users.length>0
|
||||
|
|
|
@ -33,188 +33,116 @@ import QtQuick 2.11
|
|||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.11
|
||||
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
|
||||
anchors.fill: parent
|
||||
|
||||
ColumnLayout{
|
||||
anchors.fill: parent
|
||||
Label {
|
||||
text: qsTr("News as")
|
||||
font.pointSize:osSettings.systemFontSize
|
||||
x: root.fontFactor*osSettings.bigFontSize; y: 2*root.fontFactor*osSettings.bigFontSize
|
||||
font.pointSize: 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()
|
||||
ComboBox {
|
||||
Layout.minimumWidth:root.width - mm * 3 - closeButton.width
|
||||
model: [ qsTr("Timeline"), qsTr("Conversations") ]
|
||||
currentIndex: globaloptions["newsViewType"] == "Timeline"?0:1
|
||||
onCurrentIndexChanged: {
|
||||
if(currentIndex == 0) {
|
||||
Service.updateglobaloptions(root.db,"newsViewType","Timeline");
|
||||
} else {
|
||||
Service.updateglobaloptions(root.db,"newsViewType","Conversations");
|
||||
}
|
||||
}
|
||||
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
|
||||
font.pointSize: 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
|
||||
Row{
|
||||
Label {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
id:maxNewsText
|
||||
text:maxNews.value
|
||||
}
|
||||
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: 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);
|
||||
onMoved: {
|
||||
Service.updateglobaloptions(root.db,"max_news",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
checked:globaloptions["hide_nsfw"]==1
|
||||
onClicked: {
|
||||
toggle();
|
||||
if(nsfwCheckbox.checked==true){
|
||||
Service.updateglobaloptions(root.db,"hide_nsfw",0);nsfwCheckbox.checked=false;
|
||||
if(checked){
|
||||
Service.updateglobaloptions(root.db,"hide_nsfw",1);
|
||||
}
|
||||
else{
|
||||
Service.updateglobaloptions(root.db,"hide_nsfw",1);nsfwCheckbox.checked=true;
|
||||
Service.updateglobaloptions(root.db,"hide_nsfw",0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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}
|
||||
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
RadioButton{
|
||||
id: darkRadio
|
||||
text: qsTr("Native")
|
||||
checked: globaloptions["view_darkmode"]==0 || globaloptions["view_darkmode"]==undefined
|
||||
onClicked: {
|
||||
if(checked){
|
||||
Service.updateglobaloptions(root.db,"view_darkmode",0);
|
||||
}
|
||||
}
|
||||
}
|
||||
RadioButton{
|
||||
text: qsTr("System")
|
||||
checked: (globaloptions["view_darkmode"]==0 || globaloptions["view_darkmode"]==undefined)?true:false
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
checked: globaloptions["view_darkmode"]==1
|
||||
onClicked: {
|
||||
if(checked==true){
|
||||
Service.updateglobaloptions(root.db,"view_darkmode",0);
|
||||
if(checked){
|
||||
root.Material.theme=Material.System
|
||||
systemTray.icon = root.color<palette.text?iconTrayWhite:iconTrayBlack
|
||||
Service.updateglobaloptions(root.db,"view_darkmode",1);
|
||||
}
|
||||
}
|
||||
}
|
||||
RadioButton{
|
||||
text: qsTr("Dark")
|
||||
checked: (globaloptions["view_darkmode"]==1)?true:false
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
checked: globaloptions["view_darkmode"]==2
|
||||
onClicked: {
|
||||
if(checked==true){
|
||||
Service.updateglobaloptions(root.db,"view_darkmode",1);
|
||||
if(checked){
|
||||
root.Material.theme=Material.Dark
|
||||
systemTray.icon = root.color<palette.text?iconTrayWhite:iconTrayBlack
|
||||
Service.updateglobaloptions(root.db,"view_darkmode",2);
|
||||
}
|
||||
}
|
||||
}
|
||||
RadioButton{
|
||||
text: qsTr("Light")
|
||||
checked: (globaloptions["view_darkmode"]==2)?true:false
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
checked: globaloptions["view_darkmode"]==3
|
||||
onClicked: {
|
||||
if(checked==true){
|
||||
Service.updateglobaloptions(root.db,"view_darkmode",2);
|
||||
if(checked){
|
||||
root.Material.theme=Material.Light
|
||||
systemTray.icon = root.color<palette.text?iconTrayWhite:iconTrayBlack
|
||||
Service.updateglobaloptions(root.db,"view_darkmode",3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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()}
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -33,73 +33,41 @@ 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"
|
||||
|
||||
Page{
|
||||
//anchors.fill: parent
|
||||
width:root.width
|
||||
height:root.height
|
||||
width: (parent != null)?parent.width:0
|
||||
height: (parent != null)?parent.height:0
|
||||
|
||||
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
|
||||
width:root.width/3
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Sync")
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width:10*root.fontFactor*osSettings.bigFontSize
|
||||
width:root.width/3
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Start")
|
||||
visible:osSettings.osType=="Linux"
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width:10*root.fontFactor*osSettings.bigFontSize
|
||||
width:root.width/3
|
||||
}
|
||||
}
|
||||
|
||||
LeftDrawerLinux{
|
||||
id:leftDrawer
|
||||
visible: wideScreen&&rootstackView.depth<2
|
||||
width: visible?osSettings.systemFontSize*15:0
|
||||
height: root.height-bar.height
|
||||
}
|
||||
|
||||
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
|
||||
anchors.right: parent.right
|
||||
anchors.left: leftDrawer.right
|
||||
anchors.top: configbar.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.leftMargin: 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
|
||||
|
@ -116,16 +84,32 @@ Page{
|
|||
source:(configTabView.currentIndex==2)? "qrc:/qml/configqml/ConfigStartPage.qml":""
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
|
||||
LeftDrawerLinux{
|
||||
id:leftDrawer
|
||||
visible: wideScreen&&rootstackView.depth<2
|
||||
width: visible?osSettings.systemFontSize*15:0
|
||||
height: root.height-bar.height
|
||||
}
|
||||
|
||||
LeftDrawerAndroid{
|
||||
id: leftDrawerAndroid
|
||||
}
|
||||
|
||||
CloseButton {
|
||||
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
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
text: "\uf057"
|
||||
anchors.top: configTabView.top
|
||||
}
|
||||
|
||||
Button {
|
||||
anchors.top: closeButton.bottom
|
||||
anchors.topMargin: 1*mm
|
||||
anchors.left: closeButton.left
|
||||
width: height
|
||||
text: "?"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{rootstackView.pop()}
|
||||
onClicked:{
|
||||
rootstackView.push("qrc:/qml/configqml/InfoBox.qml");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,33 +31,18 @@
|
|||
|
||||
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
|
||||
anchors.fill: parent
|
||||
|
||||
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;
|
||||
}
|
||||
filesystem.setAutostart(checked);
|
||||
}
|
||||
}
|
||||
// CheckBox{
|
||||
|
|
|
@ -31,17 +31,15 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Page{
|
||||
Text{id:infoBoxText
|
||||
Label{id:infoBoxText
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: closeButton.bottom
|
||||
anchors.topMargin: mm
|
||||
anchors.leftMargin: mm
|
||||
textFormat: Text.RichText
|
||||
width: root.width-mm
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
color:Material.primaryTextColor
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
text: "<b>Friendiqa v0.6.7 </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>"+
|
||||
|
@ -54,16 +52,12 @@ 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{
|
||||
}
|
||||
|
||||
CloseButton {
|
||||
id: closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: root.fontFactor*osSettings.bigFontSize
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
text: "\uf057"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{rootstackView.pop()}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,25 +55,29 @@ ScrollView{
|
|||
text: "\uf085 "+ qsTr("Settings")
|
||||
MouseArea{
|
||||
anchors.fill:parent
|
||||
onClicked:{rootstackView.push("qrc:qml/configqml/ConfigPage.qml");
|
||||
onClicked:{
|
||||
rootstackView.push("qrc:qml/configqml/ConfigPage.qml");
|
||||
if(!wideScreen){leftDrawerAndroid.close()}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label{y: 2*root.fontFactor*osSettings.bigFontSize
|
||||
Label{
|
||||
y: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width:implicitWidth
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
text: "\uf2bb " + qsTr("Accounts")
|
||||
MouseArea{
|
||||
anchors.fill:parent
|
||||
onClicked:{rootstackView.push("qrc:qml/configqml/AccountPage.qml");
|
||||
onClicked:{
|
||||
rootstackView.push("qrc:qml/configqml/AccountPage.qml");
|
||||
if(!wideScreen){leftDrawerAndroid.close()}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label{y: 4*root.fontFactor*osSettings.bigFontSize
|
||||
Label{
|
||||
y: 4*root.fontFactor*osSettings.bigFontSize
|
||||
width:implicitWidth
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
text: "\uf08b " +qsTr("Quit")
|
||||
|
@ -83,31 +87,38 @@ ScrollView{
|
|||
Service.cleanNews(root.db,function(){
|
||||
Service.cleanHashtags(root.db,function(){
|
||||
Service.cleanContacts(root.login,root.db,function(){
|
||||
Qt.quit()})
|
||||
})})
|
||||
Qt.quit()
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component.onCompleted:{
|
||||
Service.readAllLogins(db,function(accounts){
|
||||
var i, accountComponent, accountQml;
|
||||
if (accounts.length>0 && bar.currentIndex==0){
|
||||
leftDrawerColumn.height=4.5*root.fontFactor*osSettings.bigFontSize+accounts.length*17*root.fontFactor*osSettings.bigFontSize
|
||||
for(var i = 0; i < accounts.length; i++) {
|
||||
var accountComponent = Qt.createComponent("qrc:/qml/genericqml/DrawerAccountComponent.qml");
|
||||
var accountQml = accountComponent.createObject(leftDrawerColumn,{
|
||||
"y":4.5*root.fontFactor*osSettings.bigFontSize+i*17*root.fontFactor*osSettings.bigFontSize,
|
||||
leftDrawerColumn.height=(4.5+accounts.length*17)*root.fontFactor*osSettings.bigFontSize
|
||||
for(i = 0; i < accounts.length; i++) {
|
||||
accountComponent = Qt.createComponent("qrc:/qml/genericqml/DrawerAccountComponent.qml");
|
||||
accountQml = accountComponent.createObject(leftDrawerColumn,{
|
||||
"y":(4.5+i*17)*root.fontFactor*osSettings.bigFontSize,
|
||||
"currentnewstabstatus":currentnewstabstatus,
|
||||
"account":accounts[i]});
|
||||
"account":accounts[i]
|
||||
});
|
||||
}
|
||||
}else if(accounts.length>0 && bar.currentIndex==1){
|
||||
leftDrawerColumn.height=4.5*root.fontFactor*osSettings.bigFontSize+accounts.length*8*root.fontFactor*osSettings.bigFontSize
|
||||
for(var i = 0; i < accounts.length; i++) {
|
||||
var accountComponent = Qt.createComponent("qrc:/qml/genericqml/DrawerAccountComponentContacts.qml");
|
||||
var accountQml = accountComponent.createObject(leftDrawerColumn,{
|
||||
"y":4.5*root.fontFactor*osSettings.bigFontSize+i*8*root.fontFactor*osSettings.bigFontSize,
|
||||
"account":accounts[i]});
|
||||
leftDrawerColumn.height=(4.5+accounts.length*8)*root.fontFactor*osSettings.bigFontSize
|
||||
for(i = 0; i < accounts.length; i++) {
|
||||
accountComponent = Qt.createComponent("qrc:/qml/genericqml/DrawerAccountComponentContacts.qml");
|
||||
accountQml = accountComponent.createObject(leftDrawerColumn,{
|
||||
"y":(4.5+i*8)*root.fontFactor*osSettings.bigFontSize,
|
||||
"account":accounts[i]
|
||||
});
|
||||
}
|
||||
}
|
||||
})}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,56 +32,49 @@
|
|||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.11
|
||||
import "qrc:/qml/configqml"
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
||||
Rectangle{
|
||||
color: Material.dialogColor
|
||||
Item{
|
||||
property string adapter: ""
|
||||
width: parent.width
|
||||
height: 4*root.fontFactor*osSettings.bigFontSize
|
||||
height: childrenRect.height
|
||||
Column {
|
||||
width: parent.width
|
||||
Label{
|
||||
x: mm
|
||||
y: 0.5*mm
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
text: qsTr(adapter)
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
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 {
|
||||
checked:globaloptions["sync_"+adapter]==1
|
||||
text: qsTr("sync")
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked: {
|
||||
toggle();
|
||||
if(syncCheckbox.checked==true){
|
||||
Service.updateglobaloptions(root.db,"sync_"+adapter,0);syncCheckbox.checked=false;
|
||||
if(checked){
|
||||
Service.updateglobaloptions(root.db,"sync_"+adapter,0);
|
||||
}
|
||||
else{
|
||||
Service.updateglobaloptions(root.db,"sync_"+adapter,1);syncCheckbox.checked=true;
|
||||
Service.updateglobaloptions(root.db,"sync_"+adapter,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckBox{
|
||||
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;
|
||||
if(checked){
|
||||
Service.updateglobaloptions(root.db,"notify_"+adapter,0);
|
||||
}
|
||||
else{
|
||||
Service.updateglobaloptions(root.db,"notify_"+adapter,1);notifyCheckbox.checked=true;
|
||||
Service.updateglobaloptions(root.db,"notify_"+adapter,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,69 +31,50 @@
|
|||
|
||||
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
|
||||
|
||||
Page{
|
||||
//color:"white"
|
||||
width:root.width
|
||||
height: root.height
|
||||
anchors.fill: parent
|
||||
|
||||
//height:root.height
|
||||
ScrollView{
|
||||
anchors.fill: parent
|
||||
clip:true
|
||||
|
||||
Column {
|
||||
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: Material.dialogColor
|
||||
radius: 0.5*mm
|
||||
TextEdit{
|
||||
Row {
|
||||
Label {
|
||||
id:messageIntervalField
|
||||
anchors.fill: parent
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
verticalAlignment:TextEdit.AlignRight
|
||||
color: Material.primaryTextColor
|
||||
text:messageIntervalSlider.value
|
||||
focus: true
|
||||
selectByMouse: true
|
||||
onTextChanged: {
|
||||
Service.updateglobaloptions(root.db,"syncinterval",text);
|
||||
}
|
||||
|
||||
Slider{
|
||||
id: messageIntervalSlider
|
||||
width: root.width - messageIntervalField.width - mm * 2 - 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(text);
|
||||
} else if(osSettings.osType=="Linux" && text !=0){
|
||||
root.updateSyncinterval(parseInt(text))
|
||||
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;
|
||||
|
||||
Label {
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
text:qsTr("Min.")
|
||||
}
|
||||
|
||||
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"}
|
||||
|
@ -102,16 +83,4 @@ Page{
|
|||
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()}
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -32,17 +32,15 @@
|
|||
// List of people
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQml.Models 2.14
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id:contactlistRectangle
|
||||
property var contacts:[]
|
||||
property var possibleUsers: []
|
||||
//y:8*mm
|
||||
color: "white"
|
||||
border.color: "light grey"
|
||||
radius:0.5*mm
|
||||
width:groupListView.width
|
||||
height:groupListView.height
|
||||
|
||||
|
@ -61,10 +59,7 @@ Rectangle {
|
|||
ListModel{id: contactModel}
|
||||
|
||||
Component { id:listContact
|
||||
Rectangle{
|
||||
border.color: "#EEEEEE"
|
||||
border.width: 1
|
||||
radius:0.5*mm
|
||||
Item{
|
||||
width:contactView.width
|
||||
height:6*mm
|
||||
Image {
|
||||
|
@ -76,13 +71,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
|
||||
|
@ -90,7 +85,6 @@ Rectangle {
|
|||
text: "\u2713"
|
||||
width: 5*mm
|
||||
anchors.top: parent.top
|
||||
color: "green"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
|
||||
|
@ -110,13 +104,12 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
//color:"white"
|
||||
text: "\uf057"
|
||||
onClicked: {
|
||||
groupModelAppend(contacts,function(){
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
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
|
||||
|
@ -99,7 +98,7 @@ Page{
|
|||
}
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -117,7 +116,6 @@ Page{
|
|||
x:1.5*root.fontFactor*osSettings.systemFontSize;
|
||||
width:root.width-(7*root.fontFactor*osSettings.systemFontSize+mm);
|
||||
height: 2.5*root.fontFactor*osSettings.systemFontSize;
|
||||
color:Material.dialogColor
|
||||
selfdestroying:false
|
||||
}
|
||||
|
||||
|
@ -131,13 +129,11 @@ Page{
|
|||
|
||||
Component {
|
||||
id: sectionHeading
|
||||
Rectangle {
|
||||
Item {
|
||||
width: contactsSearchView.width
|
||||
height: childrenRect.height
|
||||
color: Material.backgroundColor
|
||||
required property string section
|
||||
Text {
|
||||
color: Material.secondaryTextColor
|
||||
Label{
|
||||
text: parent.section
|
||||
font.bold: true
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
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
|
||||
|
@ -112,7 +111,7 @@ Item{
|
|||
}
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: updateFriendsButton
|
||||
text: "\uf021"
|
||||
anchors.top: parent.top
|
||||
|
@ -143,16 +142,13 @@ Item{
|
|||
value: friendsGridTab.currentContact/root.newContacts.length
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id:searchComponent
|
||||
x: mm; y:mm
|
||||
color: Material.backgroundColor
|
||||
radius:0.5*mm
|
||||
width: 10*root.fontFactor*osSettings.bigFontSize
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
TextField {
|
||||
id: searchText
|
||||
color: Material.primaryTextColor
|
||||
focus: true
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
wrapMode: Text.Wrap
|
||||
|
@ -170,15 +166,12 @@ Item{
|
|||
anchors.left: searchComponent.right
|
||||
anchors.leftMargin: root.fontFactor*osSettings.bigFontSize
|
||||
y: mm
|
||||
width: 6*root.fontFactor*osSettings.bigFontSize
|
||||
height: 1.5*root.fontFactor*osSettings.bigFontSize
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
model: [qsTr("Friends"), qsTr("All"), qsTr("Blocked")]
|
||||
onCurrentIndexChanged:{
|
||||
if (currentIndex === 0) {
|
||||
showFriends(root.login.username);
|
||||
} else
|
||||
if (currentIndex===1){
|
||||
} else if (currentIndex===1){
|
||||
showContacts()
|
||||
} else if (currentIndex===2){
|
||||
showBlocked()
|
||||
|
@ -190,13 +183,11 @@ Item{
|
|||
|
||||
Component {
|
||||
id: sectionHeading
|
||||
Rectangle {
|
||||
Item {
|
||||
width: friendsView.width
|
||||
height: childrenRect.height
|
||||
color: Material.backgroundColor
|
||||
required property string section
|
||||
Text {
|
||||
color: Material.secondaryTextColor
|
||||
Label{
|
||||
text: parent.section
|
||||
font.bold: true
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
|
@ -207,12 +198,10 @@ Item{
|
|||
|
||||
|
||||
Component { id:headerComponent
|
||||
Rectangle{
|
||||
color: Material.dialogColor
|
||||
Item{
|
||||
width:friendsView.width
|
||||
height:6*mm
|
||||
Text{
|
||||
color: Material.primaryTextColor
|
||||
Label{
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
anchors.centerIn: parent
|
||||
text:"\uf234"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
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
|
||||
|
@ -40,9 +39,8 @@ import "qrc:/js/service.js" as Service
|
|||
import "qrc:/qml/contactqml"
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
y:1
|
||||
color: Material.backgroundColor//"white"
|
||||
|
||||
function showContactdetails(contact){
|
||||
// rootstack.currentIndex=0;
|
||||
|
@ -53,10 +51,7 @@ Rectangle {
|
|||
BlueButton{
|
||||
z:2
|
||||
visible: !wideScreen
|
||||
fontColor: "grey"
|
||||
border.color: "transparent"
|
||||
text: "\uf0c9"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{
|
||||
leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
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"
|
||||
|
@ -48,35 +47,29 @@ Item {
|
|||
callback()
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id: wrapper
|
||||
x:0.5*mm
|
||||
y:0.5*mm
|
||||
width:parent.width-mm
|
||||
height: parent.height-mm
|
||||
radius: 0.5*mm
|
||||
border.color: "grey"
|
||||
color:Material.backgroundColor
|
||||
|
||||
Rectangle{
|
||||
Item{
|
||||
id:namelabelRect
|
||||
x: 1
|
||||
y: 1
|
||||
width: wrapper.width-2
|
||||
height: 3*root.fontFactor*osSettings.bigFontSize
|
||||
//border.color: "light grey"
|
||||
color:Material.backgroundColor
|
||||
TextInput {
|
||||
id: namelabel
|
||||
anchors.fill: parent
|
||||
readOnly: true
|
||||
text: group.new?"":group.groupname
|
||||
color: Material.secondaryTextColor//"#303030"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id: closeButton
|
||||
visible: false
|
||||
anchors.right: parent.right
|
||||
|
@ -89,7 +82,7 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:infobutton
|
||||
text:"?"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
|
@ -119,10 +112,9 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
Item{
|
||||
id: detailsrectangle
|
||||
anchors.top: namelabelRect.bottom
|
||||
color: Material.backgroundColor
|
||||
//anchors.topMargin: mm
|
||||
x:mm
|
||||
width: parent.width-2*mm
|
||||
|
|
|
@ -74,7 +74,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
|
||||
|
|
|
@ -31,15 +31,14 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQml.Models 2.14
|
||||
import "qrc:/qml/genericqml"
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
// width:parent.width-2*mm
|
||||
// height:parent.height-14*mm
|
||||
anchors.fill:parent
|
||||
color: Material.backgroundColor//color:"white"
|
||||
property var profile:({})
|
||||
property var attachImageURLs:[]
|
||||
property var createdAtDate: new Date(profile.friendica_owner.created_at)
|
||||
|
@ -115,7 +114,7 @@ Rectangle {
|
|||
callback(profiletext)
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: update
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: mm
|
||||
|
@ -165,9 +164,8 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
Item{
|
||||
id:phototextRectangle
|
||||
color:"black"
|
||||
z:3
|
||||
opacity: 0.5
|
||||
width:6*mm
|
||||
|
@ -175,18 +173,17 @@ Rectangle {
|
|||
anchors.top: photoImage.top
|
||||
anchors.right: photoImage.right
|
||||
}
|
||||
Text {
|
||||
Label{
|
||||
id:phototext
|
||||
z:4
|
||||
text: "\uf040"
|
||||
width:5*mm
|
||||
anchors.top: photoImage.top
|
||||
anchors.right:photoImage.right
|
||||
color: "white"
|
||||
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
|
||||
|
@ -208,7 +205,6 @@ Rectangle {
|
|||
anchors.topMargin: 0
|
||||
anchors.left: photoImage.left
|
||||
wrapMode: Text.Wrap
|
||||
color: Material.secondaryTextColor//"#303030"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
anchors.top: photoImage.bottom
|
||||
}
|
||||
|
@ -216,18 +212,16 @@ Rectangle {
|
|||
ListModel{id:profileModel}
|
||||
Component{
|
||||
id:profileItem
|
||||
Rectangle{
|
||||
Item{
|
||||
id:profileRect
|
||||
width:profileView.width
|
||||
color: Material.backgroundColor
|
||||
height: 5*mm+profiletextfield.height
|
||||
Text{
|
||||
Label{
|
||||
y:mm
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
text:"<b>"+qsTr("profile id")+": </b> "+profileid+"<br>"
|
||||
color:Material.primaryTextColor//"black"
|
||||
}
|
||||
Text{
|
||||
Label{
|
||||
id:profiletextfield
|
||||
x:2*mm
|
||||
y:4.5*mm
|
||||
|
@ -235,16 +229,14 @@ Rectangle {
|
|||
wrapMode: Text.Wrap
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
text:profiletext
|
||||
color:Material.primaryTextColor
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
}
|
||||
Component{
|
||||
id:textcomponent
|
||||
Text{
|
||||
Label{
|
||||
id:namelabeltext
|
||||
color:Material.primaryTextColor
|
||||
width: namelabelflickable.width
|
||||
height: implicitHeight
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
|
|
|
@ -33,8 +33,8 @@ 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 QtQuick.Controls.Material 2.12
|
||||
import QSystemTrayIcon 1.0
|
||||
import "qrc:/js/news.js" as Newsjs
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
@ -75,10 +75,6 @@ ApplicationWindow{
|
|||
property var contactposts:[]
|
||||
property bool imagePicking: false
|
||||
|
||||
|
||||
Material.theme: Material.System
|
||||
color: Material.backgroundColor
|
||||
|
||||
function onLoginChanged(login){
|
||||
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
|
||||
else{
|
||||
|
@ -187,64 +183,36 @@ ApplicationWindow{
|
|||
else {rootstack.currentIndex=0;close.accepted=false}
|
||||
}
|
||||
|
||||
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundColor
|
||||
}
|
||||
|
||||
header: ToolBar{
|
||||
background: Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
RowLayout{
|
||||
anchors.fill: parent
|
||||
|
||||
TabBar {
|
||||
header: TabBar {
|
||||
id: bar
|
||||
Layout.fillWidth: true
|
||||
onCurrentIndexChanged: {
|
||||
rootstack.currentIndex=bar.currentIndex;
|
||||
try{while(rootstackView.depth>1){rootstackView.pop()}}catch(e){}
|
||||
}
|
||||
TabButton {
|
||||
text: "\uf03a"
|
||||
background:Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
width: root.width / 4
|
||||
onDoubleClicked: {newstypeSignal("refresh")}
|
||||
text: "\uf03a"
|
||||
}
|
||||
TabButton {
|
||||
width: root.width / 4
|
||||
text: "\uf0c0"
|
||||
background:Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
}
|
||||
TabButton {
|
||||
width: root.width / 4
|
||||
text: "\uf03e"
|
||||
background:Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
}
|
||||
TabButton {
|
||||
width: root.width / 4
|
||||
text: "\uf073"
|
||||
background:Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StackView{id:rootstackView
|
||||
StackView{
|
||||
id:rootstackView
|
||||
width:root.width
|
||||
height: root.height
|
||||
height: root.height - bar.height
|
||||
initialItem: StackLayout{
|
||||
id:rootstack
|
||||
width:rootstackView.width
|
||||
|
@ -275,6 +243,7 @@ StackView{id:rootstackView
|
|||
}
|
||||
}
|
||||
|
||||
SystemPalette { id: palette; colorGroup: SystemPalette.Active }
|
||||
|
||||
QSystemTrayIcon {
|
||||
id: systemTray
|
||||
|
@ -291,7 +260,7 @@ StackView{id:rootstackView
|
|||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
icon = iconTray
|
||||
icon = root.color<palette.text?iconTrayWhite:iconTrayBlack
|
||||
toolTip = qsTr("Click to open Friendiqa")
|
||||
//&hide()
|
||||
}
|
||||
|
@ -301,23 +270,21 @@ 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(globaloptions.view_darkmode==1){Material.theme=Material.System;}
|
||||
else if (globaloptions.view_darkmode==2){Material.theme=Material.Dark;}
|
||||
else if (globaloptions.view_darkmode==3){Material.theme=Material.Light;}
|
||||
if(!filesystem.Visibility){
|
||||
systemTray.icon = iconTray;
|
||||
// systemTray.toolTip = qsTr("Click to open Friendiqa");
|
||||
systemTray.visible=true
|
||||
systemTray.visible=true;
|
||||
systemTray.show();
|
||||
}
|
||||
|
||||
var component;
|
||||
if(osSettings.osType=="Android"){
|
||||
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
|
||||
component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
|
||||
var IntentReceiverQml = component.createObject(root);
|
||||
}
|
||||
else if (osSettings.osType=="Linux"){
|
||||
if (login!=""){newstypeSignal("refresh")}
|
||||
var component = Qt.createComponent("qrc:/qml/genericqml/LinuxSync.qml");
|
||||
component = Qt.createComponent("qrc:/qml/genericqml/LinuxSync.qml");
|
||||
var LinuxSyncQml = component.createObject(root);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,25 +30,21 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
Rectangle{
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
Item{
|
||||
id: blueButton
|
||||
width: Math.max(mainText.width+2*mm,5*mm)
|
||||
height: 5*mm
|
||||
border.color: "light blue"
|
||||
color:"transparent"//"#EFEAEA" "sky blue"
|
||||
property alias fontColor: mainText.color
|
||||
border.width:1
|
||||
radius: mm
|
||||
property alias text: mainText.text
|
||||
property alias font: mainText.font
|
||||
property alias fontSize: mainText.font.pointSize
|
||||
signal clicked
|
||||
state:""
|
||||
|
||||
Text{
|
||||
Label{
|
||||
id:mainText
|
||||
color: Material.primaryTextColor//"black"
|
||||
anchors.centerIn: parent
|
||||
width: contentWidth
|
||||
height: contentHeight
|
||||
|
@ -57,6 +53,7 @@ Rectangle{
|
|||
text: ""
|
||||
elide: Text.ElideNone
|
||||
}
|
||||
|
||||
MouseArea{
|
||||
id:buttonArea
|
||||
anchors.fill:parent
|
||||
|
@ -67,8 +64,9 @@ Rectangle{
|
|||
|
||||
states: [
|
||||
State { name: "Pressed"
|
||||
PropertyChanges { target: blueButton; color: Material.buttonColor} }
|
||||
PropertyChanges { target: blueButton;} }
|
||||
]
|
||||
|
||||
transitions: [
|
||||
Transition { to:"*"
|
||||
ColorAnimation { target: blueButton; duration: 100} }
|
||||
|
|
|
@ -28,18 +28,19 @@
|
|||
//
|
||||
// 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.6
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
Button{
|
||||
id: mButton
|
||||
property alias color: bg.color
|
||||
width: Math.max(text.width+2*mm,2*root.fontFactor*osSettings.bigFontSize)
|
||||
//radius: mm
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
//color: Material.grey
|
||||
id: closeButton
|
||||
width: height
|
||||
anchors.topMargin: mm
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: mm
|
||||
text: "\uf057"
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
//highlighted:true
|
||||
background: Rectangle{id:bg;color: Material.dialogColor//"#F3F3F3";
|
||||
radius: 0.5*mm}
|
||||
onClicked: {
|
||||
rootstackView.pop()
|
||||
}
|
||||
}
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Item {
|
||||
|
@ -41,13 +40,10 @@ Item {
|
|||
property var createdAtDate: new Date(contact.created_at)
|
||||
property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend==1)?"":( "<a href='"+contact.url.replace("profile","dfrn_request") +"'>"+qsTr("Connect")+"</a><br>")
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id: wrapper
|
||||
width:parent.width
|
||||
height: parent.height
|
||||
radius: 0.5*mm
|
||||
border.color: Material.backgroundDimColor
|
||||
color: Material.backgroundColor
|
||||
Image {
|
||||
id: photoImage
|
||||
x:0.5*mm
|
||||
|
@ -70,7 +66,6 @@ Item {
|
|||
height: 1.1*root.fontFactor*osSettings.bigFontSize
|
||||
text: contact.name
|
||||
elide: contentWidth>wrapper.width-4*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
|
||||
color: Material.secondaryTextColor
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
Label {
|
||||
|
@ -79,7 +74,6 @@ Item {
|
|||
height: 1.1*root.fontFactor*osSettings.bigFontSize
|
||||
text: "(@"+contact.screen_name+")"
|
||||
elide: contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone
|
||||
color: Material.secondaryTextColor
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
}
|
||||
Label {
|
||||
|
@ -89,7 +83,6 @@ Item {
|
|||
maximumLineCount:2
|
||||
text: Qt.atob(contact.description)!=""?contact.description:""
|
||||
elide:Text.ElideRight
|
||||
color: Material.secondaryTextColor
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,27 +31,24 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/configqml"
|
||||
|
||||
Rectangle{
|
||||
Item{
|
||||
// id: leftDrawer
|
||||
// width: osSettings.systemFontSize*30
|
||||
// height: root.height-bar.height
|
||||
//y: bar.height
|
||||
signal opened()
|
||||
color: Material.backgroundColor
|
||||
|
||||
LeftDrawerScrollview{
|
||||
width:parent.width-mm
|
||||
height:parent.height
|
||||
x:mm
|
||||
}
|
||||
Rectangle{
|
||||
Item{
|
||||
width: 1
|
||||
height: leftDrawer.height
|
||||
anchors.right: leftDrawer.right
|
||||
color: Material.dialogColor//"#EEEEEE"
|
||||
}
|
||||
//Component.onCompleted: {opened();}
|
||||
}
|
||||
|
|
|
@ -30,14 +30,13 @@
|
|||
// 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.12
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle{
|
||||
Item{
|
||||
id:permissionDialog
|
||||
color: Material.backgroundColor
|
||||
// x: mm
|
||||
width: parent.width-5*mm
|
||||
height:root.height/3
|
||||
|
@ -63,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: Material.primaryTextColor
|
||||
text: qsTr("Friends")
|
||||
}
|
||||
ListView {
|
||||
|
@ -84,20 +82,16 @@ Rectangle{
|
|||
ListModel{id: contactModel}
|
||||
Component{
|
||||
id:contactItem
|
||||
Rectangle{
|
||||
Item{
|
||||
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= "red"}
|
||||
else{contactitemRect.color= Material.backgroundColor}}
|
||||
border.color:Material.frameColor
|
||||
Text{
|
||||
color: Material.primaryTextColor
|
||||
/*else{}*/}
|
||||
Label{
|
||||
text:contact.screen_name
|
||||
}
|
||||
MouseArea{
|
||||
|
@ -125,8 +119,7 @@ Rectangle{
|
|||
else {contactstatus="neutral"} }
|
||||
}
|
||||
}
|
||||
Text{
|
||||
color: Material.primaryTextColor
|
||||
Label{
|
||||
x:contactView.width+2*mm
|
||||
y:0.5*mm
|
||||
text: qsTr("Groups")
|
||||
|
@ -146,20 +139,16 @@ Rectangle{
|
|||
ListModel{id: groupModel}
|
||||
Component{
|
||||
id:groupItem
|
||||
Rectangle{
|
||||
Item{
|
||||
id:groupitemRect
|
||||
width:groupView.width
|
||||
radius: 0.5*mm
|
||||
height: 5*mm
|
||||
property string groupstatus:"neutral"
|
||||
onGroupstatusChanged:
|
||||
{if(groupstatus=="positive"){groupitemRect.color="light green"}
|
||||
else if (groupstatus=="negative"){groupitemRect.color= "red"}
|
||||
else{groupitemRect.color= Material.backgroundColor}}
|
||||
color: Material.backgroundColor
|
||||
border.color: Material.frameColor
|
||||
Text{
|
||||
color: Material.primaryTextColor
|
||||
/*else{}*/}
|
||||
Label{
|
||||
text:group.groupname
|
||||
}
|
||||
MouseArea{
|
||||
|
@ -183,7 +172,7 @@ Rectangle{
|
|||
else {groupstatus="neutral"} }
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
Button{
|
||||
x:0.5*mm
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin:1
|
||||
|
@ -195,7 +184,7 @@ Rectangle{
|
|||
Service.savePermissions(db,perms)
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
Button{
|
||||
x:contactView.width+2*mm
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin:1
|
||||
|
|
|
@ -31,13 +31,10 @@
|
|||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id:searchComponent
|
||||
color: Material.backgroundColor
|
||||
radius:0.5*mm
|
||||
property bool selfdestroying:false
|
||||
/* anchors.left: parent.left
|
||||
anchors.leftMargin:mm
|
||||
|
@ -48,7 +45,6 @@ Rectangle {
|
|||
|
||||
TextInput {
|
||||
id: searchText
|
||||
color: Material.primaryTextColor
|
||||
focus: true
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
wrapMode: Text.Wrap
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQml.Models 2.14
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/js/news.js" as Newsjs
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
@ -138,10 +138,7 @@ Page {
|
|||
}
|
||||
|
||||
Component { id: contactHeader
|
||||
Rectangle{
|
||||
border.color: Material.backgroundDimColor
|
||||
border.width: 1
|
||||
color: Material.backgroundColor
|
||||
Item{
|
||||
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
|
||||
property var createdAtDate: new Date(contact.created_at)
|
||||
|
@ -168,7 +165,7 @@ Page {
|
|||
y: mm
|
||||
spacing:4
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:photobutton
|
||||
height: 6*mm
|
||||
width: 8*mm
|
||||
|
@ -185,7 +182,7 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:dmbutton
|
||||
height: 6*mm
|
||||
width: 8*mm
|
||||
|
@ -198,7 +195,7 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:eventbutton
|
||||
visible:(contact.network=="dfrn")
|
||||
height: 6*mm
|
||||
|
@ -212,7 +209,7 @@ Page {
|
|||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
Button{
|
||||
id:approvebutton
|
||||
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
||||
height: 6*mm
|
||||
|
@ -227,7 +224,7 @@ Page {
|
|||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
Button{
|
||||
id:rejectbutton
|
||||
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
||||
height: 6*mm
|
||||
|
@ -242,7 +239,7 @@ Page {
|
|||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
Button{
|
||||
id:ignorebutton
|
||||
visible:(contact.hasOwnProperty("acct")&&!contact.searchContact)
|
||||
height: 6*mm
|
||||
|
@ -257,7 +254,7 @@ Page {
|
|||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
MButton{
|
||||
Button{
|
||||
id:followbutton
|
||||
visible:(contact.isFriend==0 || !contact.hasOwnProperty("isFriend"))
|
||||
height: 6*mm
|
||||
|
@ -274,7 +271,7 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:unfollowbutton
|
||||
visible:(contact.isFriend==1)
|
||||
height: 6*mm
|
||||
|
@ -328,14 +325,13 @@ Page {
|
|||
height: implicitHeight
|
||||
text:contact.name+" (@"+contact.screen_name+")"
|
||||
wrapMode: Text.Wrap
|
||||
color: Material.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
|
||||
|
@ -346,7 +342,6 @@ 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>"+
|
||||
"<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())+"<br>"+
|
||||
|
@ -389,7 +384,7 @@ Page {
|
|||
source: "qrc:/js/newsworker.js"
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0.5*root.fontFactor*osSettings.bigFontSize
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
// ConversationView with button
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQml.Models 2.14
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
import "qrc:/qml/newsqml"
|
||||
|
@ -39,7 +40,6 @@ import "qrc:/qml/newsqml"
|
|||
Page {
|
||||
id:conversationList
|
||||
property var news:[]
|
||||
// color: "white"
|
||||
//function backRequested(){pageStack.pop()}
|
||||
// width:root.width
|
||||
// height: root.height-7*mm
|
||||
|
@ -131,7 +131,7 @@ Page {
|
|||
source: "qrc:/js/newsworker.js"
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
|
|
|
@ -31,16 +31,14 @@
|
|||
|
||||
// List of people from Friendica Activities
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQml.Models 2.14
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id:activitiesRectangle
|
||||
property var activitymembers
|
||||
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))
|
||||
|
||||
|
@ -60,11 +58,7 @@ Rectangle {
|
|||
|
||||
Component {
|
||||
id:activitiesContact
|
||||
Rectangle{
|
||||
border.color: Material.frameColor
|
||||
color: Material.backgroundColor
|
||||
border.width: 1
|
||||
radius:0.5*mm
|
||||
Item{
|
||||
width:parent.width
|
||||
height:6*mm
|
||||
Image {
|
||||
|
@ -76,8 +70,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: Material.primaryTextColor
|
||||
Label{
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
anchors.left: contactImage.right
|
||||
anchors.margins: 1*mm
|
||||
|
@ -91,13 +84,12 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
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()
|
||||
|
|
|
@ -30,19 +30,16 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id:hashtagRectangle
|
||||
color:Material.dialogColor
|
||||
property alias text: hashtagText.text
|
||||
radius:0.3*mm
|
||||
width:hashtagText.contentWidth+mm
|
||||
height:root.fontFactor*osSettings.bigFontSize
|
||||
Text{
|
||||
Label{
|
||||
id:hashtagText
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
color: Material.secondaryTextColor
|
||||
anchors.centerIn: parent
|
||||
anchors.margins: 0.5*mm
|
||||
}
|
||||
|
|
|
@ -267,7 +267,6 @@ Page{
|
|||
BlueButton{
|
||||
width: 5*root.fontFactor*osSettings.bigFontSize
|
||||
height:imageUploadView.height-3*root.fontFactor*osSettings.bigFontSize
|
||||
color: Material.backgroundColor
|
||||
text:"\u002b"
|
||||
fontSize: 3*osSettings.bigFontSize
|
||||
onClicked:{attach()}
|
||||
|
|
|
@ -33,15 +33,13 @@
|
|||
// message with buttons
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/js/smiley.js" as Smileyjs
|
||||
import "qrc:/js/news.js" as Newsjs
|
||||
import "qrc:/qml/genericqml"
|
||||
import "qrc:/qml/newsqml"
|
||||
|
||||
Rectangle{
|
||||
color:Material.dialogColor
|
||||
Item{
|
||||
width:parent.width
|
||||
height: messageColumn.height+2*mm
|
||||
id:messageSend
|
||||
|
@ -194,10 +192,6 @@ Rectangle{
|
|||
anchors.leftMargin: 2*root.fontFactor*osSettings.bigFontSize
|
||||
visible: newsSwipeview.currentIndex!=0
|
||||
text:"\uf053"
|
||||
fontColor: Material.hintTextColor
|
||||
border.color: "transparent"
|
||||
color:"transparent"
|
||||
radius:0
|
||||
onClicked: {newsSwipeview.currentIndex=newsSwipeview.currentIndex-1}
|
||||
}
|
||||
|
||||
|
@ -208,10 +202,6 @@ Rectangle{
|
|||
anchors.rightMargin: 2*root.fontFactor*osSettings.bigFontSize
|
||||
visible: newsSwipeview.currentIndex!=newsSwipeview.length-1
|
||||
text:"\uf054"
|
||||
fontColor: Material.hintTextColor
|
||||
border.color: "transparent"
|
||||
color:"transparent"
|
||||
radius:0
|
||||
onClicked: {newsSwipeview.currentIndex=newsSwipeview.currentIndex+1}
|
||||
}
|
||||
}
|
||||
|
@ -238,9 +228,7 @@ Rectangle{
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
color: Material.backgroundColor
|
||||
radius: 0.5*mm
|
||||
Item{
|
||||
visible:(conversation || (newsSwipeview.stacktype!="Notifications"))
|
||||
x:mm
|
||||
width: parent.width-2*mm
|
||||
|
@ -294,12 +282,13 @@ Rectangle{
|
|||
if (text!=""){
|
||||
var plaintext=getText(0,cursorPosition)
|
||||
var regex1 = /@[a-z]+/;var regex2 = /\![a-z]+/;var regex3 = /\s/;
|
||||
var letter;
|
||||
if (regex1.test(getText(plaintext.lastIndexOf('@',cursorPosition),cursorPosition)+preeditText) && !regex3.test(getText(plaintext.lastIndexOf('@',cursorPosition),cursorPosition)+preeditText)){
|
||||
var letter=(getText(plaintext.lastIndexOf('@',cursorPosition),cursorPosition)).match(/[a-z]+/);
|
||||
letter=(getText(plaintext.lastIndexOf('@',cursorPosition),cursorPosition)).match(/[a-z]+/);
|
||||
contactprefix="@";
|
||||
contactmenu(letter.toString())
|
||||
} else if( regex2.test(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)+preeditText) && !regex3.test(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)+preeditText) ){
|
||||
var letter=(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)).match(/[a-z]+/);
|
||||
letter=(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)).match(/[a-z]+/);
|
||||
contactprefix="!";
|
||||
contactmenu(letter.toString())
|
||||
}else {contactSelector.visible=false}
|
||||
|
@ -350,7 +339,7 @@ Rectangle{
|
|||
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}
|
||||
|
||||
|
@ -361,15 +350,15 @@ Rectangle{
|
|||
height: 2.5*root.fontFactor*osSettings.bigFontSize
|
||||
x: 0.5*mm
|
||||
|
||||
// MButton{id:permButton //Permissions not working in Friendica 02/2022
|
||||
// visible: !conversation && (newsSwipeview.stacktype!=="DirectMessages")
|
||||
// Button{id:perButton //Permissions not working in Friendica 02/2022
|
||||
// visible: !conversation && (newsSwipeview.stacktype!="DirectMessages")
|
||||
// height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
// width: 2*root.fontFactor*osSettings.bigFontSize
|
||||
// text: ((contact_allow.length==0)&&(contact_deny.length==0)&&(group_allow.length==0)&&(group_deny.length==0))?"\uf09c":"\uf023"
|
||||
// onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}}
|
||||
// }
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:smileyButton
|
||||
text: "\uf118"
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -377,14 +366,14 @@ Rectangle{
|
|||
onClicked: {if (smileyDialog.visible==false){smileyDialog.visible=true} else{smileyDialog.visible=false}}
|
||||
}
|
||||
|
||||
MButton{
|
||||
Button{
|
||||
id:hastagButton
|
||||
text: "\uf292"
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width: 2*root.fontFactor*osSettings.bigFontSize
|
||||
onClicked: {if (tagSelector.visible==false){hashtagmenu()} else{tagSelector.visible=false}}
|
||||
}
|
||||
MButton{
|
||||
Button{
|
||||
id:imagesButton
|
||||
visible:(newsSwipeview.stacktype!="DirectMessages")
|
||||
text: "\uf03e"
|
||||
|
@ -398,7 +387,7 @@ Rectangle{
|
|||
else{imageUploadDialog.visible=false}}
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: cancelButton
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width: 2*root.fontFactor*osSettings.bigFontSize
|
||||
|
@ -417,7 +406,7 @@ Rectangle{
|
|||
}
|
||||
}
|
||||
}
|
||||
MButton {
|
||||
Button {
|
||||
id: sendButton
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
width: 2*root.fontFactor*osSettings.bigFontSize
|
||||
|
|
|
@ -30,21 +30,18 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
Rectangle{
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
Item{
|
||||
id: moreComments
|
||||
width: parent.width
|
||||
height: 5*mm
|
||||
color:Material.background//"white"
|
||||
property int comments:0
|
||||
// border.color:"grey"
|
||||
// border.width:1
|
||||
signal clicked
|
||||
state:""
|
||||
|
||||
Text{
|
||||
Label{
|
||||
id:mainText
|
||||
color: "grey"
|
||||
anchors.right: parent.right
|
||||
anchors.margins: mm
|
||||
width: contentWidth
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
AnimatedImage {id:gif;
|
||||
width:toprow.width;
|
||||
cache:false
|
||||
|
@ -37,19 +39,17 @@ AnimatedImage {id:gif;
|
|||
//property string mimetype:""
|
||||
fillMode: Image.PreserveAspectFit;
|
||||
onStatusChanged: {playing = (status == AnimatedImage.Ready)}
|
||||
Rectangle{
|
||||
Item{
|
||||
visible: (model.newsitemobject.imageAttachmentList.length>1)&&(gif.status==Image.Ready)
|
||||
opacity: 0.5
|
||||
color: "black"
|
||||
width:imageCountText.contentWidth+mm
|
||||
height: imageCountText.contentHeight+mm
|
||||
x: (gif.width-gif.paintedWidth)/2+gif.paintedWidth-width
|
||||
anchors.bottom: parent.bottom
|
||||
Text {
|
||||
Label{
|
||||
anchors.centerIn: parent
|
||||
id: imageCountText
|
||||
text: "+ " + (model.newsitemobject.imageAttachmentList.length-1).toString()
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
MouseArea {anchors.fill:parent;
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Page{
|
||||
|
@ -41,9 +40,8 @@ Page{
|
|||
height:root.height//-7*mm
|
||||
property var photolistarray: []
|
||||
|
||||
Rectangle{
|
||||
Item{
|
||||
anchors.fill: newsphotolistView
|
||||
color: "black"
|
||||
}
|
||||
ListView{
|
||||
id: newsphotolistView
|
||||
|
@ -58,14 +56,13 @@ Page{
|
|||
id: photolistModel
|
||||
}
|
||||
|
||||
MButton {
|
||||
Button {
|
||||
id: closeButton
|
||||
z:2
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
color: Material.dialogColor
|
||||
text: "\uf057"
|
||||
onClicked: {
|
||||
if (rootstackView.depth>1){
|
||||
|
@ -110,10 +107,6 @@ Page{
|
|||
anchors.left: newsphotolistView.left
|
||||
visible: newsphotolistView.currentIndex!=0
|
||||
text:"\uf053"
|
||||
fontColor:"grey"
|
||||
border.color: "transparent"
|
||||
color:"transparent"
|
||||
radius:0
|
||||
onClicked: {newsphotolistView.currentIndex=newsphotolistView.currentIndex-1}
|
||||
}
|
||||
|
||||
|
@ -123,10 +116,6 @@ Page{
|
|||
anchors.right: newsphotolistView.right
|
||||
visible: newsphotolistView.currentIndex!=photolistarray.length-1
|
||||
text:"\uf054"
|
||||
fontColor:"grey"
|
||||
border.color: "transparent"
|
||||
color:"transparent"
|
||||
radius:0
|
||||
onClicked: {newsphotolistView.currentIndex=newsphotolistView.currentIndex+1}
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue