From 7a2319a9a94fd9a8aa6f3c4d5a9db62d83fd9280 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 16 Aug 2026 21:33:45 +0800 Subject: [PATCH] fix: improve promotion tabs and referral layout --- inc/helpers/aksrt-user-center.php | 2 +- inc/helpers/user-center-renderers/sidebar-nav.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/helpers/aksrt-user-center.php b/inc/helpers/aksrt-user-center.php index 128ad00e..71408b3d 100644 --- a/inc/helpers/aksrt-user-center.php +++ b/inc/helpers/aksrt-user-center.php @@ -538,7 +538,7 @@ if (!function_exists('aksrt_get_user_center_render_context')) { 'orders_url' => isset($tabs['tabs']['orders']) ? aksrt_get_user_center_tab_url('orders') : '', 'show_vip' => !empty($vip_settings['enabled']), 'show_credit_tabs' => $show_credit_tabs, - 'affiliate_enabled' => $show_credit_tabs && !empty($affiliate_settings['enabled']), + 'affiliate_enabled' => !empty($affiliate_settings['enabled']), 'currency_name' => $currency_name, 'credit_balance' => (float) ($dashboard['credit_balance'] ?? 0.0), 'credits_enabled' => $show_credit_tabs, diff --git a/inc/helpers/user-center-renderers/sidebar-nav.php b/inc/helpers/user-center-renderers/sidebar-nav.php index d36433a6..0ba3107c 100644 --- a/inc/helpers/user-center-renderers/sidebar-nav.php +++ b/inc/helpers/user-center-renderers/sidebar-nav.php @@ -13,6 +13,8 @@ $level_url = isset($dashboard_tabs['level']) $auth_url = isset($dashboard_tabs['auth']) ? aksrt_get_user_center_tab_url('auth') : ''; $orders_available = isset($dashboard_tabs['orders']); $orders_url = $orders_available ? (string) ($orders_url ?? '') : ''; +$revenue_available = isset($dashboard_tabs['revenue']); +$revenue_url = $revenue_available ? aksrt_get_user_center_tab_url('revenue') : ''; $services = array_values(array_filter([ [ @@ -36,6 +38,13 @@ $services = array_values(array_filter([ 'url' => $orders_url, 'tab' => 'orders', ], + [ + 'label' => __('推广收益', 'aksrt'), + 'icon' => 'chart-line', + 'tone' => 'revenue', + 'url' => $revenue_url, + 'tab' => 'revenue', + ], ], static fn(array $item): bool => (string) $item['url'] !== '')); $settings = array_values(array_filter([