继续 Workstream C 全量字段比对,并按用户裁定处理冲突:
- UsersLevel / UsersBadge 采用“保留但后移”策略,不兼容旧数据接口,继续沿用当前新型
sections/router 体系,在 users 主线中降权后移到 compat tools 分区。
- 按 Zibll 实际 options 默认值收敛一批高影响字段,打通 PHP schema + 前端 schema 两层:
* global/search: search_posts / search_no_page / search_custom_key_s / search_cat -> true
* forum: bbs_show_new_plate / bbs_post_pay_hide_type_s / bbs_post_pay_vip_price_s /
bbs_reply_paginate_ias_s / bbs_comment_upload_img / bbs_rewrite_suffix_html_s -> true
* shop: shop_s -> true, shop_breadcrumbs_shop_home -> false,
shop_rewrite_suffix_html_s -> true
* users: user_signup_no_repas / message_auto_clear_s / post_rewards_s /
user_report_img_s -> true
* post-list: cat_s -> false
验证:
- php -l 检查所有改动过的 PHP schema 文件均通过
- node --check 检查所有改动过的前端 schema 文件均通过
- shim 校验确认 users-level/users-badge 已从 users 主分区移出并以 secondaryEntry=true
落入 compat tools,且全站无路由碰撞
- 注:本 worktree 下缺少可执行 vite,未能在隔离副本中复跑 npm build;此前主副本同批次
IA 修正构建通过,本次继续只改 schema/sections 常量与默认值,已用语法校验覆盖
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
161 lines
10 KiB
JavaScript
161 lines
10 KiB
JavaScript
export const authSchema = {
|
|
key: 'users.auth',
|
|
title: '注册登录',
|
|
icon: 'fas fa-sign-in-alt',
|
|
description: '注册方式、登录限制、密码策略配置。',
|
|
defaults: {
|
|
close_sign: false,
|
|
user_close_signup: false,
|
|
close_signin: false,
|
|
user_agreement_s: true,
|
|
user_agreement_page: '',
|
|
user_privacy_s: true,
|
|
user_privacy_page: '',
|
|
user_agreement_check: true,
|
|
no_repetition_name: false,
|
|
user_nickname_out: '赌博,博彩,代发,代理,刷单,六合彩,admin,test,管理员,客服',
|
|
user_email_limit_type: 'black',
|
|
user_email_out: '@tempmail.com\n@throwaway.email\n@guerrillamail.com',
|
|
user_close_login: false,
|
|
user_sign_type: 'page',
|
|
sign_modal_auto_s: false,
|
|
sign_modal_auto_waiting_time: 5,
|
|
sign_modal_auto_expires: 1,
|
|
replace_wp_login: true,
|
|
admin_sign_key: '',
|
|
user_signin_phone_s: false,
|
|
user_signin_nopas_s: false,
|
|
user_signin_nopas_type: 'email',
|
|
user_signin_nopas_active: 'nopas_first',
|
|
user_signup_captch: true,
|
|
captch_type: 'email',
|
|
user_signup_no_repas: true,
|
|
user_repas_captch_type: 'email',
|
|
bind_phone: false,
|
|
bind_reminder: 'close',
|
|
bind_reminder_text: '请绑定手机号以正常使用',
|
|
bind_reminder_expires: 24,
|
|
mandatory_bind: 'close',
|
|
email_set_captch: true,
|
|
invit_code_s: false,
|
|
invit_code_mode: 'open',
|
|
invit_code_open_desc: '邀请码为选填,没有邀请码也可以注册',
|
|
invit_code_must_desc: '请输入邀请码',
|
|
sign_page_background: [],
|
|
sign_theme_mode: 'default',
|
|
sign_show_header: true,
|
|
sign_card_position: 'center',
|
|
sign_show_logo: true,
|
|
sign_page_footer: '',
|
|
sign_modal_background: [],
|
|
sign_modal_show_logo: true,
|
|
user_logo: [],
|
|
user_logo_dark: [],
|
|
},
|
|
groups: [
|
|
{
|
|
key: 'register',
|
|
title: '注册设置',
|
|
icon: 'fas fa-user-plus',
|
|
fields: [
|
|
{ key: 'close_sign', label: '一键禁用登录注册', type: 'switch', default: false, help: '开启后前台禁用全部注册/登录入口(含社交登录),不影响后台登录' },
|
|
{ key: 'user_close_signup', label: '关闭注册', type: 'switch', default: false },
|
|
{ key: 'close_signin', label: '禁用账密登录', type: 'switch', default: false, help: '仅允许社交账号登录' },
|
|
{ key: 'user_agreement_s', label: '用户协议', type: 'switch', default: true },
|
|
{ key: 'user_agreement_page', label: '协议页面', type: 'input', default: '' },
|
|
{ key: 'user_privacy_s', label: '隐私政策', type: 'switch', default: true },
|
|
{ key: 'user_privacy_page', label: '隐私页面', type: 'input', default: '' },
|
|
{ key: 'user_agreement_check', label: '强制勾选协议', type: 'switch', default: true },
|
|
{ key: 'no_repetition_name', label: '禁止重复昵称', type: 'switch', default: false },
|
|
{ key: 'user_nickname_out', label: '昵称黑名单关键词', type: 'textarea', default: '赌博,博彩,代发,代理,刷单,六合彩,admin,test,管理员,客服', help: '一行一个关键词,注册昵称包含关键词将被拒绝' },
|
|
{ key: 'user_email_limit_type', label: '邮箱限制类型', type: 'radio', default: 'black', options: [{ label: '黑名单(拒绝以下后缀)', value: 'black' }, { label: '白名单(仅允许以下后缀)', value: 'white' }] },
|
|
{ key: 'user_email_out', label: '邮箱限制后缀', type: 'textarea', default: '@tempmail.com\n@throwaway.email\n@guerrillamail.com', help: '一行一个邮箱后缀,如 @tempmail.com' },
|
|
],
|
|
},
|
|
{
|
|
key: 'login',
|
|
title: '登录设置',
|
|
icon: 'fas fa-sign-in-alt',
|
|
fields: [
|
|
{ key: 'user_close_login', label: '关闭登录', type: 'switch', default: false },
|
|
{ key: 'user_sign_type', label: '登录注册样式', type: 'radio', default: 'page', options: [{ label: '弹窗', value: 'modal' }, { label: '跳转页面', value: 'page' }] },
|
|
{ key: 'sign_modal_auto_s', label: '自动弹出登录窗', type: 'switch', default: false, help: '仅在 user_sign_type=modal 时生效' },
|
|
{ key: 'sign_modal_auto_waiting_time', label: '弹窗等待秒数', type: 'number', default: 5, min: 0, max: 60, dependsOn: { key: 'sign_modal_auto_s', value: true } },
|
|
{ key: 'sign_modal_auto_expires', label: '弹窗周期(小时)', type: 'number', default: 1, min: 0, max: 720, dependsOn: { key: 'sign_modal_auto_s', value: true } },
|
|
{ key: 'replace_wp_login', label: '替换WP登录页', type: 'switch', default: true },
|
|
{ key: 'admin_sign_key', label: '应急登录 Key', type: 'input', default: '', help: '留空为禁用。管理员可通过 /wp-login.php?aksrt_bypass=<key> 绕过前台替换' },
|
|
{ key: 'user_signin_phone_s', label: '手机号登录', type: 'switch', default: false, help: '允许用手机号作为用户名登录' },
|
|
{ key: 'user_signin_nopas_s', label: '免密登录', type: 'switch', default: false },
|
|
{ key: 'user_signin_nopas_type', label: '免密登录方式', type: 'radio', default: 'email', options: [{ label: '邮箱验证码', value: 'email' }, { label: '手机验证码', value: 'phone' }, { label: '邮箱或手机', value: 'email_phone' }], dependsOn: { key: 'user_signin_nopas_s', value: true } },
|
|
{ key: 'user_signin_nopas_active', label: '免密显示模式', type: 'radio', default: 'nopas_first', options: [{ label: '优先免密', value: 'nopas_first' }, { label: '优先密码', value: 'password_first' }, { label: '仅免密', value: 'nopas_only' }], dependsOn: { key: 'user_signin_nopas_s', value: true } },
|
|
],
|
|
},
|
|
{
|
|
key: 'signup_captcha',
|
|
title: '注册验证',
|
|
icon: 'fas fa-user-shield',
|
|
fields: [
|
|
{ key: 'user_signup_captch', label: '注册需验证', type: 'switch', default: true, help: '注册时需完成邮箱或手机验证' },
|
|
{ key: 'captch_type', label: '验证方式', type: 'radio', default: 'email', options: [{ label: '邮箱', value: 'email' }, { label: '手机', value: 'phone' }, { label: '邮箱或手机', value: 'email_phone' }], dependsOn: { key: 'user_signup_captch', value: true } },
|
|
{ key: 'user_signup_no_repas', label: '无需重复密码', type: 'switch', default: true, help: '注册时不要求二次确认密码' },
|
|
{ key: 'user_repas_captch_type', label: '找回密码验证方式', type: 'radio', default: 'email', options: [{ label: '邮箱', value: 'email' }, { label: '手机', value: 'phone' }, { label: '邮箱或手机', value: 'email_phone' }] },
|
|
],
|
|
},
|
|
{
|
|
key: 'bind',
|
|
title: '绑定设置',
|
|
icon: 'fas fa-link',
|
|
fields: [
|
|
{ key: 'bind_phone', label: '绑定手机', type: 'switch', default: false },
|
|
{ key: 'bind_reminder', label: '绑定提醒', type: 'radio', default: 'close', options: [{ label: '提醒绑定邮箱', value: 'email' }, { label: '提醒绑定手机', value: 'phone' }, { label: '提醒绑定邮箱和手机', value: 'email_phone' }, { label: '关闭', value: 'close' }] },
|
|
{ key: 'bind_reminder_text', label: '提醒文案', type: 'input', default: '请绑定手机号以正常使用' },
|
|
{ key: 'bind_reminder_expires', label: '提醒周期(小时)', type: 'number', default: 24, min: 1, max: 720, help: '用户关闭提醒后多少小时内不再提醒' },
|
|
{ key: 'mandatory_bind', label: '强制绑定', type: 'radio', default: 'close', options: [{ label: '强制绑定邮箱', value: 'email' }, { label: '强制绑定手机', value: 'phone' }, { label: '强制绑定邮箱和手机', value: 'email_phone' }, { label: '关闭', value: 'close' }] },
|
|
{ key: 'email_set_captch', label: '绑定邮箱需验证', type: 'switch', default: true, help: '绑定邮箱时需发送验证码确认' },
|
|
],
|
|
},
|
|
{
|
|
key: 'invite_inline',
|
|
title: '邀请码注册',
|
|
icon: 'fas fa-ticket-alt',
|
|
fields: [
|
|
{ key: 'invit_code_s', label: '启用邀请码', type: 'switch', default: false, help: '与「邀请码」子页联动,此处开关控制注册表单是否显示邀请码字段' },
|
|
{ key: 'invit_code_mode', label: '邀请模式', type: 'select', default: 'open', options: [{ label: '开放注册(邀请码选填)', value: 'open' }, { label: '必须邀请码', value: 'must' }], dependsOn: { key: 'invit_code_s', value: true } },
|
|
{ key: 'invit_code_open_desc', label: '开放注册提示', type: 'input', default: '邀请码为选填,没有邀请码也可以注册', dependsOn: { key: 'invit_code_s', value: true } },
|
|
{ key: 'invit_code_must_desc', label: '必填提示', type: 'input', default: '请输入邀请码', dependsOn: { key: 'invit_code_s', value: true } },
|
|
],
|
|
},
|
|
{
|
|
key: 'sign_page_ui',
|
|
title: '页面 UI 配置',
|
|
icon: 'fas fa-palette',
|
|
fields: [
|
|
{ key: 'sign_page_background', label: '页面背景图', type: 'gallery', default: [], help: '登录注册页背景图,多图随机' },
|
|
{ key: 'sign_theme_mode', label: '主题模式', type: 'radio', default: 'default', options: [{ label: '默认', value: 'default' }, { label: '亮色', value: 'light' }, { label: '暗色', value: 'dark' }] },
|
|
{ key: 'sign_show_header', label: '显示顶部导航', type: 'switch', default: true },
|
|
{ key: 'sign_card_position', label: '卡片位置', type: 'radio', default: 'center', options: [{ label: '靠左', value: 'left' }, { label: '居中', value: 'center' }, { label: '靠右', value: 'right' }] },
|
|
{ key: 'sign_show_logo', label: '显示 LOGO', type: 'switch', default: true },
|
|
{ key: 'sign_page_footer', label: '页脚 HTML', type: 'textarea', default: '', help: '登录注册页自定义页脚内容,支持 HTML' },
|
|
],
|
|
},
|
|
{
|
|
key: 'modal_ui',
|
|
title: '弹窗 UI 配置',
|
|
icon: 'fas fa-window-restore',
|
|
fields: [
|
|
{ key: 'sign_modal_background', label: '弹窗背景图', type: 'gallery', default: [], help: '弹窗左侧背景图,多图随机' },
|
|
{ key: 'sign_modal_show_logo', label: '弹窗显示 LOGO', type: 'switch', default: true },
|
|
],
|
|
},
|
|
{
|
|
key: 'sign_logo',
|
|
title: '登录框 LOGO',
|
|
icon: 'fas fa-image',
|
|
fields: [
|
|
{ key: 'user_logo', label: '日间 LOGO', type: 'gallery', default: [], help: '登录框专用日间 LOGO,留空使用站点全局 LOGO' },
|
|
{ key: 'user_logo_dark', label: '夜间 LOGO', type: 'gallery', default: [], help: '登录框专用夜间 LOGO,留空使用站点全局夜间 LOGO' },
|
|
],
|
|
},
|
|
],
|
|
}
|