diff --git a/src/components/EntityIcon.vue b/src/components/EntityIcon.vue index b14be845..ce6f9cf2 100644 --- a/src/components/EntityIcon.vue +++ b/src/components/EntityIcon.vue @@ -17,9 +17,12 @@ export default class EntityIcon extends Vue { generateIcon() { const imageUrl = this.contact?.profileImageUrl || this.profileImageUrl; if (imageUrl) { - return `avatar`; + return ``; } else { const identifier = this.contact?.did || this.entityId; + if (!identifier) { + return ``; + } const options: StyleOptions = { seed: (identifier as string) || "", size: this.iconSize, diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index c4ba2f30..65371ef8 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -394,7 +394,8 @@ export function contactForDid( * @param activeDid * @param contact * @param allMyDids - * @return { known: boolean, displayName: string } where known is true if the display name is some easily-recogizable name, false if it's a generic name like "Someone Anonymous" + * @return { known: boolean, displayName: string, profileImageUrl?: string } + * where 'known' is true if the display name is some easily-recogizable name, false if it's a generic name like "Someone Unnamed" */ export function didInfoForContact( did: string | undefined, @@ -402,15 +403,16 @@ export function didInfoForContact( contact?: Contact, allMyDids: string[] = [], // eslint-disable-next-line @typescript-eslint/no-explicit-any -): { known: boolean; displayName: string } { - if (!did) return { displayName: "Someone Anonymous", known: false }; - if (contact) { +): { known: boolean; displayName: string; profileImageUrl?: string } { + if (!did) return { displayName: "Someone Unnamed/Unknown", known: false }; + if (did === activeDid) { + return { displayName: "You", known: true }; + } else if (contact) { return { displayName: contact.name || "Contact With No Name", known: !!contact.name, + profileImageUrl: contact.profileImageUrl, }; - } else if (did === activeDid) { - return { displayName: "You", known: true }; } else { const myId = R.find(R.equals(did), allMyDids); return myId diff --git a/src/main.ts b/src/main.ts index 9d5c9351..c4a23369 100644 --- a/src/main.ts +++ b/src/main.ts @@ -34,6 +34,7 @@ import { faComment, faCopy, faDollar, + faEllipsis, faEllipsisVertical, faEye, faEyeSlash, @@ -97,6 +98,7 @@ library.add( faComment, faCopy, faDollar, + faEllipsis, faEllipsisVertical, faEye, faEyeSlash, diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 01979413..482c718f 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -104,7 +104,7 @@
- ... and those without your image see this: + ... and those without your image see this (if you let them see your activity):
- Anonymous/Unnamed + Unnamed/Unknown