Commit Graph
17 Commits
Author SHA1 Message Date
耗子andClaude Opus 4.8 443516a2cf refactor!: 迁移至 samber/do 依赖注入与三层架构
依赖注入:
- 移除 google/wire(含 wire.go/wire_gen.go 与全部 ProviderSet),
  改用 samber/do v2 单注入器 + 双入口惰性构建
- 贡献模型替代命令式注册:路由 routes:、命令 commands:、
  任务 jobs: 前缀经 internal/registry 收集与校验
- 构造函数统一 func NewXxx(i do.Injector) (T, error)

三层架构:
- 补全用例层:每个 biz.XxxRepo 配 XxxUsecase,
  service/command/job 表现层只依赖用例,不再直接引用仓储

路由与文档:
- route/http.go 按域拆为声明式 Endpoint 贡献,
  Endpoint 承载登录白名单与端点限流语义
- 调试模式下提供 OpenAPI 3.1 文档:/openapi.json 与 /docs(Scalar),
  从 validate 标签生成

目录与依赖:
- internal/http/{middleware,request,rule} 拍平至 internal/*
- CLI 命令拆至 internal/command
- 日志轮转 timberjack 换为 libtnb/logrotate
- 升级 validator/cron/sessions/gormstore/sqlite/securecookie
- 数据库迁移保持 gormigrate 不变

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 21:54:22 +08:00
耗子 c0d8642cb5 fix: 优化代码 2026-04-28 06:05:34 +08:00
耗子 909556b3d6 refactor: 统一日志清理 2026-04-27 20:30:12 +08:00
耗子 49b6c5af7e feat: 添加apcu模块,close #1517 2026-03-27 20:11:01 +08:00
耗子 76f80a8e65 feat: 修改PHP模块目录 2026-03-27 20:01:25 +08:00
Catsayer d96d83a5b7 合并拉取请求 #1441
*  refactor(service): 抽取环境 CLI 软链接公共能力并统一 SetCli 实现

* fix: 优化代码
2026-03-01 15:58:29 +08:00
半岛的蒟蒻bddjr e947259b86 fix: go.mod module github.com/acepanel/panel/v3 (#1423) 2026-02-25 18:07:00 +08:00
耗子 e77863d469 fix: run go fix ./... 2026-02-19 22:08:16 +08:00
耗子 e95c4623c5 feat: 优化日志保存,close #1382 2026-02-17 17:16:17 +08:00
耗子 aa23066fe5 feat: update resty to v3 2026-02-11 02:20:00 +08:00
5ee2409b87 feat: add parameter tuning tabs for Nginx, MySQL, PostgreSQL, Redis, Memcached, Pure-FTPd (#1343)
* Initial plan

* feat: add config_tune backend endpoints for nginx, mysql, postgresql, redis, memcached, pureftpd

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* feat: add config tune frontend for nginx, mysql, postgresql, redis, memcached, pureftpd

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* fix: address code review feedback for postgresql and pureftpd config parsers

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* fix: lint

* feat: 自动刷新各配置状态

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>
Co-authored-by: 耗子 <haozi@loli.email>
2026-02-08 05:50:27 +08:00
Copilotanddevhaozi 402388c2d3 feat: PHP 参数调整标签页 — 可视化修改常用配置 (#1340)
* Initial plan

* feat: add PHP parameter tuning tab with backend API and frontend UI

- Add GetConfigTune/UpdateConfigTune/CleanSession backend endpoints
- Add PhpConfigTuneView component with vertical tabs for disabled functions,
  upload limits, timeout limits, performance tuning, and session settings
- Register new routes and frontend API methods
- Rename component from PHPConfigTuneView to PhpConfigTuneView per convention

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* fix: address code review - refactor save handlers, fix setINIValue blank lines, add newline validation, fix CreateModal TS2322

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* refactor: use single saveLoading and handleSave, eliminate redundant refs and wrappers

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* feat: enhance session with visual Redis/Memcached fields, add general settings tab

Session tab now shows host/port/password for Redis, host/port for Memcached
instead of raw save_path. Added session.gc_maxlifetime and session.cookie_lifetime.
New General tab with short_open_tag, date.timezone, display_errors, error_reporting.

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>
2026-02-08 03:01:39 +08:00
耗子 04e0ccb64f feat: 更新swow依赖 2026-01-23 04:25:21 +08:00
耗子 c7ed032500 feat: 支持更多运行环境 2026-01-16 00:59:10 +08:00
8388cfe8bb feat(php): 添加 phpinfo() 快捷按钮功能 (#1226)
* Initial plan

* feat(php): 添加 phpinfo() 快捷按钮功能

- 后端:添加 PHPInfo 服务方法调用 php -r "phpinfo();"
- 后端:添加 /environment/php/{version}/phpinfo 路由
- 前端:添加 phpinfo API 调用
- 前端:在 PHP 运行状态页面添加"查看 PHPInfo"按钮
- 前端:添加弹窗展示 phpinfo 输出内容
- 添加中英文及繁体中文翻译

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* fix: 添加 phpinfo 请求的错误处理

添加错误回调函数,在请求失败时关闭弹窗并显示错误提示

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* fix: 使用 php-cgi 输出 HTML 格式的 phpinfo

- 后端:使用 php-cgi -q 执行 phpinfo 获取 HTML 格式输出
- 前端:使用 v-html 渲染 HTML 内容
- 前端:移除不必要的 onError 处理
- 前端:优化 phpinfo HTML 样式

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* feat: PHP支持查看phpinfo

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>
Co-authored-by: 耗子 <haozi@loli.email>
2026-01-12 18:02:26 +08:00
耗子 70c940569c fix: 修复一些遗留问题 2026-01-09 21:38:28 +08:00
耗子 edadc9b045 feat: 初步支持环境管理 2026-01-07 01:20:08 +08:00