feat: add cover image functionality for articles

- Implemented `resolveApiURL` function to handle various URL formats.
- Updated `ArticleDetail` and `UpdateArticleRequest` interfaces to include `cover_asset_url`.
- Enhanced `ArticleEditorView` to manage cover image uploads, including a new `CoverPickerModal` component.
- Added cover image requirements logic in `cover-requirements.ts` to enforce platform-specific cover image rules.
- Modified backend services to handle cover image uploads and validations, including checks for required cover images for specific platforms.
- Improved error handling for cover image requirements during article publishing.
This commit is contained in:
2026-04-07 09:19:03 +08:00
parent 1e844704e4
commit 9f721f6088
13 changed files with 1360 additions and 129 deletions
+1
View File
@@ -35,6 +35,7 @@ const errorMessageMap: Record<string, string> = {
object_storage_unavailable: "对象存储未配置或当前不可用",
invalid_payload: "请求参数不合法",
update_failed: "保存文章失败",
publish_cover_required: "已选择百家号,请先上传封面图",
publisher_plugin_timeout: "浏览器插件响应超时,请刷新当前页面后重试",
publisher_plugin_empty_response: "浏览器插件未返回数据,请刷新当前页面后重试",
publisher_plugin_invalid_response: "浏览器插件返回了无效数据,请刷新当前页面后重试",