导入 AKSRT 主题开发源码
This commit is contained in:
1 parent
9681dd3d48
commit
1268a55dd0
595 files changed
+127705
No files matched your search
@@ -0,0 +1,66 @@
|
||||
import { globalSection } from './global'
|
||||
import { pageDisplaySection } from './page-display'
|
||||
import { postListSection } from './post-list'
|
||||
import { permissionsSection } from './permissions'
|
||||
import { usersSection } from './users'
|
||||
import { paymentSection } from './payment'
|
||||
import { shopSection } from './shop'
|
||||
import { forumSection } from './forum'
|
||||
import { extensionsSection } from './extensions'
|
||||
import { themeInfoSection } from './theme-info'
|
||||
import { docsSection } from './docs'
|
||||
import { toolsSection } from './tools'
|
||||
|
||||
const primarySections = [
|
||||
globalSection,
|
||||
pageDisplaySection,
|
||||
postListSection,
|
||||
permissionsSection,
|
||||
usersSection,
|
||||
paymentSection,
|
||||
shopSection,
|
||||
forumSection,
|
||||
extensionsSection,
|
||||
]
|
||||
|
||||
const compatChildren = [
|
||||
...(toolsSection.children || []),
|
||||
...(themeInfoSection.children || []),
|
||||
...(docsSection.children || []),
|
||||
]
|
||||
|
||||
export const compatToolsSection = {
|
||||
key: 'tools-compat',
|
||||
label: '兼容&工具',
|
||||
icon: toolsSection.icon,
|
||||
route: '/tools',
|
||||
children: compatChildren,
|
||||
}
|
||||
|
||||
export const ADMIN_SECTIONS = [
|
||||
...primarySections,
|
||||
compatToolsSection,
|
||||
]
|
||||
|
||||
export function getAllAdminPages() {
|
||||
const pages = []
|
||||
|
||||
for (const section of ADMIN_SECTIONS) {
|
||||
if (section.placeholder) {
|
||||
pages.push({
|
||||
sectionKey: section.key,
|
||||
...section,
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
||||
for (const child of section.children || []) {
|
||||
pages.push({
|
||||
sectionKey: section.key,
|
||||
...child,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return pages
|
||||
}
|
||||
Reference in new issue
Block a user