fix(admin): use FA5 long-arrow icons in post list sort
后台文章列表的排序箭头还停留在 FA4 的 fa fa-long-arrow-down / up,而且类名是字符串拼接出来的。契约测试按完整的 fa fas fa-* token 逐个校验,看不穿拼接后的类名,所以这条一直是漏网之鱼。 改为按升降序直接输出完整的 fa fas fa-long-arrow-alt-down / fa-long-arrow-alt-up 两个字面量,走全局 FA5+ 图标系统。 验证:node --test tests/**/*.test.cjs 全量 572 项通过;php -l src/Admin/Native/PostListEnhance.php 无语法错误。
This commit is contained in:
@@ -92,7 +92,9 @@ class PostListEnhance {
|
|||||||
|
|
||||||
$order = $this->current_order();
|
$order = $this->current_order();
|
||||||
$order_by = $this->current_orderby();
|
$order_by = $this->current_orderby();
|
||||||
$o_icon = '<i class="opacity5 ml3 fa fa-long-arrow-' . ($order === 'asc' ? 'down' : 'up') . '"></i>';
|
$o_icon = $order === 'asc'
|
||||||
|
? '<i class="opacity5 ml3 fa fas fa-long-arrow-alt-down"></i>'
|
||||||
|
: '<i class="opacity5 ml3 fa fas fa-long-arrow-alt-up"></i>';
|
||||||
|
|
||||||
$new_columns = [];
|
$new_columns = [];
|
||||||
foreach ($columns as $key => $label) {
|
foreach ($columns as $key => $label) {
|
||||||
|
|||||||
Reference in New Issue
Block a user