diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index e2bf72d..d6dc8c9 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -913,6 +913,10 @@ "confirm": "Confirm Publish", "success": "Published Successfully", "successDescription": "{{skill}} has been submitted for review and will be available after admin approval", + "publishedTitle": "Published Successfully", + "publishedDescription": "{{skill}} is now live and available for download", + "pendingReviewTitle": "Submitted for Review", + "pendingReviewDescription": "{{skill}} has been submitted for review and will be available after admin approval", "error": "Publish Failed", "timeoutTitle": "Publish timed out", "timeoutDescription": "The publish request took too long. Please check the skill list later or try again.", diff --git a/web/src/i18n/locales/zh.json b/web/src/i18n/locales/zh.json index 95fa899..acc8275 100644 --- a/web/src/i18n/locales/zh.json +++ b/web/src/i18n/locales/zh.json @@ -913,6 +913,10 @@ "confirm": "确认发布", "success": "发布成功", "successDescription": "{{skill}} 已提交审核,等待管理员批准后即可使用", + "publishedTitle": "发布成功", + "publishedDescription": "{{skill}} 已发布,现在可以下载使用", + "pendingReviewTitle": "已提交审核", + "pendingReviewDescription": "{{skill}} 已提交审核,等待管理员批准后即可使用", "error": "发布失败", "timeoutTitle": "发布请求超时", "timeoutDescription": "本次发布等待时间过长,请稍后到技能列表确认结果,或重新尝试发布。", diff --git a/web/src/pages/dashboard/publish.tsx b/web/src/pages/dashboard/publish.tsx index b052e98..6f6172d 100644 --- a/web/src/pages/dashboard/publish.tsx +++ b/web/src/pages/dashboard/publish.tsx @@ -71,12 +71,18 @@ export function PublishPage() { file: selectedFile, visibility, }) - toast.success( - t('publish.success'), - t('publish.successDescription', { - skill: `${result.namespace}/${result.slug}@${result.version}`, - }) - ) + const skillLabel = `${result.namespace}/${result.slug}@${result.version}` + if (result.status === 'PUBLISHED') { + toast.success( + t('publish.publishedTitle'), + t('publish.publishedDescription', { skill: skillLabel }) + ) + } else { + toast.success( + t('publish.pendingReviewTitle'), + t('publish.pendingReviewDescription', { skill: skillLabel }) + ) + } navigate({ to: '/dashboard/skills' }) } catch (error) { if (error instanceof ApiError && error.status === 408) {