diff --git a/src/db/tables/contacts.ts b/src/db/tables/contacts.ts index e6369b2..9a438e5 100644 --- a/src/db/tables/contacts.ts +++ b/src/db/tables/contacts.ts @@ -2,6 +2,7 @@ export interface Contact { did: string; name?: string; nextPubKeyHashB64?: string; // base64-encoded SHA256 hash of next public key + notes?: string; profileImageUrl?: string; publicKeyBase64?: string; seesMe?: boolean; // cached value of the server setting diff --git a/src/router/index.ts b/src/router/index.ts index ba4b3a2..cf4300a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -64,6 +64,11 @@ const routes: Array = [ name: "contact-amounts", component: () => import("../views/ContactAmountsView.vue"), }, + { + path: "/contact-edit/:did", + name: "contact-edit", + component: () => import("../views/ContactEditView.vue"), + }, { path: "/contact-gift", name: "contact-gift", diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index 9532581..9e42437 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -351,7 +351,7 @@ > Details - +
Details - +
+ + + +
+
+

+ + + {{ contact.name || AppString.NO_CONTACT_NAME }} +

+
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+ + + diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 6f91815..014f32a 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -170,27 +170,34 @@ ) : contactsSelected.push(contact.did) " - class="ml-2 h-6 w-6" + class="ml-2 h-6 w-6 flex-shrink-0" data-testId="contactCheckOne" /> -

- {{ contact.name || AppString.NO_CONTACT_NAME }} +

+ {{ contactNameNonBreakingSpace(contact.name) }}

- - - + +
+ + + - {{ - shortDid(contact.did) - }} + {{ + shortDid(contact.did) + }} +
+
+ {{ contact.notes }} +
+

{{ contactFromDid?.name || "(no name)" }} - +

- -
-
-

Edit Name

- -
- - - -
-
-
-
> = []; contactFromDid?: Contact; - contactEdit = false; - contactNewName: string = ""; contactYaml = ""; hitEnd = false; isLoading = false; @@ -559,29 +525,6 @@ export default class DIDView extends Vue { return claim.claim.name || claim.claim.description || ""; } - private async onClickCancelName() { - this.contactEdit = false; - } - - private async onClickSaveName(newName: string) { - if (!this.contactFromDid) { - this.$notify( - { - group: "alert", - type: "danger", - title: "Not A Contact", - text: "First add this on the contact page, then you can edit here.", - }, - 5000, - ); - return; - } - this.contactFromDid.name = newName; - return db.contacts - .update(this.contactFromDid.did, { name: newName }) - .then(() => (this.contactEdit = false)); - } - // note that this is also in ContactView.vue async confirmSetVisibility(contact: Contact, visibility: boolean) { const visibilityPrompt = visibility