diff --git a/src/Controllers/Metrics/Controller.php b/src/Controllers/Metrics/Controller.php index 9fdf8fa6..138a5b29 100644 --- a/src/Controllers/Metrics/Controller.php +++ b/src/Controllers/Metrics/Controller.php @@ -72,6 +72,11 @@ class Controller extends BaseController $userLocales = $this->formatStats($this->stats->languages(), 'locales', 'language', 'locale'); $userThemes = $this->formatStats($this->stats->themes(), 'available_themes', 'theme'); + $themes = $this->config->get('available_themes'); + foreach ($userThemes as $key => $theme) { + $userThemes[$key]['labels']['name'] = $themes[$theme['labels']['theme']]; + } + $data = [ $this->config->get('app_name') . ' stats', 'info' => [ diff --git a/tests/Feature/Controllers/Metrics/ControllerTest.php b/tests/Feature/Controllers/Metrics/ControllerTest.php index 804fe620..1ff541a2 100644 --- a/tests/Feature/Controllers/Metrics/ControllerTest.php +++ b/tests/Feature/Controllers/Metrics/ControllerTest.php @@ -12,7 +12,11 @@ class ControllerTest extends ApplicationFeatureTest */ public function testMetrics() { - config(['api_key' => null, 'metrics' => ['work' => [60 * 60], 'voucher' => [1]]]); + config([ + 'api_key' => null, + 'metrics' => ['work' => [60 * 60], 'voucher' => [1]], + 'available_themes' => ['1' => 'Test'], + ]); /** @var Controller $controller */ $controller = app()->make(Controller::class);