feat(forum): add complete forum workflows

This commit is contained in:
kate522 committed 2026-11-11 00:09:43 +08:00
1 parent a254cbd3e9
commit ee65fc7fd2
39 files changed
+3425 -4

No files matched your search

@@ -0,0 +1,27 @@
import { renderFaIcon, schemaPage } from './helpers'
const pages = [
['general', '全局设置'],
['home', '首页与列表'],
['publishing', '发布与审核'],
['access', '权限与版主'],
['replies', '回复与互动'],
['payment', '付费与积分'],
['urls', '链接设置'],
]
export const forumSection = {
key: 'forum',
label: '社区论坛',
icon: renderFaIcon('fa fas fa-comments'),
route: '/forum',
children: pages.map(([key, label]) => schemaPage({
key: `forum-${key}`,
name: `Forum_${key}`,
label,
title: label,
route: `/forum/${key}`,
canonicalDomain: 'forum',
section: key,
})),
}
@@ -8,6 +8,7 @@ import { extensionsSection } from './extensions'
import { themeInfoSection } from './theme-info'
import { docsSection } from './docs'
import { toolsSection } from './tools'
import { forumSection } from './forum'
const SECTION_DEFAULT_CHILDREN = {
global: 'global-common',
@@ -18,6 +19,7 @@ const SECTION_DEFAULT_CHILDREN = {
payment: 'payment-knowledge',
extensions: 'extensions-system',
tools: 'tools-import-export',
forum: 'forum-general',
'theme-info': 'theme-info-dashboard',
docs: 'docs-dashboard',
}
@@ -43,6 +45,7 @@ export const ADMIN_SECTIONS = [
attachSectionDefaultRoute(permissionsSection),
attachSectionDefaultRoute(usersSection),
attachSectionDefaultRoute(paymentSection),
attachSectionDefaultRoute(forumSection),
attachSectionDefaultRoute(extensionsSection),
attachSectionDefaultRoute(toolsSection),
attachSectionDefaultRoute(themeInfoSection),
+2 -2
View File
@@ -170,7 +170,7 @@ function resolveSectionFromPath(path) {
/** Load schema from the Vue-side registry */
const pageMeta = computed(() => {
const schema = (isEmailPage.value || resolvedDomain.value === 'page_display')
const schema = (isEmailPage.value || ['page_display', 'forum'].includes(resolvedDomain.value))
? serverSchema.value
: getSchema(resolvedDomain.value, resolvedSection.value)
if (schema && schema.groups && schema.groups.length > 0) {
@@ -192,7 +192,7 @@ const pageMeta = computed(() => {
/** Default values from schema */
const defaults = computed(() => {
const schema = (isEmailPage.value || resolvedDomain.value === 'page_display')
const schema = (isEmailPage.value || ['page_display', 'forum'].includes(resolvedDomain.value))
? serverSchema.value
: getSchema(resolvedDomain.value, resolvedSection.value)
if (!schema) return {}