From 4b09f92531b0389876fd85b2718d57ddb3a816c4 Mon Sep 17 00:00:00 2001 From: shy Date: Mon, 8 Apr 2024 11:20:17 +0800 Subject: [PATCH] add some --- base/ctx/command.go | 1 + base/web/route.go | 2 +- base/web/spide.go | 2 +- base/web/store.go | 2 +- base/web/token.go | 2 +- core/chat/macos/desktop.css | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/base/ctx/command.go b/base/ctx/command.go index 3b394800..cdb0cf05 100644 --- a/base/ctx/command.go +++ b/base/ctx/command.go @@ -19,6 +19,7 @@ func _command_list(m *ice.Message, name string) *ice.Message { } m.Spawn(m.Source()).Search(name, func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) { m.Push(mdb.INDEX, kit.Keys(s.Prefix(), key)) + m.Push(mdb.ICONS, kit.Format(cmd.Icon)) m.Push(mdb.NAME, kit.Format(cmd.Name)) m.Push(mdb.HELP, kit.Format(cmd.Help)) m.Push(mdb.LIST, kit.Format(cmd.List)) diff --git a/base/web/route.go b/base/web/route.go index 1056ed02..2a680167 100644 --- a/base/web/route.go +++ b/base/web/route.go @@ -69,7 +69,7 @@ const ROUTE = "route" func init() { Index.MergeCommands(ice.Commands{ - ROUTE: {Name: "route space:text cmds:text auto build travel diagram prunes", Help: "路由表", Actions: ice.MergeActions(ice.Actions{ + ROUTE: {Name: "route space:text cmds:text auto build travel diagram prunes", Help: "路由表", Icon: "Shortcuts.png", Actions: ice.MergeActions(ice.Actions{ ice.MAIN: {Help: "首页", Hand: func(m *ice.Message, arg ...string) { ctx.ProcessField(m, CHAT_IFRAME, m.MergePod(""), arg...) }}, mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { switch mdb.HashInputs(m, arg); arg[0] { diff --git a/base/web/spide.go b/base/web/spide.go index 8f71c653..23e7ef26 100644 --- a/base/web/spide.go +++ b/base/web/spide.go @@ -279,7 +279,7 @@ const SPIDE = "spide" func init() { Index.MergeCommands(ice.Commands{ // SPIDE: {Name: "spide client.name action=raw,msg,save,cache method=GET,PUT,POST,DELETE url format=form,part,json,data,file arg run create", Help: "蜘蛛侠", Actions: ice.MergeActions(ice.Actions{ - SPIDE: {Help: "蜘蛛侠", Meta: kit.Dict(ice.CTX_TRANS, kit.Dict(html.INPUT, kit.Dict( + SPIDE: {Help: "蜘蛛侠", Icon: "Find My.png", Meta: kit.Dict(ice.CTX_TRANS, kit.Dict(html.INPUT, kit.Dict( CLIENT_TYPE, "类型", CLIENT_NAME, "名称", CLIENT_URL, "地址", CLIENT_METHOD, "方法", CLIENT_ORIGIN, "服务", CLIENT_TIMEOUT, "超时", CLIENT_PROTOCOL, "协议", CLIENT_HOST, "主机", CLIENT_HOSTNAME, "机器", diff --git a/base/web/store.go b/base/web/store.go index bb715915..4ce11a7f 100644 --- a/base/web/store.go +++ b/base/web/store.go @@ -18,7 +18,7 @@ const STORE = "store" func init() { Index.MergeCommands(ice.Commands{ - STORE: {Name: "store refresh", Help: "商店", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{ + STORE: {Name: "store refresh", Help: "商店", Icon: "App Store.png", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{ mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(SPIDE, mdb.INPUTS, arg) }}, mdb.CREATE: {Name: "create origin* name icons", Hand: func(m *ice.Message, arg ...string) { m.Cmd(SPIDE, mdb.CREATE, m.OptionSimple("origin,name,icons"), mdb.TYPE, nfs.REPOS) diff --git a/base/web/token.go b/base/web/token.go index 506180e9..d0a477a9 100644 --- a/base/web/token.go +++ b/base/web/token.go @@ -17,7 +17,7 @@ const TOKEN = "token" func init() { Index.MergeCommands(ice.Commands{ - TOKEN: {Help: "令牌桶", Actions: ice.MergeActions(ice.Actions{ + TOKEN: {Help: "令牌桶", Icon: "Keychain.png", Actions: ice.MergeActions(ice.Actions{ mdb.PRUNES: {Hand: func(m *ice.Message, arg ...string) { list := map[string]bool{} m.Cmds("").Table(func(value ice.Maps) { diff --git a/core/chat/macos/desktop.css b/core/chat/macos/desktop.css index 50175876..94768dd8 100644 --- a/core/chat/macos/desktop.css +++ b/core/chat/macos/desktop.css @@ -39,6 +39,7 @@ body:not(.mobile) fieldset.macos.desktop>div.output>div.desktop>fieldset>legend: fieldset.macos.desktop>div.output>div.desktop>fieldset div.item.button.window span { position:absolute; left:8px; top:2px; } fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>*:not(.textarea) { margin:var(--button-margin) var(--input-margin); } fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.icon { margin:var(--button-margin) 0; box-shadow:none; } +fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.icon.delete { display:none; } fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.list.icons { margin:var(--button-margin) 0; } fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.back.icons { margin:var(--button-margin) 0; } fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>div.item:last-child { margin-right:100px; }