Skip to content

Commit cf8eca6

Browse files
author
cg33
committed
feat(plugins): update plugins api
1 parent 378068b commit cf8eca6

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

controller/common.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package controller
22

33
import (
44
"github.com/GoAdminGroup/go-admin/context"
5-
"github.com/GoAdminGroup/go-admin/plugins"
5+
"github.com/GoAdminGroup/go-admin/template"
66
"github.com/GoAdminGroup/go-admin/template/types"
77
"github.com/GoAdminGroup/librarian/modules/constant"
88
"github.com/GoAdminGroup/librarian/modules/root"
@@ -12,7 +12,7 @@ type Handler struct {
1212
roots *root.Roots
1313
theme string
1414

15-
HTML func(ctx *context.Context, panel types.Panel, options ...plugins.HTMLOptions)
15+
HTML func(ctx *context.Context, panel types.Panel, options ...template.ExecuteOptions)
1616
}
1717

1818
func NewHandler(root *root.Roots, theme string) *Handler {

controller/view.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ package controller
33
import (
44
"io/ioutil"
55

6+
"github.com/GoAdminGroup/go-admin/template"
7+
68
"github.com/GoAdminGroup/go-admin/context"
7-
"github.com/GoAdminGroup/go-admin/plugins"
89
"github.com/GoAdminGroup/go-admin/template/types"
910
"github.com/GoAdminGroup/librarian/guard"
1011
"github.com/GoAdminGroup/librarian/modules/theme"
@@ -28,7 +29,7 @@ func (h *Handler) View(ctx *context.Context) {
2829
Content: theme.Get(h.theme).HTML(md),
2930
CSS: theme.Get(h.theme).CSS(),
3031
JS: theme.Get(h.theme).JS(),
31-
}, plugins.HTMLOptions{
32+
}, template.ExecuteOptions{
3233
NoCompress: true,
3334
Animation: true,
3435
})

librarian.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,16 @@ var info = plugins.Info{
161161
Website: "http://www.go-admin.cn/plugins/detail/TzgE2RAYGqnCgEt7TK",
162162
Title: "Librarian",
163163
Description: "Help you quickly build a online markdown viewer.",
164-
Version: "v0.0.4",
164+
Version: "v0.0.5",
165165
Author: "Official",
166-
Url: "https://github.com/GoAdminGroup/librarian/archive/v0.0.4.zip",
166+
Url: "https://github.com/GoAdminGroup/librarian/archive/v0.0.5.zip",
167167
Cover: "",
168168
Agreement: "",
169169
Uuid: "TzgE2RAYGqnCgEt7TK",
170170
Name: Name,
171171
ModulePath: "github.com/GoAdminGroup/librarian",
172172
CreateDate: utils.ParseTime("2020-04-19"),
173-
UpdateDate: utils.ParseTime("2020-08-02"),
173+
UpdateDate: utils.ParseTime("2020-08-03"),
174174
}
175175

176176
func (l *Librarian) AddRoot(key string, value root.Root) *Librarian {

0 commit comments

Comments
 (0)