From d57aee203ff5264f83a24e6aa8397363faad93b0 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Wed, 29 Jan 2025 21:01:35 -0700 Subject: [PATCH] add instructions for contacting potential links to hidden people --- src/components/HiddenDidDialog.vue | 174 +++++++++++++++++++++++++ src/libs/endorserServer.ts | 15 ++- src/views/ClaimView.vue | 68 ++++------ src/views/ConfirmGiftView.vue | 33 ++--- src/views/ImportDerivedAccountView.vue | 2 +- src/views/ProjectViewView.vue | 54 +++++--- 6 files changed, 270 insertions(+), 76 deletions(-) create mode 100644 src/components/HiddenDidDialog.vue diff --git a/src/components/HiddenDidDialog.vue b/src/components/HiddenDidDialog.vue new file mode 100644 index 0000000..10bb0ea --- /dev/null +++ b/src/components/HiddenDidDialog.vue @@ -0,0 +1,174 @@ + + + \ No newline at end of file diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index 199931d..f116090 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -460,7 +460,7 @@ export function didInfoForContact( } else if (contact) { return { displayName: contact.name || "Contact With No Name", - known: !!contact, + known: true, profileImageUrl: contact.profileImageUrl, }; } else { @@ -478,6 +478,19 @@ export function didInfoForContact( } } +/** + * @returns full contact info object (never undefined), where did is searched in contacts and allMyDids + */ +export function didInfoObject( + did: string | undefined, + activeDid: string | undefined, + allMyDids: string[], + contacts: Contact[], +): { known: boolean; displayName: string; profileImageUrl?: string } { + const contact = contactForDid(did, contacts); + return didInfoForContact(did, activeDid, contact, allMyDids); +} + /** always returns text, maybe something like "unnamed" or "unknown" diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index e33ef5e..db888d9 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -53,7 +53,7 @@ + + + @@ -311,16 +304,9 @@
{{ didInfo(confsVisibleTo) }} - + + +
@@ -344,7 +330,7 @@ - +

- If you'd like to ask any of your contacts to take a look and see if - their contacts can see more details, + You can ask one of your contacts to take a look and see if their + contacts can see more details: click to send them this infoclick to send them this page info - and see if they are willing to make an introduction. They are surely - connected to someone; if you don't know who to ask, you might try the - person who registered you. + and see if they can make an introduction. Someone is connected to + people closer to them; if you don't know who to ask, try the person + who registered you. - If you'd like to ask any of your contacts to take a look and see if - their contacts can see more details, + You can ask one of your contacts to take a look and see if their + contacts can see more details: share this page with themclick to copy this page info - and see if they are willing to make an introduction. + and see if they can make an introduction. Someone is connected to + people closer to them; if you don't know who to ask, try the person + who registered you. @@ -425,18 +413,17 @@ {{ didInfo(visDid) }} - + + + , found at  - + {{ veriClaim.publicUrls[visDid].substring( veriClaim.publicUrls[visDid].indexOf("//") + 2, @@ -452,7 +439,7 @@ - This record is an edited version. The latest version is here. + This record is an edited version. The latest version is shown.
@@ -963,9 +950,10 @@ export default class ClaimView extends Vue { } onClickShareClaim() { + this.copyToClipboard("A link to this page", this.windowLocation); window.navigator.share({ title: "Help Connect Me", - text: "I'm trying to find the full details of this claim. Can you help me?", + text: "I'm trying to find the people who recorded this. Can you help me?", url: this.windowLocation, }); } diff --git a/src/views/ConfirmGiftView.vue b/src/views/ConfirmGiftView.vue index fb7059b..eb449ac 100644 --- a/src/views/ConfirmGiftView.vue +++ b/src/views/ConfirmGiftView.vue @@ -254,7 +254,7 @@ - +

- If you'd like to ask any of your contacts to take a look and see if - their contacts can see more details, + You can ask one of your contacts to take a look and see if their + contacts can see more details: click to send them this infoclick to send them this page info - and see if they are willing to make an introduction. They are surely - connected to someone; if you don't know who to ask, you might try - the person who registered you. + and see if they can make an introduction. Someone is connected to + people closer to them; if you don't know who to ask, try the person + who registered you. - If you'd like to ask any of your contacts to take a look and see if - their contacts can see more details, + You can ask one of your contacts to take a look and see if their + contacts can see more details: share this page with themclick to copy this page info - and see if they are willing to make an introduction. + and see if they can make an introduction. Someone is connected to + people closer to them; if you don't know who to ask, try the person + who registered you. @@ -309,7 +311,7 @@ If you'd like an introduction, share this page with them and ask if they'll tell you more about @@ -448,7 +450,7 @@ export default class ClaimView extends Vue { veriClaim = serverUtil.BLANK_GENERIC_SERVER_RECORD; veriClaimDump = ""; veriClaimDidsVisible = {}; - windowLocation = window.location; + windowLocation = window.location.href; R = R; yaml = yaml; @@ -856,10 +858,11 @@ export default class ClaimView extends Vue { } onClickShareClaim() { + this.copyToClipboard("A link to this page", this.windowLocation); window.navigator.share({ title: "Help Connect Me", text: "I'm trying to find the full details of this claim. Can you help me?", - url: this.windowLocation.href, + url: this.windowLocation, }); } } diff --git a/src/views/ImportDerivedAccountView.vue b/src/views/ImportDerivedAccountView.vue index 9f54b14..78fd0b3 100644 --- a/src/views/ImportDerivedAccountView.vue +++ b/src/views/ImportDerivedAccountView.vue @@ -33,7 +33,7 @@
@@ -76,14 +68,14 @@ Map View - +
+ +