diff --git a/src/components/ContactListItem.vue b/src/components/ContactListItem.vue index c972fe80..11229501 100644 --- a/src/components/ContactListItem.vue +++ b/src/components/ContactListItem.vue @@ -121,6 +121,12 @@ import { AppString } from "../constants/app"; components: { EntityIcon, }, + emits: [ + "toggle-selection", + "show-identicon", + "show-gifted-dialog", + "open-offer-dialog", + ], }) export default class ContactListItem extends Vue { @Prop({ required: true }) contact!: Contact; @@ -151,14 +157,12 @@ export default class ContactListItem extends Vue { return contact; } - @Emit("show-gifted-dialog") emitShowGiftedDialog(fromDid: string, toDid: string) { - return { fromDid, toDid }; + this.$emit("show-gifted-dialog", fromDid, toDid); } - @Emit("open-offer-dialog") emitOpenOfferDialog(did: string, name: string | undefined) { - return { did, name }; + this.$emit("open-offer-dialog", did, name); } /** diff --git a/src/libs/util.ts b/src/libs/util.ts index ea234243..3404054d 100644 --- a/src/libs/util.ts +++ b/src/libs/util.ts @@ -191,9 +191,9 @@ export const nameForDid = ( did: string, ): string => { if (did === activeDid) { - return "you"; + return "You"; } - const contact = R.find((con) => con.did == did, contacts); + const contact = R.find((con) => con.did === did, contacts); return nameForContact(contact); };