This is an automated email from the ASF dual-hosted git repository. linkinstar pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/answer.git
commit 89f0ca5a3f3b57c008eb7a43dd3b9a927c47e69f Merge: bd13ef3f 0985e4f5 Author: LinkinStars <[email protected]> AuthorDate: Tue Mar 18 10:26:27 2025 +0800 Merge branch 'release/1.4.5' .github/workflows/build-binary-for-release.yml | 2 +- .gitignore | 3 + Dockerfile | 2 +- Makefile | 4 +- README.md | 4 +- cmd/command.go | 2 +- cmd/wire_gen.go | 16 +- configs/config.yaml | 3 + docs/docs.go | 200 +- docs/swagger.json | 200 +- docs/swagger.yaml | 103 +- go.mod | 2 +- 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 | 6 +- i18n/da_DK.yaml | 4 +- i18n/de_DE.yaml | 4 +- i18n/el_GR.yaml | 4 +- i18n/en_US.yaml | 58 +- i18n/es_ES.yaml | 4 +- i18n/fa_IR.yaml | 4 +- i18n/fi_FI.yaml | 4 +- i18n/fr_FR.yaml | 4 +- i18n/he_IL.yaml | 4 +- i18n/hi_IN.yaml | 6 +- i18n/hu_HU.yaml | 4 +- i18n/hy_AM.yaml | 4 +- i18n/id_ID.yaml | 6 +- i18n/it_IT.yaml | 6 +- i18n/ja_JP.yaml | 4 +- i18n/ko_KR.yaml | 4 +- i18n/ml_IN.yaml | 6 +- i18n/nl_NL.yaml | 4 +- i18n/no_NO.yaml | 4 +- i18n/pt_BR.yaml | 4 +- i18n/pt_PT.yaml | 4 +- i18n/ro_RO.yaml | 4 +- i18n/ru_RU.yaml | 4 +- i18n/sk_SK.yaml | 2 + i18n/sq_AL.yaml | 4 +- i18n/sr_SP.yaml | 4 +- i18n/sv_SE.yaml | 4 +- i18n/te_IN.yaml | 6 +- i18n/tr_TR.yaml | 6 +- i18n/uk_UA.yaml | 4 +- i18n/vi_VN.yaml | 4 +- i18n/zh_CN.yaml | 77 +- i18n/zh_TW.yaml | 6 +- internal/base/constant/upload.go | 1 + internal/base/constant/user.go | 6 + internal/base/cron/cron.go | 43 +- internal/base/middleware/accept_language.go | 34 +- internal/base/middleware/visit_img_auth.go | 10 +- internal/base/reason/reason.go | 3 + internal/base/server/config.go | 3 +- internal/base/server/http.go | 12 +- internal/cli/build.go | 19 + internal/controller/answer_controller.go | 5 - internal/controller/badge_controller.go | 5 - internal/controller/lang_controller.go | 1 + internal/controller/meta_controller.go | 1 - internal/controller/question_controller.go | 3 - internal/controller/siteinfo_controller.go | 15 +- internal/controller/tag_controller.go | 5 + internal/controller/template_controller.go | 11 +- internal/controller/upload_controller.go | 9 +- internal/controller/user_controller.go | 10 +- internal/controller_admin/plugin_controller.go | 1 - internal/controller_admin/role_controller.go | 1 + .../controller_admin/user_backyard_controller.go | 20 + internal/entity/file_record_entity.go | 45 + internal/install/install_req.go | 57 +- internal/install/install_server.go | 12 +- internal/migrations/init.go | 49 +- internal/migrations/init_data.go | 1 + internal/migrations/migrations.go | 1 + internal/migrations/v25.go | 65 + internal/repo/activity/vote_repo.go | 3 + internal/repo/activity_common/activity_repo.go | 2 +- internal/repo/answer/answer_repo.go | 29 +- internal/repo/auth/auth.go | 2 +- internal/repo/badge_award/badge_award_repo.go | 9 + internal/repo/collection/collection_repo.go | 2 +- internal/repo/file_record/file_record_repo.go | 84 + internal/repo/notification/notification_repo.go | 16 + .../repo/plugin_config/plugin_user_config_repo.go | 8 + internal/repo/provider.go | 2 + internal/repo/question/question_repo.go | 32 +- internal/repo/rank/user_rank_repo.go | 2 +- internal/repo/revision/revision_repo.go | 12 +- internal/repo/role/power_repo.go | 2 +- internal/repo/user/user_backyard_repo.go | 9 + internal/router/answer_api_router.go | 2 + internal/router/static_router.go | 12 +- internal/schema/answer_schema.go | 14 + internal/schema/backyard_user_schema.go | 5 + internal/schema/comment_schema.go | 14 + internal/schema/question_schema.go | 32 + internal/schema/siteinfo_schema.go | 66 +- internal/service/activity_common/activity.go | 2 +- internal/service/answer_common/answer.go | 1 + internal/service/badge/badge_award_service.go | 2 + internal/service/content/question_service.go | 6 +- .../service/file_record/file_record_service.go | 172 + .../service/notification_common/notification.go | 2 + internal/service/object_info/object_info.go | 3 +- .../service/plugin_common/plugin_common_service.go | 1 + internal/service/provider.go | 2 + internal/service/question_common/question.go | 25 +- internal/service/revision/revision.go | 1 + internal/service/service_config/service_config.go | 5 +- internal/service/tag_common/tag_common.go | 21 +- internal/service/uploader/upload.go | 52 +- internal/service/user_admin/user_backyard.go | 63 +- internal/service/user_common/user.go | 10 + pkg/checker/username.go | 2 +- pkg/checker/zero_string.go | 11 + pkg/converter/markdown.go | 9 +- pkg/uid/id.go | 6 +- pkg/writer/writer.go | 5 + ui/.lintstagedrc.json | 12 +- ui/.prettierrc.json | 3 +- ui/package.json | 23 +- ui/pnpm-lock.yaml | 18905 +++++++++++-------- ui/scripts/setup-eslint.js | 170 + ui/src/common/color.scss | 14 +- ui/src/common/constants.ts | 2 + ui/src/common/interface.ts | 2 + ui/src/components/AccordionNav/index.tsx | 1 + ui/src/components/Avatar/index.tsx | 19 +- ui/src/components/BaseUserCard/index.tsx | 3 + ui/src/components/Counts/index.tsx | 34 +- ui/src/components/Editor/Viewer.tsx | 7 +- ui/src/components/Editor/utils/index.ts | 57 +- ui/src/components/Footer/index.tsx | 22 +- ui/src/components/HotQuestions/index.tsx | 2 +- ui/src/components/PinList/index.tsx | 80 + ui/src/components/QueryGroup/index.tsx | 2 +- ui/src/components/QuestionList/index.tsx | 174 +- ui/src/components/QuestionListLoader/index.tsx | 22 +- ui/src/components/Share/index.tsx | 2 +- ui/src/components/SideNav/index.tsx | 4 +- ui/src/components/Tag/index.tsx | 3 + ui/src/components/TagSelector/index.tsx | 7 +- ui/src/components/Toast/index.tsx | 2 +- ui/src/components/index.ts | 2 + ui/src/hooks/index.ts | 2 + .../hooks/{useToast => useExternalToast}/index.tsx | 79 +- ui/src/hooks/useToast/index.tsx | 4 +- ui/src/index.scss | 31 + ui/src/pages/Admin/Answers/index.tsx | 47 +- ui/src/pages/Admin/Legal/index.tsx | 29 + ui/src/pages/Admin/Questions/index.tsx | 47 +- ui/src/pages/Admin/Users/index.tsx | 29 + ui/src/pages/Admin/Write/index.tsx | 8 +- .../pages/Install/components/FifthStep/index.tsx | 2 +- .../pages/Install/components/FourthStep/index.tsx | 85 +- .../pages/Install/components/SecondStep/index.tsx | 156 +- ui/src/pages/Install/index.tsx | 56 + ui/src/pages/Layout/index.tsx | 70 +- ui/src/pages/Legal/Privacy/index.tsx | 5 +- ui/src/pages/Legal/Tos/index.tsx | 5 +- .../Questions/Detail/components/Answer/index.tsx | 9 +- .../Detail/components/LinkedQuestions/index.tsx | 2 +- .../Questions/Detail/components/Question/index.tsx | 22 +- .../Detail/components/RelatedQuestions/index.tsx | 2 +- ui/src/pages/Questions/EditAnswer/index.tsx | 5 +- .../pages/Review/components/FlagContent/index.tsx | 5 +- .../Review/components/QueuedContent/index.tsx | 5 +- ui/src/pages/Tags/Info/index.tsx | 5 +- ui/src/pages/Tags/index.tsx | 6 +- ui/src/services/common.ts | 4 + ui/src/stores/branding.ts | 2 +- ui/src/stores/commentReply.ts | 2 +- ui/src/stores/customize.ts | 2 +- ui/src/stores/errorCode.ts | 2 +- ui/src/stores/index.ts | 2 + ui/src/stores/interface.ts | 2 +- ui/src/stores/loggedUserInfo.ts | 2 +- ui/src/stores/loginSetting.ts | 2 +- ui/src/stores/loginToContinue.ts | 2 +- ui/src/stores/pageTags.ts | 2 +- ui/src/stores/seoSetting.ts | 2 +- ui/src/stores/sideNav.ts | 2 +- ui/src/stores/siteInfo.ts | 2 +- ui/src/stores/{toast.ts => siteLegal.ts} | 21 +- ui/src/stores/themeSetting.ts | 2 +- ui/src/stores/toast.ts | 2 +- ui/src/stores/userCenter.ts | 2 +- ui/src/stores/writeSetting.ts | 2 +- ui/src/utils/guard.ts | 4 + ui/template/question.html | 2 +- ui/template/tag-detail.html | 2 +- ui/tsconfig.json | 3 +- 201 files changed, 13553 insertions(+), 8869 deletions(-)
