Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 添加webui的初步支持 #63

Merged
merged 11 commits into from
Sep 26, 2021
Merged

feat: 添加webui的初步支持 #63

merged 11 commits into from
Sep 26, 2021

Conversation

huoxue1
Copy link
Contributor

@huoxue1 huoxue1 commented Sep 21, 2021

使用gin监听server,前端使用vuecli

目前已支持:

  • 前端发送信息
  • 前端获取信息
  • 获取插件列表

预计实现功能:

  • 改变插件状态
  • 获取日志
  • 获取配置信息
  • 改变配置信息
  • 获取好友请求列表以及群请求列表
  • 手动同意申请列表

示例

使用gin监听server,前端使用vuecli
目前已支持:
   前端发送信息
   前端获取信息
   获取插件列表
预计实现功能:

改变插件状态
  获取日志
  获取配置信息
  改变配置信息
  获取好友请求列表以及群请求列表
  手动同意申请列表
@fumiama
Copy link
Member

fumiama commented Sep 21, 2021

  • 建议把各处理函数写为private
  • 建议可以把前端也移动到FloatTech以方便部署

@huoxue1
Copy link
Contributor Author

huoxue1 commented Sep 21, 2021

好的👌

@@ -57,6 +60,10 @@ var (
)

func init() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议加一个命令行参数决定是否启用前端

control/gui.go Outdated
go controller()
// 注册消息handle
messageHandle()
engine = Register("gui", &Options{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里没必要用engine,因为这个webui一旦打开无法关闭,可以参考刚才说的命令行控制。

control/gui.go Outdated
defer func() {
err := recover()
if err != nil {
log.Errorln("bot-manager出现不可恢复的错误")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议统一格式[gui] xxxx

@fumiama fumiama merged commit 73ac9b2 into FloatTech:master Sep 26, 2021
starim00 pushed a commit to starim00/ZeroBot-Plugin that referenced this pull request Sep 30, 2021
* feat: 添加webui的初步支持

使用gin监听server,前端使用vuecli
目前已支持:
   前端发送信息
   前端获取信息
   获取插件列表
预计实现功能:

改变插件状态
  获取日志
  获取配置信息
  改变配置信息
  获取好友请求列表以及群请求列表
  手动同意申请列表

* feat: 继续实现webui功能

改变插件状态
  获取日志
  获取配置信息
  前端仓库位置更改

* fix: 修复golangLint的提示信息

* 🎨 改进代码样式

* Update gui.go

* fix: 修复golangLint的提示信息

* fix: 修复golangLint的提示信息

* feat: 支持通过命令行参数禁用gui

* fix: 设置gin在非debug模式下禁用日志

* Update gui.go

* Update gui.go

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com>
fumiama added a commit that referenced this pull request Oct 14, 2021
* feat: 添加webui的初步支持

使用gin监听server,前端使用vuecli
目前已支持:
   前端发送信息
   前端获取信息
   获取插件列表
预计实现功能:

改变插件状态
  获取日志
  获取配置信息
  改变配置信息
  获取好友请求列表以及群请求列表
  手动同意申请列表

* feat: 继续实现webui功能

改变插件状态
  获取日志
  获取配置信息
  前端仓库位置更改

* fix: 修复golangLint的提示信息

* 🎨 改进代码样式

* Update gui.go

* fix: 修复golangLint的提示信息

* fix: 修复golangLint的提示信息

* feat: 支持通过命令行参数禁用gui

* fix: 设置gin在非debug模式下禁用日志

* Update gui.go

* Update gui.go

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com>
starim00 pushed a commit to starim00/ZeroBot-Plugin that referenced this pull request Oct 16, 2021
* feat: 添加webui的初步支持

使用gin监听server,前端使用vuecli
目前已支持:
   前端发送信息
   前端获取信息
   获取插件列表
预计实现功能:

改变插件状态
  获取日志
  获取配置信息
  改变配置信息
  获取好友请求列表以及群请求列表
  手动同意申请列表

* feat: 继续实现webui功能

改变插件状态
  获取日志
  获取配置信息
  前端仓库位置更改

* fix: 修复golangLint的提示信息

* 🎨 改进代码样式

* Update gui.go

* fix: 修复golangLint的提示信息

* fix: 修复golangLint的提示信息

* feat: 支持通过命令行参数禁用gui

* fix: 设置gin在非debug模式下禁用日志

* Update gui.go

* Update gui.go

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants