1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
shaoying 2022-10-29 09:30:00 +08:00
parent c4108d5875
commit 13856edd6b
2 changed files with 10 additions and 8 deletions

View File

@ -96,6 +96,9 @@ func init() {
m.Option(nfs.CONTENT, m.Cmdx("", TEMPLATE))
}
m.Cmdy(nfs.SAVE, path.Join(m.Option(nfs.PATH), m.Option(nfs.FILE)))
if m.Option(nfs.FILE) == "proto.js" {
m.Cmd("", DEVPACK)
}
}},
nfs.TRASH: {Name: "trash path", Help: "删除", Hand: func(m *ice.Message, arg ...string) {
m.Cmd(nfs.TRASH, arg[0])

View File

@ -15,23 +15,22 @@ const GOODS = "goods"
func init() {
Index.MergeCommands(ice.Commands{
GOODS: {Name: "goods hash@keyboard place@province date@date name@key auto", Help: "商品", Actions: ice.MergeActions(ice.Actions{
mdb.MODIFY: {Name: "modify zone type name text price count image=4@img"},
mdb.CREATE: {Name: "modify zone type name text price count image=4@img"},
GOODS: {Name: "goods hash@keyboard place@province date@date name@key count=_number@keyboard auto music", Help: "商品", Actions: ice.MergeActions(ice.Actions{
mdb.MODIFY: {Name: "modify zone type name text price count image=4@img audio video"},
mdb.CREATE: {Name: "modify zone type name text price count image=4@img audio video"},
web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) { web.Upload(m) }},
"copy": {Hand: func(m *ice.Message, arg ...string) {
m.Cmd("", mdb.CREATE, m.OptionSimple("zone,type,name,text,price,count,image"))
}},
}, mdb.HashAction(mdb.FIELD, "time,hash,zone,type,name,text,price,count,image")), Hand: func(m *ice.Message, arg ...string) {
"copy": {Hand: func(m *ice.Message, arg ...string) { m.Cmd("", mdb.CREATE, m.OptionSimple("zone,type,name,text,price,count,image")) }},
}, mdb.HashAction(mdb.FIELD, "time,hash,zone,type,name,text,price,count,image,audio,video")), Hand: func(m *ice.Message, arg ...string) {
if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT)
m.PushAction("copy", mdb.MODIFY, mdb.REMOVE)
ctx.DisplayLocal(m, "")
} else {
for _, p := range kit.Split(m.Append("image")) {
m.EchoImages(web.MergeURL2(m, web.SHARE_CACHE+p))
}
m.PushAction("play", "stop", "copy", mdb.MODIFY, mdb.REMOVE)
}
m.PushAction("copy", mdb.MODIFY, mdb.REMOVE)
}},
})
}