feat(admin): unify native admin pages on a shared modern UI

Add NativeUi helper + native-ui.css (tokens mirror the SPA Naive UI theme)
and move the pay center, orders, products, coupons, charge cards, income,
withdrawals, tickets, invite codes, VIP, verify, messages and report/ban
pages onto shared header, stat cards, cards, filters, badges and empty
states. Remove inline styles and dead helpers; split PayChargeCards into
sibling traits to stay under the file size limit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-30 15:05:38 +08:00
1 parent aa692f3c9f
commit 18951b01d6
29 files changed
+2503 -1593

No files matched your search

+14 -1
View File
@@ -23,7 +23,20 @@ const test = require('node:test');
const vm = require('node:vm');
const root = path.resolve(__dirname, '..', '..');
const page = fs.readFileSync(path.join(root, 'src/Admin/Native/PayChargeCards.php'), 'utf8');
// PayChargeCards 已按关注点拆成 flat sibling traits。契约按方法名切片,依赖「类体 + trait 体」
// 在同一文本里保持原有相邻顺序,因此这里按固定顺序把壳类与三个 trait 文件拼接后再切片:
// 壳类(render_charge_cards_page / 动作 / 数据辅助)
// → List(render_list / list_query_args)
// → Assets(print_assets 的 <style>/<script>)
// → Forms(render_add_form / render_export_form / 依赖显隐助手 / button_set / spinner / page_notice)
const read = (rel) => fs.readFileSync(path.join(root, rel), 'utf8');
const page = [
'src/Admin/Native/PayChargeCards.php',
'src/Admin/Native/PayChargeCardsList.php',
'src/Admin/Native/PayChargeCardsAssets.php',
'src/Admin/Native/PayChargeCardsForms.php',
].map(read).join('\n');
/** 依赖条目:checked / unchecked 不写 val,与 wp_json_encode 的输出保持一致。 */
const DEP_ENTRY = /\['key'\s*=>\s*'([^']*)'\s*,\s*'op'\s*=>\s*'([^']*)'(?:\s*,\s*'val'\s*=>\s*'([^']*)')?\]/g;