Browse Source

don't show issuer for self-issued claims

split_build_process
Trent Larson 4 weeks ago
parent
commit
ec0e4693cb
  1. 5
      CHANGELOG.md
  2. 4
      package-lock.json
  3. 2
      package.json
  4. 13
      src/views/ClaimCertificateView.vue

5
CHANGELOG.md

@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.40] - 2024.12.20
### Added
- Only show issuer on certificate if it's not the agent
## [0.3.39] - 2024.12.20 - d8819155e2acd2b57fdab523168fa5d1d09e80cc
### Added
- Page for a framed claim certificate

4
package-lock.json

@ -1,12 +1,12 @@
{
"name": "TimeSafari",
"version": "0.3.40-beta",
"version": "0.3.40",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "TimeSafari",
"version": "0.3.40-beta",
"version": "0.3.40",
"dependencies": {
"@capacitor/android": "^6.1.2",
"@capacitor/cli": "^6.1.2",

2
package.json

@ -1,6 +1,6 @@
{
"name": "TimeSafari",
"version": "0.3.40-beta",
"version": "0.3.40",
"scripts": {
"dev": "vite",
"serve": "vite preview",

13
src/views/ClaimCertificateView.vue

@ -178,19 +178,26 @@ export default class ClaimCertificateView extends Vue {
ctx.fillText(amountText, (CANVAS_WIDTH - amountWidth) / 2, yPos);
}
// Draw claim issuer & recipient
if (claimData.issuer) {
// Draw claim issuer
console.log("claimData.issuer", claimData.issuer);
if (claimData.issuer == null
|| serverUtil.isHiddenDid(claimData.issuer)
// don't show if issuer claimed for themselves
// (The confirmations are the good stuff anyway, and self-issued certs shouldn't detract from that.)
|| claimData.issuer !== claimData.claim.agent?.identifier) {
ctx.font = "14px Arial";
let fullIssuer = serverUtil.didInfoForCertificate(
claimData.issuer,
allContacts,
);
if (fullIssuer.length > 15) {
if (fullIssuer.length > 30) {
fullIssuer = fullIssuer.substring(0, 30) + "...";
}
const issuerText = "Issued by " + fullIssuer;
ctx.fillText(issuerText, CANVAS_WIDTH * 0.3, CANVAS_HEIGHT * 0.6);
}
// Draw number of claim confirmers
if (confirmerIds.length > 0) {
const confirmerText =
"Confirmed by " +

Loading…
Cancel
Save