Signed-off-by: Georg Ehrke <developer@georgehrke.com>tags/v20.0.0beta1
@@ -29,6 +29,10 @@ | |||
:url="share.shareWithAvatar" /> | |||
<div 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> | |||
<Actions | |||
menu-align="right" | |||
@@ -342,6 +346,17 @@ export default { | |||
&& moment().add(1 + this.config.defaultInternalExpireDate, 'days') | |||
}, | |||
/** | |||
* @returns {bool} | |||
*/ | |||
hasStatus() { | |||
if (this.share.type !== this.SHARE_TYPES.SHARE_TYPE_USER) { | |||
return false | |||
} | |||
return (typeof this.share.status === 'object' && !Array.isArray(this.share.status)) | |||
}, | |||
}, | |||
methods: { |
@@ -528,4 +528,8 @@ export default class Share { | |||
return this.#share.item_source | |||
} | |||
get status() { | |||
return this.#share.status | |||
} | |||
} |
@@ -286,6 +286,7 @@ export default { | |||
this.linkShares = shares.filter(share => share.type === this.SHARE_TYPES.SHARE_TYPE_LINK || share.type === this.SHARE_TYPES.SHARE_TYPE_EMAIL) | |||
this.shares = shares.filter(share => share.type !== this.SHARE_TYPES.SHARE_TYPE_LINK && share.type !== this.SHARE_TYPES.SHARE_TYPE_EMAIL) | |||
console.debug('Processed', this.linkShares.length, 'link share(s)') | |||
console.debug('Processed', this.shares.length, 'share(s)') | |||
} |