From bfaf7380e18bcb2aad9817947c01fe642098855b Mon Sep 17 00:00:00 2001 From: shy Date: Sun, 26 May 2024 08:07:13 +0800 Subject: [PATCH] add some --- base/aaa/role.go | 2 +- base/aaa/sess.go | 2 +- base/log/debug.go | 2 +- base/log/watch.go | 2 +- base/mdb/mdb.go | 3 +-- base/nfs/document.go | 3 +-- base/nfs/template.go | 3 +-- base/web/count.go | 2 +- base/web/html/html.go | 18 +++++++++--------- base/web/matrix.css | 4 ++-- base/web/space.go | 2 +- base/web/toast.go | 2 +- core/chat/macos/desktop.css | 24 ++++++++++-------------- core/code/package.go | 2 -- core/code/version.go | 9 +++++---- core/mall/goods.go | 2 +- misc/git/tags.go | 4 +--- 17 files changed, 38 insertions(+), 48 deletions(-) diff --git a/base/aaa/role.go b/base/aaa/role.go index cdd5f51b..875d6e5a 100644 --- a/base/aaa/role.go +++ b/base/aaa/role.go @@ -72,7 +72,7 @@ const ROLE = "role" func init() { Index.MergeCommands(ice.Commands{ - ROLE: {Name: "role role key auto insert filter:text simple", Help: "角色", Actions: ice.MergeActions(ice.Actions{ + ROLE: {Name: "role role key auto insert simple", Help: "角色", Actions: ice.MergeActions(ice.Actions{ ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { m.Cmd(ROLE, mdb.CREATE, VOID, TECH) has := map[string]bool{VOID: true, TECH: true} diff --git a/base/aaa/sess.go b/base/aaa/sess.go index 0aab45be..3394dcd4 100644 --- a/base/aaa/sess.go +++ b/base/aaa/sess.go @@ -45,7 +45,7 @@ const SESS = "sess" func init() { Index.MergeCommands(ice.Commands{ - SESS: {Name: "sess hash auto filter:text", Help: "会话", Actions: ice.MergeActions(ice.Actions{ + SESS: {Name: "sess hash auto", Help: "会话", Actions: ice.MergeActions(ice.Actions{ mdb.CREATE: {Name: "create username*", Hand: func(m *ice.Message, arg ...string) { _sess_create(m, m.Option(USERNAME), UA, m.Option(ice.MSG_USERUA), IP, m.Option(ice.MSG_USERIP)) }}, diff --git a/base/log/debug.go b/base/log/debug.go index f1095dd1..03297ecd 100644 --- a/base/log/debug.go +++ b/base/log/debug.go @@ -23,7 +23,7 @@ func init() { LEVEL = "level" ) Index.MergeCommands(ice.Commands{ - DEBUG: {Name: "debug level=error,bench,debug,error,watch offset limit filter auto reset app doc", Help: "后台日志", Actions: ice.Actions{ + DEBUG: {Name: "debug level=error,bench,debug,error,watch offset limit auto reset app doc", Help: "后台日志", Actions: ice.Actions{ "doc": {Help: "文档", Hand: func(m *ice.Message, arg ...string) { m.ProcessOpen("https://pkg.go.dev/std") }}, "reset": {Help: "重置", Hand: func(m *ice.Message, arg ...string) { m.Cmd(nfs.CAT, _debug_file(arg[0]), func(line string, index int) { m.ProcessRewrite(mdb.OFFSET, index+2, mdb.LIMIT, 1000) }) diff --git a/base/log/watch.go b/base/log/watch.go index fa397288..398b1201 100644 --- a/base/log/watch.go +++ b/base/log/watch.go @@ -23,7 +23,7 @@ func init() { m.Push(ctx.SHIP, ls[3]).Push("operate", ls[4]).Push(nfs.CONTENT, kit.Join(kit.Slice(ls, 5, -1), lex.SP)) stats[ls[4]]++ }) - m.Action("filter:text").StatusTimeCount(stats) + m.StatusTimeCount(stats) }}, }) } diff --git a/base/mdb/mdb.go b/base/mdb/mdb.go index 87d12346..dc06f0fd 100644 --- a/base/mdb/mdb.go +++ b/base/mdb/mdb.go @@ -5,7 +5,6 @@ import ( "strings" ice "shylinux.com/x/icebergs" - "shylinux.com/x/icebergs/base/web/html" kit "shylinux.com/x/toolkits" ) @@ -243,7 +242,7 @@ var Index = &ice.Context{Name: MDB, Help: "数据模块", Commands: ice.Commands HashSelect(m, arg...).RewriteAppend(func(value, key string, index int) string { kit.If(key == STATUS, func() { value = kit.Select(ENABLE, value) }) return value - }).PushAction().Action(html.FILTER) + }).PushAction() if len(arg) == 1 { m.Cmdy("nfs.cat", "usr/local/export/"+arg[0]+"/hash.json") } diff --git a/base/nfs/document.go b/base/nfs/document.go index d3f2306a..fbbb8a7c 100644 --- a/base/nfs/document.go +++ b/base/nfs/document.go @@ -4,7 +4,6 @@ import ( "path" ice "shylinux.com/x/icebergs" - "shylinux.com/x/icebergs/base/web/html" kit "shylinux.com/x/toolkits" ) @@ -14,7 +13,7 @@ func init() { Index.MergeCommands(ice.Commands{ DOCUMENT: {Name: "document index path auto", Help: "文档", Hand: func(m *ice.Message, arg ...string) { if len(arg) == 0 { - m.Cmdy(ice.COMMAND).Action(html.FILTER).Option(ice.MSG_DISPLAY, "") + m.Cmdy(ice.COMMAND).Option(ice.MSG_DISPLAY, "") return } m.Search(arg[0], func(p *ice.Context, c *ice.Context, key string, cmd *ice.Command) { diff --git a/base/nfs/template.go b/base/nfs/template.go index 50da6e26..769f1f7c 100644 --- a/base/nfs/template.go +++ b/base/nfs/template.go @@ -4,7 +4,6 @@ import ( "path" ice "shylinux.com/x/icebergs" - "shylinux.com/x/icebergs/base/web/html" kit "shylinux.com/x/toolkits" ) @@ -20,7 +19,7 @@ func init() { }}, }), Hand: func(m *ice.Message, arg ...string) { if len(arg) == 0 { - m.Cmdy(ice.COMMAND).Action(html.FILTER).Option(ice.MSG_DISPLAY, "") + m.Cmdy(ice.COMMAND).Option(ice.MSG_DISPLAY, "") return } m.Search(arg[0], func(p *ice.Context, c *ice.Context, key string, cmd *ice.Command) { diff --git a/base/web/count.go b/base/web/count.go index 9d6c50f5..fc2ea19b 100644 --- a/base/web/count.go +++ b/base/web/count.go @@ -47,7 +47,7 @@ const COUNT = "count" func init() { Index.MergeCommands(ice.Commands{ - COUNT: &ice.Command{Name: "count hash auto group valid location filter", Help: "计数器", Meta: kit.Dict( + COUNT: &ice.Command{Name: "count hash auto group valid location", Help: "计数器", Meta: kit.Dict( ice.CTX_TRANS, kit.Dict(html.INPUT, kit.Dict(aaa.LOCATION, "地理位置")), ), Actions: ice.MergeActions(ice.Actions{ mdb.CREATE: {Name: "create type name text", Hand: func(m *ice.Message, arg ...string) { diff --git a/base/web/html/html.go b/base/web/html/html.go index 0aa8df24..5672465b 100644 --- a/base/web/html/html.go +++ b/base/web/html/html.go @@ -81,15 +81,15 @@ const ( PROFILE = "profile" DISPLAY = "display" - VIEW = "view" - VALUE = "value" - INPUT = "input" - ICON = "icon" - ICONS = "icons" - OUTPUT = "output" - LAYOUT = "layout" - RESIZE = "resize" - FILTER = "filter" + VIEW = "view" + VALUE = "value" + INPUT = "input" + ICON = "icon" + ICONS = "icons" + OUTPUT = "output" + LAYOUT = "layout" + RESIZE = "resize" + // FILTER = "filter" REFRESH = "refresh" CONFIRM = "confirm" diff --git a/base/web/matrix.css b/base/web/matrix.css index fe42634f..0fb3a437 100644 --- a/base/web/matrix.css +++ b/base/web/matrix.css @@ -22,8 +22,8 @@ fieldset.web.matrix>div.output>table.content div.item div.status div.item:hover fieldset.web.matrix>div.output>table.content div.item:hover { background-color:unset; color:unset; } fieldset.web.matrix>div.output:not(.process)>table.content div.item.notice { background-color:var(--notice-bg-color); color:var(--notice-fg-color); } fieldset.web.matrix>div.output:not(.process)>table.content div.item.danger { background-color:var(--danger-bg-color); color:var(--danger-fg-color); } -fieldset.web.matrix>div.output:not(.process)>table.content div.item.server { border:var(--box-notice3); } -fieldset.web.matrix>div.output:not(.process)>table.content div.item.origin { border:var(--box-danger3); } +fieldset.web.matrix>div.output:not(.process)>table.content div.item.server { border:var(--box-notice); } +fieldset.web.matrix>div.output:not(.process)>table.content div.item.origin { border:var(--box-danger); } fieldset.web.matrix>div.output:not(.process)>table.content div.item.danger div.status div.item { color:var(--danger-fg-color); } fieldset.web.matrix>div.output:not(.process)>table.content div.item.notice div.status div.item { color:var(--notice-fg-color); } fieldset.web.matrix>div.output:not(.process)>table.content div.item.stop div.title>span { color:var(--disable-fg-color); } diff --git a/base/web/space.go b/base/web/space.go index 8d4ab551..eb1ab36d 100644 --- a/base/web/space.go +++ b/base/web/space.go @@ -421,7 +421,7 @@ func init() { } m.PushButton(kit.Select(OPEN, LOGIN, value[mdb.TYPE] == LOGIN), mdb.REMOVE) }) - m.Action(html.FILTER).Sort("", kit.Simple(aaa.LOGIN, WEIXIN, PORTAL, WORKER, SERVER, ORIGIN)) + m.Sort("", kit.Simple(aaa.LOGIN, WEIXIN, PORTAL, WORKER, SERVER, ORIGIN)) } else { if kit.IsIn(arg[0], "", ice.CONTEXTS) { m.Cmdy(arg[1:]) diff --git a/base/web/toast.go b/base/web/toast.go index 9a85bf39..f170134b 100644 --- a/base/web/toast.go +++ b/base/web/toast.go @@ -28,7 +28,7 @@ func init() { }, mdb.ClearOnExitHashAction(), mdb.StatusHashAction(html.CHECKBOX, ice.TRUE, mdb.FIELD, "time,hash,type,name,text,cost,status,index,icons,agent,system,ip,ua", )), Hand: func(m *ice.Message, arg ...string) { - mdb.HashSelect(m, arg...).PushAction(ctx.PREVIEW, mdb.REMOVE).Action(mdb.PRUNES, html.FILTER) + mdb.HashSelect(m, arg...).PushAction(ctx.PREVIEW, mdb.REMOVE).Action(mdb.PRUNES) m.Sort("status,cost", []string{"", TOAST_INIT, TOAST_DONE}, func(value string) int { return -int(kit.Duration(value)) }) }}, }) diff --git a/core/chat/macos/desktop.css b/core/chat/macos/desktop.css index 4d65be86..ba458bcb 100644 --- a/core/chat/macos/desktop.css +++ b/core/chat/macos/desktop.css @@ -6,11 +6,9 @@ fieldset.desktop>div.output>fieldset.macos>div.output { background-color:transpa fieldset.desktop>div.output>fieldset.macos.menu { border:0; border-radius:0; line-height:var(--desktop-menu-height); height:var(--desktop-menu-height); width:100%; position:sticky; top:0; overflow:hidden; z-index:10; } fieldset.desktop>div.output>fieldset.macos.menu div.menu:hover { background-color:var(--hover-bg-color); } fieldset.desktop>div.output>fieldset.macos.menu div.menu.icon { font-size:24px; line-height:22px; height:var(--desktop-menu-height); } -fieldset.desktop>div.output>fieldset.macos.menu div.menu.refresh { font-size:20px; } fieldset.desktop>div.output>fieldset.macos.menu div.menu img { height:var(--desktop-menu-height); margin-right:var(--input-padding); } fieldset.desktop>div.output>fieldset.macos.menu div.menu { display:flex; align-items:flex-start; } fieldset.desktop>div.output>fieldset.macos.menu div.menu.title { font-style:italic; } -// fieldset.desktop>div.output>fieldset.macos.menu div.item.time { margin-right:10px; } fieldset.desktop>div.output>fieldset.macos.menu>div.output { overflow:hidden; } fieldset.desktop>div.output>fieldset.macos.dock { border:var(--plugin-border); border-radius:var(--plugin-radius); position:absolute; bottom:var(--input-margin); transition:margin-left 0.3s; z-index:10; } fieldset.desktop>div.output>fieldset.macos.searchs { position:absolute; z-index:10; } @@ -69,12 +67,8 @@ fieldset.desktop>div.output>div.desktop>fieldset.web.chat.macos.finder>div.outpu fieldset.desktop>div.output>fieldset.web.chat.macos.dock>div.output div.item.disable { display:none; } fieldset.desktop>div.output>div.desktop>div.item.disable { display:none; } fieldset.macos.menu>div.output>div.item { padding:0 var(--input-padding); height:var(--desktop-menu-height); float:right; } -body.cmd fieldset.macos.menu>div.output>div.item { padding:0 var(--button-padding); } -// fieldset.macos.menu>div.output>div.item.avatar { padding:0; } -// fieldset.macos.menu>div.output>div.item.avatar { margin-right:10px; } fieldset.macos.menu>div.output>div.item.avatar>img { padding:0; height:var(--desktop-menu-height); } fieldset.macos.menu>div.output>div.menu { padding:0 var(--input-padding); float:left; } -body.cmd fieldset.macos.menu>div.output>div.menu { padding:0 var(--button-padding); } fieldset.macos.menu>div.output>div.tabs { font-style:italic; padding:0 var(--button-padding); float:left; } fieldset.macos.menu>div.output>div.tabs.select { background-color:var(--panel-hover-bg-color); color:var(--panel-hover-fg-color); } fieldset.macos.dock>div.output { height:var(--desktop-icon-size); display:flex; overflow:auto; } @@ -88,20 +82,22 @@ fieldset.macos.finder>div.output div.content>div.item img { object-fit:contain; fieldset.macos.finder>div.output div.content>div.item div.name { font-size:var(--code-font-size); white-space:pre; text-align:center; overflow:hidden; } fieldset.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(odd):not(:hover) { background-color:var(--output-bg-color); } fieldset.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(even):not(:hover) { background-color:var(--plugin-bg-color); } -body.dark fieldset.desktop>div.output>fieldset.macos { background-color:#08234ad1; } -body.light fieldset.desktop>div.output>fieldset.macos { background-color:#daefff99; } body:not(.mobile) fieldset.macos.dock>div.output { overflow:visible; } body:not(.mobile) fieldset.macos.dock>div.output>div.item:hover { background-color:unset; margin-top:-80px; transition:margin-top 0.3s; } body:not(.mobile) fieldset.macos.dock>div.output>div.item img:hover { width:160px; transition:width 0.3s; } body:not(.mobile) fieldset.desktop>div.output>fieldset.macos.dock:hover { margin-left:-40px; transition:margin-left 0.3s; } body:not(.mobile) fieldset.desktop>div.output>div.desktop>div.item { margin:var(--desktop-icon-margin); } -body.mobile fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.item.text>input { width:60px; } -body.mobile fieldset.macos.dock>div.output { overflow-y:hidden; } body:not(.mobile) fieldset.desktop>div.output>fieldset.macos.searchs>form.option>div.item.keyword input { background-color:transparent; width:var(--river-width); } body:not(.mobile) fieldset.desktop>div.output>fieldset.macos.searchs>div.action input { background-color:transparent; } -body.windows fieldset.desktop>div.output>fieldset.macos.notifications>div.action>div.item.refresh>span { font-size:24px; margin-top:0; } body:not(.mobile) fieldset.desktop>div.output>div.desktop>fieldset>legend:not(:hover) { background-color:transparent; } -body.mobile fieldset.desktop>div.output>div.desktop>fieldset>legend { float:none; } -body.windows fieldset.desktop>div.output>div.desktop>fieldset div.item.button.window span { top:-2px; } +body.cmd fieldset.macos.menu>div.output>div.item { padding:0 var(--button-padding); } +body.cmd fieldset.macos.menu>div.output>div.menu { padding:0 var(--button-padding); } +body.dark fieldset.desktop>div.output>fieldset.macos { background-color:#08234ad1; } +body.light fieldset.desktop>div.output>fieldset.macos { background-color:#daefff99; } body.white fieldset.desktop>div.output>div.desktop>div.item>div.name { color:white; } - +body.mobile fieldset.desktop>div.output>div.desktop>fieldset>legend { float:none; } +body.mobile fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.item.text>input { width:60px; } +body.mobile fieldset.macos.dock>div.output { overflow-y:hidden; } +body.windows fieldset.desktop>div.output>fieldset.macos.notifications>div.action>div.item.refresh>span { font-size:24px; margin-top:0; } +body.windows fieldset.desktop>div.output>div.desktop>fieldset div.item.button.window span { top:-2px; } +body.windows fieldset.desktop>div.output>fieldset.macos.menu div.menu.refresh { font-size:20px; } diff --git a/core/code/package.go b/core/code/package.go index 0cc8a367..69422eaf 100644 --- a/core/code/package.go +++ b/core/code/package.go @@ -10,7 +10,6 @@ import ( "shylinux.com/x/icebergs/base/nfs" "shylinux.com/x/icebergs/base/tcp" "shylinux.com/x/icebergs/base/web" - "shylinux.com/x/icebergs/base/web/html" kit "shylinux.com/x/toolkits" ) @@ -87,7 +86,6 @@ func init() { }) web.PushPodCmd(m, "", arg...) kit.If(!m.IsWorker(), func() { m.RenameAppend(web.SPACE, ice.POD) }) - m.Action(html.FILTER) }}, }) } diff --git a/core/code/version.go b/core/code/version.go index a8d9c2a6..d3dc9361 100644 --- a/core/code/version.go +++ b/core/code/version.go @@ -54,6 +54,9 @@ func init() { STATUS: {Hand: func(m *ice.Message, arg ...string) { web.ProcessPodCmd(m, m.Option(web.SPACE), m.ActionKey(), nil, arg...) }}, + nfs.SCAN: {Hand: func(m *ice.Message, arg ...string) { + m.Cmd(REPOS, m.ActionKey()) + }}, }), Hand: func(m *ice.Message, arg ...string) { repos := map[string]string{} list := map[string]map[string]string{} @@ -84,9 +87,6 @@ func init() { button, status := []ice.Any{}, "" m.Push(web.SPACE, space).Push(MODULE, v[MODULE]).Push(VERSION, v[VERSION]) kit.For(repos, func(k, _v string) { - if kit.IsIn(k, "shylinux.com/x/websocket", "shylinux.com/x/go-qrcode") { - return - } if k == v[MODULE] || v[k] == "" { m.Push(k, "") } else if v[k] == _v { @@ -102,12 +102,13 @@ func init() { }) kit.If(list[space][DIFF] != "", func() { button = append(button, STATUS) }) kit.If(strings.Contains(list[space][VERSION], "-"), func() { button = append(button, TAG) }) - kit.If(len(button) > 0, func() { button = append(button, XTERM) }) + button = append(button, XTERM) m.Push(DIFF, list[space][DIFF]).Push(mdb.STATUS, status).PushButton(button...) } fields := []string{} kit.For(m.Appendv(ice.MSG_APPEND), func(k string) { kit.If(len(kit.TrimArg(m.Appendv(k)...)) > 0, func() { fields = append(fields, k) }) }) m.Cut(fields...).Sort(web.SPACE, ice.STR_R) + m.Action(nfs.SCAN) }}, }) diff --git a/core/mall/goods.go b/core/mall/goods.go index 6dac6060..45e29c8b 100644 --- a/core/mall/goods.go +++ b/core/mall/goods.go @@ -38,7 +38,7 @@ func init() { }}, }, web.StatsAction(), web.ExportCacheAction(nfs.IMAGE), mdb.ExportHashAction(ctx.TOOLS, kit.Fields(Prefix(CART), Prefix(ORDER)), mdb.FIELD, "time,hash,zone,name,text,price,count,units,image")), Hand: func(m *ice.Message, arg ...string) { kit.If(len(arg) == 0 && m.IsMobileUA(), func() { m.OptionDefault(ice.MSG_FIELDS, "zone,name,price,count,units,text,hash,time,image") }) - mdb.HashSelect(m, arg...).PushAction(ORDER).Action("filter:text") + mdb.HashSelect(m, arg...).PushAction(ORDER) web.PushPodCmd(m, "", arg...).Sort("zone,name") ctx.DisplayLocal(m, "") _status_amount(m) diff --git a/misc/git/tags.go b/misc/git/tags.go index 0997c8a1..f96871bc 100644 --- a/misc/git/tags.go +++ b/misc/git/tags.go @@ -11,7 +11,6 @@ import ( "shylinux.com/x/icebergs/base/mdb" "shylinux.com/x/icebergs/base/nfs" "shylinux.com/x/icebergs/base/web" - "shylinux.com/x/icebergs/base/web/html" "shylinux.com/x/icebergs/core/code" kit "shylinux.com/x/toolkits" ) @@ -44,7 +43,6 @@ func init() { m.Push(mdb.TEXT, text) } }) - m.Action(html.FILTER) return } m.Cmdy("web.code.doc", arg) @@ -110,7 +108,7 @@ func init() { m.PushButton(code.DOC, mdb.SHOW, mdb.CREATE) } }) - m.Action(html.FILTER).StatusTimeCountStats(mdb.TYPE) + m.StatusTimeCountStats(mdb.TYPE) m.Sort("status,type,name", []string{ice.TRUE, ice.FALSE}, []string{"t", "n", "f", "v", "c"}, ice.STR) }}, })