From d2838847815c64d2f42fa4ed924fc438fbe1ffc1 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 5 Aug 2020 13:05:17 -0700 Subject: [PATCH] show % match, not warnings, in SWF upload tool I think this will be much clearer about whether the warnings are a good or bad amount! --- src/app/WardrobePage/support/ItemLayerSupportUploadModal.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/WardrobePage/support/ItemLayerSupportUploadModal.js b/src/app/WardrobePage/support/ItemLayerSupportUploadModal.js index 10e7290..082c58d 100644 --- a/src/app/WardrobePage/support/ItemLayerSupportUploadModal.js +++ b/src/app/WardrobePage/support/ItemLayerSupportUploadModal.js @@ -255,13 +255,17 @@ function ItemLayerSupportReviewStep({ imageWithAlphaUrl, numWarnings }) { return Generating imageā€¦; } + const ratioBad = numWarnings / (600 * 600); + const ratioGood = 1 - ratioBad; + return ( <> Step 3: Does this look correct? If so, let's upload it! - (Generated with {numWarnings} warnings.) + ({Math.floor(ratioGood * 10000) / 100}% match,{" "} + {Math.floor(ratioBad * 10000) / 100}% mismatch.)