Files
wordpress-theme-aksrt/assets/admin/src/schema/sections/users/notifications.js
T
kate522andClaude Fable 5 accf5bdbe8 字段全量比对收口:对齐 Zibll 默认值并后移等级/徽章入口
继续 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>
2026-07-06 19:00:52 +08:00

75 lines
5.4 KiB
JavaScript

export const notificationsSchema = {
key: 'users.notifications',
title: '消息通知',
icon: 'fas fa-bell',
description: '站内通知、私信、通知策略配置。',
defaults: {
message_s: true,
msg_center_rewrite_slug: 'message',
message_icon_show: ['nav_menu'],
message_paginate_type: 'ajax_lists',
message_user_set: true,
message_close_msg_type: [],
message_auto_clear_s: true,
message_auto_clear_time: 365,
message_auto_clear_types: ['posts', 'comment', 'favorite', 'like', 'hot', 'followed', 'system'],
private_s: true,
private_smilie_s: true,
private_code_s: false,
private_image_s: true,
private_upload_img: false,
private_quick_s: true,
private_quick_often: '你好,请问有什么可以帮你的?\n感谢你的反馈\n已处理,请查收',
private_submit_text: '发送',
private_placeholder: '请输入消息...',
},
groups: [
{
key: 'basic',
title: '基础设置',
icon: 'fas fa-cog',
fields: [
{ key: 'message_s', label: '站内通知总开关', type: 'switch', default: true },
{ key: 'msg_center_rewrite_slug', label: '消息中心 URL 别名', type: 'input', default: 'message' },
{ key: 'message_icon_show', label: '通知图标位置', type: 'checkbox', default: ['nav_menu'], options: [{ label: '导航菜单', value: 'nav_menu' }, { label: '用户头像', value: 'avatar' }, { label: '移动端底部', value: 'mobile_bar' }] },
{ key: 'message_paginate_type', label: '列表翻页模式', type: 'radio', default: 'ajax_lists', options: [{ label: 'AJAX 翻页', value: 'ajax_lists' }, { label: '传统翻页', value: 'default' }] },
{ key: 'message_user_set', label: '允许用户设置推送', type: 'switch', default: true, help: '允许用户在前台自行设置通知推送偏好' },
],
},
{
key: 'types',
title: '通知类型',
icon: 'fas fa-list-check',
fields: [
{ key: 'message_close_msg_type', label: '关闭部分推送', type: 'checkbox', default: [], options: [{ label: '文章通知', value: 'posts' }, { label: '评论回复', value: 'comment' }, { label: '收藏通知', value: 'favorite' }, { label: '点赞通知', value: 'like' }, { label: '热门通知', value: 'hot' }, { label: '关注通知', value: 'followed' }, { label: '系统通知', value: 'system' }, { label: '支付通知', value: 'pay' }, { label: '提现回复', value: 'withdraw_reply' }, { label: '勋章通知', value: 'medal' }, { label: '认证回复', value: 'auth_apply_reply' }], help: '勾选的类型将不向用户推送通知' },
],
},
{
key: 'auto_clear',
title: '自动清理',
icon: 'fas fa-broom',
fields: [
{ key: 'message_auto_clear_s', label: '自动清理已读消息', type: 'switch', default: true },
{ key: 'message_auto_clear_time', label: '过期天数', type: 'number', default: 365, min: 1, max: 3650, help: '已读消息超过此天数将被自动清理', dependsOn: { key: 'message_auto_clear_s', value: true } },
{ key: 'message_auto_clear_types', label: '清理类型', type: 'checkbox', default: ['posts', 'comment', 'favorite', 'like', 'hot', 'followed', 'system'], options: [{ label: '文章通知', value: 'posts' }, { label: '评论回复', value: 'comment' }, { label: '收藏通知', value: 'favorite' }, { label: '点赞通知', value: 'like' }, { label: '热门通知', value: 'hot' }, { label: '关注通知', value: 'followed' }, { label: '系统通知', value: 'system' }, { label: '支付通知', value: 'pay' }, { label: '提现回复', value: 'withdraw_reply' }, { label: '勋章通知', value: 'medal' }, { label: '认证回复', value: 'auth_apply_reply' }, { label: '下载通知', value: 'download' }, { label: '积分变动', value: 'credits' }, { label: '私信', value: 'private' }, { label: '举报反馈', value: 'report' }], dependsOn: { key: 'message_auto_clear_s', value: true } },
],
},
{
key: 'private',
title: '私信设置',
icon: 'fas fa-envelope',
fields: [
{ key: 'private_s', label: '启用私信功能', type: 'switch', default: true },
{ key: 'private_smilie_s', label: '支持表情', type: 'switch', default: true, dependsOn: { key: 'private_s', value: true } },
{ key: 'private_code_s', label: '支持代码', type: 'switch', default: false, dependsOn: { key: 'private_s', value: true } },
{ key: 'private_image_s', label: '支持图片', type: 'switch', default: true, dependsOn: { key: 'private_s', value: true } },
{ key: 'private_upload_img', label: '支持上传图片', type: 'switch', default: false, dependsOn: { key: 'private_s', value: true } },
{ key: 'private_quick_s', label: '快捷回复', type: 'switch', default: true, dependsOn: { key: 'private_s', value: true } },
{ key: 'private_quick_often', label: '常用快捷回复', type: 'textarea', default: '你好,请问有什么可以帮你的?\n感谢你的反馈\n已处理,请查收', help: '一行一条快捷回复文案', dependsOn: { key: 'private_s', value: true } },
{ key: 'private_submit_text', label: '发送按钮文案', type: 'input', default: '发送', dependsOn: { key: 'private_s', value: true } },
{ key: 'private_placeholder', label: '输入占位符', type: 'input', default: '请输入消息...', dependsOn: { key: 'private_s', value: true } },
],
},
],
}