feat(icons): wire the universal picker into tabbar/floating settings and keep customsvg through their save paths

手机底部Tab and 右侧悬浮按钮 settings pages swap their icon text inputs
for the shared FaIconPicker (with a new IconValue preview component that
renders FA/sprite/custom SVG values in lists and previews). footer.php
tabbar/floating/sub-item icons and the VIP float render through
aksrt_icon_markup so every stored format displays; GlobalControllerPart1
and the VIP helper drop the FA-only regex gate and sanitize icon values
through aksrt_sanitize_icon_value. The picker popover tabs now wrap
instead of overflowing, and FA grid previews use style-only classes.
This commit is contained in:
2026-09-06 14:27:49 +08:00
parent d89752d543
commit 70cba11fb7
8 changed files with 96 additions and 63 deletions
+4 -6
View File
@@ -43,11 +43,9 @@ if (!function_exists('aksrt_get_float_pay_vip_html')) :
}
$icon = trim((string) ($item['icon'] ?? ''));
if ($icon === '') {
$icon = 'fa fas fa-gem';
}
if (!preg_match('/^fa\s+(?:fas|far|fab)\s+fa-[a-z0-9-]+(?:\s+fa-[a-z0-9-]+)*$/i', $icon)) {
$icon = 'fa fas fa-gem';
$icon_html = aksrt_icon_markup($icon);
if ($icon_html === '') {
$icon_html = aksrt_icon_markup('fa fas fa-gem');
}
// Logged-in: open modal. Guest: open login.
@@ -72,7 +70,7 @@ if (!function_exists('aksrt_get_float_pay_vip_html')) :
: '';
return '<a class="' . esc_attr($cls) . '" href="javascript:;" role="button" aria-label="' . esc_attr($title) . '" title="' . esc_attr($title) . '"' . $style_attr . $vip_level_attr . '>'
. '<i class="' . esc_attr($icon) . '" aria-hidden="true"></i>'
. $icon_html
. '</a>';
}
endif;