Profile: Little bit of refactoring

This commit is contained in:
Vladimir Barinov 2021-10-09 22:12:57 +03:00 committed by GitHub
parent 2c118e3179
commit d2b572818f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,7 +122,7 @@
<div n:if="isset($thisUser) && !$thisUser->prefersNotToSeeRating()" class="profile-hints">
{var completeness = $user->getProfileCompletenessReport()}
<div class="completeness-gauge {if $completeness->total >= 100}completeness-gauge-gold{/if}">
<div class="completeness-gauge, $completeness->total >= 100 ? completeness-gauge-gold">
<div style="width: {if ($completeness->total >= 100)}{round(($completeness->total / 10**strlen(strval($completeness->total))) * 100, 0)}{else}{$completeness->percent}{/if}%"></div>
<span>{$completeness->total}%</span>
</div>