mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 17:44:05 +08:00
opt inner.js
This commit is contained in:
parent
ea1b19f7b0
commit
e8623eaba4
@ -184,7 +184,8 @@ func init() {
|
||||
}
|
||||
})
|
||||
m.Display("/plugin/story/pie.js?field=Size")
|
||||
m.RenameAppend("Use%", "Use")
|
||||
m.RenameAppend("%iused", "piused")
|
||||
m.RenameAppend("Use%", "Usep")
|
||||
}},
|
||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
if len(arg) > 0 && arg[0] == BOOTINFO {
|
||||
|
@ -1,9 +1,12 @@
|
||||
package wiki
|
||||
|
||||
import (
|
||||
"path"
|
||||
|
||||
ice "shylinux.com/x/icebergs"
|
||||
"shylinux.com/x/icebergs/base/ctx"
|
||||
"shylinux.com/x/icebergs/base/lex"
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
"shylinux.com/x/icebergs/base/nfs"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
)
|
||||
@ -15,6 +18,14 @@ func init() {
|
||||
DRAW: {Name: DRAW, Help: "思维导图", Value: kit.Data(lex.REGEXP, ".*\\.svg")},
|
||||
}, Commands: map[string]*ice.Command{
|
||||
DRAW: {Name: "draw path=src/main.svg pid refresh:button=auto edit save actions", Help: "思维导图", Meta: kit.Dict(ice.DisplayLocal("")), Action: ice.MergeAction(map[string]*ice.Action{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmd(mdb.RENDER, mdb.CREATE, mdb.TYPE, "svg", mdb.NAME, m.Prefix(DRAW))
|
||||
}},
|
||||
mdb.RENDER: {Name: "render", Help: "渲染", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Echo("<html><body>")
|
||||
defer m.Echo("</body></html>")
|
||||
m.Cmdy(nfs.CAT, path.Join(arg[2], arg[1]))
|
||||
}},
|
||||
nfs.SAVE: {Name: "save", Help: "保存", Hand: func(m *ice.Message, arg ...string) {
|
||||
_wiki_save(m, DRAW, arg[0], m.Option("content"))
|
||||
}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user