This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 6da9d718cc0b4af3106ee7fab659b4703b22fc81
Merge: 88b52d86 23729505
Author: LinkinStars <[email protected]>
AuthorDate: Wed Oct 16 16:56:57 2024 +0800

    Merge branch 'dev' into test
    
    # Conflicts:
    #       ui/src/pages/Users/Personal/components/Overview/index.tsx

 cmd/wire_gen.go                                    |   4 +-
 docs/docs.go                                       |  87 +++++++++-
 docs/swagger.json                                  |  87 +++++++++-
 docs/swagger.yaml                                  |  52 ++++++
 i18n/af_ZA.yaml                                    |   4 +-
 i18n/ar_SA.yaml                                    |   4 +-
 i18n/az_AZ.yaml                                    |   4 +-
 i18n/bal_BA.yaml                                   |   4 +-
 i18n/ban_ID.yaml                                   |   4 +-
 i18n/bn_BD.yaml                                    |   4 +-
 i18n/bs_BA.yaml                                    |   4 +-
 i18n/ca_ES.yaml                                    |   4 +-
 i18n/cs_CZ.yaml                                    |   4 +-
 i18n/cy_GB.yaml                                    |   4 +-
 i18n/da_DK.yaml                                    |   4 +-
 i18n/de_DE.yaml                                    |   4 +-
 i18n/el_GR.yaml                                    |   4 +-
 i18n/en_US.yaml                                    |  25 ++-
 i18n/es_ES.yaml                                    |   4 +-
 i18n/fa_IR.yaml                                    |   4 +-
 i18n/fi_FI.yaml                                    |   4 +-
 i18n/fr_FR.yaml                                    |   6 +-
 i18n/he_IL.yaml                                    |   4 +-
 i18n/hi_IN.yaml                                    |   4 +-
 i18n/hu_HU.yaml                                    |   4 +-
 i18n/hy_AM.yaml                                    |   4 +-
 i18n/id_ID.yaml                                    |   4 +-
 i18n/it_IT.yaml                                    |   4 +-
 i18n/ja_JP.yaml                                    |   4 +-
 i18n/ko_KR.yaml                                    |   2 +-
 i18n/nl_NL.yaml                                    |   4 +-
 i18n/no_NO.yaml                                    |   4 +-
 i18n/pl_PL.yaml                                    |   4 +-
 i18n/pt_BR.yaml                                    |   2 +-
 i18n/pt_PT.yaml                                    |   4 +-
 i18n/ro_RO.yaml                                    |   4 +-
 i18n/ru_RU.yaml                                    |   4 +-
 i18n/sk_SK.yaml                                    |   4 +-
 i18n/sq_AL.yaml                                    |   4 +-
 i18n/sr_SP.yaml                                    |   4 +-
 i18n/sv_SE.yaml                                    |   4 +-
 i18n/te_IN.yaml                                    |   4 +-
 i18n/tr_TR.yaml                                    |   4 +-
 i18n/uk_UA.yaml                                    |   4 +-
 i18n/vi_VN.yaml                                    |   4 +-
 i18n/zh_CN.yaml                                    |  10 +-
 i18n/zh_TW.yaml                                    |   4 +-
 internal/controller/question_controller.go         |  22 +++
 .../entity/question_link_entity.go                 |  34 ++--
 internal/migrations/init_data.go                   |   1 +
 internal/migrations/migrations.go                  |   1 +
 .../username.go => internal/migrations/v23.go      |  13 +-
 internal/repo/answer/answer_repo.go                |  18 ++
 internal/repo/question/question_repo.go            | 167 +++++++++++++++++++
 internal/router/answer_api_router.go               |   1 +
 internal/schema/question_schema.go                 |  14 ++
 internal/schema/user_schema.go                     |   2 +-
 internal/service/answer_common/answer.go           |   1 +
 internal/service/content/answer_service.go         |  36 +++-
 internal/service/content/question_service.go       |  69 +++++++-
 internal/service/importer/importer_service.go      | 172 +++++++++++++++++++
 .../service/plugin_common/plugin_common_service.go |   8 +
 internal/service/question_common/question.go       | 113 +++++++++++++
 pkg/checker/question_link.go                       | 132 +++++++++++++++
 pkg/checker/question_link_test.go                  | 184 +++++++++++++++++++++
 pkg/checker/username.go                            |   2 +-
 plugin/embed.go                                    |   2 +-
 plugin/importer.go                                 |  62 +++++++
 plugin/plugin.go                                   |   4 +
 plugin/render.go                                   |   2 +-
 plugin/search.go                                   |   2 +-
 ui/package.json                                    |   2 +-
 ui/scripts/importPlugins.js                        |  68 ++++++++
 ui/scripts/{plugin.js => loadPlugins.js}           |  47 ++----
 ui/scripts/preinstall.js                           |   2 +-
 ui/src/components/QuestionList/index.tsx           |   2 +-
 ui/src/pages/Admin/Plugins/Installed/index.tsx     |   2 +-
 .../Detail/components/LinkedQuestions/index.tsx    | 105 ++++++++++++
 ui/src/pages/Questions/Detail/components/index.tsx |   2 +
 ui/src/pages/Questions/Detail/index.tsx            |   3 +
 ui/src/pages/Questions/Linked/index.tsx            | 127 ++++++++++++++
 .../Users/Personal/components/Overview/index.tsx   |  45 ++---
 .../Users/Register/components/SignUpForm/index.tsx |   4 +-
 ui/src/router/routes.ts                            |   4 +
 ui/src/services/common.ts                          |  17 ++
 ui/src/utils/pluginKit/index.ts                    |  38 +++--
 86 files changed, 1756 insertions(+), 201 deletions(-)

diff --cc ui/src/pages/Users/Personal/components/Overview/index.tsx
index 81ed7b32,7f937f68..3c1f590e
--- a/ui/src/pages/Users/Personal/components/Overview/index.tsx
+++ b/ui/src/pages/Users/Personal/components/Overview/index.tsx
@@@ -71,24 -74,24 +74,26 @@@ const Index: FC<Props> = ({ visible, in
          </Col>
        </Row>
  
-       {Number(recentBadges?.count) > 0 && (
-         <div className="mb-4">
-           <h5 className="mb-3">{t('recent_badges')}</h5>
-           <Row>
+       <div className="mb-5">
+         <h5 className="mb-3">{t('recent_badges')}</h5>
+         {Number(recentBadges?.count) > 0 ? (
+           <div className="d-flex flex-wrap" style={{ margin: '-12px' }}>
              {recentBadges?.list?.map((item) => {
                return (
 -                <CardBadge
 -                  data={item}
 -                  urlSearchParams={`username=${username}`}
 -                  badgePillType="count"
 -                />
 +                <Col sm={6} md={4} lg={3} key={item.id} className="mb-4">
 +                  <CardBadge
 +                    data={item}
 +                    urlSearchParams={`username=${username}`}
 +                    badgePillType="count"
 +                  />
 +                </Col>
                );
              })}
-           </Row>
-         </div>
-       )}
+           </div>
+         ) : (
+           <div className="mb-5">{t('content_empty')}</div>
+         )}
+       </div>
      </div>
    );
  };

Reply via email to