fix(nav): use reference theme sprite icons for header wallet tiles
The top-nav user card rendered its balance and points tiles with Font Awesome glyphs (fa-money-bill-wave, fa-coins) while the reference theme paints the multi-tone SVGs money-color-2 and points-color, so the two tiles read as flat monochrome next to the rest of the card. aksrt_header_user_wallet_mini() now resolves both value icons through aksrt_icon_markup(), which is the same call the user-center sidebar uses for the same two figures, so the header and the sidebar cannot drift apart: 余额 fa-money-bill-wave -> zibsvg-money-color-2 (em14) 积分 fa-coins -> zibsvg-points-color (em14) The tile arrows stay on fa-angle-right because that is what the reference renders there; only the two value icons were wrong. The muted-box geometry, the c-blue-2 / c-yellow value colours and the data-aksrt-* live-update hooks are untouched. Verification: node --test across widget-system, navigation, admin, asset-ledger, dev, front-submit and fixtures (621 tests), plus php -l. Rendered the tile through a stubbed harness and diffed it against the reference markup: identical structure, classes and icon. Contract-locked the two keys in tests/navigation/legacy-navigation-contract.test.cjs and added a cross-surface parity assertion to the sidebar icon contract.
This commit is contained in:
1 parent
4b18f7ef2c
commit
319ec2f47f
3 files changed
+27
-5
No files matched your search
@@ -137,6 +137,8 @@ if (!function_exists('aksrt_header_user_wallet_mini')) :
|
||||
|
||||
$center = function_exists('aksrt_get_user_center_url') ? aksrt_get_user_center_url('credits') : '#';
|
||||
$box = '';
|
||||
$balance_icon = aksrt_icon_markup('zibsvg-money-color-2', 'em14');
|
||||
$points_icon = aksrt_icon_markup('zibsvg-points-color', 'em14');
|
||||
|
||||
if ($balance_on) {
|
||||
$box .= '<a rel="nofollow" style="flex: 1;" class="muted-box padding-6 flex1 radius4" href="' . esc_url($center) . '">'
|
||||
@@ -144,7 +146,7 @@ if (!function_exists('aksrt_header_user_wallet_mini')) :
|
||||
. '<i class="ml6 fa fas fa-angle-right em12" aria-hidden="true"></i></div>'
|
||||
. '<div class="flex jsb"><span class="font-bold c-blue-2" data-aksrt-wallet-value data-aksrt-count-format="cut-count">'
|
||||
. esc_html(aksrt_cut_count((float) aksrt_user_balance_decimal($user_id)))
|
||||
. '</span><i class="fa fas fa-money-bill-wave em14 c-blue-2" aria-hidden="true"></i></div></a>';
|
||||
. '</span>' . $balance_icon . '</div></a>';
|
||||
}
|
||||
|
||||
if ($points_on) {
|
||||
@@ -154,7 +156,7 @@ if (!function_exists('aksrt_header_user_wallet_mini')) :
|
||||
. '<i class="ml6 fa fas fa-angle-right em12" aria-hidden="true"></i></div>'
|
||||
. '<div class="flex jsb"><span class="font-bold c-yellow" data-aksrt-points-value data-aksrt-count-format="cut-count">'
|
||||
. esc_html(aksrt_cut_count(aksrt_user_points($user_id)))
|
||||
. '</span><i class="fa fas fa-coins em14 c-yellow" aria-hidden="true"></i></div></a>';
|
||||
. '</span>' . $points_icon . '</div></a>';
|
||||
}
|
||||
|
||||
return '<div class="flex ab jsb col-ml6">' . $box . '</div>';
|
||||
|
||||
Reference in new issue
Block a user