Feature gui 20230219 (#597)

*  添加gui

* 🐛 添加位置

*  修改为0.0.0.0

*  添加webui说明

* 🎨 修改为本地

*  添加webui默认url

* 📝 修改readme

* 🎨 修改方法名

*  修改readme

* 🎨 修改命令

* 🎨 更新包

* 🎨 调整位置
This commit is contained in:
himawari
2023-03-08 00:44:47 +08:00
committed by GitHub
parent 4ef6f584c9
commit bb844eaa40
4 changed files with 176 additions and 7 deletions

View File

@@ -192,6 +192,7 @@ import (
"github.com/wdvxdr1123/ZeroBot/message"
"github.com/FloatTech/ZeroBot-Plugin/kanban/banner"
webctrl "github.com/FloatTech/zbputils/control/web"
// -----------------------以上为内置依赖,勿动------------------------ //
)
@@ -209,6 +210,7 @@ func init() {
d := flag.Bool("d", false, "Enable debug level log and higher.")
w := flag.Bool("w", false, "Enable warning level log and higher.")
h := flag.Bool("h", false, "Display this help.")
g := flag.String("g", "127.0.0.1:3000", "Set webui url.")
// 直接写死 AccessToken 时,请更改下面第二个参数
token := flag.String("t", "", "Set AccessToken of WSClient.")
// 直接写死 URL 时,请更改下面第二个参数
@@ -245,6 +247,9 @@ func init() {
sus = append(sus, i)
}
// 启用 gui
go webctrl.RunGui(*g)
// 通过代码写死的方式添加主人账号
// sus = append(sus, 12345678)
// sus = append(sus, 87654321)