diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-12-08 13:01:29 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-12-09 13:20:24 +0100 |
commit | 8131965b740377cad5c64910ea76070cbf81868a (patch) | |
tree | 4a20c79b51c3231e41e0ab470c98db139678aa61 /apps/files_sharing/src | |
parent | f1a54cb6aad8dcb9c98f0070ba4d74b4941aefe3 (diff) | |
download | nextcloud-server-8131965b740377cad5c64910ea76070cbf81868a.tar.gz nextcloud-server-8131965b740377cad5c64910ea76070cbf81868a.zip |
Allow share results to have a detailed description and share entries to have a link
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntry.vue | 7 | ||||
-rw-r--r-- | apps/files_sharing/src/components/SharingInput.vue | 2 | ||||
-rw-r--r-- | apps/files_sharing/src/models/Share.js | 11 |
3 files changed, 18 insertions, 2 deletions
diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index 55bdbb8fdcb..407221037dc 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -29,13 +29,16 @@ :tooltip-message="share.type === SHARE_TYPES.SHARE_TYPE_USER ? share.shareWith : ''" :menu-position="'left'" :url="share.shareWithAvatar" /> - <div v-tooltip.auto="tooltip" class="sharing-entry__desc"> + <component :is="share.shareWithLink ? 'a' : 'div'" + :href="share.shareWithLink" + v-tooltip.auto="tooltip" + class="sharing-entry__desc"> <h5>{{ title }}</h5> <p v-if="hasStatus"> <span>{{ share.status.icon || '' }}</span> <span>{{ share.status.message || '' }}</span> </p> - </div> + </component> <Actions menu-align="right" class="sharing-entry__actions" diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index c1331146eef..c8373c6c0ae 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -387,6 +387,8 @@ export default { desc = t('files_sharing', 'on {server}', { server: result.value.server }) } else if (result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_EMAIL) { desc = result.value.shareWith + } else { + desc = result.shareWithDescription ?? '' } return { diff --git a/apps/files_sharing/src/models/Share.js b/apps/files_sharing/src/models/Share.js index 07f74652a44..d36484f064a 100644 --- a/apps/files_sharing/src/models/Share.js +++ b/apps/files_sharing/src/models/Share.js @@ -151,6 +151,17 @@ export default class Share { } /** + * Get the share with entity link + * + * @returns {string} + * @readonly + * @memberof Share + */ + get shareWithLink() { + return this.#share.share_with_link + } + + /** * Get the share with avatar if any * * @returns {string} |