diff --git a/src/libs/util.ts b/src/libs/util.ts index c11f046d5..47195e5f9 100644 --- a/src/libs/util.ts +++ b/src/libs/util.ts @@ -348,9 +348,9 @@ export function offerGiverDid( export const canFulfillOffer = ( veriClaim: GenericCredWrapper<GenericVerifiableCredential>, ) => { - return !!( + return ( veriClaim.claimType === "Offer" && - offerGiverDid(veriClaim as GenericCredWrapper<OfferVerifiableCredential>) + !!offerGiverDid(veriClaim as GenericCredWrapper<OfferVerifiableCredential>) ); }; diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index adf572eeb..e58f4aad4 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -201,11 +201,15 @@ </span> </div> - <span v-if="totalConfirmers() === 0">Nobody has confirmed this.</span> - <span v-else-if="totalConfirmers() === 1"> - One person has confirmed this. - </span> - <span v-else> {{ totalConfirmers() }} people have confirmed this. </span> + <div class="mt-2"> + <span v-if="totalConfirmers() === 0">Nobody has confirmed this.</span> + <span v-else-if="totalConfirmers() === 1"> + One person has confirmed this. + </span> + <span v-else> + {{ totalConfirmers() }} people have confirmed this. + </span> + </div> <div v-if="totalConfirmers() > 0"> <div @@ -312,9 +316,7 @@ <!-- Note that a similar section is found in ConfirmGiftView.vue --> <div> - <h2 class="font-bold uppercase text-xl mt-8 mb-2"> - {{ serverUtil.containsHiddenDid(veriClaim) ? "Visible " : "" }}Details - </h2> + <h2 class="font-bold uppercase text-xl mt-8 mb-2">Details</h2> <div v-if=" serverUtil.containsHiddenDid(veriClaim) && @@ -393,11 +395,12 @@ </button> </span> <span v-if="veriClaim.publicUrls?.[visDid]" - >, found at - <fa icon="globe" class="fa-fw text-slate-400" /> <a + >, found at <a :href="veriClaim.publicUrls?.[visDid]" class="text-blue-500" - >{{ + > + <fa icon="globe" class="fa-fw text-slate-400" /> + {{ veriClaim.publicUrls[visDid].substring( veriClaim.publicUrls[visDid].indexOf("//") + 2, ) @@ -428,7 +431,7 @@ > </div> - <h2 class="font-bold uppercase text-xl mt-8 mb-2">Full Claim</h2> + <h2 class="text-xl mt-8 mb-2">Full Claim</h2> <p class="mb-4"> The full claim includes the claim as it was originally issued, including the signature (ie. the proof of issuance by that person). @@ -761,13 +764,35 @@ export default class ClaimView extends Vue { console.error("Error retrieving full claim:", error); const serverError = error as AxiosError; if (serverError.response?.status === 403) { + let issuerPhrase = ""; + const issuerContact = serverUtil.contactForDid( + this.veriClaim.issuer, + this.allContacts, + ); + if (issuerContact?.name) { + issuerPhrase += + "Ask " + + issuerContact.name + + " to show you the full claim details."; + } + if ( + this.confirmerIdList.length > 0 || + this.confsVisibleToIdList.length > 0 + ) { + if (issuerContact?.name) { + issuerPhrase += + "You could also ask someone in the Confirmations section to make an introduction."; + } else { + issuerPhrase += + "Ask someone in the Confirmations section to make an introduction."; + } + } this.fullClaimMessage = "You are not authorized to view the full contents of this claim." + - " To see all the details, ask the issuer to allow you to see their claims." + - " If you cannot see the issuer's DID, ask someone in the Confirmations section above." + - " If there are no connections, you will have to ask people in your" + - " network for their help, some other way; send them to this page and" + - " see if they can make a connection for you."; + issuerPhrase + + " You might ask someone in your network -- like the person who registered you --" + + " if they can find out more and make an introduction: " + + " send them this page and see if they can make a connection for you."; } else { this.$notify( { diff --git a/src/views/ConfirmGiftView.vue b/src/views/ConfirmGiftView.vue index 737a30a2e..8c91adc92 100644 --- a/src/views/ConfirmGiftView.vue +++ b/src/views/ConfirmGiftView.vue @@ -54,13 +54,6 @@ Confirm <fa icon="circle-check" class="ml-2 text-white cursor-pointer" /> </button> - <a - v-if="isRegistered" - class="col-span-1 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-2 px-4 py-2 rounded-md" - :href="urlForNewGive" - > - Record a Similar One - </a> </div> <!-- Details --> @@ -264,13 +257,13 @@ <!-- Note that a similar section is found in ClaimView.vue --> <h2 class="font-bold uppercase text-xl text-blue-500 mt-8 mb-2 cursor-pointer" - @click="showDetails = !showDetails" + @click="showVeriClaimDump = !showVeriClaimDump" > - {{ serverUtil.containsHiddenDid(veriClaim) ? "Visible " : "" }}Details - <span v-if="!showDetails"><fa icon="chevron-down" /></span> + Details + <span v-if="!showVeriClaimDump"><fa icon="chevron-down" /></span> <span v-else><fa icon="chevron-up" /></span> </h2> - <div v-if="showDetails"> + <div v-if="showVeriClaimDump"> <div v-if=" serverUtil.containsHiddenDid(veriClaim) && @@ -286,7 +279,9 @@ <a @click="onClickShareClaim()" class="text-blue-500" >click to send them this info</a > - and see if they are willing to make an introduction. + 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. </span> <span v-else> If you'd like to ask any of your contacts to take a look and see if @@ -313,7 +308,9 @@ <span v-else> If you'd like an introduction, <a - @click="copyToClipboard('Location', windowLocation.href)" + @click=" + copyToClipboard('A link to this page', windowLocation.href) + " class="text-blue-500" >share this page with them and ask if they'll tell you more about about the participants.</a @@ -373,20 +370,29 @@ class="text-sm overflow-x-scroll px-4 py-3 bg-slate-100 rounded-md" >{{ veriClaimDump }}</pre > + <div class="mt-2 ml-2"> + <a + @click="showClaimPage(veriClaim.id)" + class="text-blue-500 cursor-pointer" + > + <fa icon="file-lines" /> + See All Generic Info + </a> + </div> + <div class="mt-2 ml-2"> + <a + v-if="isRegistered" + class="text-blue-500 cursor-pointer" + :href="urlForNewGive" + > + <fa icon="file-lines" /> + Record a Give Similar to the Original + </a> + </div> </div> </div> <div v-else-if="!isLoading">This does not have details to confirm.</div> - <div class="mt-4" v-if="!isLoading"> - <a - @click="showClaimPage(veriClaim.id)" - class="text-blue-500 cursor-pointer" - > - <fa icon="file-lines" class="pl-2" /> - All Generic Info - </a> - </div> - <div class="fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full" v-if="isLoading" @@ -438,7 +444,7 @@ export default class ClaimView extends Vue { isRegistered = false; numConfsNotVisible = 0; // number of hidden DIDs in the confirmerIdList, minus the issuer if they aren't visible recipientName = ""; - showDetails = false; + showVeriClaimDump = false; urlForNewGive = ""; veriClaim = serverUtil.BLANK_GENERIC_SERVER_RECORD; veriClaimDump = ""; diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue index 591869545..b5f756641 100644 --- a/src/views/ProjectViewView.vue +++ b/src/views/ProjectViewView.vue @@ -14,7 +14,7 @@ > <fa icon="chevron-left" class="fa-fw"></fa> </button> - Idea + Project Idea <h2 class="text-xl font-semibold"> {{ name }} <button @@ -226,7 +226,7 @@ @click="openOfferDialog()" class="block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white rounded-md" > - Offer (maybe with conditions)... + Offer to this (maybe with conditions)... </button> </div> </div> @@ -403,7 +403,9 @@ :fromProjectId="this.projectId" /> - <h3 class="text-lg font-bold mb-3 mt-4">Benefitted By This</h3> + <h3 class="text-lg font-bold mb-3 mt-4"> + Benefitted From This Project + </h3> <div v-if="givesProvidedByThis.length === 0">(None yet.)</div>