mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt draw
This commit is contained in:
parent
8739c8fa6f
commit
edb7962b20
@ -365,7 +365,7 @@ var Index = &ice.Context{Name: "nfs", Help: "存储模块",
|
||||
_file_list(m, kit.Select("./", m.Option(DIR_ROOT)), arg[0],
|
||||
0, m.Options(DIR_DEEP), kit.Select(TYPE_BOTH, m.Option(DIR_TYPE)), reg,
|
||||
kit.Split(kit.Select("time size path", strings.Join(arg[1:], " "))))
|
||||
m.Sort(kit.MDB_TIME, "time_r")
|
||||
m.SortTimeR(kit.MDB_TIME)
|
||||
}},
|
||||
FILE: {Name: "file path auto", Help: "文件", Action: map[string]*ice.Action{
|
||||
mdb.SEARCH: {Name: "search type name text", Help: "搜索", Hand: func(m *ice.Message, arg ...string) {
|
||||
|
@ -264,6 +264,12 @@ func init() {
|
||||
if m.Warn(res.StatusCode != http.StatusOK, res.Status) {
|
||||
m.Set(ice.MSG_RESULT)
|
||||
// return
|
||||
switch res.StatusCode {
|
||||
case http.StatusNotFound:
|
||||
return
|
||||
default:
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 缓存变量
|
||||
|
@ -16,7 +16,7 @@ func init() {
|
||||
DRAW: {Name: DRAW, Help: "思维导图", Value: kit.Data(kit.MDB_PATH, "", "regs", ".*\\.svg")},
|
||||
},
|
||||
Commands: map[string]*ice.Command{
|
||||
DRAW: {Name: "draw path=src/ file=main.svg 刷新:button=auto 编辑 save 项目 变参", Help: "思维导图", Meta: kit.Dict(
|
||||
DRAW: {Name: "draw path=src/ file=main.svg 刷新:button=auto 编辑 save 项目 参数", Help: "思维导图", Meta: kit.Dict(
|
||||
"display", "/plugin/local/wiki/draw.js", "style", "drawer",
|
||||
), Action: map[string]*ice.Action{
|
||||
nfs.SAVE: {Name: "save", Help: "保存", Hand: func(m *ice.Message, arg ...string) {
|
||||
@ -25,9 +25,6 @@ func init() {
|
||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
if !_wiki_list(m, DRAW, kit.Select("./", path.Join(arg...))) {
|
||||
_wiki_show(m, DRAW, path.Join(arg...))
|
||||
if m.Result(0) == ice.ErrWarn {
|
||||
m.Set(ice.MSG_RESULT)
|
||||
}
|
||||
}
|
||||
}},
|
||||
},
|
||||
|
@ -24,7 +24,6 @@ func init() {
|
||||
}},
|
||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
_wiki_list(m, FEEL, kit.Select("./", arg, 0))
|
||||
m.SortTimeR(kit.MDB_TIME)
|
||||
}},
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user