From be968a8841587f6e4034ff32880d1ceca4a827bd Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 26 Jan 2022 15:33:36 +0100 Subject: Use @nextcloud/sharing in files and files_sharing Signed-off-by: Louis Chemineau Update tests Signed-off-by: Louis Chemineau --- apps/files_sharing/src/utils/SharedWithMe.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'apps/files_sharing/src/utils') diff --git a/apps/files_sharing/src/utils/SharedWithMe.js b/apps/files_sharing/src/utils/SharedWithMe.js index 9a063e423cf..bd39c765221 100644 --- a/apps/files_sharing/src/utils/SharedWithMe.js +++ b/apps/files_sharing/src/utils/SharedWithMe.js @@ -21,8 +21,10 @@ * */ +import { Type as ShareTypes } from '@nextcloud/sharing' + const shareWithTitle = function(share) { - if (share.type === OC.Share.SHARE_TYPE_GROUP) { + if (share.type === ShareTypes.SHARE_TYPE_GROUP) { return t( 'files_sharing', 'Shared with you and the group {group} by {owner}', @@ -33,7 +35,7 @@ const shareWithTitle = function(share) { undefined, { escape: false } ) - } else if (share.type === OC.Share.SHARE_TYPE_CIRCLE) { + } else if (share.type === ShareTypes.SHARE_TYPE_CIRCLE) { return t( 'files_sharing', 'Shared with you and {circle} by {owner}', @@ -44,7 +46,7 @@ const shareWithTitle = function(share) { undefined, { escape: false } ) - } else if (share.type === OC.Share.SHARE_TYPE_ROOM) { + } else if (share.type === ShareTypes.SHARE_TYPE_ROOM) { if (share.shareWithDisplayName) { return t( 'files_sharing', -- cgit v1.2.3