File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed
Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 925925 "confirm" : " Confirm Publish" ,
926926 "success" : " Published Successfully" ,
927927 "successDescription" : " {{skill}} has been submitted for review and will be available after admin approval" ,
928+ "publishedTitle" : " Published Successfully" ,
929+ "publishedDescription" : " {{skill}} is now live and available for download" ,
930+ "pendingReviewTitle" : " Submitted for Review" ,
931+ "pendingReviewDescription" : " {{skill}} has been submitted for review and will be available after admin approval" ,
928932 "error" : " Publish Failed" ,
929933 "timeoutTitle" : " Publish timed out" ,
930934 "timeoutDescription" : " The publish request took too long. Please check the skill list later or try again." ,
Original file line number Diff line number Diff line change 925925 "confirm" : " 确认发布" ,
926926 "success" : " 发布成功" ,
927927 "successDescription" : " {{skill}} 已提交审核,等待管理员批准后即可使用" ,
928+ "publishedTitle" : " 发布成功" ,
929+ "publishedDescription" : " {{skill}} 已发布,现在可以下载使用" ,
930+ "pendingReviewTitle" : " 已提交审核" ,
931+ "pendingReviewDescription" : " {{skill}} 已提交审核,等待管理员批准后即可使用" ,
928932 "error" : " 发布失败" ,
929933 "timeoutTitle" : " 发布请求超时" ,
930934 "timeoutDescription" : " 本次发布等待时间过长,请稍后到技能列表确认结果,或重新尝试发布。" ,
Original file line number Diff line number Diff line change @@ -71,12 +71,18 @@ export function PublishPage() {
7171 file : selectedFile ,
7272 visibility,
7373 } )
74- toast . success (
75- t ( 'publish.success' ) ,
76- t ( 'publish.successDescription' , {
77- skill : `${ result . namespace } /${ result . slug } @${ result . version } ` ,
78- } )
79- )
74+ const skillLabel = `${ result . namespace } /${ result . slug } @${ result . version } `
75+ if ( result . status === 'PUBLISHED' ) {
76+ toast . success (
77+ t ( 'publish.publishedTitle' ) ,
78+ t ( 'publish.publishedDescription' , { skill : skillLabel } )
79+ )
80+ } else {
81+ toast . success (
82+ t ( 'publish.pendingReviewTitle' ) ,
83+ t ( 'publish.pendingReviewDescription' , { skill : skillLabel } )
84+ )
85+ }
8086 navigate ( { to : '/dashboard/skills' } )
8187 } catch ( error ) {
8288 if ( error instanceof ApiError && error . status === 408 ) {
You can’t perform that action at this time.
0 commit comments