refactor: rename the theme brand and every identifier from AKSRT to Jio

Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.

Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
  cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
  window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)

Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
  so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
  (dropped 3 stale entries, added the 17 missing ones)

Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
  get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
  when it is empty

Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.

Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Opus 5 committed 2026-11-01 20:05:04 +08:00
1 parent 5b16bc6e15
commit 35bb96e82f
997 files changed
+28216 -28188

No files matched your search

@@ -17,12 +17,12 @@ const css = read('assets/css/admin/tickets.css');
test('ticket native page registers no AJAX read; writes reuse REST', () => {
assert.match(menus, /use UsersMenusTicketsCenter;/);
assert.match(menus, /'users.php',[\s\S]*?'aksrt_tickets'/);
assert.doesNotMatch(menus + center, /wp_ajax_aksrt_ticket_view|ajax_ticket_view|aksrt_ticket_view/);
assert.match(menus, /'users.php',[\s\S]*?'jio_tickets'/);
assert.doesNotMatch(menus + center, /wp_ajax_jio_ticket_view|ajax_ticket_view|jio_ticket_view/);
assert.match(center, /wp_create_nonce\('wp_rest'\)/);
assert.match(center, /rest_url\('aksrt\/v1\/admin\/tickets' \./);
assert.match(center, /rest_url\('jio\/v1\/admin\/tickets' \./);
assert.match(js, /'X-WP-Nonce': config.restNonce/);
assert.doesNotMatch(menus, /admin_post_aksrt_ticket_update/);
assert.doesNotMatch(menus, /admin_post_jio_ticket_update/);
assert.doesNotMatch(center, /function (handle_ticket_update|ticket_action_\w+|ticket_redirect)/);
assert.match(menus, /count_pending_tickets\(\)/);
assert.match(menus, /TicketSettings::enabled\(\)/);
@@ -44,8 +44,8 @@ test('list and workspace are page views; only creation is a dialog on the list p
// 处理工作区本身不是弹窗;只有内部备注的输入在弹窗内。
assert.equal((detail.match(/<dialog /g) || []).length, 1);
assert.match(detail, /<dialog id="' \. esc_attr\(self::TICKET_NOTE_DIALOG\)/);
assert.match(detail, /ticket_form_open\('note', \$id, 'aksrt-ticket-dialog__frame'\)/);
assert.doesNotMatch(js + css, /aksrt-ticket-detail-dialog|aksrt-ticket-modal-open|data-aksrt-ticket-panel/);
assert.match(detail, /ticket_form_open\('note', \$id, 'jio-ticket-dialog__frame'\)/);
assert.doesNotMatch(js + css, /jio-ticket-detail-dialog|jio-ticket-modal-open|data-jio-ticket-panel/);
});
test('detail lookup is independent of the filtered list; paging clamps and preserves filters', () => {
@@ -64,25 +64,25 @@ test('detail lookup is independent of the filtered list; paging clamps and prese
test('conversation, private notes and final-state confirmation remain distinct', () => {
assert.match(detail, /TicketNoteService::for_ticket\(\$id\)/);
assert.match(detail, /TicketRepository::get_instance\(\)->replies\(\$id\)/);
assert.match(detail, /!empty\(\$quote\['is_deleted'\]\) \? __\('原回复已删除', 'aksrt'\)/);
assert.match(detail, /!empty\(\$quote\['is_deleted'\]\) \? __\('原回复已删除', 'jio'\)/);
// 回复框是会话面板的底部,而不是独立卡片。
assert.match(detail, /return \$html \. '<\/ol><\/div>' \. \$footer \. '<\/section>';/);
assert.ok(detail.includes("ticket_form_open('reply', $id, 'aksrt-ticket-composer')"));
assert.match(detail, /data-aksrt-ticket-send-shortcut/);
assert.ok(detail.includes("ticket_form_open('reply', $id, 'jio-ticket-composer')"));
assert.match(detail, /data-jio-ticket-send-shortcut/);
assert.match(js, /event\.ctrlKey \|\| event\.metaKey/);
assert.ok(detail.includes("ticket_form_open('status'"));
assert.doesNotMatch(detail, /function ticket_composer\(/);
assert.match(detail, /aksrt-ticket-detail__closed/);
assert.match(detail, /jio-ticket-detail__closed/);
assert.match(detail, /TicketStatusService::can_transition\(\$from, \$key\)/);
assert.match(detail, /data-aksrt-ticket-close-confirm/);
assert.match(detail, /data-aksrt-ticket-assign/);
assert.match(detail, /data-jio-ticket-close-confirm/);
assert.match(detail, /data-jio-ticket-assign/);
assert.match(detail, /仅管理员可见,不会发送给用户/);
});
test('page safety: unsaved-change guard, drafts survive the post-save reload, uncertain writes lock forms', () => {
assert.match(js, /window.addEventListener\('beforeunload'/);
assert.match(js, /sessionStorage/);
assert.match(js, /aksrt_ticket_msg/);
assert.match(js, /jio_ticket_msg/);
assert.match(js, /next.length > field.maxLength/);
assert.match(js, /strings.uncertain/);
assert.match(js, /\[401, 403, 404, 409\]/);
@@ -94,19 +94,19 @@ test('page safety: unsaved-change guard, drafts survive the post-save reload, un
});
test('configuration remains in the SPA; native ops has no old config tabs', () => {
assert.match(list, /admin_url\('admin\.php\?page=aksrt-settings#\/users\/ticket'\)/);
assert.match(list, /admin_url\('admin\.php\?page=jio-settings#\/users\/ticket'\)/);
assert.doesNotMatch(center + list + detail, /nav-tab-wrapper|ticket_tab|UsersMenusTicketsConfig/);
assert.ok(!fs.existsSync(path.join(root, 'src/Admin/Native/UsersMenusTicketsConfig.php')));
assert.ok(read('assets/admin/src/router/index.js').includes("{ path: '/users/tickets', title: '工单管理', nativeAdminPath: 'users.php?page=aksrt_tickets' }"));
assert.ok(read('assets/admin/src/router/index.js').includes("{ path: '/users/tickets', title: '工单管理', nativeAdminPath: 'users.php?page=jio_tickets' }"));
});
test('frontend hooks remain aligned with their independent REST consumer', () => {
const renderer = read('inc/helpers/user-center-renderers/profile-tickets.php');
const frontend = read('assets/js/ticket-center.js') + '\n' + read('assets/js/ticket-center-core.js');
for (const hook of ['data-aksrt-ticket-center', 'data-aksrt-ticket-create', 'data-aksrt-ticket-stats', 'data-aksrt-ticket-stat=', 'data-aksrt-ticket-list', 'data-aksrt-ticket-pagination', 'data-aksrt-tickets-search', 'data-aksrt-ticket-filter=']) {
for (const hook of ['data-jio-ticket-center', 'data-jio-ticket-create', 'data-jio-ticket-stats', 'data-jio-ticket-stat=', 'data-jio-ticket-list', 'data-jio-ticket-pagination', 'data-jio-tickets-search', 'data-jio-ticket-filter=']) {
assert.ok(renderer.includes(hook), `renderer missing ${hook}`);
}
for (const hook of ['data-aksrt-ticket-center', 'data-aksrt-ticket-create', 'data-aksrt-ticket-list', 'data-aksrt-ticket-view=', 'data-aksrt-ticket-page=', 'data-aksrt-ticket-quote=', 'data-aksrt-ticket-images']) {
for (const hook of ['data-jio-ticket-center', 'data-jio-ticket-create', 'data-jio-ticket-list', 'data-jio-ticket-view=', 'data-jio-ticket-page=', 'data-jio-ticket-quote=', 'data-jio-ticket-images']) {
assert.ok(frontend.includes(hook), `frontend missing ${hook}`);
}
for (const endpoint of ["'/tickets'", "'/tickets/statistic'", "'/tickets/meta'", "'/tickets/' + ticketId", "'/tickets/' + ticket.id + '/reply'", "'/ticket/upload-attachment'"]) {
@@ -115,5 +115,5 @@ test('frontend hooks remain aligned with their independent REST consumer', () =>
assert.match(frontend, /runCaptcha\('ticket_create'\)/);
assert.match(frontend, /runCaptcha\('ticket_reply'\)/);
const routeCss = read('assets/css/routes/tickets.css');
for (const hook of ['.aksrt-tickets-page', '.aksrt-ticket-badge', '.aksrt-ticket-detail', '--aksrt-ticket-color']) assert.ok(routeCss.includes(hook));
for (const hook of ['.jio-tickets-page', '.jio-ticket-badge', '.jio-ticket-detail', '--jio-ticket-color']) assert.ok(routeCss.includes(hook));
});