diff options
Diffstat (limited to 'apps/files_sharing/src/utils/SharedWithMe.js')
-rw-r--r-- | apps/files_sharing/src/utils/SharedWithMe.js | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/apps/files_sharing/src/utils/SharedWithMe.js b/apps/files_sharing/src/utils/SharedWithMe.js index 6a404416f3a..2f63932bfbe 100644 --- a/apps/files_sharing/src/utils/SharedWithMe.js +++ b/apps/files_sharing/src/utils/SharedWithMe.js @@ -1,33 +1,12 @@ /** - * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com> - * - * @author John Molakvoæ <skjnldsv@protonmail.com> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ -/** - * Get the shared with me title - * - * @param {Share} share current share - * @returns {string} the title - */ +import { ShareType } from '@nextcloud/sharing' + const shareWithTitle = function(share) { - if (share.type === OC.Share.SHARE_TYPE_GROUP) { + if (share.type === ShareType.Group) { return t( 'files_sharing', 'Shared with you and the group {group} by {owner}', @@ -36,9 +15,9 @@ const shareWithTitle = function(share) { owner: share.ownerDisplayName, }, undefined, - { escape: false } + { escape: false }, ) - } else if (share.type === OC.Share.SHARE_TYPE_CIRCLE) { + } else if (share.type === ShareType.Team) { return t( 'files_sharing', 'Shared with you and {circle} by {owner}', @@ -47,9 +26,9 @@ const shareWithTitle = function(share) { owner: share.ownerDisplayName, }, undefined, - { escape: false } + { escape: false }, ) - } else if (share.type === OC.Share.SHARE_TYPE_ROOM) { + } else if (share.type === ShareType.Room) { if (share.shareWithDisplayName) { return t( 'files_sharing', @@ -59,7 +38,7 @@ const shareWithTitle = function(share) { owner: share.ownerDisplayName, }, undefined, - { escape: false } + { escape: false }, ) } else { return t( @@ -69,7 +48,7 @@ const shareWithTitle = function(share) { owner: share.ownerDisplayName, }, undefined, - { escape: false } + { escape: false }, ) } } else { @@ -78,7 +57,7 @@ const shareWithTitle = function(share) { 'Shared with you by {owner}', { owner: share.ownerDisplayName }, undefined, - { escape: false } + { escape: false }, ) } } |