From 2ff1c00f556633c9c36a9328d4eb77eba2dd25e7 Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Sun, 5 Feb 2023 11:22:50 +0100 Subject: fix(files_trashbin): previews crop support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/files_trashbin/src/services/trashbin.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/files_trashbin/src') diff --git a/apps/files_trashbin/src/services/trashbin.ts b/apps/files_trashbin/src/services/trashbin.ts index 2070cfc92b0..2be4c39dbfc 100644 --- a/apps/files_trashbin/src/services/trashbin.ts +++ b/apps/files_trashbin/src/services/trashbin.ts @@ -22,7 +22,7 @@ /* eslint-disable */ import { getCurrentUser } from '@nextcloud/auth' import { File, Folder, parseWebdavPermissions } from '@nextcloud/files' -import { generateRemoteUrl } from '@nextcloud/router' +import { generateRemoteUrl, generateUrl } from '@nextcloud/router' import type { FileStat, ResponseDataDetailed } from 'webdav' import type { ContentsWithRoot } from '../../../files/src/services/Navigation' @@ -49,9 +49,11 @@ const data = ` ` + const resultToNode = function(node: FileStat): File | Folder { const permissions = parseWebdavPermissions(node.props?.permissions) const owner = getCurrentUser()?.uid as string + const previewUrl = generateUrl('/apps/files_trashbin/preview?fileId={fileid}', node.props) const nodeData = { id: node.props?.fileid as number || 0, @@ -67,6 +69,7 @@ const resultToNode = function(node: FileStat): File | Folder { ...node.props, // Override displayed name on the list displayName: node.props?.['trashbin-filename'], + previewUrl, }, } -- cgit v1.2.3