feat(libs): create library by name only; root_path derived server-side as BOOKS_DIR/SafeName(name), validated at creation; drop root_path input from admin UI; align changelogs to bilingual template; trim AGENTS.md to rules not derivable from repo layout
This commit is contained in:
+9
-3
@@ -1,10 +1,16 @@
|
||||
# Changelog
|
||||
# Changelog / 更新日志
|
||||
|
||||
All non-WebUI user-visible changes. Newest version on top.
|
||||
All notable non-WebUI user-visible changes should be documented in this file, newest version on top.
|
||||
本文件记录所有非 WebUI 的重要用户可见变更,最新版本在最上方。
|
||||
|
||||
The format loosely follows Keep a Changelog and can be adapted to the team's habits.
|
||||
本文档参考了 Keep a Changelog 的思路,也可以根据团队习惯调整。
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
### Changed / 变更
|
||||
|
||||
- API: `POST /api/libraries` now takes only `{name}`; `root_path` is generated server-side as `BOOKS_DIR/<sanitized name>` (no client-supplied paths, validated at creation).
|
||||
- API:`POST /api/libraries` 只需 `{name}`;`root_path` 由服务端生成为 `BOOKS_DIR/<清洗后的库名>`(不再接受客户端指定路径,创建时即校验)。
|
||||
- Repo structure conformed to `AGENTS.md`: `web/` renamed to `frontend/`; backend HTTP layer moved from `internal/api` to `cmd/webui/{api,handlers}` (`cmd/server` → `cmd/webui`); README/CHANGELOGs relocated under `docs/` (`README_zh.md` added as Chinese mirror); module-level `.gitignore`s added (`backend/`, `deploy/`); stray root `library/` removed (book files live in `deploy/api/storage/`); debug binaries untracked.
|
||||
- Docs: `docs/README.md` is now the English primary; previous Chinese README mirrored to `docs/README_zh.md`.
|
||||
|
||||
+11
-2
@@ -1,7 +1,16 @@
|
||||
# Changelog (WebUI)
|
||||
# Changelog (WebUI) / 更新日志
|
||||
|
||||
All WebUI user-visible changes. Newest version on top.
|
||||
All notable WebUI user-visible changes should be documented in this file, newest version on top.
|
||||
本文件记录所有 WebUI 的重要用户可见变更,最新版本在最上方。
|
||||
|
||||
The format loosely follows Keep a Changelog and can be adapted to the team's habits.
|
||||
本文档参考了 Keep a Changelog 的思路,也可以根据团队习惯调整。
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed / 变更
|
||||
|
||||
- Creating a library on the admin Libraries page no longer asks for a server-side absolute path; just a name (the directory lands at `BOOKS_DIR/<name>` automatically).
|
||||
- 库管理页建库不再要求填写服务端绝对路径,只需库名(目录自动落在 `BOOKS_DIR/<库名>` 下)。
|
||||
|
||||
_No WebUI user-visible changes in this release; the structural refactor (`web/` → `frontend/`) does not affect the served app._
|
||||
|
||||
@@ -77,7 +77,7 @@ POST /api/users ★ {username,password,role}
|
||||
DELETE /api/users/{id} ★
|
||||
|
||||
GET /api/libraries
|
||||
POST /api/libraries ★ {name,root_path}
|
||||
POST /api/libraries ★ {name} → root_path 由服务端生成(BooksDir/清洗后的库名)
|
||||
POST /api/libraries/{id}/scan ★ → 202 异步
|
||||
POST /api/libraries/{id}/upload multipart ★ → 202
|
||||
|
||||
|
||||
Reference in New Issue
Block a user