Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions web/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
4 changes: 4 additions & 0 deletions web/src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,10 @@
"confirm": "确认发布",
"success": "发布成功",
"successDescription": "{{skill}} 已提交审核,等待管理员批准后即可使用",
"publishedTitle": "发布成功",
"publishedDescription": "{{skill}} 已发布,现在可以下载使用",
"pendingReviewTitle": "已提交审核",
"pendingReviewDescription": "{{skill}} 已提交审核,等待管理员批准后即可使用",
"error": "发布失败",
"timeoutTitle": "发布请求超时",
"timeoutDescription": "本次发布等待时间过长,请稍后到技能列表确认结果,或重新尝试发布。",
Expand Down
18 changes: 12 additions & 6 deletions web/src/pages/dashboard/publish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading