put didInfo names in more places and add copy icons for DIDs & IDs

This commit is contained in:
2024-01-16 18:58:08 -07:00
parent 0eb16d5661
commit 3ebe7bc156
6 changed files with 62 additions and 6 deletions

View File

@@ -89,7 +89,7 @@
>
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
</button>
<span v-show="showDidCopy">Copied!</span>
<span v-show="showDidCopy">Copied</span>
</div>
</div>
@@ -248,7 +248,7 @@
>
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
</button>
<span v-show="showB64Copy">Copied!</span>
<span v-show="showB64Copy">Copied</span>
</div>
<div class="text-slate-500 text-sm font-bold">Public Key (hex)</div>
@@ -264,7 +264,7 @@
>
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
</button>
<span v-show="showPubCopy">Copied!</span>
<span v-show="showPubCopy">Copied</span>
</div>
<div class="text-slate-500 text-sm font-bold">Derivation Path</div>
@@ -283,7 +283,7 @@
>
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
</button>
<span v-show="showDerCopy">Copied!</span>
<span v-show="showDerCopy">Copied</span>
</div>
</div>

View File

@@ -26,6 +26,18 @@
<div class="text-sm">
<div>
{{ veriClaim.id }}
<button
@click="
libsUtil.doCopyTwoSecRedo(
veriClaim.id as string,
() => (showIdCopy = !showIdCopy),
)
"
class="ml-2 mr-2"
>
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
</button>
<span v-show="showIdCopy">Copied ID</span>
</div>
<div>
<fa icon="message" class="fa-fw text-slate-400"></fa>
@@ -34,6 +46,20 @@
<div>
<fa icon="user" class="fa-fw text-slate-400"></fa>
{{ veriClaim.issuer }}
<span v-if="!serverUtil.isEmptyOrHiddenDid(veriClaim.issuer)">
<button
@click="
libsUtil.doCopyTwoSecRedo(
veriClaim.issuer as string,
() => (showDidCopy = !showDidCopy),
)
"
class="ml-2 mr-2"
>
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
</button>
<span v-show="showDidCopy">Copied DID</span>
</span>
</div>
<div>
<fa icon="calendar" class="fa-fw text-slate-400"></fa>
@@ -295,6 +321,8 @@ export default class ClaimView extends Vue {
fullClaimDump = "";
fullClaimMessage = "";
numConfsNotVisible = 0; // number of hidden DIDs in the confirmerIdList, minus the issuer if they aren't visible
showDidCopy = false;
showIdCopy = false;
veriClaim = serverUtil.BLANK_GENERIC_SERVER_RECORD;
veriClaimDump = "";

View File

@@ -35,7 +35,23 @@
<div class="text-sm mb-3">
<div class="truncate">
<fa icon="user" class="fa-fw text-slate-400"></fa>
{{ issuer }}
{{
serverUtil.didInfo(issuer, activeDid, allMyDids, allContacts)
}}
<span v-if="!serverUtil.isEmptyOrHiddenDid(issuer)">
<button
@click="
libsUtil.doCopyTwoSecRedo(
issuer,
() => (showDidCopy = !showDidCopy),
)
"
class="ml-2 mr-2"
>
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
</button>
<span v-show="showDidCopy">Copied DID</span>
</span>
</div>
<div v-if="timeSince">
<fa icon="calendar" class="fa-fw text-slate-400"></fa>
@@ -371,6 +387,7 @@ export default class ProjectViewView extends Vue {
name = "";
offersToThis: Array<OfferServerRecord> = [];
projectId = localStorage.getItem("projectId") || ""; // handle ID
showDidCopy = false;
timeSince = "";
truncatedDesc = "";
truncateLength = 40;