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: answer add pending state
shuai6201a5a74090
diff --git a/i18n/en_US.yaml b/i18n/en_US.yamlindex 7236e700..37a2ecdc 100644--- a/i18n/en_US.yaml+++ b/i18n/en_US.yaml@@ -1882,3 +1882,4 @@ ui:post_reopen: This post has been reopened.post_list: This post has been listed.post_unlist: This post has been unlisted.+ post_pending: Your post is awaiting review. This is a preview, it will be visible after it has been approved.diff --git a/ui/config-overrides.js b/ui/config-overrides.jsindex 770d8096..11496b08 100644--- a/ui/config-overrides.js+++ b/ui/config-overrides.js@@ -44,14 +44,14 @@ module.exports = {minChunks: 2,cacheGroups: {automaticNamePrefix: 'chunk',- // components: {- // test: /[\\/]components[\\/]/,- // name: 'components',- // priority: 14,- // reuseExistingChunk: true,- // minChunks: 1,- // chunks: 'initial',- // },+ components: {+ test: /[\\/]components[\\/]/,+ name: 'components',+ priority: 14,+ reuseExistingChunk: true,+ minChunks: process.env.NODE_ENV === 'production' ? 1 : 2,+ chunks: 'initial',+ },i18next: {name: 'i18next',test: /[\/]node_modules[\/](i18next)[\/]/,diff --git a/ui/src/pages/Questions/Detail/components/Answer/index.tsx b/ui/src/pages/Questions/Detail/components/Answer/index.tsxindex 1fc90955..474c83d6 100644--- a/ui/src/pages/Questions/Detail/components/Answer/index.tsx+++ b/ui/src/pages/Questions/Detail/components/Answer/index.tsx@@ -99,6 +99,12 @@ const Index: FC<Props> = ({{t('post_deleted', { keyPrefix: 'messages' })}</Alert>)}+ {data.status === 11 && (+ <Alert variant="secondary" className="mb-4">+ {t('post_pending', { keyPrefix: 'messages' })}+ </Alert>+ )}+{data?.accepted === 2 && (<div className="mb-3 lh-1"><Badge bg="success" pill>