forked from jsnbuchanan/crowd-funder-for-time-pwa
Fix: handle special "You" entity
This commit is contained in:
@@ -11,17 +11,18 @@ details step with edit functionality. * * @author Matthew Raymer */
|
||||
<div>
|
||||
<template v-if="entityType === 'project'">
|
||||
<ProjectIcon
|
||||
v-if="entity?.handleId"
|
||||
v-if="entity && 'handleId' in entity && entity.handleId"
|
||||
:entity-id="entity.handleId"
|
||||
:icon-size="32"
|
||||
:image-url="entity.image"
|
||||
:image-url="'image' in entity ? entity.image : ''"
|
||||
class="rounded-full bg-white overflow-hidden !size-[2rem] object-cover"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<EntityIcon
|
||||
v-if="entity?.did"
|
||||
:contact="entity"
|
||||
:entity-id="entity.did"
|
||||
:contact="isContactEntity ? entity : undefined"
|
||||
class="rounded-full bg-white overflow-hidden !size-[2rem] object-cover"
|
||||
/>
|
||||
<font-awesome
|
||||
@@ -101,6 +102,13 @@ export default class EntitySummaryButton extends Vue {
|
||||
@Prop({ default: true })
|
||||
editable!: boolean;
|
||||
|
||||
/**
|
||||
* Whether the entity is a Contact object
|
||||
*/
|
||||
get isContactEntity(): boolean {
|
||||
return this.entity !== null && "profileImageUrl" in this.entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Computed CSS classes for the edit/lock icon
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user