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: {
+47 -2
View File
@@ -79,8 +79,8 @@ const zhCN = {
contentManagement: "内容管理",
knowledge: "知识库",
images: "图片管理",
kolMarket: "精调模版",
kolMarketplace: "精调模版",
kolMarket: "精调模版市场",
kolMarketplace: "精调模版市场",
kolWorkspace: "KOL 工作台",
kolManage: "提示词管理",
kolDashboard: "数据看板",
@@ -186,6 +186,8 @@ const zhCN = {
},
manage: {
title: "KOL 提示词管理",
packageTitle: "订阅包",
promptTitle: "提示词",
createPackage: "创建订阅包",
editPackage: "编辑包",
publishPackage: "发布",
@@ -193,8 +195,46 @@ const zhCN = {
createPrompt: "新增提示词",
activatePrompt: "上线",
archivePrompt: "下线",
confirmDeletePackage: "确定要删除这个订阅包吗?",
confirmDeletePrompt: "确定要删除这个提示词吗?",
emptyPromptSelection: "请选择左侧订阅包以查看提示词",
platformHint: "平台",
platformHintDefault: "通用",
packageStatus: {
draft: "草稿",
published: "已发布",
archived: "已归档",
},
messages: {
packageCreated: "订阅包创建成功",
packageUpdated: "订阅包更新成功",
packagePublished: "订阅包发布成功",
packageArchived: "订阅包归档成功",
packageDeleted: "订阅包删除成功",
promptCreated: "提示词创建成功",
promptActivated: "提示词已上线",
promptArchived: "提示词已下线",
promptDeleted: "提示词删除成功",
},
packageForm: {
tags: "标签",
tagsPlaceholder: "输入标签后按回车",
priceNote: "价格说明",
priceNotePlaceholder: "例如:联系我获取报价",
cover: "封面图",
coverHint: "支持从素材库选择,也支持本地上传后自动转为 WebP。",
selectCover: "选择封面图",
changeCover: "更换封面图",
removeCover: "移除封面图",
noCover: "暂未设置封面图",
nameRequired: "请填写订阅包标题",
coverPicker: {
title: "选择订阅包封面",
localTab: "本地上传",
emptyTitle: "选择一张图片作为订阅包封面",
emptyHint: "支持从素材库选择,也支持本地上传后自动转为 WebP。",
},
},
status: {
draft: "草稿",
active: "已上线",
@@ -221,6 +261,11 @@ const zhCN = {
required: "必填",
placeholder: "提示语",
options: "选项(逗号分隔)",
maxLength: "字数限制",
defaultValue: "默认值",
minValue: "最小数字",
maxValue: "最大数字",
defaultNumber: "默认数字",
},
},
dashboard: {