mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
add some
This commit is contained in:
parent
b5f1c75ddc
commit
33194101bf
@ -69,6 +69,9 @@ func init() {
|
|||||||
if _, ok := cmd.Actions[RUN]; !ok {
|
if _, ok := cmd.Actions[RUN]; !ok {
|
||||||
cmd.Actions[RUN] = &ice.Action{Hand: Run}
|
cmd.Actions[RUN] = &ice.Action{Hand: Run}
|
||||||
}
|
}
|
||||||
|
if _, ok := cmd.Actions[mdb.INPUTS]; !ok {
|
||||||
|
cmd.Actions[mdb.INPUTS] = &ice.Action{Hand: func(m *ice.Message, arg ...string) { mdb.HashInputs(m, arg) }}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}},
|
}},
|
||||||
mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) {
|
mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -18,7 +18,11 @@ func Render(m *ice.Message, cmd string, arg ...ice.Any) (res string) {
|
|||||||
return res
|
return res
|
||||||
default:
|
default:
|
||||||
if res = m.Result(); res == "" {
|
if res = m.Result(); res == "" {
|
||||||
res = m.TableEchoWithStatus().Result()
|
if m.IsCliUA() {
|
||||||
|
res = m.TableEchoWithStatus().Result()
|
||||||
|
} else {
|
||||||
|
res = m.TableEcho().Result()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if fmt.Fprint(m.O, res); !strings.HasSuffix(res, lex.NL) {
|
if fmt.Fprint(m.O, res); !strings.HasSuffix(res, lex.NL) {
|
||||||
|
@ -150,6 +150,18 @@ func init() {
|
|||||||
m.Cmdy(SPACE, m.Option(mdb.NAME), SPACE, mdb.INPUTS, arg)
|
m.Cmdy(SPACE, m.Option(mdb.NAME), SPACE, mdb.INPUTS, arg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
switch m.Option(ctx.ACTION) {
|
||||||
|
case nfs.CAT:
|
||||||
|
switch arg[0] {
|
||||||
|
case nfs.FILE:
|
||||||
|
m.Options(nfs.DIR_TYPE, nfs.TYPE_CAT, ice.MSG_FIELDS, nfs.PATH)
|
||||||
|
m.Cmdy(nfs.DIR, "src/")
|
||||||
|
m.Cmdy(nfs.DIR, "etc/")
|
||||||
|
m.Cmdy(nfs.DIR, "")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
switch arg[0] {
|
switch arg[0] {
|
||||||
case mdb.NAME, nfs.TEMPLATE:
|
case mdb.NAME, nfs.TEMPLATE:
|
||||||
_dream_list(m).Cut("name,status,time")
|
_dream_list(m).Cut("name,status,time")
|
||||||
@ -165,9 +177,10 @@ func init() {
|
|||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
mdb.CREATE: {Name: "create name*=hi icon@icon repos binary template", Hand: func(m *ice.Message, arg ...string) {
|
mdb.CREATE: {Name: "create name*=hi icon@icon repos binary template", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.OptionDefault(mdb.ICON, nfs.USR_ICONS_ICEBERGS)
|
|
||||||
m.Option(nfs.REPOS, kit.Select("", kit.Slice(kit.Split(m.Option(nfs.REPOS)), -1), 0))
|
|
||||||
kit.If(!strings.Contains(m.Option(mdb.NAME), "-") || !strings.HasPrefix(m.Option(mdb.NAME), "20"), func() { m.Option(mdb.NAME, m.Time("20060102-")+m.Option(mdb.NAME)) })
|
kit.If(!strings.Contains(m.Option(mdb.NAME), "-") || !strings.HasPrefix(m.Option(mdb.NAME), "20"), func() { m.Option(mdb.NAME, m.Time("20060102-")+m.Option(mdb.NAME)) })
|
||||||
|
m.OptionDefault(nfs.REPOS, mdb.Config(m, nfs.REPOS)+m.Option(mdb.NAME))
|
||||||
|
m.Option(nfs.REPOS, kit.Select("", kit.Slice(kit.Split(m.Option(nfs.REPOS)), -1), 0))
|
||||||
|
m.OptionDefault(mdb.ICON, nfs.USR_ICONS_ICEBERGS)
|
||||||
if mdb.HashCreate(m); !m.IsCliUA() {
|
if mdb.HashCreate(m); !m.IsCliUA() {
|
||||||
_dream_start(m, m.OptionDefault(mdb.NAME, path.Base(m.Option(nfs.REPOS))))
|
_dream_start(m, m.OptionDefault(mdb.NAME, path.Base(m.Option(nfs.REPOS))))
|
||||||
}
|
}
|
||||||
@ -239,6 +252,7 @@ func init() {
|
|||||||
m.Push(mdb.NAME, value[mdb.NAME])
|
m.Push(mdb.NAME, value[mdb.NAME])
|
||||||
m.Push(mdb.TEXT, m.Cmdx(SPACE, value[mdb.NAME], nfs.CAT, m.Option(nfs.FILE)))
|
m.Push(mdb.TEXT, m.Cmdx(SPACE, value[mdb.NAME], nfs.CAT, m.Option(nfs.FILE)))
|
||||||
})
|
})
|
||||||
|
m.StatusTimeCount(nfs.FILE, m.Option(nfs.FILE))
|
||||||
}},
|
}},
|
||||||
ice.CMD: {Name: "cmd cmd*", Help: "命令", Hand: func(m *ice.Message, arg ...string) {
|
ice.CMD: {Name: "cmd cmd*", Help: "命令", Hand: func(m *ice.Message, arg ...string) {
|
||||||
GoToast(m, "", func(toast func(string, int, int)) []string {
|
GoToast(m, "", func(toast func(string, int, int)) []string {
|
||||||
|
@ -12,6 +12,7 @@ import (
|
|||||||
"shylinux.com/x/icebergs/base/aaa"
|
"shylinux.com/x/icebergs/base/aaa"
|
||||||
"shylinux.com/x/icebergs/base/cli"
|
"shylinux.com/x/icebergs/base/cli"
|
||||||
"shylinux.com/x/icebergs/base/ctx"
|
"shylinux.com/x/icebergs/base/ctx"
|
||||||
|
"shylinux.com/x/icebergs/base/gdb"
|
||||||
"shylinux.com/x/icebergs/base/lex"
|
"shylinux.com/x/icebergs/base/lex"
|
||||||
"shylinux.com/x/icebergs/base/log"
|
"shylinux.com/x/icebergs/base/log"
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
@ -226,7 +227,7 @@ func init() {
|
|||||||
cli.Opens(m, mdb.Config(m, cli.OPEN))
|
cli.Opens(m, mdb.Config(m, cli.OPEN))
|
||||||
})
|
})
|
||||||
}},
|
}},
|
||||||
}, mdb.HashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,status,name,proto,host,port"), mdb.ClearOnExitHashAction()), Hand: func(m *ice.Message, arg ...string) {
|
}, gdb.EventsAction(SERVE_START), mdb.HashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,status,name,proto,host,port"), mdb.ClearOnExitHashAction()), Hand: func(m *ice.Message, arg ...string) {
|
||||||
mdb.HashSelect(m, arg...).Options(ice.MSG_ACTION, "").StatusTimeCount(kit.Dict(ice.MAIN, mdb.Config(m, ice.MAIN)))
|
mdb.HashSelect(m, arg...).Options(ice.MSG_ACTION, "").StatusTimeCount(kit.Dict(ice.MAIN, mdb.Config(m, ice.MAIN)))
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
|
@ -89,6 +89,7 @@ func init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Options("volcano", web.UserHost(m), nfs.VERSION, web.RenderVersion(m))
|
m.Options("volcano", web.UserHost(m), nfs.VERSION, web.RenderVersion(m))
|
||||||
|
m.Options(ice.MSG_USERWEB, tcp.PublishLocalhost(m, m.Option(ice.MSG_USERWEB)))
|
||||||
m.Options(ice.MSG_USERWEB, kit.MergeURL(m.Option(ice.MSG_USERWEB), web.SHARE, m.Cmdx(web.SHARE, mdb.CREATE, mdb.TYPE, web.LOGIN)))
|
m.Options(ice.MSG_USERWEB, kit.MergeURL(m.Option(ice.MSG_USERWEB), web.SHARE, m.Cmdx(web.SHARE, mdb.CREATE, mdb.TYPE, web.LOGIN)))
|
||||||
m.Cmdy(aaa.EMAIL, aaa.SEND, arg, aaa.CONTENT, nfs.Template(m, "email.html"))
|
m.Cmdy(aaa.EMAIL, aaa.SEND, arg, aaa.CONTENT, nfs.Template(m, "email.html"))
|
||||||
}},
|
}},
|
||||||
|
@ -4,7 +4,7 @@ fieldset.macos.desktop>div.output>fieldset.macos { background-color:var(--plugin
|
|||||||
fieldset.macos.desktop>div.output>fieldset.macos>div.output { background-color:transparent; }
|
fieldset.macos.desktop>div.output>fieldset.macos>div.output { background-color:transparent; }
|
||||||
fieldset.macos.desktop>div.output>fieldset.macos.menu { line-height:25px; border-radius:0; height:25px; width:100%; position:absolute; top:0; overflow:hidden; }
|
fieldset.macos.desktop>div.output>fieldset.macos.menu { line-height:25px; border-radius:0; height:25px; width:100%; position:absolute; top:0; overflow:hidden; }
|
||||||
fieldset.macos.desktop>div.output>fieldset.macos.menu div.menu:hover { background-color:var(--hover-bg-color); }
|
fieldset.macos.desktop>div.output>fieldset.macos.menu div.menu:hover { background-color:var(--hover-bg-color); }
|
||||||
fieldset.macos.desktop>div.output>fieldset.macos.menu div.menu.create { font-size:24px; line-height:20px; height:25px; }
|
fieldset.macos.desktop>div.output>fieldset.macos.menu div.menu.icon { font-size:24px; line-height:20px; height:25px; padding:0 10px; }
|
||||||
fieldset.macos.desktop>div.output>fieldset.macos.menu>div.output { overflow:hidden; }
|
fieldset.macos.desktop>div.output>fieldset.macos.menu>div.output { overflow:hidden; }
|
||||||
fieldset.macos.desktop>div.output>fieldset.macos.dock { border:var(--box-border); border-radius:20px; position:absolute; bottom:10px; transition:margin-left 0.3s; }
|
fieldset.macos.desktop>div.output>fieldset.macos.dock { border:var(--box-border); border-radius:20px; position:absolute; bottom:10px; transition:margin-left 0.3s; }
|
||||||
fieldset.macos.desktop>div.output>fieldset.macos.searchs { position:absolute; z-index:100; }
|
fieldset.macos.desktop>div.output>fieldset.macos.searchs { position:absolute; z-index:100; }
|
||||||
|
@ -6,6 +6,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) { can.page.style(can, can._ou
|
|||||||
return {view: [html.ITEM], list: [{img: can.page.drawText(can, item.name||item.index, 25, 0, 20)}], onclick: function(event) { can.sup.onexport.record(can, item) }}
|
return {view: [html.ITEM], list: [{img: can.page.drawText(can, item.name||item.index, 25, 0, 20)}], onclick: function(event) { can.sup.onexport.record(can, item) }}
|
||||||
}), [
|
}), [
|
||||||
{view: [html.MENU, "", can.ConfSpace()||can.misc.Search(can, ice.POD)||location.host], onclick: function(event) { can.sup.onexport.record(can, html.DESKTOP) }},
|
{view: [html.MENU, "", can.ConfSpace()||can.misc.Search(can, ice.POD)||location.host], onclick: function(event) { can.sup.onexport.record(can, html.DESKTOP) }},
|
||||||
{view: [[html.MENU, mdb.CREATE], "", can.page.unicode.create], onclick: function(event) { can.sup.onexport.record(can, mdb.CREATE) }},
|
{view: [[html.MENU, mdb.ICON, web.REFRESH], "", can.page.unicode.refresh], onclick: function(event) { can.user.reload(true) }},
|
||||||
|
{view: [[html.MENU, mdb.ICON, mdb.CREATE], "", can.page.unicode.create], onclick: function(event) { can.sup.onexport.record(can, mdb.CREATE) }},
|
||||||
]))
|
]))
|
||||||
}})
|
}})
|
||||||
|
@ -2,8 +2,6 @@ package oauth
|
|||||||
|
|
||||||
import "shylinux.com/x/ice"
|
import "shylinux.com/x/ice"
|
||||||
|
|
||||||
type Server struct {
|
type Server struct{ ice.Hash }
|
||||||
ice.Hash
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { ice.ChatCtxCmd(Client{}) }
|
func init() { ice.ChatCtxCmd(Client{}) }
|
||||||
|
@ -50,7 +50,10 @@ func _binpack_all(m *ice.Message) {
|
|||||||
defer fmt.Fprintln(w, nfs.Template(m, "binpack_end.go"))
|
defer fmt.Fprintln(w, nfs.Template(m, "binpack_end.go"))
|
||||||
defer fmt.Fprint(w, lex.TB)
|
defer fmt.Fprint(w, lex.TB)
|
||||||
nfs.OptionFiles(m, nfs.DiskFile)
|
nfs.OptionFiles(m, nfs.DiskFile)
|
||||||
kit.For([]string{ice.USR_VOLCANOS, ice.USR_INTSHELL, ice.SRC}, func(p string) { _binpack_dir(m, w, p) })
|
kit.If(m.Option(ice.MSG_USERPOD) == "", func() {
|
||||||
|
kit.For([]string{ice.USR_VOLCANOS, ice.USR_INTSHELL}, func(p string) { _binpack_dir(m, w, p) })
|
||||||
|
})
|
||||||
|
kit.For([]string{ice.SRC}, func(p string) { _binpack_dir(m, w, p) })
|
||||||
kit.For([]string{
|
kit.For([]string{
|
||||||
ice.ETC_MISS_SH, ice.ETC_INIT_SHY, ice.ETC_LOCAL_SHY, ice.ETC_EXIT_SHY, ice.ETC_PATH,
|
ice.ETC_MISS_SH, ice.ETC_INIT_SHY, ice.ETC_LOCAL_SHY, ice.ETC_EXIT_SHY, ice.ETC_PATH,
|
||||||
ice.README_MD, ice.MAKEFILE, ice.LICENSE, ice.GO_MOD, ice.GO_SUM,
|
ice.README_MD, ice.MAKEFILE, ice.LICENSE, ice.GO_MOD, ice.GO_SUM,
|
||||||
|
@ -27,11 +27,12 @@ func _install_path(m *ice.Message, link string) string {
|
|||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func _install_download(m *ice.Message) {
|
func _install_download(m *ice.Message, arg ...string) {
|
||||||
link := m.Option(web.LINK)
|
link := kit.Select(m.Option(web.LINK), arg, 0)
|
||||||
name := path.Base(kit.ParseURL(link).Path)
|
name := path.Base(kit.ParseURL(link).Path)
|
||||||
// file := path.Join(kit.Select(ice.USR_INSTALL, m.Option(nfs.PATH)), name)
|
// file := path.Join(kit.Select(ice.USR_INSTALL, m.Option(nfs.PATH)), name)
|
||||||
file := path.Join(ice.USR_INSTALL, name)
|
file := path.Join(kit.Select(ice.USR_INSTALL, arg, 1), name)
|
||||||
|
// file := path.Join(ice.USR_INSTALL, name)
|
||||||
defer m.Cmdy(nfs.DIR, file)
|
defer m.Cmdy(nfs.DIR, file)
|
||||||
if nfs.Exists(m, file) {
|
if nfs.Exists(m, file) {
|
||||||
return
|
return
|
||||||
@ -170,7 +171,7 @@ const INSTALL = "install"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
INSTALL: {Name: "install name port path:text auto download", Help: "安装", Actions: ice.MergeActions(ice.Actions{
|
INSTALL: {Name: "install name port path:text auto download", Help: "安装", Actions: ice.MergeActions(ice.Actions{
|
||||||
web.DOWNLOAD: {Name: "download link* path", Hand: func(m *ice.Message, arg ...string) { _install_download(m) }},
|
web.DOWNLOAD: {Name: "download link* path", Hand: func(m *ice.Message, arg ...string) { _install_download(m, arg...) }},
|
||||||
cli.BUILD: {Name: "build link*", Hand: func(m *ice.Message, arg ...string) {
|
cli.BUILD: {Name: "build link*", Hand: func(m *ice.Message, arg ...string) {
|
||||||
web.PushStream(m)
|
web.PushStream(m)
|
||||||
if err := _install_build(m, arg...); m.Warn(err != "", err) {
|
if err := _install_build(m, arg...); m.Warn(err != "", err) {
|
||||||
|
@ -32,7 +32,7 @@ func _plan_scope(m *ice.Message, arg ...string) (begin_time, end_time time.Time)
|
|||||||
return begin_time, end_time
|
return begin_time, end_time
|
||||||
}
|
}
|
||||||
func _plan_list(m *ice.Message, begin_time, end_time string) {
|
func _plan_list(m *ice.Message, begin_time, end_time string) {
|
||||||
m.Options(mdb.CACHE_LIMIT, "-1").OptionFields("begin_time,close_time,zone,id,level,status,score,type,name,text,extra")
|
m.Options(mdb.CACHE_LIMIT, "-1").OptionFields("begin_time,end_time,zone,id,status,level,score,type,name,text,extra")
|
||||||
m.Cmd(mdb.SELECT, m.Prefix(TASK), "", mdb.ZONE, mdb.FOREACH, func(key string, fields []string, value, val ice.Map) {
|
m.Cmd(mdb.SELECT, m.Prefix(TASK), "", mdb.ZONE, mdb.FOREACH, func(key string, fields []string, value, val ice.Map) {
|
||||||
if begin_time <= kit.Format(value[BEGIN_TIME]) && kit.Format(value[BEGIN_TIME]) < end_time {
|
if begin_time <= kit.Format(value[BEGIN_TIME]) && kit.Format(value[BEGIN_TIME]) < end_time {
|
||||||
m.Push(key, value, fields, val).PushButton(_task_action(m, value[STATUS], mdb.PLUGIN))
|
m.Push(key, value, fields, val).PushButton(_task_action(m, value[STATUS], mdb.PLUGIN))
|
||||||
|
@ -32,7 +32,7 @@ func _task_modify(m *ice.Message, field, value string, arg ...string) {
|
|||||||
case PROCESS:
|
case PROCESS:
|
||||||
arg = append(arg, BEGIN_TIME, m.Time())
|
arg = append(arg, BEGIN_TIME, m.Time())
|
||||||
case CANCEL, FINISH:
|
case CANCEL, FINISH:
|
||||||
arg = append(arg, CLOSE_TIME, m.Time())
|
arg = append(arg, END_TIME, m.Time())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mdb.ZoneModify(m, field, value, arg)
|
mdb.ZoneModify(m, field, value, arg)
|
||||||
@ -51,7 +51,6 @@ const (
|
|||||||
)
|
)
|
||||||
const (
|
const (
|
||||||
BEGIN_TIME = "begin_time"
|
BEGIN_TIME = "begin_time"
|
||||||
CLOSE_TIME = "close_time"
|
|
||||||
END_TIME = "end_time"
|
END_TIME = "end_time"
|
||||||
|
|
||||||
STATUS = "status"
|
STATUS = "status"
|
||||||
@ -78,7 +77,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
kit.If(arg[0] == mdb.ZONE, func() { m.Push(arg[0], kit.Split(nfs.TemplateText(m, mdb.ZONE))) })
|
kit.If(arg[0] == mdb.ZONE, func() { m.Push(arg[0], kit.Split(nfs.TemplateText(m, mdb.ZONE))) })
|
||||||
}},
|
}},
|
||||||
mdb.INSERT: {Name: "insert space zone* type=once,step,week name* text begin_time@date close_time@date", Hand: func(m *ice.Message, arg ...string) {
|
mdb.INSERT: {Name: "insert space zone* type=once,step,week name* text begin_time@date end_time@date", Hand: func(m *ice.Message, arg ...string) {
|
||||||
if space, arg := arg[1], arg[2:]; space != "" {
|
if space, arg := arg[1], arg[2:]; space != "" {
|
||||||
m.Cmdy(web.SPACE, space, TASK, mdb.INSERT, web.SPACE, "", arg)
|
m.Cmdy(web.SPACE, space, TASK, mdb.INSERT, web.SPACE, "", arg)
|
||||||
} else {
|
} else {
|
||||||
@ -89,7 +88,7 @@ func init() {
|
|||||||
CANCEL: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, CANCEL) }},
|
CANCEL: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, CANCEL) }},
|
||||||
BEGIN: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, PROCESS) }},
|
BEGIN: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, PROCESS) }},
|
||||||
END: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, FINISH) }},
|
END: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, FINISH) }},
|
||||||
}, mdb.ExportZoneAction(mdb.FIELDS, "begin_time,close_time,id,status,level,score,type,name,text")), Hand: func(m *ice.Message, arg ...string) {
|
}, mdb.ExportZoneAction(mdb.FIELDS, "begin_time,end_time,id,status,level,score,type,name,text")), Hand: func(m *ice.Message, arg ...string) {
|
||||||
if mdb.ZoneSelect(m, arg...); len(arg) > 0 && arg[0] != "" {
|
if mdb.ZoneSelect(m, arg...); len(arg) > 0 && arg[0] != "" {
|
||||||
status := map[string]int{}
|
status := map[string]int{}
|
||||||
m.Table(func(value ice.Maps) { m.PushButton(_task_action(m, value[STATUS])) })
|
m.Table(func(value ice.Maps) { m.PushButton(_task_action(m, value[STATUS])) })
|
||||||
|
@ -440,10 +440,11 @@ func init() {
|
|||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
INIT: {Name: "init origin* path", Hand: func(m *ice.Message, arg ...string) {
|
INIT: {Name: "init origin* path", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd(nfs.DEFS, kit.Path(".git/config"), kit.Format(nfs.Template(m, CONFIG), m.Option(ORIGIN)))
|
m.OptionDefault(nfs.PATH, kit.Path(""))
|
||||||
m.Cmd(nfs.DEFS, kit.Path(".gitignore"), nfs.Template(m, IGNORE))
|
m.Cmd(nfs.DEFS, path.Join(m.Option(nfs.PATH), ".git/config"), kit.Format(nfs.Template(m, CONFIG), m.Option(ORIGIN)))
|
||||||
|
m.Cmd(nfs.DEFS, path.Join(m.Option(nfs.PATH), ".gitignore"), nfs.Template(m, IGNORE))
|
||||||
git.PlainInit(m.Option(nfs.PATH), false)
|
git.PlainInit(m.Option(nfs.PATH), false)
|
||||||
_repos_insert(m, kit.Path(""))
|
_repos_insert(m, m.Option(nfs.PATH))
|
||||||
m.ProcessRefresh()
|
m.ProcessRefresh()
|
||||||
}},
|
}},
|
||||||
REMOTE: {Hand: func(m *ice.Message, arg ...string) {
|
REMOTE: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
@ -595,16 +596,6 @@ func init() {
|
|||||||
web.DREAM_TRASH: {Hand: func(m *ice.Message, arg ...string) {
|
web.DREAM_TRASH: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd("", mdb.REMOVE, kit.Dict(REPOS, m.Option(mdb.NAME)))
|
m.Cmd("", mdb.REMOVE, kit.Dict(REPOS, m.Option(mdb.NAME)))
|
||||||
}},
|
}},
|
||||||
web.DREAM_TABLES: {Hand: func(m *ice.Message, arg ...string) {
|
|
||||||
if !kit.IsIn(m.Option(mdb.TYPE), web.WORKER, web.SERVER) {
|
|
||||||
return
|
|
||||||
} else if !nfs.Exists(m, path.Join(ice.USR_LOCAL_WORK, m.Option(mdb.NAME), ".git")) {
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
m.PushButton(kit.Dict(m.CommandKey(), "源码"))
|
|
||||||
}
|
|
||||||
}},
|
|
||||||
web.DREAM_ACTION: {Hand: func(m *ice.Message, arg ...string) { web.DreamProcess(m, []string{}, arg...) }},
|
|
||||||
}, aaa.RoleAction(REMOTE), web.DreamAction(), mdb.HashAction(mdb.SHORT, REPOS, mdb.FIELD, "time,repos,branch,version,message,origin"), mdb.ClearOnExitHashAction()), Hand: func(m *ice.Message, arg ...string) {
|
}, aaa.RoleAction(REMOTE), web.DreamAction(), mdb.HashAction(mdb.SHORT, REPOS, mdb.FIELD, "time,repos,branch,version,message,origin"), mdb.ClearOnExitHashAction()), Hand: func(m *ice.Message, arg ...string) {
|
||||||
if len(arg) == 0 {
|
if len(arg) == 0 {
|
||||||
mdb.HashSelect(m, arg...).Sort(REPOS).PushAction(STATUS, mdb.REMOVE).Action(STATUS, PULL, PUSH, CLONE)
|
mdb.HashSelect(m, arg...).Sort(REPOS).PushAction(STATUS, mdb.REMOVE).Action(STATUS, PULL, PUSH, CLONE)
|
||||||
@ -635,3 +626,6 @@ func ReposList(m *ice.Message) *ice.Message {
|
|||||||
func ReposClone(m *ice.Message, arg ...string) *ice.Message {
|
func ReposClone(m *ice.Message, arg ...string) *ice.Message {
|
||||||
return m.Cmdy(web.CODE_GIT_REPOS, CLONE, arg)
|
return m.Cmdy(web.CODE_GIT_REPOS, CLONE, arg)
|
||||||
}
|
}
|
||||||
|
func ReposInit(m *ice.Message, arg ...string) *ice.Message {
|
||||||
|
return m.Cmdy(web.CODE_GIT_REPOS, INIT, arg)
|
||||||
|
}
|
||||||
|
@ -76,6 +76,7 @@ func init() {
|
|||||||
text = append(text, list[0]+" ---")
|
text = append(text, list[0]+" ---")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
m.PushButton(kit.Dict(m.CommandKey(), "源码"))
|
||||||
m.Push(mdb.TEXT, strings.Join(text, ", "))
|
m.Push(mdb.TEXT, strings.Join(text, ", "))
|
||||||
}},
|
}},
|
||||||
}, aaa.RoleAction(), web.DreamAction(), Prefix(REPOS)), Hand: func(m *ice.Message, arg ...string) {
|
}, aaa.RoleAction(), web.DreamAction(), Prefix(REPOS)), Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
10
misc/github/github.go
Normal file
10
misc/github/github.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package code
|
||||||
|
|
||||||
|
import (
|
||||||
|
ice "shylinux.com/x/icebergs"
|
||||||
|
"shylinux.com/x/icebergs/core/code"
|
||||||
|
)
|
||||||
|
|
||||||
|
var Index = &ice.Context{Name: "github", Help: "github"}
|
||||||
|
|
||||||
|
func init() { code.Index.Merge(Index) }
|
@ -4,9 +4,9 @@ websocket
|
|||||||
webview
|
webview
|
||||||
qrcode
|
qrcode
|
||||||
xterm
|
xterm
|
||||||
git
|
|
||||||
|
|
||||||
ssh
|
ssh
|
||||||
|
|
||||||
|
git
|
||||||
vim
|
vim
|
||||||
bash
|
bash
|
||||||
tmux
|
tmux
|
||||||
|
Loading…
x
Reference in New Issue
Block a user