From 44d976ec09d7305ed0d4917606e05aae8892af0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dzieko=C5=84ski?= Date: Fri, 24 Jun 2022 03:08:16 +0200 Subject: [PATCH] GH-224 Display current dark energy as green when meeting cost --- .../settings/screens/UsernameChange/UsernameChange.screen.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/settings/screens/UsernameChange/UsernameChange.screen.php b/modules/settings/screens/UsernameChange/UsernameChange.screen.php index b1408383..cc7f3d8b 100644 --- a/modules/settings/screens/UsernameChange/UsernameChange.screen.php +++ b/modules/settings/screens/UsernameChange/UsernameChange.screen.php @@ -41,10 +41,11 @@ function render($props) { ]; $userDarkEnergy = $user['darkEnergy']; + $usernameChangeCost = Settings\Utils\Helpers\getUsernameChangeCost(); $_Lang['skinpath'] = $_SkinPath; $_Lang['DarkEnergy_Counter'] = $userDarkEnergy; - if ($userDarkEnergy >= 15) { + if ($userDarkEnergy >= $usernameChangeCost) { $_Lang['DarkEnergy_Color'] = 'lime'; } else if ($userDarkEnergy > 0) { $_Lang['DarkEnergy_Color'] = 'orange';