Allow share results to have a detailed description and share entries to have a link

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-12-08 13:01:29 +01:00
parent f1a54cb6aa
commit 8131965b74
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
3 changed files with 18 additions and 2 deletions

View File

@ -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"

View File

@ -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 {

View File

@ -150,6 +150,17 @@ export default class Share {
|| this.#share.share_with
}
/**
* 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
*