kate522
481f40378a
fix(payment): 修复添加卡密页「确认提交」按钮静默失效
...
数字输入(auto_num / auto_price / auto_rand_number_limit /
auto_rand_password_limit)此前被平铺成原生 HTML5 约束属性
(min/max/step),叠加两个问题后表现为按钮点了毫无反应:
1) 数值彼此不自洽:参考主题 CSF spinner 的 default=20 / min=1 /
step=10 合法格点是 1,11,21…,默认值 20 当场就非法;
auto_rand_number_limit 同理(默认 20、格点 1,6,11…)。
2) 这些行是条件显隐的(field_row 输出 <tr data-dep>,不满足依赖时
display:none)。提交时浏览器仍会校验隐藏控件,而隐藏控件无法聚焦
去弹提示气泡,于是 Chrome 只往控制台丢一句
"An invalid form control ... is not focusable" 便静默拒绝提交——
不跳转、不报错、无 notice,用户看到的就是按钮坏了。
处置:数字输入改用 data-min/data-max/data-step + step="any"
(与参考主题 CSF_Field_spinner::render() 语义一致),不再写任何原生
约束属性;auto_price 一并去掉 min="0",面额下限改由服务端夹取兜底
(max(0.0, ...)),避免「去掉客户端下限」变成放行负面额。
验证:
- 无头 Chrome 探针:btn.click() 触发的 submit 事件 0 → 1,
参与校验控件 23 个、无效 3 个 → 0 个;
- 服务端扫描页面 25 个 input:带原生约束的 0 个;
- 服务端面额夹取:-5 拒绝、0.001 拒绝、12.5 正常生成 1 张;
- 新增 tests/admin/charge-cards-form-constraints.test.cjs(4 例),
并做负向对照(重引入 min/step 后 2 pass / 2 fail);
- tests/admin 四个套件合计 22 pass / 0 fail。
2026-09-17 13:19:05 +08:00
kate522
0e7b888277
fix(payment): 修复卡密管理分页:页码夹取、显式基准 URL、补齐每页条数入口
...
- render_pagenavi():页码先夹到 [1, total_pages],禁用状态由 $on_first / $on_last
一次导出。旧写法是一串 if/elseif,页码越界时三个分支一个都不命中,
上一页与下一页同时停在 '#':既不打 disabled 也点不动。
- 翻页链接改用显式基准 URL(page_url + 当前筛选参数),不再依赖
add_query_arg() 默认取 $_SERVER['REQUEST_URI'] 的行为;
status / type / other / s / orderby / desc / ice_perpage 随链接带走。
- render_list():页码越界(手改 URL、或筛选后总数变小)时回退到最后一页重查,
消除「空白表格 + 一个分页控件都没有」的死胡同。
- 新增「每页显示」选择器(ice_perpage)。该参数此前只有服务端读取、界面上没有
任何入口能改,条数小于默认每页条数时永远只有一页,分页条恒为 disabled。
- 禁用按钮加 pointer-events:none,避免点空还滚回页首。
- 新增 tests/admin/charge-cards-pagination.test.cjs(6 条契约)。
验证:容器内真实渲染 7 组 URL(默认 / 每页 5 / 第 2 页 / paged=2 越界 /
paged=99 越界 / 带 status 筛选 / 非预设每页 7),无头 Chrome 截图核对版式;
node --test 三套 18/18 通过;负向对照(还原旧写法)按要求失败 2 条;php -l 通过。
2026-09-17 12:45:22 +08:00
kate522
5243bbf0d4
fix(payment): 添加卡密页清理依赖求值死代码并锁定显隐契约
...
render_add_form() 渲染 19 行表单,其中 17 行带 data-dep;4 条导入提示
(导入卡密 / 导入会员兑换卡密 / 自定义卡密导入 / 自定义卡密导入-单密码模式)
的显隐依赖已由服务端预隐藏与服务端默认值修正落地,本次仅做收尾。
变更:
- 删除行内脚本 IIFE 末尾的 evalDeps() 死调用。该调用位于表单之前的
解析期(脚本在表单前输出),此刻 document 中尚无任何 tr[data-dep],
属于必然空操作;初始求值统一交由 DOMContentLoaded 分支处理。
- 补充注释说明「脚本在表单前输出 → 解析期取不到行 → 必须等 DOM 就绪」,
避免后人误加回解析期调用。
- .gitignore 追加 /tests/admin/charge-cards-dependency.test.cjs 白名单。
新增契约测试 tests/admin/charge-cards-dependency.test.cjs(5 用例,全过):
从源码抽取 field_row/submessage_row 的 data-dep,用 Node vm 加载真实行内
脚本并以最小 DOM 桩驱动,断言:
1) 依赖键须在 is_known_dep_key 与 default_form_value 成对登记;
2) 服务端预判与前端求值使用同一组操作符且覆盖表单实际用到的全部操作符;
3) 两类行渲染均接入服务端预隐藏,避免首帧铺开;
4) 行内脚本不再保留解析期空操作求值;
5) 导入提示跟随「卡密类型 × 添加方式」切换(balance/credits/vip/custom
及单密码模式矩阵),且不同时铺开、切回 auto 全部收起。
负向验证:将 balance,credits 篡改为 balance,credits,vip 后测试转为
pass 4 / fail 1,护栏确实生效。
验证:node --test 两个 admin 契约测试 9/9 通过;php -l 无语法错误;
dev 与运行副本内容一致(行尾归一后逐字节相同)。
2026-09-17 11:03:34 +08:00
kate522
9fffe7b590
fix(payment): 卡密管理页标题按钮单点输出并修正排序箭头下沉
...
- 标题右侧按钮原在页面头部与列表渲染函数各输出一次(实际渲染 3 个
page-title-action,「添加卡密」重复出现),改为只在页面头部的 tab switch 中
拼一次;render_list() 收为 render_list(string $s),只渲染过滤链接与表格,
搜索词在页面头部单次解析后传入,搜索提示仍按参考主题跟在按钮之后。
- .orderby-but 恢复参考主题写法(position: relative,不设 display)。
箭头是绝对定位元素且不写 top/left,位置取自容器的静态位置;容器一旦变成零
高度 inline-block,基线会退化为自身下边缘并与文字基线对齐,整组箭头下沉一
个字高。同时补回参考主题的 padding-right: 1em,并加注释锁定该约束。
- 清理死代码:行循环中 custom 分支的 $type_html 赋值总被下方类型链覆盖,已删除。
- 新增 tests/admin/charge-cards-page-contract.test.cjs(4 例)作为回归护栏,
并按 .gitignore 既有白名单惯例放开该文件。
2026-09-17 10:14:19 +08:00
kate522
7efbbeed3f
修复余额页顶部资产卡片高度
2026-09-15 20:50:21 +08:00
kate522
486fc34a4b
修正“成长体系”卡片顶部字段错位问题
2026-09-14 12:45:01 +08:00
kate522
26afa6ea3a
revert(build): stop tracking the admin SPA build output
...
Tracking assets/admin/build was wrong — it is deploy-only output.
Revert to the ignored state; deploy by building on the target:
cd assets/admin && npm ci && npm run build
2026-09-06 15:53:50 +08:00
kate522
27d8a9ea71
build(admin): track the SPA build output so git deploys carry it
...
assets/admin/build was gitignored, so servers deployed by git pull kept
running a stale admin bundle — the icon picker integration in the tabbar
and floating-button settings pages never reached them. Track the build
directory (rebuild with: cd assets/admin && npm run build) and commit the
current bundle containing the universal icon picker.
2026-09-06 14:35:15 +08:00
kate522
d0c6c3e431
feat(submit): fold slide cover into multi-select image picker
...
Match the featured cover buttons row to the reference theme: drop the
dedicated slide button, let the icon-only image picker select multiple
images into a slide cover (single pick stays an image cover), and align
the loaded-state visibility matrix.
2026-09-06 10:30:27 +08:00
kate522
1a0b023658
fix(submit): raise TinyMCE fullscreen above the fixed navbar
...
TinyMCE's skin injects .mce-fullscreen { z-index: 100 } at editor init,
after core editor.css, so the fullscreen editor (toolbar at the viewport
top) lost to the fixed navbar (.nav-fixed .header, z-index 999). Restore
core's intended 100010 with an element+class selector that outranks the
skin regardless of injection order; it stays below the submit media
dialog (100080). Also remove the dead .mce-top-part.affix rules (no
AKSRT script drives them) and pin both in a contract test.
2026-09-06 10:10:20 +08:00
kate522
51a591e2b9
feat(submit): add video cover picker with playable video preview
...
Featured video preview now renders a real DPlayer (video-url/video-pic)
like the reference theme instead of a static image, so the cover video
plays on the submit page. Top-right bar gains the video-cover button
shown only when a video cover is loaded; backend honors pic_id and no
longer deletes the thumbnail before cover validation. Drop dead i18n
keys and data-can-* attributes.
2026-09-05 23:41:22 +08:00
kate522
4f2d17f6ee
fix(single): align slide and video cover heights with image cover
...
The image-mode cover reserves +50px for the title/breadcrumb overlay
(calc(scale% + 50px)), but the slide cover wrapper was given a bare
inline padding-bottom by aksrt_render_slider, permanently defeating the
.cover-slide rule, and the video cover used a bare video_scale%.
- aksrt_render_slider: add scale_extra so scale mode emits
calc(ratio% + extra); the single cover passes 50px so all three
modes share one height formula
- drop the unreachable static slide fallback and function_exists guard
(the helper is unconditionally loaded by inc/bootstrap.php), the
always-true cover_url/ep_count conditions, and the dead --scale-ratio
and inner swiper padding emitted in scale mode
- remove the dead cover CSS cluster with no producer: .single-cover-slide
(main.css/main.min.css/cover.css), .single-cover-slider family
(components/base.css), .single-cover-slide-wrap and .single-cover__*
helpers (cover.css), and initSlideCovers in misc.js
- rebuild public bundles via tools/build-public-assets.mjs
- add single-cover-height-contract test covering the shared formula
and the dead-code removals
2026-09-05 18:22:37 +08:00
kate522
f3fcfe45da
feat(submit): add user media library
2026-09-04 22:53:33 +08:00
kate522
44e165d34e
fix(comments): align image upload with Zibll
...
Unify comment image upload settings, REST permissions, preview, progress,
and response handling while removing obsolete compatibility paths.
2026-09-04 19:52:56 +08:00
kate522
4833053a5c
fix(email): complete mail settings and templates
2026-09-04 12:06:42 +08:00
kate522
5fd7c212ed
fix(runtime): 按参考主题硬切换为 loader/main/auto_fun 单一 DOM 生命周期
...
- 删除 AksrtFrontend registry/rehydrate 双路架构及 build/public.js 拼包入口,
前台唯一初始路径为 PHP 本地栈(jQuery 1.9.1 → Bootstrap 3.4.1)
→ loader_js(_win/aksrtData 唯一注入)→ tbquire(['main']) → runtime/main.min.js
- window.auto_fun = debounce(z_auto_fun, 100) 为唯一重扫入口;所有模块改为
执行一次 + off/on('auto_fun.aksrt-*') 命名空间重扫,data/class 标记幂等
- 局部更新协议统一:HTML 注入 → post_ajax.ed → auto_fun();
远程 modal → loaded.bs.modal → auto_fun();JSON 成功 → zib_ajax.success
- 灯箱恢复 Miniimgbox/imgbox 唯一 owner(imgbox-container、a[data-imgbox]、
imgbox_data),删除 AksrtLightbox/data-aksrt-lightbox 第二实现及 CSS/overlay,
_win.imgbox* 重新接上 post-display 设置
- 死代码清理:runtime 下 11 组被自有实现替代的旧模块副本、无消费 vendored 库、
顶层 grade.min.js、revenue.js、无调用方的 aksrt_get_win_runtime_config(),
以及 loader 中 16 条死 mapping
- PHP 入队改为本地栈 + loader_js,routed/widget/submit 依赖统一换绑;
用户卡片发布按钮恢复 nav_user_newposts_btn 设置门控
- 测试对齐:新增 frontend-lifecycle-contract,重写 navigation/lazyload/toast/
auth-source/comment/page-display/post-visual 等断言为目标架构契约
验证:node --test widget-system+navigation 223 通过 0 失败;
构建脚本重建 main/imgbox min 与 CSS bundles;改动 PHP php -l、JS node --check
全部通过;git diff --check 干净;credits 重入 harness 通过。
2026-09-03 12:44:31 +08:00
kate522
1f4a39d8f8
feat(runtime): 全站前端脚本统一接入 AksrtFrontend 全局 DOM 生命周期
...
- rehydrate.js 新增 boot()/aksrt:ready 事件,支持 boot 后晚注册立即以 init 触发
- aksrt-runtime.js 初始加载改走 AksrtFrontend.boot,tooltip/倒计时注册为组件
- 约 30 个前端脚本(首页、评论、支付、路由、页面叶子、widgets)
从直接 DOMContentLoaded 迁移为 AksrtFrontend.register,并加幂等标记
- section-navs 依赖改为 aksrt-runtime,保证注册时序
- 清理死代码:删除孤儿 loader.js/main.js 及 runtime/page-navs 遗留副本
- loader.js 移除已迁移模块的 tbquire 路径映射,main.js 相应瘦身
- build-public-assets.mjs 增加 runtime/main.min.js 自动压缩步骤
- 新增 4 个契约测试(homepage-dom/rehydrate-runtime/global-dom-init/
public-bundle-parity),3 个既有 harness 适配注册表初始化方式
2026-09-02 21:48:56 +08:00
kate522
ddf7c37556
feat(lightbox): 接入全站图片预览
2026-09-02 18:33:47 +08:00
kate522
ff4ec1eb43
feat(captcha): 打通人机验证 11 个场景的前后端完整链路
...
- 统一验证入口 aksrt_require_captcha(),返回 true|WP_Error,启用场景配置缺失时 fail-closed 拒绝
- 前端公共 API 重构为 window.AKSRTCaptcha(verify/collect/reset/run),单飞锁防并发重复验证,一次性 proof 绑定浏览器 cookie+场景+服务商+主机名
- challenge/exchange REST 端点:challenge 原子占用防票据放大厂商调用,增加频率限制
- 新增 OAuth bind pass:服务端签发 5 分钟一次性令牌,绑定用户+服务商+浏览器,微信扫码延迟消费
- 覆盖场景:评论、登录、注册、绑定第三方、绑定手机、找回密码、修改密码、更改邮箱、资料下载、签到、前台投稿
- 移除 Service 层重复验证与 _auth_code_verified/_defer_login 等客户端可伪造标志,删除下载共享 pass 死代码
- 修复腾讯 TC3 签名 scope、Cloudflare action/cdata/hostname 严格校验、阿里云验签错误码映射
- 后台 Schema 保存对 secret 字段做掩码/保留合并;导入导出过滤 aksrt_captcha_config
- 重建 public bundle 与 admin SPA;新增 captcha 运行时/安全/业务契约测试与 harness
2026-09-02 13:03:24 +08:00
kate522
2085a702b9
进行了一些小优化
2026-08-31 20:58:48 +08:00
kate522
a73fa9a6c0
进行了一些小优化
2026-08-30 20:38:25 +08:00
kate522
780e1eba21
优化了一些问题
2026-08-29 22:03:48 +08:00
kate522
e54228d509
优化了一些问题
2026-08-29 15:50:04 +08:00
kate522
2cb78edabb
进行了一些小修复
2026-08-26 16:32:18 +08:00
kate522
ae10b3d3fd
进行了一些小修复
2026-08-26 15:11:25 +08:00
kate522
d37c34f71c
进行了一些小修复
2026-08-26 14:21:32 +08:00
kate522
dc14c29878
进行了一些小修复
2026-08-26 12:10:06 +08:00
kate522
bb9413cba6
对小工具进行了一些修复
2026-08-26 08:41:24 +08:00
kate522
ea83f2211c
修复了一些问题
2026-08-25 19:14:38 +08:00
kate522
c8d199a694
修复了一些问题
2026-08-25 18:22:30 +08:00
kate522
0109a59922
修复了一些问题
2026-08-25 18:11:26 +08:00
kate522
dbb1f776f2
修复了一些问题
2026-08-25 17:57:20 +08:00
kate522
11f1c23fa7
进行了一些小优化
2026-08-25 17:02:33 +08:00
kate522
e5df6fdaa7
进行了一些小优化
2026-08-25 06:58:09 +08:00
kate522
07c4e969c3
新增全局流水号
2026-08-25 05:33:01 +08:00
kate522
5cae5b5c93
积分与余额账务系统硬切重构
2026-08-24 15:59:11 +08:00
kate522
86692ff3f9
用户功能设置收口与废弃后台链路清理
2026-08-23 22:09:12 +08:00
kate522
af52f9e94d
登录注册体系的源码级硬切换
2026-08-23 20:30:01 +08:00
kate522
0375a11adc
fix:顶部横版卡片
2026-08-19 17:01:27 +08:00
kate522
8a738c7998
feat(admin): refine theme settings UI
2026-08-19 13:11:04 +08:00
kate522
480e2bf07e
feat(admin): rebuild page display settings
2026-08-19 00:07:13 +08:00
kate522
86614c4905
refactor(frontend): replace toast system with zibll notyf
2026-08-18 02:38:43 +08:00
kate522
435ee1daa7
feat(frontend): replace lazy loading with zibll lazysizes
2026-08-18 01:33:38 +08:00
kate522
02571eecd6
chore(repo): ignore local agent instructions
2026-08-17 22:58:16 +08:00
kate522
5d45eb053b
fix(frontend): align layouts posts and widgets with zibll
2026-08-17 21:47:40 +08:00
kate522
e77efd3802
占位文件
2026-08-17 20:14:22 +08:00
kate522
7419130066
chore(repo): exclude local development files
2026-08-17 20:08:56 +08:00
kate522
6c6c462df8
refactor: remove forum and topic feature chains
2026-08-17 14:52:19 +08:00
kate522
52e9e2353f
chore(admin): add contract audit baseline and incomplete build notice
...
Introduce tools/audit-admin-contracts.php to fail on missing schemaPage
sections, missing REST $this callbacks, and incomplete admin build chunks.
Document menu/schema deploy rules and surface a wp-admin error when
assets/admin/build is missing modules instead of failing silently.
2026-07-11 13:26:19 +08:00
kate522
3247db7ed1
补充主题静态资源与归档模板
2026-07-03 23:15:11 +08:00