forked from x/icebergs
add todo
This commit is contained in:
parent
fcdc32b253
commit
f6eab408b7
@ -123,11 +123,6 @@ func init() {
|
||||
m.Cmd(nfs.COPY, ice.GO_MOD, path.Join(ice.SRC_RELEASE, ice.GO_MOD))
|
||||
m.Cmdy(code.WEBPACK, mdb.CREATE, m.OptionSimple(mdb.NAME))
|
||||
}},
|
||||
code.DEVPACK: {Name: "devpack", Help: "开发模式", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmd(nfs.COPY, ice.GO_MOD, path.Join(ice.SRC_DEBUG, ice.GO_MOD))
|
||||
m.Cmd(nfs.COPY, ice.GO_SUM, path.Join(ice.SRC_DEBUG, ice.GO_SUM))
|
||||
m.Cmdy(code.WEBPACK, mdb.REMOVE)
|
||||
}},
|
||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
msg := m.Cmd(aaa.USER, m.Option(ice.MSG_USERNAME))
|
||||
for _, k := range []string{aaa.LANGUAGE, aaa.BACKGROUND, aaa.AVATAR, aaa.USERNICK} {
|
||||
|
@ -35,6 +35,12 @@ func init() {
|
||||
m.Cmd(nfs.COPY, path.Join(ice.USR_RELEASE, "conf.go"), path.Join(ice.USR_ICEBERGS, "conf.go"))
|
||||
m.ProcessInner()
|
||||
}},
|
||||
DEVPACK: {Name: "devpack", Help: "开发模式", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmd(nfs.COPY, ice.GO_MOD, path.Join(ice.SRC_DEBUG, ice.GO_MOD))
|
||||
m.Cmd(nfs.COPY, ice.GO_SUM, path.Join(ice.SRC_DEBUG, ice.GO_SUM))
|
||||
m.Cmdy(WEBPACK, mdb.REMOVE)
|
||||
m.ProcessHold()
|
||||
}},
|
||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Cmdy(INNER, arg) }},
|
||||
}})
|
||||
}
|
||||
|
@ -69,6 +69,10 @@ func init() {
|
||||
PLAN: {Name: "plan scale=week,day,week,month,year,long begin_time@date place@province auto insert export import", Help: "计划", Meta: kit.Dict(
|
||||
ice.Display("/plugin/local/team/plan.js"),
|
||||
), Action: ice.MergeAction(map[string]*ice.Action{
|
||||
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(TODO, mdb.INPUTS, arg)
|
||||
m.Cmdy(TASK, mdb.INPUTS, arg)
|
||||
}},
|
||||
mdb.PLUGIN: {Name: "plugin extra.ctx extra.cmd extra.arg", Help: "插件", Hand: func(m *ice.Message, arg ...string) {
|
||||
_task_modify(m, arg[0], arg[1], arg[2:]...)
|
||||
}},
|
||||
|
30
core/team/todo.go
Normal file
30
core/team/todo.go
Normal file
@ -0,0 +1,30 @@
|
||||
package team
|
||||
|
||||
import (
|
||||
ice "shylinux.com/x/icebergs"
|
||||
"shylinux.com/x/icebergs/base/cli"
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
)
|
||||
|
||||
const TODO = "todo"
|
||||
|
||||
func init() {
|
||||
Index.Merge(&ice.Context{Commands: map[string]*ice.Command{
|
||||
TODO: {Name: "todo hash auto create", Help: "待办", Action: ice.MergeAction(map[string]*ice.Action{
|
||||
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(mdb.INPUTS, m.PrefixKey(), "", mdb.HASH, arg)
|
||||
m.Cmdy(TASK, mdb.INPUTS, arg)
|
||||
}},
|
||||
mdb.CREATE: {Name: "create zone name text", Help: "创建"},
|
||||
cli.START: {Name: "start type=once,step,week", Help: "启动", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmd(TASK, mdb.INSERT, m.OptionSimple("zone,type,name,text"), BEGIN_TIME, m.Time())
|
||||
m.Cmd(mdb.DELETE, m.PrefixKey(), "", mdb.HASH, m.OptionSimple(mdb.HASH))
|
||||
}},
|
||||
}, mdb.HashAction(mdb.FIELD, "time,hash,zone,name,text")), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Fields(len(arg), m.Config(mdb.FIELD))
|
||||
m.Cmdy(mdb.SELECT, m.PrefixKey(), "", mdb.HASH, mdb.HASH, arg)
|
||||
m.PushAction(cli.START, mdb.REMOVE)
|
||||
m.StatusTimeCount()
|
||||
}},
|
||||
}})
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user