mirror of https://github.com/harness/drone.git
fix: [code-1663]: add error message on submit btn (#1136)
parent
ac7ac5e881
commit
00f58fd08e
|
@ -478,8 +478,12 @@ export function MarkdownEditorWithPreview({
|
||||||
variation={ButtonVariation.PRIMARY}
|
variation={ButtonVariation.PRIMARY}
|
||||||
disabled={false}
|
disabled={false}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (file !== undefined) {
|
||||||
handleUpload(file as File, setMarkdownContent, repoMetadata, showError, standalone, routingId)
|
handleUpload(file as File, setMarkdownContent, repoMetadata, showError, standalone, routingId)
|
||||||
setOpen(false)
|
setOpen(false)
|
||||||
|
} else {
|
||||||
|
showError(getString('uploadAFileError'))
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -852,6 +852,7 @@ export interface StringsMap {
|
||||||
updateUser: string
|
updateUser: string
|
||||||
updateWebhook: string
|
updateWebhook: string
|
||||||
updated: string
|
updated: string
|
||||||
|
uploadAFileError: string
|
||||||
user: string
|
user: string
|
||||||
userCreated: string
|
userCreated: string
|
||||||
userId: string
|
userId: string
|
||||||
|
|
|
@ -1002,3 +1002,4 @@ summary: Summary
|
||||||
prGenSummary: Have Harness AIDA summarize the code changes in this pull request
|
prGenSummary: Have Harness AIDA summarize the code changes in this pull request
|
||||||
aidaGenSummary: '[AIDA is generating a summary...]'
|
aidaGenSummary: '[AIDA is generating a summary...]'
|
||||||
importFailed: Import Failed
|
importFailed: Import Failed
|
||||||
|
uploadAFileError: There is no image or video uploaded. Please upload an image or video.
|
||||||
|
|
Loading…
Reference in New Issue