This is an automated email from the ASF dual-hosted git repository. robin0716 pushed a commit to branch test in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit 938598aa72fa9515c7c06ba3128d9904359746a4 Merge: 1c8ceea4 15dc4371 Author: robin <[email protected]> AuthorDate: Thu Jun 6 09:42:07 2024 +0800 Merge branch 'feat/1.3.5/embed' into test cmd/wire_gen.go | 3 +- docs/docs.go | 49 +++++++++++++++++++++ docs/swagger.json | 49 +++++++++++++++++++++ docs/swagger.yaml | 29 ++++++++++++ internal/controller/controller.go | 1 + internal/controller/embed_controller.go | 47 ++++++++++++++++++++ internal/router/plugin_api_router.go | 4 ++ internal/schema/plugin_option_schema.go | 6 +++ pkg/converter/markdown.go | 2 + plugin/embed.go | 11 +++++ plugin/plugin.go | 4 ++ ui/.eslintignore | 2 + ui/scripts/plugin.js | 17 ++++++++ ui/src/components/Editor/ToolBars/blockquote.tsx | 2 +- ui/src/components/Editor/ToolBars/bold.tsx | 2 +- ui/src/components/Editor/ToolBars/code.tsx | 2 +- ui/src/components/Editor/ToolBars/heading.tsx | 2 +- ui/src/components/Editor/ToolBars/help.tsx | 2 +- ui/src/components/Editor/ToolBars/image.tsx | 2 +- ui/src/components/Editor/ToolBars/indent.tsx | 2 +- ui/src/components/Editor/ToolBars/italic.tsx | 2 +- ui/src/components/Editor/ToolBars/link.tsx | 2 +- ui/src/components/Editor/ToolBars/ol.tsx | 2 +- ui/src/components/Editor/ToolBars/outdent.tsx | 2 +- ui/src/components/Editor/ToolBars/ul.tsx | 2 +- ui/src/components/Editor/index.scss | 6 +-- ui/src/components/Editor/index.tsx | 3 +- ui/src/components/Editor/toolItem.tsx | 9 ++-- ui/src/components/Editor/utils/index.ts | 41 ++++++++--------- ui/src/components/PluginRender/index.tsx | 2 +- ui/src/components/SchemaForm/components/Button.tsx | 1 - ui/src/components/SchemaForm/components/Switch.tsx | 3 -- ui/src/components/SchemaForm/index.tsx | 3 +- ui/src/pages/Admin/Plugins/Config/index.tsx | 9 +--- .../Questions/Detail/components/Answer/index.tsx | 3 +- .../pages/Review/components/FlagContent/index.tsx | 2 - .../Review/components/QueuedContent/index.tsx | 2 - ui/src/pages/Search/components/Head/index.tsx | 3 +- ui/src/pages/Users/Login/index.tsx | 10 ++--- ui/src/pages/Users/Register/index.tsx | 3 +- ui/src/plugins/builtin/index.ts | 4 +- ui/src/utils/pluginKit/index.ts | 51 +++++++++++++++------- ui/src/utils/pluginKit/interface.ts | 31 ++++++++++++- ui/src/utils/pluginKit/utils.ts | 38 ++-------------- 44 files changed, 350 insertions(+), 122 deletions(-) diff --cc cmd/wire_gen.go index 1fa655d8,1bad939a..8696ce22 --- a/cmd/wire_gen.go +++ b/cmd/wire_gen.go @@@ -265,8 -263,9 +265,9 @@@ func initApplication(debug bool, server userCenterLoginService := user_external_login2.NewUserCenterLoginService(userRepo, userCommon, userExternalLoginRepo, userActiveActivityRepo, siteInfoCommonService) userCenterController := controller.NewUserCenterController(userCenterLoginService, siteInfoCommonService) captchaController := controller.NewCaptchaController() - pluginAPIRouter := router.NewPluginAPIRouter(connectorController, userCenterController, captchaController) + embedController := controller.NewEmbedController() + pluginAPIRouter := router.NewPluginAPIRouter(connectorController, userCenterController, captchaController, embedController) - ginEngine := server.NewHTTPServer(debug, staticRouter, answerAPIRouter, swaggerRouter, uiRouter, authUserMiddleware, avatarMiddleware, shortIDMiddleware, templateRouter, pluginAPIRouter) + ginEngine := server.NewHTTPServer(debug, staticRouter, answerAPIRouter, swaggerRouter, uiRouter, authUserMiddleware, avatarMiddleware, shortIDMiddleware, templateRouter, pluginAPIRouter, uiConf) scheduledTaskManager := cron.NewScheduledTaskManager(siteInfoCommonService, questionService) application := newApplication(serverConf, ginEngine, scheduledTaskManager) return application, func() { diff --cc internal/controller/controller.go index 4db48322,cfaf8f33..9eb64c58 --- a/internal/controller/controller.go +++ b/internal/controller/controller.go @@@ -49,5 -49,5 +49,6 @@@ var ProviderSetController = wire.NewSet NewUserPluginController, NewReviewController, NewCaptchaController, + NewMetaController, + NewEmbedController, ) diff --cc ui/src/utils/pluginKit/index.ts index 95f14780,5a106523..1f7efaca --- a/ui/src/utils/pluginKit/index.ts +++ b/ui/src/utils/pluginKit/index.ts @@@ -17,6 -17,8 +17,8 @@@ * under the License. */ -import React, { RefObject } from 'react'; ++import { RefObject } from 'react'; + import builtin from '@/plugins/builtin'; import * as allPlugins from '@/plugins'; import type * as Type from '@/common/interface';
