aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/views/SharingList.vue
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/src/views/SharingList.vue')
-rw-r--r--apps/files_sharing/src/views/SharingList.vue39
1 files changed, 14 insertions, 25 deletions
diff --git a/apps/files_sharing/src/views/SharingList.vue b/apps/files_sharing/src/views/SharingList.vue
index 6da48c2eece..2167059772e 100644
--- a/apps/files_sharing/src/views/SharingList.vue
+++ b/apps/files_sharing/src/views/SharingList.vue
@@ -1,27 +1,10 @@
<!--
- - @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
+-->
<template>
- <ul class="sharing-sharee-list">
+ <ul class="sharing-sharee-list" :aria-label="t('files_sharing', 'Shares')">
<SharingEntry v-for="share in shares"
:key="share.id"
:file-info="fileInfo"
@@ -32,10 +15,10 @@
</template>
<script>
-// eslint-disable-next-line no-unused-vars
+import { t } from '@nextcloud/l10n'
import SharingEntry from '../components/SharingEntry.vue'
-import ShareTypes from '../mixins/ShareTypes.js'
import ShareDetails from '../mixins/ShareDetails.js'
+import { ShareType } from '@nextcloud/sharing'
export default {
name: 'SharingList',
@@ -44,7 +27,7 @@ export default {
SharingEntry,
},
- mixins: [ShareTypes, ShareDetails],
+ mixins: [ShareDetails],
props: {
fileInfo: {
@@ -58,6 +41,12 @@ export default {
required: true,
},
},
+
+ setup() {
+ return {
+ t,
+ }
+ },
computed: {
hasShares() {
return this.shares.length === 0
@@ -65,7 +54,7 @@ export default {
isUnique() {
return (share) => {
return [...this.shares].filter((item) => {
- return share.type === this.SHARE_TYPES.SHARE_TYPE_USER && share.shareWithDisplayName === item.shareWithDisplayName
+ return share.type === ShareType.User && share.shareWithDisplayName === item.shareWithDisplayName
}).length <= 1
}
},