Fix: handle special "You" entity

This commit is contained in:
Jose Olarte III
2025-07-07 17:16:59 +08:00
parent c28ddc0c5c
commit e1db9083c2
2 changed files with 44 additions and 7 deletions

View File

@@ -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
*/