From 1fbd1da87d293eaaa1019a333a676f1ccee41ed6 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 28 Jul 2024 20:15:36 -0600 Subject: [PATCH] add visibility flag set, refactor to see results, and add copy icons for contact info --- src/libs/endorserServer.ts | 7 +++-- src/views/ContactsView.vue | 62 ++++++++++++++++++++++++++++++++------ 2 files changed, 58 insertions(+), 11 deletions(-) diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index 06a3f28..97b943b 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -1135,8 +1135,11 @@ export async function setVisibilityUtil( try { const resp = await axios.post(url, payload, { headers }); if (resp.status === 200) { - db.contacts.update(contact.did, { seesMe: visibility }); - return { success: true }; + const success = resp.data.success; + if (success) { + db.contacts.update(contact.did, { seesMe: visibility }); + } + return { success }; } else { console.error( "Got some bad server response when setting visibility: ", diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 1fc73e9..18b515d 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -128,17 +128,44 @@ {{ contact.did }}
- Public Key (base 64): {{ contact.publicKeyBase64 }} + Public Key (base 64): + + Copied Key + {{ contact.publicKeyBase64 }}
Next Public Key Hash (base 64): + + Copied Hash {{ contact.nextPubKeyHashB64 }}
+ + + + + + + +