feat: group the server's chats and use OpenChamber's project icons
Sessions under the server's managed chats root (chats/<date>/session-…) were grouped per directory, so each one appeared as its own session-xxxxx band. GET /api/fs/home now supplies the chats root plus its canonical and legacy aliases; every chat folder becomes the single 聊天 group. The new-session picker can target 聊天 too: the first send creates a fresh chat directory before creating the session, and a new session started from an existing chat gets a new one instead of sharing its folder. Projects merge their OpenChamber settings row (label, icon key, colour, iconBackground and uploaded/auto icon image) with /api/project. Group headers, the picker and the draft chip draw the chosen icon in its colour, and custom images are fetched through the client transport (SVG included) with a themed fallback to the glyph. The chat group uses a chat bubble rather than a folder. 0.4.8 (408).
This commit is contained in:
1 parent
91bf5e5b81
commit
79221e57d7
14 files changed
+599
-32
No files matched your search
@@ -5,6 +5,30 @@
|
||||
|
||||
---
|
||||
|
||||
## 0.4.8 项目图标与聊天图标(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
| --- | --- |
|
||||
| 元数据 | `refreshProjects` 同时读 `/api/config/settings?surface=mobile` 的 `projects`,把 label / icon / color / iconBackground / iconImage 按路径合并到 `/api/project` 的条目上(自定义 data dir、Windows 大小写/分隔符都按路径匹配) |
|
||||
| 项目图标 | 聊天组改用聊天气泡图标;项目组、项目选择器、草稿的项目 chip 统一用 `ProjectIcon`:OpenChamber 的 46 个 icon key 映射到 Material 图标,`color` 支持 hex 与旧主题 key(primary/error/comment/keyword/string/…),无自定义图标时显示对应颜色的图标/文件夹 |
|
||||
| 自定义图标 | `iconImage` 存在时经 `GET /api/projects/<settingsId>/icon?theme=…&iconColor=…` 取图(带认证,走 Transport/Relay);SVG 用 `flutter_svg` 渲染,PNG/favicon 用 `Image.memory`;有 `iconBackground` 时加圆角底色;加载失败回退字形,按 theme+updatedAt 缓存 |
|
||||
| 测试 | 现有 46 项全过;模拟器上确认聊天组是气泡、项目组带各自的颜色/图标、选择器与草稿 chip 一致 |
|
||||
| 版本 | **0.4.8(code 408)** |
|
||||
|
||||
---
|
||||
|
||||
## 0.4.7 聊天分组与「聊天」新建目标(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
| --- | --- |
|
||||
| 聊天分组 | 连接后读 `GET /api/fs/home` 的 `chatsRoot` / `canonicalChatsRoot` / 旧版 `.config/openchamber/chats`,所有位于这些根下的会话(`chats/<日期>/session-…`)合并成一个「聊天」组;修复此前按目录 leaf 分组、每个聊天各显示成 `session-xxxxx` 的问题。自定义 data dir、Windows 分隔符/盘符大小写都按路径边界匹配 |
|
||||
| 新建目标 | 新会话的项目选择器新增「聊天」:选择后草稿 chip 显示聊天图标和「聊天」;首次发送时先在 `chatsRoot/YYYY-MM-DD/session-<id>` 建目录(`POST /api/fs/mkdir`),再在该目录创建会话。已有聊天里点新会话会得到一个新的聊天目录,不会复用旧的 |
|
||||
| 侧栏 | 聊天组的「+」提示「新建聊天」,直接打开以聊天为目标的草稿;项目选择器不再把聊天目录当作项目列出 |
|
||||
| 测试 | `test/paths_test.dart` 增加聊天根边界(POSIX/Windows、`chats-other` 不误判);`test/sidebar_rows_test.dart` 增加多个聊天目录合并为唯一「聊天」组、不出现 `session-xxxxx` 的断言;本地服务器上用 curl 验证了在 chatsRoot 下 mkdir + 建会话 + 删除 |
|
||||
| 版本 | **0.4.7(code 407)** |
|
||||
|
||||
---
|
||||
|
||||
## 0.4.6 扫码无反应的修复与诊断(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
|
||||
Reference in new issue
Block a user