refactor some verbiage & look-and-feel

This commit is contained in:
2024-11-30 13:16:58 -07:00
parent 5fc021b197
commit 7acf921e82
4 changed files with 79 additions and 46 deletions

View File

@@ -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" />&nbsp;<a
>, found at&nbsp;<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(
{