feat(admin): add ban/report entry to the users sidebar section
The users SPA section had no ban/report menu item after the queue pages moved to native WP admin. Add a sidebar entry under 用户&互动 that lands on users.php?page=aksrt_user_ban via NativeOpsRedirect, and keep the old /users/report bookmark redirect.
This commit is contained in:
@@ -40,6 +40,10 @@ function createRouteMeta(page) {
|
||||
meta.section = page.section
|
||||
}
|
||||
|
||||
if (page.nativeAdminPath) {
|
||||
meta.nativeAdminPath = page.nativeAdminPath
|
||||
}
|
||||
|
||||
if (page.component === 'DeferredPage') {
|
||||
meta.deferred = true
|
||||
meta.deferredProps = {
|
||||
@@ -74,11 +78,11 @@ function createSectionRedirectRoutes() {
|
||||
/**
|
||||
* Old SPA ops routes → native WP admin pages.
|
||||
* Bookmarks under order-related paths land on NativeOpsRedirect.
|
||||
* (封禁/举报 as a sidebar entry lives in constants/sections/users.js → /users/ban.)
|
||||
*/
|
||||
const NATIVE_OPS_REDIRECTS = [
|
||||
{ path: '/users/messages', title: '消息中心', nativeAdminPath: 'users.php?page=aksrt_messages' },
|
||||
{ path: '/users/referral-codes', title: '推广码运营', nativeAdminPath: 'users.php?page=aksrt_referral_codes' },
|
||||
{ path: '/users/ban', title: '禁封管理', nativeAdminPath: 'users.php?page=aksrt_user_ban&tab=restrictions' },
|
||||
{ path: '/users/report', title: '禁封/举报', nativeAdminPath: 'users.php?page=aksrt_user_ban&tab=reports' },
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user