mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-19 20:32:03 +03:00
Display image for sharedWithMe share owner in share view
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
7ff1d011c0
commit
d7f7d94e1d
3 changed files with 22 additions and 11 deletions
|
@ -139,20 +139,30 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.leftMargin: root.horizontalPadding
|
Layout.leftMargin: root.horizontalPadding
|
||||||
Layout.rightMargin: root.horizontalPadding
|
Layout.rightMargin: root.horizontalPadding
|
||||||
|
|
||||||
|
Image {
|
||||||
|
Layout.preferredWidth: 32
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
source: shareModel.shareOwnerAvatar
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
EnforcedPlainTextLabel {
|
EnforcedPlainTextLabel {
|
||||||
|
Layout.fillWidth: true
|
||||||
visible: shareModel.displayShareOwner
|
visible: shareModel.displayShareOwner
|
||||||
text: qsTr("Shared with you by %1").arg(shareModel.shareOwnerDisplayName)
|
text: qsTr("Shared with you by %1").arg(shareModel.shareOwnerDisplayName)
|
||||||
font.bold: true
|
font.bold: true
|
||||||
}
|
}
|
||||||
EnforcedPlainTextLabel {
|
EnforcedPlainTextLabel {
|
||||||
|
Layout.fillWidth: true
|
||||||
visible: shareModel.sharedWithMeExpires
|
visible: shareModel.sharedWithMeExpires
|
||||||
text: qsTr("Expires in %1").arg(shareModel.sharedWithMeRemainingTimeString)
|
text: qsTr("Expires in %1").arg(shareModel.sharedWithMeRemainingTimeString)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
visible: shareModel.displayShareOwner
|
visible: shareModel.displayShareOwner
|
||||||
}
|
}
|
||||||
|
|
|
@ -1677,7 +1677,7 @@ private:
|
||||||
|
|
||||||
QQuickImageResponse *ImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize)
|
QQuickImageResponse *ImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize)
|
||||||
{
|
{
|
||||||
const auto response = new class ImageResponse(id, requestedSize, &pool);
|
const auto response = new class ImageResponse(id, requestedSize, &_pool);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1758,5 +1758,3 @@ QHash<int, QByteArray> UserAppsModel::roleNames() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "usermodel.moc"
|
|
||||||
|
|
||||||
|
|
|
@ -283,6 +283,9 @@ class ImageProvider : public QQuickAsyncImageProvider
|
||||||
public:
|
public:
|
||||||
ImageProvider() = default;
|
ImageProvider() = default;
|
||||||
QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override;
|
QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QThreadPool _pool;
|
||||||
};
|
};
|
||||||
|
|
||||||
class UserAppsModel : public QAbstractListModel
|
class UserAppsModel : public QAbstractListModel
|
||||||
|
|
Loading…
Reference in a new issue