导入 AKSRT 主题开发源码
This commit is contained in:
1 parent
9681dd3d48
commit
1268a55dd0
595 files changed
+127705
No files matched your search
@@ -0,0 +1,29 @@
|
||||
export const backupSchema = {
|
||||
key: 'tools.backup',
|
||||
title: '数据备份',
|
||||
icon: 'fas fa-cloud-download-alt',
|
||||
description: '站点数据备份与恢复。',
|
||||
defaults: {},
|
||||
groups: [
|
||||
{
|
||||
key: 'backup',
|
||||
title: '备份设置',
|
||||
icon: 'fas fa-save',
|
||||
fields: [
|
||||
{ key: 'backup_auto', label: '自动备份', type: 'switch', help: '启用自动定时备份' },
|
||||
{
|
||||
key: 'backup_frequency',
|
||||
label: '备份频率',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '每天', value: 'daily' },
|
||||
{ label: '每周', value: 'weekly' },
|
||||
{ label: '每月', value: 'monthly' },
|
||||
],
|
||||
},
|
||||
{ key: 'backup_retain', label: '保留份数', type: 'number', min: 3, max: 20, default: 7 },
|
||||
{ key: 'backup_now', label: '立即备份', type: 'button', help: '手动触发一次完整备份' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
export const emailRollbackSchema = {
|
||||
key: 'tools.email-rollback',
|
||||
title: '邮件回滚',
|
||||
icon: 'fas fa-undo',
|
||||
description: '批量回滚已发送的通知邮件。',
|
||||
defaults: {},
|
||||
groups: [
|
||||
{
|
||||
key: 'rollback',
|
||||
title: '邮件回滚',
|
||||
icon: 'fas fa-envelope-open',
|
||||
fields: [
|
||||
{
|
||||
key: 'rollback_type',
|
||||
label: '回滚类型',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '按时间范围', value: 'date_range' },
|
||||
{ label: '按邮件类型', value: 'email_type' },
|
||||
{ label: '全部回滚', value: 'all' },
|
||||
],
|
||||
},
|
||||
{ key: 'rollback_date_from', label: '开始日期', type: 'date' },
|
||||
{ key: 'rollback_date_to', label: '结束日期', type: 'date' },
|
||||
{ key: 'rollback_execute', label: '执行回滚', type: 'button', danger: true, help: '此操作不可逆' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export const healthSchema = {
|
||||
key: 'tools.health',
|
||||
title: '健康检查',
|
||||
icon: 'fas fa-heartbeat',
|
||||
description: '检查主题运行环境和依赖状态。',
|
||||
defaults: {},
|
||||
groups: [
|
||||
{
|
||||
key: 'check',
|
||||
title: '环境检查',
|
||||
icon: 'fas fa-stethoscope',
|
||||
fields: [
|
||||
{ key: 'php_version', label: 'PHP 版本', type: 'display', help: '建议 7.4+' },
|
||||
{ key: 'wp_version', label: 'WordPress 版本', type: 'display', help: '建议 5.8+' },
|
||||
{ key: 'memory_limit', label: '内存限制', type: 'display', help: '建议 256M+' },
|
||||
{ key: 'upload_max_size', label: '上传限制', type: 'display' },
|
||||
{ key: 'extensions', label: '必要扩展', type: 'display', help: 'curl, mbstring, json, gd' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
export const importExportSchema = {
|
||||
key: 'tools.import-export',
|
||||
title: '导入导出',
|
||||
icon: 'fas fa-exchange-alt',
|
||||
description: '主题配置的导入和导出。',
|
||||
defaults: {},
|
||||
groups: [
|
||||
{
|
||||
key: 'export',
|
||||
title: '导出配置',
|
||||
icon: 'fas fa-file-export',
|
||||
fields: [
|
||||
{ key: 'export_settings', label: '导出主题设置', type: 'button', help: '导出当前所有主题配置为 JSON 文件' },
|
||||
{ key: 'export_options', label: '导出 WordPress 选项', type: 'button', help: '导出 aksrt_settings 等选项' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'import',
|
||||
title: '导入配置',
|
||||
icon: 'fas fa-file-import',
|
||||
fields: [
|
||||
{ key: 'import_settings', label: '导入主题设置', type: 'file', accept: '.json', help: '导入主题配置文件(将覆盖当前设置)' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Tools & Backup domain schemas.
|
||||
* Each key corresponds to a sub-page under the "备份&导入" section.
|
||||
*/
|
||||
|
||||
import { importExportSchema } from './import-export.js'
|
||||
import { healthSchema } from './health.js'
|
||||
import { migrationSchema } from './migration.js'
|
||||
import { emailRollbackSchema } from './email-rollback.js'
|
||||
import { backupSchema } from './backup.js'
|
||||
|
||||
export const toolsSchemas = {
|
||||
'import-export': importExportSchema,
|
||||
health: healthSchema,
|
||||
migration: migrationSchema,
|
||||
'email-rollback': emailRollbackSchema,
|
||||
backup: backupSchema,
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
export const migrationSchema = {
|
||||
key: 'tools.migration',
|
||||
title: '数据迁移',
|
||||
icon: 'fas fa-database',
|
||||
description: '数据库结构迁移和版本升级。',
|
||||
defaults: {},
|
||||
groups: [
|
||||
{
|
||||
key: 'status',
|
||||
title: '迁移状态',
|
||||
icon: 'fas fa-info-circle',
|
||||
fields: [
|
||||
{ key: 'current_version', label: '当前版本', type: 'display' },
|
||||
{ key: 'pending_migrations', label: '待执行迁移', type: 'display' },
|
||||
{ key: 'run_migration', label: '执行迁移', type: 'button', help: '手动触发数据库迁移' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in new issue
Block a user