feat: add EditorGridSizePicker and EditorSelectionFrame components; implement FreeCreateView for article management; introduce ArticleSelectionOptimizeService for optimizing article selections

This commit is contained in:
2026-04-06 22:18:55 +08:00
parent 08ace0a9e0
commit 1e844704e4
20 changed files with 3033 additions and 740 deletions
+52 -4
View File
@@ -53,7 +53,7 @@ const enUS = {
articleCreation: "Article Creation",
templates: "Templates",
custom: "Custom Generation",
optimize: "Optimization",
freeCreate: "Free Create",
media: "Media",
brandManagement: "Brand Management",
brands: "Brand Library",
@@ -106,9 +106,9 @@ const enUS = {
title: "Custom Generation",
description: "Generate articles with custom prompt rules, instant or scheduled.",
},
optimize: {
title: "Article Optimization",
description: "No matching backend APIs exist in this repository yet.",
freeCreate: {
title: "Free Create",
description: "Create and edit articles freely, no templates or AI generation required.",
},
media: {
title: "Media Management",
@@ -209,8 +209,32 @@ const enUS = {
custom_generation: "Custom generation",
instant_task: "Instant task",
schedule_task: "Scheduled task",
free_create: "Free create",
},
},
freeCreate: {
actions: {
create: "New Article",
},
filters: {
publishStatus: "Publish Status",
keyword: "Search",
createdTime: "Created Time",
createdTimeStart: "Start",
createdTimeEnd: "End",
keywordPlaceholder: "Search by title",
},
list: {
eyebrow: "Free Create",
count: "{count} articles",
empty: "No articles yet. Click \"New Article\" to start creating.",
edit: "Edit article",
deleteConfirm: "Are you sure you want to delete this article?",
deleteSuccess: "Article deleted",
deleteError: "Failed to delete article",
},
createError: "Failed to create article",
},
templates: {
eyebrow: "Article Creation",
actions: {
@@ -431,6 +455,30 @@ const enUS = {
resetSize: "Reset size",
delete: "Delete image",
},
aiOptimize: {
title: "AI Optimize",
subtitle: "Supports contiguous multi-block selections and generates a rewrite from your instruction",
originalLabel: "Selected text",
previewLabel: "Preview",
previewPlaceholder: "After you enter an instruction, the AI rewrite will stream here.",
generating: "Generating...",
streamingHint: "Building a stronger version of the selected text in real time...",
disclaimer: "AI output is for reference only. Review it before replacing the original text.",
promptLabel: "Instruction",
promptPlaceholder: "For example: make it more natural, classroom-friendly, and persuasive while keeping the facts unchanged.",
generate: "Generate",
regenerate: "Regenerate",
stop: "Stop",
replace: "Replace selection",
close: "Keep original",
messages: {
selectionRequired: "Select one block or multiple contiguous blocks of article text first.",
promptRequired: "Enter an instruction first.",
selectionChanged: "The original selection changed. Please select it again before replacing.",
empty: "There is no AI content ready to replace yet.",
failed: "AI optimization failed. Please try again later.",
},
},
messages: {
saved: "Article saved.",
generating: "This article is still generating. Try editing it later.",