diff --git a/base/log/tail.go b/base/log/tail.go index 290b5fa3..61933860 100644 --- a/base/log/tail.go +++ b/base/log/tail.go @@ -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)) diff --git a/base/nfs/trash.go b/base/nfs/trash.go index 4f8c07f5..dcb3f8af 100644 --- a/base/nfs/trash.go +++ b/base/nfs/trash.go @@ -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))) }}, diff --git a/base/tcp/port.go b/base/tcp/port.go index 2dffefd3..9e315b88 100644 --- a/base/tcp/port.go +++ b/base/tcp/port.go @@ -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 { diff --git a/core/wiki/chart.go b/core/wiki/chart.go index c748f41f..f6063922 100644 --- a/core/wiki/chart.go +++ b/core/wiki/chart.go @@ -69,7 +69,8 @@ func (g *Group) EchoPath(group string, str string, arg ...ice.Any) *ice.Message return g.Echo(group, ``, 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, "%s", x, y+offset, formatStyle(arg...), text) } func (g *Group) EchoArrowLine(group string, x1, y1, x2, y2 int, arg ...string) *ice.Message { // marker-end diff --git a/core/wiki/portal.css b/core/wiki/portal.css index 26e63ec8..e0bd844a 100644 --- a/core/wiki/portal.css +++ b/core/wiki/portal.css @@ -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; diff --git a/misc/git/repos.go b/misc/git/repos.go index ca4f7144..5e5e5409 100644 --- a/misc/git/repos.go +++ b/misc/git/repos.go @@ -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 { diff --git a/render.go b/render.go index 30e8dfb3..9b0b9f9e 100644 --- a/render.go +++ b/render.go @@ -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) {