Commit 2cc6b759 authored by Camilo higuita's avatar Camilo higuita

quick fixes

parent 58c9bcc4
......@@ -285,6 +285,19 @@ Maui.ApplicationWindow
}
}
Component
{
id: notificationDialogComponent
Maui.Dialog
{
defaultButtons: false
maxWidth: unit * 300
colorScheme.textColor: warningColor
colorScheme.backgroundColor: altColor
}
}
Loader
{
id: dialogLoader
......
#ifndef BASELIST_H
#define BASELIST_H
#ifdef Q_OS_ANDROID
#ifdef STATIC_MAUIKIT
#include "fm.h"
#include "fmh.h"
#else
......
......@@ -12,6 +12,11 @@ Cloud::Cloud(QObject *parent) : BaseList (parent)
this->list = list;
this->formatList();
emit this->postListChanged();
});
connect(this->fm, &FM::warningMessage, [this](const QString &message)
{
emit this->warning(message);
});
connect(this->fm, &FM::cloudItemReady, [this](const FMH::MODEL &item, const QString &path)
......@@ -56,7 +61,10 @@ QString Cloud::getAccount() const
void Cloud::setList()
{
emit this->preListChanged();
this->list.clear();
this->fm->getCloudServerContent(FMH::PATHTYPE_NAME[FMH::PATHTYPE_KEY::CLOUD_PATH]+"/"+this->account, FMH::FILTER_LIST[FMH::FILTER_TYPE::IMAGE], 3);
emit this->postListChanged();
}
void Cloud::formatList()
......
......@@ -45,6 +45,7 @@ public slots:
signals:
void accountChanged();
void cloudImageReady(QVariantMap item);
void warning(QString error);
};
#endif // CLOUD_H
......@@ -88,7 +88,7 @@ Maui.Page
headBar.rightContent:[
Maui.ToolButton
{
iconName: "edit-select"
iconName: "item-select"
onClicked: selectionMode = !selectionMode
iconColor: selectionMode ? highlightColor : textColor
......@@ -97,9 +97,10 @@ Maui.Page
{
id: menuBtn
iconName: "overflow-menu"
onClicked: isMobile? gridMenu.open() : gridMenu.popup()
onClicked: gridMenu.popup()
}
]
headBar.leftContent: [
Maui.ToolButton
{
......@@ -161,7 +162,7 @@ Maui.Page
},
Maui.ToolButton
{
iconName: "image-frame"
iconName: "image-preview"
onClicked: fitPreviews = !fitPreviews
iconColor: !fitPreviews ? highlightColor : textColor
},
......
......@@ -101,6 +101,13 @@ PixGrid
{
id: _cloudList
account: currentAccount
onWarning:
{
dialogLoader.sourceComponent = notificationDialogComponent
dialog.title = qsTr("An error happened")
dialog.message = error
dialog.open()
}
}
grid.model: _cloudModel
......
......@@ -83,7 +83,7 @@ Maui.Page
Maui.ToolButton
{
iconName: "view-preview"
iconName: "image-preview"
onClicked: control.contentIsRised ? dropContent() : riseContent()
iconColor: control.contentIsRised ? colorScheme.highlightColor: colorScheme.textColor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment