From 78afcfeb60cd41f03c24aa52d7590e86ece1f0ea Mon Sep 17 00:00:00 2001 From: shy Date: Mon, 5 Feb 2024 13:47:38 +0800 Subject: [PATCH] add some --- base/web/store.go | 3 ++- core/chat/macos/desktop.css | 11 +++++------ core/chat/macos/desktop.js | 8 ++++++-- render.go | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/base/web/store.go b/base/web/store.go index 780d2484..169c7165 100644 --- a/base/web/store.go +++ b/base/web/store.go @@ -43,7 +43,7 @@ func init() { PORTAL: {Role: aaa.VOID, Hand: func(m *ice.Message, arg ...string) { ProcessIframe(m, m.Option(mdb.NAME), m.Option(ORIGIN)+S(m.Option(mdb.NAME))+C(PORTAL), arg...) }}, - }, ctx.ConfAction(CLIENT_TIMEOUT, cli.TIME_300ms)), Hand: func(m *ice.Message, arg ...string) { + }, ctx.ConfAction(CLIENT_TIMEOUT, "3s")), Hand: func(m *ice.Message, arg ...string) { m.Display("") if len(arg) == 0 { m.Cmd(SPIDE, arg, kit.Dict(ice.MSG_FIELDS, "time,icons,client.type,client.name,client.origin")).Table(func(value ice.Maps) { @@ -54,6 +54,7 @@ func init() { } m.Action(html.FILTER, mdb.CREATE) } else { + defer ToastProcess(m, "查询中,请稍候")("查询成功") origin := SpideOrigin(m, arg[0]) kit.If(arg[0] == ice.OPS, func() { origin = tcp.PublishLocalhost(m, origin) }) list := m.Spawn(ice.Maps{ice.MSG_FIELDS: ""}).CmdMap(DREAM, mdb.NAME) diff --git a/core/chat/macos/desktop.css b/core/chat/macos/desktop.css index 1362b529..0ff76b9e 100644 --- a/core/chat/macos/desktop.css +++ b/core/chat/macos/desktop.css @@ -41,7 +41,7 @@ fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>*:not(.textar fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.icon { margin:var(--button-margin) 0; } 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>form.option>div.item:last-child { margin-right:100px; } +/* fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.item:last-child { margin-right:100px; } */ fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>div.item:last-child { margin-right:100px; } fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>* { margin:var(--button-margin) var(--input-margin); } fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>div.tabs { display:none; } @@ -78,16 +78,15 @@ fieldset.macos.finder>div.output div.content>div.item { text-align:center; float fieldset.macos.finder>div.output div.content>div.item img { object-fit:contain; height:var(--desktop-icon-size); width:var(--desktop-icon-size); } fieldset.macos.finder>div.output div.content>div.item div.name { font-size:var(--code-font-size); text-align:center; } body.dark fieldset.macos.desktop>div.output>fieldset.macos { background-color:#08234ad1; } -body.dark fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(odd) { background-color:#282B2F; } -body.dark fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(even) { background-color:#1a1d1e; } +body.dark fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(odd):not(:hover) { background-color:#282B2F; } +body.dark fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(even):not(:hover) { background-color:#1a1d1e; } body.light fieldset.macos.desktop>div.output>fieldset.macos { background-color:#daefff99; } -body.light fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(odd) { background-color:white; } -body.light fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(even) { background-color:#f4f5f5; } +body.light fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(odd):not(:hover) { background-color:white; } +body.light fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(even):not(:hover) { background-color:#f4f5f5; } 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.macos.desktop>div.output>fieldset.macos.dock:hover { margin-left:-40px; transition:margin-left 0.3s; } -/* body:not(.mobile) fieldset.macos.desktop>div.output>div.desktop>fieldset:not(:hover)>form.option>div.icon { visibility:hidden; } */ body:not(.mobile) fieldset.macos.desktop>div.output>div.desktop>div.item { margin:var(--desktop-icon-margin); } body.mobile fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.item.text>input { width:60px; } body.mobile fieldset.macos.dock>div.output { overflow-y:hidden; } diff --git a/core/chat/macos/desktop.js b/core/chat/macos/desktop.js index 42c4604f..b1bd21f6 100644 --- a/core/chat/macos/desktop.js +++ b/core/chat/macos/desktop.js @@ -32,8 +32,12 @@ Volcanos(chat.ONIMPORT, { sub.onaction._close = function() { can.onmotion.hidden(can, sub._target) }, can.onmotion.hidden(can, sub._target) sub.onexport.record = function(sub, value, key, item) { can.onimport._window(can, item) } }) }, - _searchs: function(can) { can.onappend.plugin(can, {index: "web.chat.macos.searchs"}, function(sub) { can.ui.searchs = sub, can.onmotion.hidden(can, sub._target) - can.page.style(can, sub._target, html.LEFT, can.ConfWidth()/4, html.TOP, can.ConfHeight()/4), sub.onimport.size(sub, can.ConfHeight()/2, can.ConfWidth()/2, true); + _searchs: function(can) { can.onappend.plugin(can, {index: "web.chat.macos.searchs"}, function(sub) { + can.ui.searchs = sub, can.onmotion.hidden(can, sub._target) + var width = can.base.Max(can.ConfWidth()/2, can.ConfWidth(), html.FLOAT_WIDTH) + var height = can.base.Max(can.ConfHeight()/2, can.ConfHeight(), html.FLOAT_HEIGHT) + can.page.style(can, sub._target, html.LEFT, (can.ConfWidth()-width)/2, html.TOP, (can.ConfHeight()-height)/2) + sub.onimport.size(sub, height, width, true) sub.onaction._close = function() { can.onmotion.hidden(can, sub._target) }, can.onmotion.hidden(can, sub._target) sub.onexport.record = function(sub, value, key, item, event) { switch (item.type) { case ice.CMD: can.onimport._window(can, {index: item.name, args: can.base.Obj(item.text) }); break diff --git a/render.go b/render.go index 721f314f..dd0bfb75 100644 --- a/render.go +++ b/render.go @@ -256,6 +256,6 @@ func (m *Message) resource(file string) string { p = strings.Split(p, "/pkg/mod/")[1] } kit.If(file == "", func() { p = kit.ExtChange(p, JS) }, func() { p = path.Join(path.Dir(p), file) }) - return "/require/" + p + return kit.MergeURL("/require/"+p, POD, m.Option(MSG_USERPOD)) // return m.MergeLink("/require/"+p, POD, m.Option(MSG_USERPOD)) }