Skip to content

Commit

Permalink
fix: default http code 400 confirm btn text change to ok (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuashuai authored Oct 17, 2023
1 parent 86ed0ce commit 727a973
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions i18n/en_US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,7 @@ ui:
unsuspend: Unsuspend
close: Close
reopen: Reopen
ok: OK
search:
title: Search Results
keywords: Keywords
Expand Down
4 changes: 3 additions & 1 deletion ui/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions ui/src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ class Request {
// default error msg will show modal
Modal.confirm({
content: msg,
showCancel: false,
confirmText: 'OK',
});
return Promise.reject(false);
}
Expand Down

0 comments on commit 727a973

Please sign in to comment.