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:
@@ -254,6 +254,7 @@ export interface ArticleDetail {
|
||||
template_name: string | null;
|
||||
generation_mode: string | null;
|
||||
platforms: string[];
|
||||
cover_asset_url: string | null;
|
||||
generate_status: string;
|
||||
publish_status: string;
|
||||
title: string | null;
|
||||
@@ -275,6 +276,7 @@ export interface UpdateArticleRequest {
|
||||
title: string;
|
||||
markdown_content: string;
|
||||
platforms?: string[];
|
||||
cover_asset_url?: string | null;
|
||||
}
|
||||
|
||||
export interface ArticleImageUploadResponse {
|
||||
|
||||
Reference in New Issue
Block a user