fix(admin): restore Vite admin source files
This commit is contained in:
1 parent
8fe3a89c36
commit
ac5c0b2dd7
114 files changed
+17272
No files matched your search
@@ -0,0 +1,68 @@
|
||||
export const codeHighlightSchema = {
|
||||
key: 'global.code-highlight',
|
||||
title: '代码高亮',
|
||||
icon: 'fas fa-code',
|
||||
description: '代码块语法高亮主题、行号、最大高度等配置。',
|
||||
defaults: {
|
||||
highlight_kg: true,
|
||||
highlight_hh: false,
|
||||
highlight_btn: true,
|
||||
highlight_maxheight: 400,
|
||||
highlight_zt: 'enlighter',
|
||||
highlight_dark_zt: 'monokai',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'basic',
|
||||
title: '代码高亮设置',
|
||||
icon: 'fas fa-highlighter',
|
||||
fields: [
|
||||
{ key: 'highlight_kg', label: '代码高亮开关', type: 'switch', default: true },
|
||||
{ key: 'highlight_hh', label: '显示行号', type: 'switch', default: false },
|
||||
{ key: 'highlight_btn', label: '显示扩展按钮', type: 'switch', default: true, help: '控制原始代码 / 信息 / 新窗口按钮的显示' },
|
||||
{ key: 'highlight_maxheight', label: '最大高度(px,0=不限)', type: 'number', default: 400, min: 0, max: 2000, help: '代码块最大高度,超出滚动显示。0 表示不限制' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'theme',
|
||||
title: '主题设置',
|
||||
icon: 'fas fa-palette',
|
||||
fields: [
|
||||
{
|
||||
key: 'highlight_zt',
|
||||
label: '日间默认主题',
|
||||
type: 'select',
|
||||
default: 'enlighter',
|
||||
options: [
|
||||
{ label: 'Enlighter', value: 'enlighter' },
|
||||
{ label: 'Bootstrap 4', value: 'bootstrap4' },
|
||||
{ label: 'Classic', value: 'classic' },
|
||||
{ label: 'Beyond', value: 'beyond' },
|
||||
{ label: 'Mowtwo', value: 'mowtwo' },
|
||||
{ label: 'Eclipse', value: 'eclipse' },
|
||||
{ label: 'Droide', value: 'droide' },
|
||||
{ label: 'Minimal', value: 'minimal' },
|
||||
{ label: 'Rowhammer', value: 'rowhammer' },
|
||||
{ label: 'Godzilla', value: 'godzilla' },
|
||||
{ label: 'Dracula', value: 'dracula' },
|
||||
{ label: 'Atomic', value: 'atomic' },
|
||||
{ label: 'Monokai', value: 'monokai' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'highlight_dark_zt',
|
||||
label: '暗色默认主题',
|
||||
type: 'select',
|
||||
default: 'monokai',
|
||||
options: [
|
||||
{ label: 'Dracula', value: 'dracula' },
|
||||
{ label: 'Atomic', value: 'atomic' },
|
||||
{ label: 'Monokai', value: 'monokai' },
|
||||
{ label: 'Enlighter', value: 'enlighter' },
|
||||
{ label: 'Bootstrap 4', value: 'bootstrap4' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
export const customCodeSchema = {
|
||||
key: 'global.custom-code',
|
||||
title: '自定义代码',
|
||||
icon: 'fas fa-code',
|
||||
description: '自定义 CSS、JS 代码注入。',
|
||||
defaults: {
|
||||
custom_css: '',
|
||||
head_code: '',
|
||||
foot_code: '',
|
||||
trackcode: '',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'css',
|
||||
title: '自定义 CSS',
|
||||
icon: 'fab fa-css3-alt',
|
||||
fields: [
|
||||
{ key: 'custom_css', label: '自定义 CSS', type: 'code', language: 'css', placeholder: '/* 在此输入自定义 CSS */', rows: 10, help: '将在页面 <head> 中加载' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'code',
|
||||
title: '头部 & 底部代码',
|
||||
icon: 'fas fa-code',
|
||||
fields: [
|
||||
{ key: 'head_code', label: '头部 HTML 代码', type: 'code', placeholder: '<!-- 支持 meta/link/style/script 等任意 HTML -->', rows: 6, help: '在 <head> 中输出,支持 meta/link/style/script 等任意 HTML' },
|
||||
{ key: 'foot_code', label: '底部 HTML 代码', type: 'code', placeholder: '<!-- 在 </body> 前输出 -->', rows: 6, help: '在页面底部 </body> 前输出,支持任意 HTML' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'stats',
|
||||
title: '统计代码',
|
||||
icon: 'fas fa-chart-bar',
|
||||
fields: [
|
||||
{ key: 'trackcode', label: '统计代码', type: 'code', placeholder: '<!-- 百度统计 / GA / CNZZ / 51la -->', rows: 6, help: '百度统计、Google Analytics、CNZZ、51la 等统计代码,自动在 head 中输出' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
export const emailSchema = {
|
||||
key: 'global.email',
|
||||
title: '邮件配置',
|
||||
icon: 'fas fa-envelope',
|
||||
description: 'SMTP 发信配置、邮件事件开关与模板自定义。',
|
||||
defaults: {
|
||||
email_footer_text: '',
|
||||
email_site_branding: true,
|
||||
email_template_mode: 'plain',
|
||||
email_private_receive_limit: 'all',
|
||||
email_reg_verify_link_enabled: true,
|
||||
email_reg_verify_code_enabled: true,
|
||||
email_reg_success_enabled: true,
|
||||
email_password_reset_enabled: true,
|
||||
email_change_code_enabled: true,
|
||||
email_change_notice_enabled: true,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'global',
|
||||
title: '全局设置',
|
||||
icon: 'fas fa-cog',
|
||||
fields: [
|
||||
{ key: 'email_footer_text', label: '邮件页脚文字', type: 'textarea', rows: 2, placeholder: '留空则使用站点名称', help: '附加在每封邮件底部的文字' },
|
||||
{ key: 'email_site_branding', label: '显示站点品牌', type: 'switch', default: true, help: '在邮件开头显示「[站点名]」前缀' },
|
||||
{ key: 'email_template_mode', label: '邮件格式', type: 'radio', default: 'plain', options: [
|
||||
{ label: '纯文本', value: 'plain' },
|
||||
{ label: 'HTML', value: 'html' },
|
||||
]},
|
||||
{
|
||||
key: 'email_private_receive_limit',
|
||||
label: '私信邮件接收组',
|
||||
type: 'select',
|
||||
default: 'all',
|
||||
options: [
|
||||
{ label: '所有用户', value: 'all' },
|
||||
{ label: 'VIP 及以上', value: 'vip' },
|
||||
{ label: 'VIP2 及以上', value: 'vip2' },
|
||||
{ label: '仅管理员', value: 'admin' },
|
||||
],
|
||||
help: '限制哪些用户组可以收到私信邮件通知',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'branding',
|
||||
title: '邮件品牌',
|
||||
icon: 'fas fa-signature',
|
||||
fields: [
|
||||
{ key: 'mail_showname', label: '发件人名称', type: 'input', default: '', help: '覆盖系统默认发件人名称' },
|
||||
{ key: 'mail_title_prefix', label: '主题前缀', type: 'input', default: '', help: '自动添加在所有邮件主题前面,如【站点名】' },
|
||||
{ key: 'mail_description', label: '邮件底部说明', type: 'textarea', rows: 3, default: '', help: '附加在邮件页脚文字之后,留空不显示' },
|
||||
{ key: 'mail_more_content', label: '邮件附加内容', type: 'textarea', rows: 4, default: '', help: '附加在邮件内容末尾的补充说明' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'reg_verify_link',
|
||||
title: '注册验证链接',
|
||||
icon: 'fas fa-link',
|
||||
fields: [
|
||||
{ key: 'email_reg_verify_link_enabled', label: '启用', type: 'switch', default: true, help: '注册后发送验证链接邮件' },
|
||||
{ key: 'email_reg_verify_link_subject', label: '主题(留空使用默认)', type: 'input', placeholder: '验证你的邮箱地址' },
|
||||
{ key: 'email_reg_verify_link_content', label: '内容模板(留空使用默认)', type: 'textarea', rows: 4, placeholder: '支持 {username} {site_name} {url}', help: '可用占位符:{username} 用户名、{site_name} 站点名、{url} 验证链接' },
|
||||
{ key: 'email_reg_verify_link_html', label: 'HTML 格式', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'reg_verify_code',
|
||||
title: '注册验证码',
|
||||
icon: 'fas fa-keyboard',
|
||||
fields: [
|
||||
{ key: 'email_reg_verify_code_enabled', label: '启用', type: 'switch', default: true, help: '注册后发送 6 位验证码邮件' },
|
||||
{ key: 'email_reg_verify_code_subject', label: '主题(留空使用默认)', type: 'input', placeholder: '邮箱验证码' },
|
||||
{ key: 'email_reg_verify_code_content', label: '内容模板(留空使用默认)', type: 'textarea', rows: 4, placeholder: '支持 {username} {site_name} {code}', help: '可用占位符:{username} 用户名、{site_name} 站点名、{code} 验证码' },
|
||||
{ key: 'email_reg_verify_code_html', label: 'HTML 格式', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'reg_success',
|
||||
title: '注册成功通知',
|
||||
icon: 'fas fa-check-circle',
|
||||
fields: [
|
||||
{ key: 'email_reg_success_enabled', label: '启用', type: 'switch', default: true, help: '邮箱验证成功后发送通知邮件' },
|
||||
{ key: 'email_reg_success_subject', label: '主题(留空使用默认)', type: 'input', placeholder: '邮箱验证成功' },
|
||||
{ key: 'email_reg_success_content', label: '内容模板(留空使用默认)', type: 'textarea', rows: 4, placeholder: '支持 {username} {site_name}', help: '可用占位符:{username} 用户名、{site_name} 站点名' },
|
||||
{ key: 'email_reg_success_html', label: 'HTML 格式', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'password_reset',
|
||||
title: '密码重置',
|
||||
icon: 'fas fa-unlock-alt',
|
||||
fields: [
|
||||
{ key: 'email_password_reset_enabled', label: '启用', type: 'switch', default: true, help: '发送密码重置链接邮件' },
|
||||
{ key: 'email_password_reset_subject', label: '主题(留空使用默认)', type: 'input', placeholder: '重置密码' },
|
||||
{ key: 'email_password_reset_content', label: '内容模板(留空使用默认)', type: 'textarea', rows: 4, placeholder: '支持 {username} {site_name} {url}', help: '可用占位符:{username} 用户名、{site_name} 站点名、{url} 重置链接' },
|
||||
{ key: 'email_password_reset_html', label: 'HTML 格式', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'change_code',
|
||||
title: '邮箱变更验证码',
|
||||
icon: 'fas fa-shield-alt',
|
||||
fields: [
|
||||
{ key: 'email_change_code_enabled', label: '启用', type: 'switch', default: true, help: '变更邮箱时发送验证码邮件' },
|
||||
{ key: 'email_change_code_subject', label: '主题(留空使用默认)', type: 'input', placeholder: '邮箱验证码' },
|
||||
{ key: 'email_change_code_content', label: '内容模板(留空使用默认)', type: 'textarea', rows: 4, placeholder: '支持 {username} {site_name} {code}', help: '可用占位符:{username} 用户名、{site_name} 站点名、{code} 验证码' },
|
||||
{ key: 'email_change_code_html', label: 'HTML 格式', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'change_notice',
|
||||
title: '邮箱变更通知',
|
||||
icon: 'fas fa-bell',
|
||||
fields: [
|
||||
{ key: 'email_change_notice_enabled', label: '启用', type: 'switch', default: true, help: '邮箱变更成功后向旧邮箱发送通知' },
|
||||
{ key: 'email_change_notice_subject', label: '主题(留空使用默认)', type: 'input', placeholder: '账号邮箱已变更' },
|
||||
{ key: 'email_change_notice_content', label: '内容模板(留空使用默认)', type: 'textarea', rows: 4, placeholder: '支持 {username} {site_name} {new_email}', help: '可用占位符:{username} 用户名、{site_name} 站点名、{new_email} 新邮箱' },
|
||||
{ key: 'email_change_notice_html', label: 'HTML 格式', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export const floatingSchema = {
|
||||
key: 'global.floating',
|
||||
title: '右侧悬浮按钮',
|
||||
icon: 'fas fa-ellipsis-v',
|
||||
description: '页面右侧浮动按钮的显示与配置。',
|
||||
defaults: {},
|
||||
groups: [],
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
export const i18nSchema = {
|
||||
key: 'global.i18n',
|
||||
title: '多语言翻译',
|
||||
icon: 'fas fa-language',
|
||||
description: '配置站点语言、语言切换器和翻译管理。',
|
||||
defaults: {
|
||||
i18n_enabled: false,
|
||||
i18n_default_lang: 'zh-CN',
|
||||
i18n_switcher_position: 'footer',
|
||||
i18n_auto_detect: true,
|
||||
i18n_available_langs: 'zh-CN|简体中文\nen|English\nzh-TW|繁體中文\nja|日本語\nko|한국어\nfr|Français\nde|Deutsch\nes|Español\nru|Русский',
|
||||
i18n_nomenclature: '',
|
||||
i18n_url_strategy: 'query',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'basic',
|
||||
title: '基础配置',
|
||||
icon: 'fas fa-globe',
|
||||
fields: [
|
||||
{ key: 'i18n_enabled', label: '启用多语言', type: 'switch', default: false, help: '开启后站点将支持多语言切换' },
|
||||
{
|
||||
key: 'i18n_default_lang',
|
||||
label: '默认语言',
|
||||
type: 'select',
|
||||
default: 'zh-CN',
|
||||
options: [
|
||||
{ label: '简体中文', value: 'zh-CN' },
|
||||
{ label: 'English', value: 'en' },
|
||||
{ label: '繁體中文', value: 'zh-TW' },
|
||||
{ label: '日本語', value: 'ja' },
|
||||
{ label: '한국어', value: 'ko' },
|
||||
{ label: 'Français', value: 'fr' },
|
||||
{ label: 'Deutsch', value: 'de' },
|
||||
{ label: 'Español', value: 'es' },
|
||||
{ label: 'Русский', value: 'ru' },
|
||||
],
|
||||
dependsOn: { key: 'i18n_enabled', value: true },
|
||||
},
|
||||
{ key: 'i18n_auto_detect', label: '自动检测浏览器语言', type: 'switch', default: true, dependsOn: { key: 'i18n_enabled', value: true }, help: '基于浏览器 Accept-Language 自动切换(AKSRT 方案,区别于 zibll IP 定位方案)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'languages',
|
||||
title: '语言管理',
|
||||
icon: 'fas fa-language',
|
||||
fields: [
|
||||
{ key: 'i18n_available_langs', label: '可用语言列表', type: 'textarea', default: 'zh-CN|简体中文\nen|English\nzh-TW|繁體中文\nja|日本語\nko|한국어\nfr|Français\nde|Deutsch\nes|Español\nru|Русский', dependsOn: { key: 'i18n_enabled', value: true }, help: '每行一个语言:语言代码|显示名称(9 种内置语言)' },
|
||||
{ key: 'i18n_nomenclature', label: '自定义术语', type: 'code', default: '', dependsOn: { key: 'i18n_enabled', value: true }, help: 'JSON 格式自定义翻译术语(key => 翻译),对齐 zibll nomenclature' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'display',
|
||||
title: '展示设置',
|
||||
icon: 'fas fa-eye',
|
||||
fields: [
|
||||
{
|
||||
key: 'i18n_switcher_position',
|
||||
label: '语言切换器位置',
|
||||
type: 'radio',
|
||||
default: 'footer',
|
||||
options: [
|
||||
{ label: '导航栏', value: 'header' },
|
||||
{ label: '页脚', value: 'footer' },
|
||||
{ label: '导航栏+页脚', value: 'both' },
|
||||
{ label: '隐藏', value: 'none' },
|
||||
],
|
||||
dependsOn: { key: 'i18n_enabled', value: true },
|
||||
},
|
||||
{
|
||||
key: 'i18n_url_strategy',
|
||||
label: 'URL 策略',
|
||||
type: 'radio',
|
||||
default: 'query',
|
||||
options: [
|
||||
{ label: '查询参数 (?lang=en)', value: 'query' },
|
||||
{ label: '路径前缀 (/en/page)', value: 'path' },
|
||||
{ label: '子域名 (en.site.com)', value: 'subdomain' },
|
||||
],
|
||||
dependsOn: { key: 'i18n_enabled', value: true },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Global & Functions domain schemas.
|
||||
* Each key corresponds to a sub-page under the "全局&功能" section.
|
||||
*/
|
||||
|
||||
import { logoSchema } from './logo.js'
|
||||
import { commonSchema } from './common.js'
|
||||
import { layoutSchema } from './layout.js'
|
||||
import { searchSchema } from './search.js'
|
||||
import { emailSchema } from './email.js'
|
||||
import { tabbarSchema } from './tabbar.js'
|
||||
import { floatingSchema } from './floating.js'
|
||||
import { i18nSchema } from './i18n.js'
|
||||
import { customCodeSchema } from './custom-code.js'
|
||||
import { seoSchema } from './seo.js'
|
||||
import { codeHighlightSchema } from './code-highlight.js'
|
||||
import { systemNoticeSchema } from './system-notice.js'
|
||||
|
||||
export const globalSchemas = {
|
||||
logo: logoSchema,
|
||||
common: commonSchema,
|
||||
layout: layoutSchema,
|
||||
search: searchSchema,
|
||||
email: emailSchema,
|
||||
tabbar: tabbarSchema,
|
||||
floating: floatingSchema,
|
||||
i18n: i18nSchema,
|
||||
'custom-code': customCodeSchema,
|
||||
seo: seoSchema,
|
||||
'code-highlight': codeHighlightSchema,
|
||||
'system-notice': systemNoticeSchema,
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
export const layoutSchema = {
|
||||
key: 'global.layout',
|
||||
title: '显示 & 布局',
|
||||
icon: 'fas fa-desktop',
|
||||
description: '全局布局风格、颜色方案、字体设置。',
|
||||
defaults: {
|
||||
theme_mode: 'time-auto',
|
||||
theme_mode_button: ['pc_nav', 'm_menu'],
|
||||
primary_color: '#1890ff',
|
||||
theme_skin: 'f04494',
|
||||
dark_primary_color: '',
|
||||
border_radius: 8,
|
||||
theme_main_radius: 12,
|
||||
container_max_width: 1200,
|
||||
sidebar_enabled: true,
|
||||
sidebar_position: 'right',
|
||||
sidebar_width: 311,
|
||||
sidebar_home_enabled: true,
|
||||
sidebar_category_enabled: true,
|
||||
sidebar_tag_enabled: true,
|
||||
sidebar_single_enabled: true,
|
||||
sidebar_page_enabled: true,
|
||||
sidebar_search_enabled: true,
|
||||
font_family: 'system',
|
||||
qj_loading: false,
|
||||
qj_dh_xs: 'no1',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'loading-animation',
|
||||
title: '加载动画',
|
||||
icon: 'fas fa-spinner',
|
||||
fields: [
|
||||
{ key: 'qj_loading', label: '全站加载动画', type: 'switch', default: false, help: '开启后页面加载时显示全屏加载动画覆盖层' },
|
||||
{
|
||||
key: 'qj_dh_xs',
|
||||
label: '加载动画样式',
|
||||
type: 'select',
|
||||
default: 'no1',
|
||||
dependsOn: { key: 'qj_loading', value: true },
|
||||
options: [
|
||||
{ label: '样式 1', value: 'no1' },
|
||||
{ label: '样式 2', value: 'no2' },
|
||||
{ label: '样式 3', value: 'no3' },
|
||||
{ label: '样式 4', value: 'no4' },
|
||||
{ label: '样式 5', value: 'no5' },
|
||||
{ label: '样式 6', value: 'no6' },
|
||||
{ label: '样式 7', value: 'no7' },
|
||||
{ label: '样式 8', value: 'no8' },
|
||||
{ label: '样式 9', value: 'no9' },
|
||||
{ label: '样式 10', value: 'no10' },
|
||||
],
|
||||
help: '10 种加载动画样式可选',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'color',
|
||||
title: '色彩方案',
|
||||
icon: 'fas fa-palette',
|
||||
fields: [
|
||||
{
|
||||
key: 'theme_mode',
|
||||
label: '默认主题模式',
|
||||
type: 'radio',
|
||||
default: 'time-auto',
|
||||
options: [
|
||||
{ label: '浅色', value: 'white-theme' },
|
||||
{ label: '深色', value: 'dark-theme' },
|
||||
{ label: '跟随系统', value: 'time-auto' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'theme_mode_button',
|
||||
label: '主题切换按钮位置',
|
||||
type: 'checkbox',
|
||||
default: ['pc_nav', 'm_menu'],
|
||||
options: [
|
||||
{ label: 'PC 顶部导航', value: 'pc_nav' },
|
||||
{ label: '移动端菜单', value: 'm_menu' },
|
||||
],
|
||||
help: '控制主题切换按钮在哪些位置显示',
|
||||
},
|
||||
{ key: 'primary_color', label: '主题色', type: 'color', default: '#f04494', help: '按钮、链接和强调元素的主色调' },
|
||||
{
|
||||
key: 'theme_skin',
|
||||
label: '预设主题色',
|
||||
type: 'palette',
|
||||
default: 'f04494',
|
||||
options: [
|
||||
{ label: '玫红', value: 'ff1856' },
|
||||
{ label: '粉色', value: 'f04494' },
|
||||
{ label: '紫色', value: 'ae53f3' },
|
||||
{ label: '靛蓝', value: '627bf5' },
|
||||
{ label: '天蓝', value: '00a2e3' },
|
||||
{ label: '青绿', value: '16b597' },
|
||||
{ label: '翠绿', value: '36af18' },
|
||||
{ label: '黄绿', value: '8fb107' },
|
||||
{ label: '棕金', value: 'b18c07' },
|
||||
{ label: '橘橙', value: 'e06711' },
|
||||
{ label: '朱红', value: 'f74735' },
|
||||
],
|
||||
help: '选择预设主题色,将覆盖上方自定义主题色',
|
||||
},
|
||||
{ key: 'dark_primary_color', label: '暗色模式主题色', type: 'color', default: '', help: '暗色模式下独立的主题色,留空则跟随浅色模式' },
|
||||
{ key: 'border_radius', label: '全局圆角 (px)', type: 'slider', min: 0, max: 20, step: 1, default: 8 },
|
||||
{ key: 'theme_main_radius', label: '卡片圆角 (px)', type: 'number', min: 0, max: 30, default: 12, help: '独立卡片圆角,留空则使用全局圆角 +4' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'layout',
|
||||
title: '布局设置',
|
||||
icon: 'fas fa-columns',
|
||||
fields: [
|
||||
{ key: 'container_max_width', label: '内容最大宽度 (px)', type: 'select', default: 1200, options: [
|
||||
{ label: '1200px', value: 1200 },
|
||||
{ label: '1320px', value: 1320 },
|
||||
{ label: '1440px', value: 1440 },
|
||||
{ label: '1600px', value: 1600 },
|
||||
{ label: '1800px', value: 1800 },
|
||||
{ label: '2000px', value: 2000 },
|
||||
{ label: '2200px', value: 2200 },
|
||||
{ label: '全宽', value: 0 },
|
||||
]},
|
||||
{ key: 'sidebar_enabled', label: '开启侧边栏', type: 'switch', default: true },
|
||||
{ key: 'sidebar_position', label: '侧边栏位置', type: 'radio', default: 'right', dependsOn: { key: 'sidebar_enabled', value: true }, options: [
|
||||
{ label: '左侧', value: 'left' },
|
||||
{ label: '右侧', value: 'right' },
|
||||
]},
|
||||
{ key: 'sidebar_width', label: '侧边栏宽度 (px)', type: 'number', default: 300, min: 200, max: 400, step: 10, dependsOn: { key: 'sidebar_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'sidebar-scope',
|
||||
title: '侧边栏显示范围',
|
||||
icon: 'fas fa-th-list',
|
||||
fields: [
|
||||
{ key: 'sidebar_home_enabled', label: '首页侧边栏', type: 'switch', default: true, dependsOn: { key: 'sidebar_enabled', value: true } },
|
||||
{ key: 'sidebar_category_enabled', label: '分类页侧边栏', type: 'switch', default: true, dependsOn: { key: 'sidebar_enabled', value: true } },
|
||||
{ key: 'sidebar_tag_enabled', label: '标签页侧边栏', type: 'switch', default: true, dependsOn: { key: 'sidebar_enabled', value: true } },
|
||||
{ key: 'sidebar_single_enabled', label: '文章页侧边栏', type: 'switch', default: true, dependsOn: { key: 'sidebar_enabled', value: true } },
|
||||
{ key: 'sidebar_page_enabled', label: '页面侧边栏', type: 'switch', default: true, dependsOn: { key: 'sidebar_enabled', value: true } },
|
||||
{ key: 'sidebar_search_enabled', label: '搜索页侧边栏', type: 'switch', default: true, dependsOn: { key: 'sidebar_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'typography',
|
||||
title: '字体设置',
|
||||
icon: 'fas fa-font',
|
||||
fields: [
|
||||
{ key: 'font_family', label: '正文字体', type: 'select', default: 'system', options: [
|
||||
{ label: '系统默认', value: 'system' },
|
||||
{ label: '思源黑体', value: 'noto-sans-sc' },
|
||||
{ label: '思源宋体', value: 'noto-serif-sc' },
|
||||
{ label: '自定义', value: 'custom' },
|
||||
]},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
export const logoSchema = {
|
||||
key: 'global.logo',
|
||||
title: 'LOGO & 品牌',
|
||||
icon: 'fas fa-image',
|
||||
description: '管理站点 Logo、站点图标和品牌标识。',
|
||||
defaults: {
|
||||
site_logo: '',
|
||||
site_logo_dark: '',
|
||||
site_favicon: '',
|
||||
site_icon: '',
|
||||
logo_width: 150,
|
||||
logo_text: '',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'logo',
|
||||
title: 'Logo 设置',
|
||||
icon: 'fas fa-image',
|
||||
fields: [
|
||||
{ key: 'site_logo', label: '站点 Logo', type: 'media', help: '建议尺寸 300x80,支持 PNG/SVG 透明背景' },
|
||||
{ key: 'site_logo_dark', label: '暗色模式 Logo', type: 'media', help: '暗色模式下显示的 Logo,留空则使用默认 Logo' },
|
||||
{ key: 'logo_width', label: 'Logo 宽度 (px)', type: 'number', min: 50, max: 400, step: 10, help: '导航栏中 Logo 显示宽度' },
|
||||
{ key: 'logo_text', label: 'Logo 文字', type: 'input', placeholder: '当无 Logo 图片时显示的文字', help: '同时作为首页标题和 alt 文本使用' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'favicon',
|
||||
title: '站点图标',
|
||||
icon: 'fas fa-fingerprint',
|
||||
fields: [
|
||||
{ key: 'site_favicon', label: '浏览器图标 (Favicon)', type: 'media', help: '建议 32x32 或 16x16 的 ICO/PNG 文件' },
|
||||
{ key: 'site_icon', label: '移动端图标', type: 'media', help: '建议 192x192 的 PNG,用于移动端添加到桌面' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
export const seoSchema = {
|
||||
key: 'global.seo',
|
||||
title: 'SEO 优化',
|
||||
icon: 'fas fa-search',
|
||||
description: '站点标题、描述、关键词与 AI SEO。AI 生成入口在文章「独立 SEO」框;连接配置在「扩展 → AI 连接配置」。优先使用 WordPress AI Connectors。',
|
||||
defaults: {
|
||||
seo_enabled: true,
|
||||
seo_ai_enabled: false,
|
||||
seo_connector: '-',
|
||||
seo_title: '',
|
||||
seo_keywords: '',
|
||||
seo_description: '',
|
||||
ai_seo_title_prompt: '',
|
||||
ai_seo_keywords_prompt: '',
|
||||
ai_seo_description_prompt: '',
|
||||
seo_baidu_push: false,
|
||||
seo_baidu_normal: false,
|
||||
seo_baidu_fast: false,
|
||||
seo_baidu_token: '',
|
||||
seo_image_optimize: true,
|
||||
seo_image_default: '',
|
||||
seo_image_always_default: false,
|
||||
seo_auto_alt: true,
|
||||
seo_go_link: true,
|
||||
seo_go_link_nonce: true,
|
||||
seo_go_link_post: true,
|
||||
seo_go_link_exclude: '',
|
||||
seo_no_category: false,
|
||||
seo_jsonld: true,
|
||||
seo_jsonld_single: true,
|
||||
seo_jsonld_page: true,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'basic',
|
||||
title: 'SEO 基础',
|
||||
icon: 'fas fa-globe',
|
||||
fields: [
|
||||
{
|
||||
key: 'seo_enabled',
|
||||
label: '启用核心 SEO 优化',
|
||||
type: 'switch',
|
||||
default: true,
|
||||
help: '关闭后主题不再输出 SEO title/description/keywords 等 head 标签。',
|
||||
},
|
||||
{
|
||||
key: 'seo_ai_enabled',
|
||||
label: '启用 AI SEO 生成',
|
||||
type: 'switch',
|
||||
default: false,
|
||||
help: '开启后文章/分类「独立 SEO」框显示「AI 生成 SEO」按钮。需先配置 AI 连接(WP Connectors 或扩展 → AI 连接配置)。',
|
||||
dependsOn: { key: 'seo_enabled', value: true },
|
||||
},
|
||||
{ key: 'seo_connector', label: '标题连接符', type: 'input', default: '-', placeholder: '例如:- 或 |', help: 'AI 生成标题时会用此连接符追加站点名。' },
|
||||
{ key: 'seo_title', label: '站点 SEO 标题', type: 'textarea', rows: 2, default: '' },
|
||||
{ key: 'seo_keywords', label: '站点 SEO 关键词', type: 'textarea', rows: 3, default: '' },
|
||||
{ key: 'seo_description', label: '站点 SEO 描述', type: 'textarea', rows: 4, default: '' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'ai-seo',
|
||||
title: 'AI SEO 提示词',
|
||||
icon: 'fas fa-robot',
|
||||
description: '留空则使用内置 Zibll 风格默认提示词。填写后作为 system instruction 覆盖默认。',
|
||||
fields: [
|
||||
{
|
||||
key: 'ai_seo_title_prompt',
|
||||
label: '标题提示词',
|
||||
type: 'textarea',
|
||||
rows: 5,
|
||||
default: '',
|
||||
dependsOn: { key: 'seo_ai_enabled', value: true },
|
||||
placeholder: '你是一名资深的网站 SEO 编辑……直接输出标题文本本身,不要任何前缀、引号或解释。',
|
||||
help: '控制 AI 如何生成 SEO 标题。留空使用主题内置默认。',
|
||||
},
|
||||
{
|
||||
key: 'ai_seo_keywords_prompt',
|
||||
label: '关键词提示词',
|
||||
type: 'textarea',
|
||||
rows: 5,
|
||||
default: '',
|
||||
dependsOn: { key: 'seo_ai_enabled', value: true },
|
||||
placeholder: '你是一名资深 SEO 编辑……使用英文逗号分隔,直接输出关键词列表。',
|
||||
help: '控制 AI 如何生成 meta keywords。留空使用主题内置默认。',
|
||||
},
|
||||
{
|
||||
key: 'ai_seo_description_prompt',
|
||||
label: '描述提示词',
|
||||
type: 'textarea',
|
||||
rows: 5,
|
||||
default: '',
|
||||
dependsOn: { key: 'seo_ai_enabled', value: true },
|
||||
placeholder: '你是一名资深的中文 SEO 编辑……字数控制在 80 至 150 个汉字之间。',
|
||||
help: '控制 AI 如何生成 meta description。留空使用主题内置默认。',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'baidu',
|
||||
title: '百度推送',
|
||||
icon: 'fas fa-paper-plane',
|
||||
fields: [
|
||||
{ key: 'seo_baidu_push', label: '启用百度自动推送', type: 'switch', default: false },
|
||||
{ key: 'seo_baidu_normal', label: '普通收录推送', type: 'switch', default: false },
|
||||
{ key: 'seo_baidu_fast', label: '快速收录推送', type: 'switch', default: false },
|
||||
{ key: 'seo_baidu_token', label: '百度推送 Token', type: 'input', default: '', placeholder: '百度资源平台 Token' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'image',
|
||||
title: '图片 SEO',
|
||||
icon: 'fas fa-image',
|
||||
fields: [
|
||||
{ key: 'seo_image_optimize', label: '优化搜索引擎图片展示', type: 'switch', default: true },
|
||||
{ key: 'seo_image_default', label: '默认分享图 / SEO 图', type: 'media', default: '' },
|
||||
{ key: 'seo_image_always_default', label: '固定使用默认图', type: 'switch', default: false },
|
||||
{ key: 'seo_auto_alt', label: '自动补全图片 alt', type: 'switch', default: true },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'redirect',
|
||||
title: '外链重定向',
|
||||
icon: 'fas fa-external-link-alt',
|
||||
fields: [
|
||||
{ key: 'seo_go_link', label: '启用外链重定向', type: 'switch', default: true },
|
||||
{ key: 'seo_go_link_nonce', label: '启用外链鉴权', type: 'switch', default: true },
|
||||
{ key: 'seo_go_link_post', label: '文章内容链接走重定向', type: 'switch', default: true },
|
||||
{ key: 'seo_go_link_exclude', label: '重定向排除域名', type: 'textarea', rows: 4, default: '', placeholder: '每行一个域名' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'advanced',
|
||||
title: '高级 SEO',
|
||||
icon: 'fas fa-sliders-h',
|
||||
fields: [
|
||||
{ key: 'seo_no_category', label: '分类 URL 去掉 category', type: 'switch', default: false },
|
||||
{ key: 'seo_jsonld', label: '启用 JSON-LD', type: 'switch', default: true },
|
||||
{ key: 'seo_jsonld_single', label: '文章页输出 JSON-LD', type: 'switch', default: true },
|
||||
{ key: 'seo_jsonld_page', label: '页面输出 JSON-LD', type: 'switch', default: true },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
export const systemNoticeSchema = {
|
||||
key: 'global.system-notice',
|
||||
title: '弹窗通知',
|
||||
icon: 'fas fa-bullhorn',
|
||||
description: '全站弹窗公告配置,支持按用户身份定向、多按钮组、弹窗尺寸与过期周期。',
|
||||
defaults: {
|
||||
system_notice_enabled: true,
|
||||
system_notice_policy: '',
|
||||
system_notice_title: '',
|
||||
system_notice_content: '',
|
||||
system_notice_btn1_text: '',
|
||||
system_notice_btn1_link: '',
|
||||
system_notice_btn1_color: 'primary',
|
||||
system_notice_btn2_text: '',
|
||||
system_notice_btn2_link: '',
|
||||
system_notice_btn2_color: 'primary',
|
||||
system_notice_btn3_text: '',
|
||||
system_notice_btn3_link: '',
|
||||
system_notice_btn3_color: 'primary',
|
||||
system_notice_btn4_text: '',
|
||||
system_notice_btn4_link: '',
|
||||
system_notice_btn4_color: 'primary',
|
||||
system_notice_size: '',
|
||||
system_notice_radius: false,
|
||||
system_notice_class: '',
|
||||
system_notice_title_icon: '',
|
||||
system_notice_title_class: '',
|
||||
system_notice_title_style: '',
|
||||
system_notice_expires: 24,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'basic',
|
||||
title: '公告设置',
|
||||
icon: 'fas fa-bullhorn',
|
||||
fields: [
|
||||
{ key: 'system_notice_enabled', label: '启用系统公告', type: 'switch', default: true },
|
||||
{
|
||||
key: 'system_notice_policy',
|
||||
label: '显示对象',
|
||||
type: 'select',
|
||||
default: '',
|
||||
options: [
|
||||
{ label: '所有访客', value: '' },
|
||||
{ label: '仅登录用户', value: 'signin' },
|
||||
{ label: '仅 VIP 会员', value: 'vip' },
|
||||
{ label: '仅非 VIP', value: 'free' },
|
||||
{ label: '仅认证用户', value: 'auth' },
|
||||
],
|
||||
dependsOn: { key: 'system_notice_enabled', value: true },
|
||||
},
|
||||
{ key: 'system_notice_title', label: '公告标题', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_content', label: '公告内容', type: 'textarea', default: '', rows: 5, dependsOn: { key: 'system_notice_enabled', value: true }, help: '支持 HTML 标签' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'buttons',
|
||||
title: '按钮组(留空则不显示)',
|
||||
icon: 'fas fa-th-large',
|
||||
fields: [
|
||||
{ key: 'system_notice_btn1_text', label: '按钮 1 文案', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn1_link', label: '按钮 1 链接', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true }, help: '可选,填写后按钮变为链接' },
|
||||
{ key: 'system_notice_btn1_color', label: '按钮 1 颜色', type: 'select', default: 'primary', options: [
|
||||
{ label: '主题色', value: 'primary' },
|
||||
{ label: '成功绿', value: 'success' },
|
||||
{ label: '警告橙', value: 'warning' },
|
||||
{ label: '危险红', value: 'danger' },
|
||||
{ label: '信息蓝', value: 'info' },
|
||||
{ label: '深紫', value: 'purple' },
|
||||
{ label: '深灰', value: 'dark' },
|
||||
], dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn2_text', label: '按钮 2 文案', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn2_link', label: '按钮 2 链接', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn2_color', label: '按钮 2 颜色', type: 'select', default: 'primary', options: [
|
||||
{ label: '主题色', value: 'primary' },
|
||||
{ label: '成功绿', value: 'success' },
|
||||
{ label: '警告橙', value: 'warning' },
|
||||
{ label: '危险红', value: 'danger' },
|
||||
{ label: '信息蓝', value: 'info' },
|
||||
{ label: '深紫', value: 'purple' },
|
||||
{ label: '深灰', value: 'dark' },
|
||||
], dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn3_text', label: '按钮 3 文案', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn3_link', label: '按钮 3 链接', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn3_color', label: '按钮 3 颜色', type: 'select', default: 'primary', options: [
|
||||
{ label: '主题色', value: 'primary' },
|
||||
{ label: '成功绿', value: 'success' },
|
||||
{ label: '警告橙', value: 'warning' },
|
||||
{ label: '危险红', value: 'danger' },
|
||||
{ label: '信息蓝', value: 'info' },
|
||||
{ label: '深紫', value: 'purple' },
|
||||
{ label: '深灰', value: 'dark' },
|
||||
], dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn4_text', label: '按钮 4 文案', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn4_link', label: '按钮 4 链接', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_btn4_color', label: '按钮 4 颜色', type: 'select', default: 'primary', options: [
|
||||
{ label: '主题色', value: 'primary' },
|
||||
{ label: '成功绿', value: 'success' },
|
||||
{ label: '警告橙', value: 'warning' },
|
||||
{ label: '危险红', value: 'danger' },
|
||||
{ label: '信息蓝', value: 'info' },
|
||||
{ label: '深紫', value: 'purple' },
|
||||
{ label: '深灰', value: 'dark' },
|
||||
], dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'style',
|
||||
title: '样式设置',
|
||||
icon: 'fas fa-paint-brush',
|
||||
fields: [
|
||||
{
|
||||
key: 'system_notice_size',
|
||||
label: '弹窗尺寸',
|
||||
type: 'select',
|
||||
default: '',
|
||||
options: [
|
||||
{ label: '默认', value: '' },
|
||||
{ label: '迷你', value: 'modal-mini' },
|
||||
{ label: '小号', value: 'modal-sm' },
|
||||
{ label: '大号', value: 'modal-lg' },
|
||||
],
|
||||
dependsOn: { key: 'system_notice_enabled', value: true },
|
||||
},
|
||||
{ key: 'system_notice_radius', label: '按钮圆角', type: 'switch', default: false, dependsOn: { key: 'system_notice_enabled', value: true }, help: '开启后弹窗按钮使用圆角样式' },
|
||||
{ key: 'system_notice_class', label: '公告样式类', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
{ key: 'system_notice_title_icon', label: '标题图标', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true }, help: '如 fas fa-bullhorn' },
|
||||
{ key: 'system_notice_title_class', label: '标题背景配色', type: 'select', default: '', dependsOn: { key: 'system_notice_enabled', value: true }, options: [
|
||||
{ label: '无', value: '' },
|
||||
{ label: '炫彩黄', value: 'jb-yellow' },
|
||||
{ label: '炫彩蓝', value: 'jb-blue' },
|
||||
{ label: '炫彩绿', value: 'jb-green' },
|
||||
{ label: '炫彩紫', value: 'jb-purple' },
|
||||
{ label: '炫彩红', value: 'jb-red' },
|
||||
{ label: '炫彩橙', value: 'jb-orange' },
|
||||
], help: '弹窗标题区域的背景配色方案' },
|
||||
{ key: 'system_notice_title_style', label: '标题样式', type: 'input', default: '', dependsOn: { key: 'system_notice_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'expire',
|
||||
title: '过期设置',
|
||||
icon: 'fas fa-clock',
|
||||
fields: [
|
||||
{ key: 'system_notice_expires', label: '弹窗周期(小时)', type: 'number', default: 24, min: 0, max: 720, dependsOn: { key: 'system_notice_enabled', value: true }, help: '0 表示永不过期' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export const tabbarSchema = {
|
||||
key: 'global.tabbar',
|
||||
title: '手机底部Tab',
|
||||
icon: 'fas fa-mobile-alt',
|
||||
description: '移动端底部导航栏配置。',
|
||||
defaults: {},
|
||||
groups: [],
|
||||
}
|
||||
Reference in new issue
Block a user