forked from trent_larson/crowd-funder-for-time-pwa
fix linting
This commit is contained in:
@@ -109,12 +109,12 @@ export default class ClaimCertificateView extends Vue {
|
||||
ctx.font = "bold 20px Arial";
|
||||
const claimTypeText =
|
||||
claimData.claimType === "GiveAction"
|
||||
? "Gift"
|
||||
: claimData.claimType === "PlanAction"
|
||||
? "Project"
|
||||
: this.serverUtil.capitalizeAndInsertSpacesBeforeCaps(
|
||||
claimData.claimType || "",
|
||||
);
|
||||
? "Gift"
|
||||
: claimData.claimType === "PlanAction"
|
||||
? "Project"
|
||||
: this.serverUtil.capitalizeAndInsertSpacesBeforeCaps(
|
||||
claimData.claimType || "",
|
||||
);
|
||||
const claimTypeWidth = ctx.measureText(claimTypeText).width;
|
||||
ctx.fillText(
|
||||
claimTypeText,
|
||||
@@ -162,13 +162,18 @@ export default class ClaimCertificateView extends Vue {
|
||||
);
|
||||
}
|
||||
|
||||
if (claimData.claim.object?.amountOfThisGood && claimData.claim.object?.unitCode) {
|
||||
if (
|
||||
claimData.claim.object?.amountOfThisGood &&
|
||||
claimData.claim.object?.unitCode
|
||||
) {
|
||||
const amount = claimData.claim.object.amountOfThisGood;
|
||||
const unit = claimData.claim.object.unitCode;
|
||||
const amountText = serverUtil.displayAmount(unit, amount);
|
||||
const amountWidth = ctx.measureText(amountText).width;
|
||||
// if there was no description then put this in that spot, otherwise put it below the description
|
||||
const yPos = descriptionText ? CANVAS_HEIGHT * 0.525 : CANVAS_HEIGHT * 0.495;
|
||||
const yPos = descriptionText
|
||||
? CANVAS_HEIGHT * 0.525
|
||||
: CANVAS_HEIGHT * 0.495;
|
||||
ctx.font = "14px Arial";
|
||||
ctx.fillText(amountText, (CANVAS_WIDTH - amountWidth) / 2, yPos);
|
||||
}
|
||||
@@ -176,7 +181,10 @@ export default class ClaimCertificateView extends Vue {
|
||||
// Draw claim issuer & recipient
|
||||
if (claimData.issuer) {
|
||||
ctx.font = "14px Arial";
|
||||
let fullIssuer = serverUtil.didInfoForCertificate(claimData.issuer, allContacts);
|
||||
let fullIssuer = serverUtil.didInfoForCertificate(
|
||||
claimData.issuer,
|
||||
allContacts,
|
||||
);
|
||||
if (fullIssuer.length > 15) {
|
||||
fullIssuer = fullIssuer.substring(0, 30) + "...";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user