Show block adjustment / penalty on name-based admin cards & fix "undefined" altText

This commit is contained in:
QuickMythril 2025-01-14 15:46:48 -05:00
parent e0628ee8e0
commit 7cb0064242

View File

@ -1144,7 +1144,9 @@ const createEncryptedCardHTML = async (cardData, pollResults, cardIdentifier, co
createModal('poll-details')
let showRemoveHtml
let altText
let altText = ''
let penaltyText = ''
let adjustmentText = ''
const verifiedName = await validateMinterName(minterName)
let levelText = '</h3>'
@ -1154,6 +1156,8 @@ const createEncryptedCardHTML = async (cardData, pollResults, cardIdentifier, co
const addressInfo = await getAddressInfo(accountAddress)
levelText = ` - Level ${addressInfo.level}</h3>`
console.log(`name is validated, utilizing for removal features...${verifiedName}`)
penaltyText = addressInfo.blocksMintedPenalty == 0 ? '' : '<p>(has Blocks Penalty)<p>'
adjustmentText = addressInfo.blocksMintedAdjustment == 0 ? '' : '<p>(has Blocks Adjustment)<p>'
const removeActionsHtml = await checkAndDisplayRemoveActions(adminYes, verifiedName, cardIdentifier)
showRemoveHtml = removeActionsHtml
if (userVote === 0) {
@ -1189,7 +1193,7 @@ const createEncryptedCardHTML = async (cardData, pollResults, cardIdentifier, co
<h2>${creator}</h2>
${minterOrTopicHtml}${levelText}
<p>${header}</p>
${altText}
${penaltyText}${adjustmentText}${altText}
</div>
<div class="info">
${content}