A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: default http code 400 confirm btn text change to ok (#570)
dashuai727a97385797
diff --git a/i18n/en_US.yaml b/i18n/en_US.yamlindex 7ebbf9ea..6856645e 100644--- a/i18n/en_US.yaml+++ b/i18n/en_US.yaml@@ -1132,6 +1132,7 @@ ui:unsuspend: Unsuspendclose: Closereopen: Reopen+ ok: OKsearch:title: Search Resultskeywords: Keywordsdiff --git a/ui/src/components/Modal/Modal.tsx b/ui/src/components/Modal/Modal.tsxindex 16517fcb..4efe906e 100644--- a/ui/src/components/Modal/Modal.tsx+++ b/ui/src/components/Modal/Modal.tsx@@ -71,7 +71,9 @@ const Index: FC<Props> = ({}}id="ok_button"disabled={confirmBtnDisabled}>- {confirmText || t('btns.confirm')}+ {confirmText === 'OK'+ ? t('btns.ok')+ : confirmText || t('btns.confirm')}</Button>)}</Modal.Footer>diff --git a/ui/src/utils/request.ts b/ui/src/utils/request.tsindex 7132099d..ad57946f 100644--- a/ui/src/utils/request.ts+++ b/ui/src/utils/request.ts@@ -117,6 +117,8 @@ class Request {// default error msg will show modalModal.confirm({content: msg,+ showCancel: false,+ confirmText: 'OK',});return Promise.reject(false);}