feat(admin-web): add paste-text source mode to imitation create page
- Add a source-method toggle (article URL / pasted text) with per-mode hints, a 24,000-character counter, and mode-aware submit validation - Validate URLs client-side (http/https only) with a dedicated error message; only the active mode's field is sent to the API - Keep URL mode selected when arriving with source_url query params - Refresh the page layout and update zh-CN/en-US copy for both modes
This commit is contained in:
@@ -224,7 +224,7 @@ const enUS = {
|
|||||||
},
|
},
|
||||||
imitationCreate: {
|
imitationCreate: {
|
||||||
title: 'Imitation Create',
|
title: 'Imitation Create',
|
||||||
description: 'Extract an article from a URL, then generate a new article in one step.',
|
description: 'Extract from an article URL first, or paste the source text directly.',
|
||||||
},
|
},
|
||||||
media: {
|
media: {
|
||||||
title: 'Media Management',
|
title: 'Media Management',
|
||||||
@@ -854,10 +854,18 @@ const enUS = {
|
|||||||
create: {
|
create: {
|
||||||
title: 'Create rewritten article',
|
title: 'Create rewritten article',
|
||||||
subtitle:
|
subtitle:
|
||||||
'The backend fetches the source article first, then generates a new original article from your settings.',
|
'Extract from an article URL or paste the source text to generate a new article for the current brand.',
|
||||||
sourceSection: 'Source article',
|
sourceSection: 'Source article',
|
||||||
settingsSection: 'Rewrite settings',
|
settingsSection: 'Rewrite settings',
|
||||||
|
settingsHint: 'Set the brand context, reference sources, and writing constraints.',
|
||||||
|
sourceMethod: 'Source method',
|
||||||
|
sourcePriority: 'URL is recommended',
|
||||||
|
sourceURLMode: 'Article URL',
|
||||||
|
sourceContentMode: 'Paste text',
|
||||||
|
sourceURLModeHint: 'The page title and article body will be extracted automatically.',
|
||||||
|
sourceContentModeHint: 'Use text from restricted pages or an existing document.',
|
||||||
sourceURL: 'Article URL',
|
sourceURL: 'Article URL',
|
||||||
|
sourceContent: 'Source text',
|
||||||
sourceTitle: 'Source title',
|
sourceTitle: 'Source title',
|
||||||
language: 'Article language',
|
language: 'Article language',
|
||||||
brandName: 'Current company',
|
brandName: 'Current company',
|
||||||
@@ -874,6 +882,9 @@ const enUS = {
|
|||||||
knowledgeBaseHint:
|
knowledgeBaseHint:
|
||||||
'Selected groups are retrieved in the backend and passed to generation as reference context.',
|
'Selected groups are retrieved in the backend and passed to generation as reference context.',
|
||||||
sourceURLPlaceholder: 'https://example.com/article',
|
sourceURLPlaceholder: 'https://example.com/article',
|
||||||
|
sourceContentPlaceholder:
|
||||||
|
'Paste the complete source article here, including relevant headings and data.',
|
||||||
|
sourceContentCount: '{count} / 24,000 characters',
|
||||||
sourceTitlePlaceholder: 'Optional. Citation titles are prefilled automatically.',
|
sourceTitlePlaceholder: 'Optional. Citation titles are prefilled automatically.',
|
||||||
brandNamePlaceholder: 'Select the current company in the top bar first.',
|
brandNamePlaceholder: 'Select the current company in the top bar first.',
|
||||||
regionPlaceholder: 'For example: Shanghai, East China, nationwide, North America',
|
regionPlaceholder: 'For example: Shanghai, East China, nationwide, North America',
|
||||||
@@ -885,6 +896,8 @@ const enUS = {
|
|||||||
'Add channel, structure, title style, or industry-specific instructions.',
|
'Add channel, structure, title style, or industry-specific instructions.',
|
||||||
queued: 'Rewrite task submitted and queued.',
|
queued: 'Rewrite task submitted and queued.',
|
||||||
sourceURLRequired: 'Enter the source article URL first.',
|
sourceURLRequired: 'Enter the source article URL first.',
|
||||||
|
sourceURLInvalid: 'Enter a valid link beginning with http:// or https://.',
|
||||||
|
sourceContentRequired: 'Paste the source article text first.',
|
||||||
brandNameRequired: 'Select the current company in the top bar first.',
|
brandNameRequired: 'Select the current company in the top bar first.',
|
||||||
submitError: 'Failed to submit rewrite task.',
|
submitError: 'Failed to submit rewrite task.',
|
||||||
backToList: 'Back to rewrites',
|
backToList: 'Back to rewrites',
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ const zhCN = {
|
|||||||
},
|
},
|
||||||
imitationCreate: {
|
imitationCreate: {
|
||||||
title: '仿写创作',
|
title: '仿写创作',
|
||||||
description: '从文章链接提取内容后,一步生成适配当前场景的新文章。',
|
description: '优先从文章链接提取内容,也可直接粘贴正文作为仿写来源。',
|
||||||
},
|
},
|
||||||
media: {
|
media: {
|
||||||
title: '媒体管理',
|
title: '媒体管理',
|
||||||
@@ -831,10 +831,18 @@ const zhCN = {
|
|||||||
},
|
},
|
||||||
create: {
|
create: {
|
||||||
title: '创建仿写文章',
|
title: '创建仿写文章',
|
||||||
subtitle: '后台会先抓取源文章内容,再按下方设定生成一篇新的原创表达文章。',
|
subtitle: '从文章 URL 自动提取,或粘贴正文,生成符合当前品牌场景的新文章。',
|
||||||
sourceSection: '来源文章',
|
sourceSection: '来源文章',
|
||||||
settingsSection: '仿写设置',
|
settingsSection: '仿写设置',
|
||||||
|
settingsHint: '设置品牌、增强信息与表达边界,未填写项将使用默认生成策略。',
|
||||||
|
sourceMethod: '来源方式',
|
||||||
|
sourcePriority: '推荐优先使用 URL',
|
||||||
|
sourceURLMode: '文章 URL',
|
||||||
|
sourceContentMode: '粘贴正文',
|
||||||
|
sourceURLModeHint: '系统将自动解析网页中的标题与正文内容',
|
||||||
|
sourceContentModeHint: '适用于无法直接访问的网页或已有文档内容',
|
||||||
sourceURL: '文章 URL',
|
sourceURL: '文章 URL',
|
||||||
|
sourceContent: '原文正文',
|
||||||
sourceTitle: '来源标题',
|
sourceTitle: '来源标题',
|
||||||
language: '文章语言',
|
language: '文章语言',
|
||||||
brandName: '当前公司',
|
brandName: '当前公司',
|
||||||
@@ -850,6 +858,8 @@ const zhCN = {
|
|||||||
knowledgeBaseHint:
|
knowledgeBaseHint:
|
||||||
'选择后,后台会检索相关知识片段并作为生成参考,未选择则只基于来源文章和当前设置生成。',
|
'选择后,后台会检索相关知识片段并作为生成参考,未选择则只基于来源文章和当前设置生成。',
|
||||||
sourceURLPlaceholder: 'https://example.com/article',
|
sourceURLPlaceholder: 'https://example.com/article',
|
||||||
|
sourceContentPlaceholder: '在此粘贴完整原文,保留必要的标题、段落与数据即可',
|
||||||
|
sourceContentCount: '已输入 {count} / 24,000 字',
|
||||||
sourceTitlePlaceholder: '可选,引用来源标题会自动带入',
|
sourceTitlePlaceholder: '可选,引用来源标题会自动带入',
|
||||||
brandNamePlaceholder: '请先在顶部选择当前公司',
|
brandNamePlaceholder: '请先在顶部选择当前公司',
|
||||||
regionPlaceholder: '例如:上海、华东、全国、北美市场',
|
regionPlaceholder: '例如:上海、华东、全国、北美市场',
|
||||||
@@ -859,6 +869,8 @@ const zhCN = {
|
|||||||
extraRequirementsPlaceholder: '补充行业、渠道、结构、标题风格等自由要求',
|
extraRequirementsPlaceholder: '补充行业、渠道、结构、标题风格等自由要求',
|
||||||
queued: '仿写任务已提交,正在排队生成',
|
queued: '仿写任务已提交,正在排队生成',
|
||||||
sourceURLRequired: '请先填写来源文章 URL',
|
sourceURLRequired: '请先填写来源文章 URL',
|
||||||
|
sourceURLInvalid: '请输入以 http:// 或 https:// 开头的有效链接',
|
||||||
|
sourceContentRequired: '请先粘贴需要仿写的原文正文',
|
||||||
brandNameRequired: '请先在顶部选择当前公司',
|
brandNameRequired: '请先在顶部选择当前公司',
|
||||||
submitError: '仿写任务提交失败',
|
submitError: '仿写任务提交失败',
|
||||||
backToList: '返回仿写列表',
|
backToList: '返回仿写列表',
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user