Commit Graph

51 Commits

Author SHA1 Message Date
molanp
1cc18bb195
fix(shop): 修改道具不存在时的提示信息 (#2061)
Some checks failed
检查bot是否运行正常 / bot check (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
Sequential Lint and Type Check / ruff-call (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Force Sync to Aliyun / sync (push) Has been cancelled
Update Version / update-version (push) Has been cancelled
Sequential Lint and Type Check / pyright-call (push) Has been cancelled
- 将道具不存在时的提示信息从具体的道具名称改为通用提示,避免暴露内部实现细节,
提升用户体验和安全性。
- resolve Bug: 使用道具功能优化
Fixes #2060
2025-10-09 09:01:20 +08:00
Rumio
07be73c1b7
feat(avatar): 引入头像缓存服务并优化头像获取 (#2055)
Some checks failed
检查bot是否运行正常 / bot check (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
Sequential Lint and Type Check / ruff-call (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Force Sync to Aliyun / sync (push) Has been cancelled
Update Version / update-version (push) Has been cancelled
Sequential Lint and Type Check / pyright-call (push) Has been cancelled
Co-authored-by: webjoin111 <455457521@qq.com>
2025-09-28 08:53:10 +08:00
Rumio
c7ef6fdb17
feat(ui): 增强表格构建器并完善组件模型文档 (#2048)
Some checks failed
检查bot是否运行正常 / bot check (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
Sequential Lint and Type Check / ruff-call (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Force Sync to Aliyun / sync (push) Has been cancelled
Update Version / update-version (push) Has been cancelled
Sequential Lint and Type Check / pyright-call (push) Has been cancelled
*  feat(table): 添加 ComponentCell 以支持表格单元格中嵌入可渲染组件

*  feat(ui): 增强表格构建器并完善组件模型文档

- 增强 `TableBuilder`,新增 `_normalize_cell` 辅助方法,支持自动将原生数据类型(如 `str`, `int`, `Path`)转换为 `TableCell` 模型,简化了表格行的创建。
- 完善 `zhenxun/ui/models` 目录下所有组件模型字段的 `description` 属性和文档字符串,显著提升了代码可读性和开发者体验。
- 优化 `shop/_data_source.py` 中 `gold_rank` 函数的平台路径判断格式,并统一 `my_props` 函数中图标路径的处理逻辑。

* 🚨 auto fix by pre-commit hooks

---------

Co-authored-by: webjoin111 <455457521@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-11 10:31:49 +08:00
molanp
fb0a9813e1
fix(ui): 修复表格组件中对本地图片的显示问题 (#2047)
Some checks failed
检查bot是否运行正常 / bot check (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
Sequential Lint and Type Check / ruff-call (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Force Sync to Aliyun / sync (push) Has been cancelled
Update Version / update-version (push) Has been cancelled
Sequential Lint and Type Check / pyright-call (push) Has been cancelled
- 在 ImageCell 中添加对 Path 类型的支持,并在验证器中处理路径解析
- 优化 ShopManage 和 SignManage 类中的代码,使用新的 ImageCell 构造方式
- 更新 TableData 类中的注释,提高代码可读性
2025-09-09 15:01:45 +08:00
molanp
6940c2f37b
🚑 修复 我的道具 渲染异常 (#2046)
Some checks failed
检查bot是否运行正常 / bot check (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
Sequential Lint and Type Check / ruff-call (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Force Sync to Aliyun / sync (push) Has been cancelled
Update Version / update-version (push) Has been cancelled
Sequential Lint and Type Check / pyright-call (push) Has been cancelled
2025-09-08 08:43:56 +08:00
Rumio
7f460296dd
feat(ui): 添加富文本单元格并迁移UI表格渲染 (#2039)
*  feat(ui): 添加富文本单元格并迁移UI表格渲染

- 【新功能】
  - 添加 `RichTextCell` 模型,支持在表格单元格中显示多个带样式的文本片段。
  - `TableCell` 类型别名更新以包含 `RichTextCell`。
- 【迁移】
  - 将`ShopManage`、`SignManage` 和 `SchedulerManager` 中所有基于 `ImageTemplate.table_page` 的表格图片生成逻辑迁移至新的 `TableBuilder` 和 `ui.render` 系统。
  - 移除旧的 `ImageTemplate` 导入和 `RowStyle` 函数。
  - 将 `ThemeManager` 中的资源解析逻辑提取到独立的 `ResourceResolver` 类中,增强模块化和可维护性。
  - 优化 `ThemeManager.load_theme` 中 `ChoiceLoader` 的处理逻辑。
  - 优化签到卡片数据结构,移除 `last_sign_date_str` 字段,并调整 `reward_info` 在卡片视图下的结构。
  - 移除 `_generate_html_card` 中 `favorability_info` 的 `attitude` 和 `relation` 字段。

* 🎨 (log): 优化消息日志格式,摘要base64内容

* 🚨 auto fix by pre-commit hooks

---------

Co-authored-by: webjoin111 <455457521@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-30 18:13:37 +08:00
Rumio
6124e217d0
♻️ refactor(UI): 重构UI渲染服务为组件化分层架构 (#2025)
Some checks failed
检查bot是否运行正常 / bot check (push) Waiting to run
Sequential Lint and Type Check / ruff-call (push) Waiting to run
Sequential Lint and Type Check / pyright-call (push) Blocked by required conditions
Release Drafter / Update Release Draft (push) Waiting to run
Force Sync to Aliyun / sync (push) Waiting to run
Update Version / update-version (push) Waiting to run
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
* ♻️ refactor(UI): 重构UI渲染服务为组件化分层架构

♻️ **架构重构**
- UI渲染服务重构为组件化分层架构
- 解耦主题管理、HTML生成、截图功能

 **新增功能**
- `zhenxun.ui` 统一入口,提供 `render`、`markdown`、`vstack` 等API
- `RenderableComponent` 基类和渲染协议抽象
- 新增主题管理器和截图引擎模块

⚙️ **配置优化**
- UI配置迁移至 `superuser/ui_manager.py`
- 新增"重载UI主题"管理指令

🔧 **性能改进**
- 优化渲染缓存,支持组件级透明缓存
- 所有UI组件适配新渲染流程

* 🚨 auto fix by pre-commit hooks

---------

Co-authored-by: webjoin111 <455457521@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-18 23:08:22 +08:00
Rumio
11524bcb04
♻️ refactor: 统一图片渲染架构并引入通用UI组件系统 (#2019)
Some checks failed
检查bot是否运行正常 / bot check (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
Sequential Lint and Type Check / ruff-call (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Force Sync to Aliyun / sync (push) Has been cancelled
Update Version / update-version (push) Has been cancelled
Sequential Lint and Type Check / pyright-call (push) Has been cancelled
* ♻️ refactor: 统一图片渲染架构并引入通用UI组件系统

🎨 **渲染服务重构**
- 统一图片渲染入口,引入主题系统支持
- 优化Jinja2环境管理,支持主题覆盖和插件命名空间
- 新增UI缓存机制和主题重载功能

 **通用UI组件系统**
- 新增 zhenxun.ui 模块,提供数据模型和构建器
- 引入BaseBuilder基类,支持链式调用
- 新增多种UI构建器:InfoCard, Markdown, Table, Chart, Layout等
- 新增通用组件:Divider, Badge, ProgressBar, UserInfoBlock

🔄 **插件迁移**
- 迁移9个内置插件至新渲染系统
- 移除各插件中分散的图片生成工具
- 优化数据处理和渲染逻辑

💥 **Breaking Changes**
- 移除旧的图片渲染接口和模板路径
- TEMPLATE_PATH 更名为 THEMES_PATH
- 插件需适配新的RendererService和zhenxun.ui模块

*  test(check): 更新自检插件测试中的渲染服务模拟

* ♻️ refactor(renderer): 将缓存文件名哈希算法切换到 SHA256

* ♻️ refactor(shop): 移除商店HTML图片生成模块

* 🚨 auto fix by pre-commit hooks

---------

Co-authored-by: webjoin111 <455457521@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-15 16:34:37 +08:00
HibiKier
205f4ff1fa
添加bot画像
*  新增自我介绍功能及自动发送图片支持

- 在 bot_profile.py 中实现自我介绍指令及重载功能
- 在 group_handle 中添加自动发送自我介绍图片的逻辑
- 在 fg_request 中实现添加好友时自动发送自我介绍图片
- 新增 bot_profile_manager.py 管理 BOT 自我介绍及图片生成
- 更新 models.py 以支持插件自我介绍和注意事项字段

* 🎨 调整管理帮助宽度

*  更新数据访问层,优化获取数据的方法并引入缓存机制

*  更新用户数据访问逻辑,优化获取用户信息的方法,使用新的函数替代原有实现

*  在 BotProfileManager 中添加自我介绍文件不存在的日志记录,优化文件读取逻辑

*  更新 BOT 自我介绍帮助信息,增加文件不存在时自动创建功能
2025-07-16 02:51:06 +08:00
HibiKier
13579f5842
使用道具允许at目标用户 (#1877)
*  使用道具允许at目标用户

*  修改帮助配置项默认值

*  修改帮助配置项默认值

* 🎨 优化广播方法

* 💡 添加广播方法注释
2025-06-16 09:18:58 +08:00
HibiKier
611f0b62ba
引用消息同意好友/群组请求 (#1902)
*  提供event日志表, 新增引用消息同意好友/群组请求

*  移除城市列表更新

*  新增申请入群功能

* 💬 文本修改
2025-06-09 14:39:28 +08:00
HibiKier
7baf9f296c
🚑 修复道具使用问题 (#1917) 2025-06-04 14:58:17 +08:00
HibiKier
2d8320b5a0
🚑 修复pydantic2情况下的商店模型构造 (#1883) 2025-04-05 23:19:24 +08:00
HibiKier
629b4256af
🐛 修复群欢迎消息删除问题 (#1864)
* 🐛 修复群欢迎消息删除问题

* 🩹 优化笨蛋检测和修复商店图标问题

* 🎨 笨蛋检测更多规则移入rule

* 🎨 优化我的道具方法
2025-03-03 22:19:34 +08:00
ChthollyWn
a6ddb726d3
新增插件智能模式适配 (#1850)
* 新增插件智能模式适配

* 🚨 auto fix by pre-commit hooks

* 更改类名,命名更清晰

* 🎨 添加模块化参数

* 🎨  AI模块化修改

* 🩹  道具调用修复

* 🩹 修复商品使用前检测

*  retry增加参数适配

*   修改道具使用函数参数传递

*  捕获道具无法使用异常

* 🐛 添加依赖require

* 🐛  修复插件使用问题

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: HibiKier <45528451+HibiKier@users.noreply.github.com>
2025-02-24 09:28:53 +08:00
HibiKier
5fd746a52a
🚑 修复field在pyd1下报错 (#1842)
* 🚑 修复field在pyd1下报错

* 🐛 修正字段
2025-02-04 02:15:21 +08:00
BalconyJH
d6fd5f170a
🚨 Make pyright happy (#1840) 2025-01-27 03:40:50 +08:00
HibiKier
63145ffee0
🐛 修复商店购买 (#1834)
*  优化商店模块查询与修复购买逻辑

*  修复商店购买逻辑及优化商品展示
2025-01-13 14:33:38 +08:00
HibiKier
264929e5cb
新增好感度/金币设置和详细帮助 (#1831)
*  新增好感度/金币设置和详细帮助

* 🔧 修复html帮助
2025-01-10 18:39:23 +08:00
HibiKier
e814469b75 Compatible with pydantic 2.0 using the pydantic compatibility layer provided by nonebot 2025-01-10 12:19:11 +08:00
HibiKier
23ef00d01f
🐛 移除神秘药水2道具 (#1828) 2025-01-09 00:11:38 +08:00
HibiKier
e124c1dbdb
🚑 修复商品图标显示 (#1823) 2025-01-07 14:50:47 +08:00
HibiKier
2c97eeac79
🐛 移除resources,图标不存在时不会显示图片 (#1820)
Co-authored-by: Flern <cb56ec362bbbfb5272eb941281299d8d-qq_connect@git.osc>
2025-01-07 09:26:05 +08:00
HibiKier
2f939ff52b
🐛 修复商品图标显示问题,移除测试道具 (#1817)
Co-authored-by: Flern <cb56ec362bbbfb5272eb941281299d8d-qq_connect@git.osc>
2025-01-06 21:23:15 +08:00
HibiKier
2a5c06702a
新增全新商店界面 (#1816)
* 🎉 新增商店模板及样式配置

* 🎨 移除webui注释

* 🎨 新增神秘药水道具及商店样式调整

* 🎨 添加商店样式底部边距调整

---------

Co-authored-by: Flern <cb56ec362bbbfb5272eb941281299d8d-qq_connect@git.osc>
2025-01-06 19:21:35 +08:00
HibiKier
35014e4048
重构webui适配 (#1801)
* ♻️ 使用Uninfo重构PlatformUtils基础方法

* 🩹 优化插件加载与模块格式转换逻辑

* 🚑 修复商店道具无法使用

* 🚑 修复道具无法正常使用

* 🔧 增加Bot状态管理及模块禁用功能

* 🎨  优化Web UI代码结构,修改target方法

* 🚨 auto fix by pre-commit hooks

* 🎨 添加菜单API及优化异常处理

* 🐛 优化菜单API及模型结构,修复WebUi插件列表Api

* 📝 更新仓库readme

* 🚨 add mdlint file

* 📝 Add help chapter.

* 🐛 修复优化AuthChecker逻辑

* 🐛 优化数据库API,移除冗余导入及修正SQL_DICT引用

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: BalconyJH <balconyjh@gmail.com>
2024-12-25 12:03:49 +08:00
HibiKier
ebf05fd884
🚑 修复道具购买限制检查 (#1796) 2024-12-24 11:26:52 +08:00
HibiKier
3a197c0c1d
🐛 修复使用道具错误 (#1790) 2024-12-21 23:52:17 +08:00
HibiKier
a8e4d29031
🐛 修改webui导入路径 (#1783)
* 🐛 修改webui导入路径

* 🚨 auto fix by pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-19 09:51:31 +08:00
BalconyJH
bc5a9c4fcc
Develop: 完全使用 ruff 替代 isort 与 black (#1757)
* 🚨 完全使用 ruff 替代 isort 与 black

* 🚨 ruff lint&format
2024-12-10 19:49:11 +08:00
HibiKier
4e4b4590c4 🎨 排行榜代码优化与修改版本 2024-11-22 10:05:54 +08:00
梦璃雨落
6519b1cad4
🐞 fix: 更新货物未找到异常的信息处理方式 (#1713) 2024-10-23 13:19:47 +08:00
HibiKier
3ffe213652 🐛 修复签到金币排行bug以及添加官bot监控 2024-10-19 00:36:19 +08:00
HibiKier
3d3a2a5f7f
部分功能适配QQ BOT (#1701) 2024-10-18 18:57:55 +08:00
HibiKier
fcfaf56021
🐛 修复商店商品为空时报错 (#1634) 2024-09-16 21:17:09 +08:00
HibiKier
8a688eb4f0
🐛 好感度排行提供默认值 (#1624) 2024-09-12 22:15:04 +08:00
HibiKier
e4a92ea34b
签到/金币排行限制最大数量 (#1616)
*  签到/金币排行限制最大数量
2024-09-09 22:47:23 +08:00
AkashiCoin
440e7b54a5 添加金币排行
Co-Authored-By: HibiKier <45528451+HibiKier@users.noreply.github.com>
2024-09-08 11:33:19 +08:00
HibiKier
8fe061738a 🐛 bug修复 2024-09-01 23:30:26 +08:00
HibiKier
09f586be25 🐛 修复使用道具后未减去道具数量 2024-08-19 18:57:21 +08:00
HibiKier
da595b8c8e 🎨 2024-08-12 00:09:38 +08:00
HibiKier
d0792e0a1c 移除saa依赖 2024-08-11 15:57:33 +08:00
HibiKier
e0a3fe526e 🎨 统一发送格式 2024-08-10 02:25:04 +08:00
HibiKier
2926a46ae8 🎨 优化导入 2024-08-04 23:54:54 +08:00
HibiKier
7ab800be97 🐛 修复道具仓库 2024-08-03 00:10:24 +08:00
HibiKier
5a50a2bff4 perf👌: 道具使用与签到 2024-03-05 08:29:46 +08:00
HibiKier
db96f46dcb feat: 数据迁移 2024-03-04 23:27:05 +08:00
HibiKier
aa68553539 fix🐛: 修改图片bytes发送 2024-02-28 00:38:54 +08:00
HibiKier
9f17a525f1 perf👌: 添加shop的shortcut 2024-02-27 21:43:40 +08:00
HibiKier
7b3793728a feat: 添加hook,更新其他 2024-02-26 03:04:32 +08:00