refactor(admin): consolidate duplicate configuration
Remove duplicate comment, captcha, filing, and website-security configuration paths. Move front submission verification to the captcha scene matrix and retire obsolete admin routes and components.
This commit is contained in:
@@ -4,7 +4,6 @@ export const commonSchema = {
|
||||
icon: 'fas fa-cog',
|
||||
description: '管理站点常用开关、懒加载与备案信息等基础配置。',
|
||||
defaults: {
|
||||
comment_enabled: true,
|
||||
lazyload_enabled: true,
|
||||
lazyload_animation: 'blur',
|
||||
lazyload_placeholder: '',
|
||||
@@ -18,17 +17,10 @@ export const commonSchema = {
|
||||
lazyload_other: true,
|
||||
lazyload_widget: true,
|
||||
icp_filing: '',
|
||||
police_filing: '',
|
||||
footer_text: '',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'comment',
|
||||
title: '评论功能',
|
||||
icon: 'fas fa-comment',
|
||||
fields: [
|
||||
{ key: 'comment_enabled', label: '开启评论', type: 'switch', default: true, help: '全局评论开关,关闭后所有文章不再显示评论区' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'performance',
|
||||
title: '性能优化',
|
||||
@@ -72,6 +64,7 @@ export const commonSchema = {
|
||||
icon: 'fas fa-shield-alt',
|
||||
fields: [
|
||||
{ key: 'icp_filing', label: 'ICP 备案号', type: 'input', placeholder: '例如:京ICP备12345678号', help: '显示在页脚的备案信息' },
|
||||
{ key: 'police_filing', label: '公安备案号', type: 'input', placeholder: '例如:公网安备11000000000000号', help: '显示在页脚的备案信息' },
|
||||
{ key: 'footer_text', label: '页脚附加文字', type: 'input', placeholder: '自定义页脚文字', help: '显示在版权信息下方' },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -824,9 +824,7 @@ export const pageDisplaySchemas = {
|
||||
footer_columns: 3,
|
||||
footer_copyright: true,
|
||||
footer_icp: true,
|
||||
icp_number: '',
|
||||
footer_police: true,
|
||||
police_number: '',
|
||||
footer_theme_custom: false,
|
||||
footer_theme_bg_custom: '',
|
||||
footer_theme_bg: '',
|
||||
@@ -857,9 +855,7 @@ export const pageDisplaySchemas = {
|
||||
{ key: 'footer_columns', label: '页脚列数', type: 'number', default: 3, min: 1, max: 4 },
|
||||
{ key: 'footer_copyright', label: '显示版权信息', type: 'switch', default: true },
|
||||
{ key: 'footer_icp', label: '显示ICP备案', type: 'switch', default: true },
|
||||
{ key: 'icp_number', label: 'ICP备案号', type: 'input', default: '' },
|
||||
{ key: 'footer_police', label: '显示公安备案', type: 'switch', default: true },
|
||||
{ key: 'police_number', label: '公安备案号', type: 'input', default: '' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ export const permissionsSchemas = {
|
||||
'comment', 'login', 'register', 'bind', 'bind_phone',
|
||||
'lostpassword', 'change_password', 'change_email', 'verify_email', 'download', 'signin',
|
||||
],
|
||||
disabled_scenarios: [],
|
||||
tencent: {},
|
||||
aliyun: {},
|
||||
cloudflare: {},
|
||||
@@ -75,6 +74,7 @@ export const permissionsSchemas = {
|
||||
{ label: '邮箱验证', value: 'verify_email' },
|
||||
{ label: '资源下载', value: 'download' },
|
||||
{ label: '每日签到', value: 'signin' },
|
||||
{ label: '前台投稿', value: 'front_submit' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -23,7 +23,6 @@ export const submitSchema = {
|
||||
front_submit_draft_save: true,
|
||||
front_submit_leave_warning: true,
|
||||
front_submit_guest_enabled: false,
|
||||
front_submit_captcha: false,
|
||||
post_article_btn_txte: '发布文章',
|
||||
post_article_title_strlen_limit_min: 5,
|
||||
post_article_title_strlen_limit_max: 30,
|
||||
@@ -63,7 +62,6 @@ export const submitSchema = {
|
||||
{ key: 'post_article_cat', label: '允许投稿分类', type: 'taxonomy_select', taxonomy: 'category', multiple: true, default: [], help: '为空则允许全部分类', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_guest_enabled', label: '允许免登录投稿', type: 'switch', default: false, help: '开启后访客可投稿;文章归属到下方用户', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_user', label: '免登录归属用户', type: 'user_select', default: 0, help: '免登录投稿时文章归属的用户,搜索选择', dependsOn: { key: 'front_submit_guest_enabled', value: true } },
|
||||
{ key: 'front_submit_captcha', label: '提交人机验证', type: 'switch', default: false, help: '提交正式投稿时校验人机验证(需在安全扩展启用 captcha)', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_tags', label: '标签输入', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_topics_s', label: '专题选择', type: 'switch', default: false, help: '投稿时可选择专题分类', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_custom_filter_s', label: '高级筛选选择', type: 'switch', default: true, help: '投稿时可选择自定义筛选维度值', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
|
||||
Reference in New Issue
Block a user