diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-01-23 17:48:24 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-03-01 20:56:17 +0100 |
commit | 88aa3de7842a5113de5f137ba57bdae1f77777b5 (patch) | |
tree | 41be56cdfaa58851e271e59433a895240555ed26 /apps | |
parent | 555afff015ec2fa785726bf0d9169d25d53ba679 (diff) | |
download | nextcloud-server-88aa3de7842a5113de5f137ba57bdae1f77777b5.tar.gz nextcloud-server-88aa3de7842a5113de5f137ba57bdae1f77777b5.zip |
Add iconClass to resources
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Collaboration/Resources/ResourceProvider.php | 12 | ||||
-rw-r--r-- | apps/files_sharing/src/components/CollectionListItem.vue | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/apps/files/lib/Collaboration/Resources/ResourceProvider.php b/apps/files/lib/Collaboration/Resources/ResourceProvider.php index 6d9b1b59784..62dcbe19c1d 100644 --- a/apps/files/lib/Collaboration/Resources/ResourceProvider.php +++ b/apps/files/lib/Collaboration/Resources/ResourceProvider.php @@ -25,6 +25,7 @@ namespace OCA\Files\Collaboration\Resources; use OCP\Collaboration\Resources\IProvider; use OCP\Collaboration\Resources\IResource; use OCP\Files\IRootFolder; +use OCP\Files\Node; use OCP\IUser; class ResourceProvider implements IProvider { @@ -80,4 +81,15 @@ class ResourceProvider implements IProvider { return false; } + + /** + * Get the icon class of a resource + * + * @param IResource $resource + * @return string + * @since 15.0.0 + */ + public function getIconClass(IResource $resource): string { + return 'icon-folder'; + } } diff --git a/apps/files_sharing/src/components/CollectionListItem.vue b/apps/files_sharing/src/components/CollectionListItem.vue index aebab670ac2..f22d5238d6c 100644 --- a/apps/files_sharing/src/components/CollectionListItem.vue +++ b/apps/files_sharing/src/components/CollectionListItem.vue @@ -92,7 +92,7 @@ ] }, getIcon() { - return (resource) => [window.OCP.Collaboration.getIcon(resource.type)] + return (resource) => [window.OCP.Collaboration.getIcon(resource.type), resource.iconClass] }, getLink() { return (resource) => window.OCP.Collaboration.getLink(resource.type, resource.id) |