feat(kol): expand variable schema and polish KOL UI

- Add length/range limits to KOL variable definitions: max_length and
  default_value for input/textarea, min_value/max_value/default_number
  for number. Backend validates and normalizes; frontend renders limit
  inputs in KolVariableConfig and applies limits at runtime in
  KolDynamicForm.
- Sort workspace cards by most recent prompt/package update, falling
  back to granted_at. Adds updated_at to KolWorkspaceCard.
- Polish TemplatesView, WorkspaceView, and KOL package management UI;
  route create/update/publish/archive/delete toasts through i18n and
  expand package form copy and status labels.
- Remove stale KnowledgeView.vue.patch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-18 15:01:40 +08:00
parent 1dd316a34b
commit 79c65c1da7
26 changed files with 1506 additions and 235 deletions
+47 -2
View File
@@ -79,8 +79,8 @@ const enUS = {
contentManagement: "Content Management",
knowledge: "Knowledge Base",
images: "Image Management",
kolMarket: "Refined Templates",
kolMarketplace: "Refined Templates",
kolMarket: "Refined Template Marketplace",
kolMarketplace: "Refined Template Marketplace",
kolWorkspace: "KOL Workspace",
kolManage: "Prompt Management",
kolDashboard: "Dashboard",
@@ -186,6 +186,8 @@ const enUS = {
},
manage: {
title: "KOL Prompt Management",
packageTitle: "Packages",
promptTitle: "Prompts",
createPackage: "Create package",
editPackage: "Edit package",
publishPackage: "Publish",
@@ -193,8 +195,46 @@ const enUS = {
createPrompt: "Create prompt",
activatePrompt: "Go live",
archivePrompt: "Take offline",
confirmDeletePackage: "Are you sure you want to delete this package?",
confirmDeletePrompt: "Are you sure you want to delete this prompt?",
emptyPromptSelection: "Select a package on the left to view its prompts",
platformHint: "Platform",
platformHintDefault: "General",
packageStatus: {
draft: "Draft",
published: "Published",
archived: "Archived",
},
messages: {
packageCreated: "Package created successfully",
packageUpdated: "Package updated successfully",
packagePublished: "Package published successfully",
packageArchived: "Package archived successfully",
packageDeleted: "Package deleted successfully",
promptCreated: "Prompt created successfully",
promptActivated: "Prompt is live",
promptArchived: "Prompt is offline",
promptDeleted: "Prompt deleted successfully",
},
packageForm: {
tags: "Tags",
tagsPlaceholder: "Type a tag and press Enter",
priceNote: "Price Note",
priceNotePlaceholder: "For example: Contact me for pricing",
cover: "Cover Image",
coverHint: "Choose from the image library or upload a local image and convert it to WebP automatically.",
selectCover: "Select cover image",
changeCover: "Change cover image",
removeCover: "Remove cover image",
noCover: "No cover image selected",
nameRequired: "Package title is required",
coverPicker: {
title: "Select package cover",
localTab: "Local upload",
emptyTitle: "Choose an image for this package cover",
emptyHint: "Choose from the image library or upload a local image and convert it to WebP automatically.",
},
},
status: {
draft: "Draft",
active: "Live",
@@ -221,6 +261,11 @@ const enUS = {
required: "Required",
placeholder: "Placeholder",
options: "Options (comma separated)",
maxLength: "Max length",
defaultValue: "Default value",
minValue: "Min number",
maxValue: "Max number",
defaultNumber: "Default number",
},
},
dashboard: {