forked from x/icebergs
add some
This commit is contained in:
parent
8684e804d3
commit
afdebbdc67
@ -20,7 +20,7 @@ const TAIL = "tail"
|
||||
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
TAIL: {Name: "tail name id auto page create", Help: "日志流", Actions: ice.MergeActions(ice.Actions{
|
||||
TAIL: {Name: "tail name id auto page", Help: "日志流", Actions: ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
mdb.HashSelect(m.Spawn(ice.OptionFields("name,file"))).Table(func(value ice.Maps) {
|
||||
m.Cmd("", mdb.CREATE, kit.SimpleKV("name,file", value))
|
||||
|
@ -28,7 +28,7 @@ const TRASH = "trash"
|
||||
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
TRASH: {Name: "trash hash auto prunes", Help: "回收站", Actions: ice.MergeActions(ice.Actions{
|
||||
TRASH: {Name: "trash hash auto", Help: "回收站", Actions: ice.MergeActions(ice.Actions{
|
||||
mdb.CREATE: {Hand: func(m *ice.Message, arg ...string) {
|
||||
_trash_create(m, kit.Paths(m.Option(FROM)))
|
||||
}},
|
||||
|
@ -69,7 +69,7 @@ func init() {
|
||||
})
|
||||
}
|
||||
}},
|
||||
SOCKET: {Hand: func(m *ice.Message, arg ...string) {
|
||||
SOCKET: {Help: "端口", Hand: func(m *ice.Message, arg ...string) {
|
||||
parse := func(str string) int64 { port, _ := strconv.ParseInt(str, 16, 32); return port }
|
||||
trans := func(str string) string {
|
||||
switch str {
|
||||
|
@ -69,7 +69,8 @@ func (g *Group) EchoPath(group string, str string, arg ...ice.Any) *ice.Message
|
||||
return g.Echo(group, `<path d="%s"></path>`, kit.Format(str, arg...))
|
||||
}
|
||||
func (g *Group) EchoText(group string, x, y int, text string, arg ...string) *ice.Message {
|
||||
offset := kit.Int(kit.Select("8", "4", g.Get(group).IsMobileUA()))
|
||||
m := g.Get(group)
|
||||
offset := kit.Int(kit.Select("8", "4", m.IsMobileUA()))
|
||||
return g.Echo(group, "<text x=%d y=%d %s>%s</text>", x, y+offset, formatStyle(arg...), text)
|
||||
}
|
||||
func (g *Group) EchoArrowLine(group string, x1, y1, x2, y2 int, arg ...string) *ice.Message { // marker-end
|
||||
|
@ -30,7 +30,7 @@ fieldset.web.wiki.portal>div.output>div.layout>div.main fieldset.inner.output di
|
||||
--code-object:silver; --code-datatype:silver; --code-package:silver;
|
||||
}
|
||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story[data-type=spark][data-name=shell] {
|
||||
background-color:var(--code-bg-color); color:var(--code-fg-color); padding:var(--input-padding); margin:var(--plugin-margin) 0; box-shadow:var(--box-shadow);
|
||||
background-color:var(--code-bg-color); color:var(--code-fg-color); padding:var(--button-padding) var(--input-padding); margin:var(--plugin-margin) 0; box-shadow:var(--box-shadow);
|
||||
}
|
||||
fieldset.web.wiki.portal>div.output>div.layout>div.main table.content div.story[data-type=spark][data-name=shell] {
|
||||
margin-top:unset;
|
||||
|
@ -612,7 +612,7 @@ func init() {
|
||||
}},
|
||||
}, aaa.RoleAction(REMOTE), web.StatsAction("", "代码库总数"), 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 {
|
||||
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(CLONE, PULL, PUSH, STATUS)
|
||||
} else if len(arg) == 1 {
|
||||
_repos_branch(m, _repos_open(m, arg[0]))
|
||||
} else if len(arg) == 2 {
|
||||
|
@ -123,6 +123,9 @@ func (m *Message) IsMobileUA() bool {
|
||||
func (m *Message) IsWeixinUA() bool {
|
||||
return strings.Contains(m.Option(MSG_USERUA), "MicroMessenger")
|
||||
}
|
||||
func (m *Message) IsChromeUA() bool {
|
||||
return strings.Contains(m.Option(MSG_USERUA), "Chrome")
|
||||
}
|
||||
func (m *Message) PushSearch(arg ...Any) {
|
||||
data := kit.Dict(arg...)
|
||||
kit.For(arg, func(k, v Any) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user