Display user-status in sharing list
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
5b26487f14
commit
4485cb30a1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -29,6 +29,10 @@
|
||||||
:url="share.shareWithAvatar" />
|
:url="share.shareWithAvatar" />
|
||||||
<div v-tooltip.auto="tooltip" class="sharing-entry__desc">
|
<div v-tooltip.auto="tooltip" class="sharing-entry__desc">
|
||||||
<h5>{{ title }}</h5>
|
<h5>{{ title }}</h5>
|
||||||
|
<p v-if="hasStatus">
|
||||||
|
<span>{{ share.status.icon || '' }}</span>
|
||||||
|
<span>{{ share.status.message || '' }}</span>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Actions
|
<Actions
|
||||||
menu-align="right"
|
menu-align="right"
|
||||||
|
@ -342,6 +346,17 @@ export default {
|
||||||
&& moment().add(1 + this.config.defaultInternalExpireDate, 'days')
|
&& 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: {
|
methods: {
|
||||||
|
|
|
@ -528,4 +528,8 @@ export default class Share {
|
||||||
return this.#share.item_source
|
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.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)
|
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.linkShares.length, 'link share(s)')
|
||||||
console.debug('Processed', this.shares.length, 'share(s)')
|
console.debug('Processed', this.shares.length, 'share(s)')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue