From 3c1731acdfada839dfd429cb627209c611c54260 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 4 Jan 2025 20:34:05 -0700 Subject: [PATCH] add contact-methods to a contact --- src/App.vue | 2 +- src/db/tables/contacts.ts | 7 +++ src/main.ts | 2 + src/views/ClaimView.vue | 12 ++-- src/views/ContactEditView.vue | 115 +++++++++++++++++++++++++++++++++- src/views/ContactsView.vue | 7 ++- 6 files changed, 132 insertions(+), 13 deletions(-) diff --git a/src/App.vue b/src/App.vue index 146cc3b..06888fa 100644 --- a/src/App.vue +++ b/src/App.vue @@ -332,7 +332,7 @@ export default class App extends Vue { truncateLongWords(sentence: string) { return sentence .split(" ") - .map(word => (word.length > 30 ? word.slice(0, 30) + "..." : word)) + .map((word) => (word.length > 30 ? word.slice(0, 30) + "..." : word)) .join(" "); } diff --git a/src/db/tables/contacts.ts b/src/db/tables/contacts.ts index 9a438e5..bcbd9df 100644 --- a/src/db/tables/contacts.ts +++ b/src/db/tables/contacts.ts @@ -1,5 +1,12 @@ +export interface ContactMethod { + label: string; + type: string; // eg. "EMAIL", "SMS", "WHATSAPP" + value: string; +} + export interface Contact { did: string; + contactMethods?: Array; name?: string; nextPubKeyHashB64?: string; // base64-encoded SHA256 hash of next public key notes?: string; diff --git a/src/main.ts b/src/main.ts index 08525c5..758f844 100644 --- a/src/main.ts +++ b/src/main.ts @@ -22,6 +22,7 @@ import { faBurst, faCalendar, faCamera, + faCaretDown, faCheck, faChevronDown, faChevronLeft, @@ -98,6 +99,7 @@ library.add( faBurst, faCalendar, faCamera, + faCaretDown, faCheck, faChevronDown, faChevronLeft, diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index a84988c..e33ef5e 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -346,12 +346,12 @@

- Details - - + class="font-bold uppercase text-xl text-blue-500 mt-8 cursor-pointer" + @click="showVeriClaimDump = !showVeriClaimDump" + > + Details + +

+ +
+

Contact Methods

+
+ + +
+ +
+
+ CELL +
+
+ EMAIL +
+
+ WHATSAPP +
+
+
+ + +
+ +
+ -
+