aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/SharingEntryLink.vue
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-07-09 11:00:08 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-07-12 20:14:30 +0200
commit208ff8013dc750326cab7fcf11d09ceef2a60f51 (patch)
treebf260ae0d1c26291e5b89c8a47f5cb57d3c5be29 /apps/files_sharing/src/components/SharingEntryLink.vue
parent06462804f7f8b2c046aa3875d8780fb4e4f4d9fc (diff)
downloadnextcloud-server-208ff8013dc750326cab7fcf11d09ceef2a60f51.tar.gz
nextcloud-server-208ff8013dc750326cab7fcf11d09ceef2a60f51.zip
chore(files_sharing): refactor sharing config
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntryLink.vue')
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue16
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index 210029f617b..e9b7ee44815 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -327,6 +327,11 @@ export default {
}
if (this.share.label && this.share.label.trim() !== '') {
if (this.isEmailShareType) {
+ if (this.isFileRequest) {
+ return t('files_sharing', 'File request ({label})', {
+ label: this.share.label.trim(),
+ })
+ }
return t('files_sharing', 'Mail share ({label})', {
label: this.share.label.trim(),
})
@@ -336,6 +341,11 @@ export default {
})
}
if (this.isEmailShareType) {
+ if (!this.share.shareWith || this.share.shareWith.trim() === '') {
+ return this.isFileRequest
+ ? t('files_sharing', 'File request')
+ : t('files_sharing', 'Mail share')
+ }
return this.share.shareWith
}
}
@@ -554,9 +564,13 @@ export default {
},
canChangeHideDownload() {
- const hasDisabledDownload = (shareAttribute) => shareAttribute.key === 'download' && shareAttribute.scope === 'permissions' && shareAttribute.value === false
+ const hasDisabledDownload = (shareAttribute) => shareAttribute.scope === 'permissions' && shareAttribute.key === 'download'&& shareAttribute.value === false
return this.fileInfo.shareAttributes.some(hasDisabledDownload)
},
+
+ isFileRequest() {
+ return this.share.isFileRequest
+ },
},
methods: {