From 7fbeb2c15c1413a9432bca39ede9cdc414c84ed6 Mon Sep 17 00:00:00 2001 From: shy Date: Fri, 1 Mar 2024 20:35:49 +0800 Subject: [PATCH] add some --- base/web/dream.go | 2 +- base/web/matrix.go | 12 ++++++------ base/web/store.go | 14 +++++++++----- base/web/toast.go | 2 +- core/chat/message.css | 1 + 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/base/web/dream.go b/base/web/dream.go index 323bd2da..f1f212db 100644 --- a/base/web/dream.go +++ b/base/web/dream.go @@ -421,7 +421,7 @@ func init() { DREAM_TABLES: {Hand: func(m *ice.Message, arg ...string) { switch m.Option(mdb.TYPE) { case WORKER: - m.PushButton(cli.RUNTIME, tcp.SEND, OPEN, "settings") + m.PushButton(cli.RUNTIME, "settings", tcp.SEND, OPEN) default: m.PushButton(cli.RUNTIME, DREAM, OPEN) } diff --git a/base/web/matrix.go b/base/web/matrix.go index 860a9d1e..5c4aa1d9 100644 --- a/base/web/matrix.go +++ b/base/web/matrix.go @@ -20,20 +20,20 @@ func _matrix_list(m *ice.Message, domain, icon, typ string, fields ...string) (s button := []ice.Any{} switch typ { case MYSELF: - button = []ice.Any{PORTAL, WORD, STATUS, VIMER, COMPILE, DREAM, cli.RUNTIME, XTERM, DESKTOP, ADMIN, OPEN} + button = []ice.Any{PORTAL, WORD, STATUS, VIMER, COMPILE, DREAM, DESKTOP, ADMIN, OPEN, cli.RUNTIME, XTERM} case SERVER: - button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, UPGRADE, DREAM, cli.RUNTIME, XTERM, WORD, STATUS, VIMER} + button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, UPGRADE, DREAM, WORD, STATUS, VIMER, cli.RUNTIME, XTERM} default: - button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, XTERM, DREAM, cli.RUNTIME, WORD, STATUS, VIMER} + button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, COMPILE, DREAM, WORD, STATUS, VIMER, cli.RUNTIME, XTERM} } m.PushRecord(value, fields...).PushButton(button...) switch typ { case MYSELF: - button = []ice.Any{PORTAL, WORD, STATUS, VIMER, COMPILE, MESSAGE, cli.RUNTIME, XTERM, DESKTOP, ADMIN, OPEN} + button = []ice.Any{PORTAL, WORD, STATUS, VIMER, COMPILE, MESSAGE, DESKTOP, ADMIN, OPEN, cli.RUNTIME, XTERM} case SERVER: - button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, UPGRADE, MESSAGE, cli.RUNTIME, XTERM, WORD, STATUS, VIMER} + button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, UPGRADE, MESSAGE, WORD, STATUS, VIMER, cli.RUNTIME, XTERM} default: - button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, XTERM, cli.RUNTIME, WORD, STATUS, VIMER} + button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, WORD, STATUS, VIMER, cli.RUNTIME, XTERM} } button = append(button, cli.STOP) m.Cmd(Space(m, domain), DREAM).Table(func(value ice.Maps) { diff --git a/base/web/store.go b/base/web/store.go index 1d79f816..6ce5e7eb 100644 --- a/base/web/store.go +++ b/base/web/store.go @@ -37,12 +37,16 @@ func init() { } ProcessIframe(m, m.Option(mdb.NAME), S(m.Option(mdb.NAME)), arg...) }}, - OPEN: {Hand: func(m *ice.Message, arg ...string) { - ProcessIframe(m, m.Option(mdb.NAME), S(m.Option(mdb.NAME)), arg...) - }}, 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...) + ProcessIframe(m, m.Option(mdb.NAME), m.Option(ORIGIN)+S(m.Option(mdb.NAME))+C(m.ActionKey()), arg...) }}, + DESKTOP: {Role: aaa.VOID, Hand: func(m *ice.Message, arg ...string) { + ProcessIframe(m, kit.Keys(m.Option(mdb.NAME), m.ActionKey()), S(m.Option(mdb.NAME))+C(m.ActionKey()), arg...) + }}, + ADMIN: {Role: aaa.VOID, Hand: func(m *ice.Message, arg ...string) { + ProcessIframe(m, kit.Keys(m.Option(mdb.NAME), m.ActionKey()), S(m.Option(mdb.NAME))+C(m.ActionKey()), arg...) + }}, + OPEN: {Hand: func(m *ice.Message, arg ...string) { m.ProcessOpen(S(m.Option(mdb.NAME))) }}, }, ctx.ConfAction(CLIENT_TIMEOUT, cli.TIME_3s), DREAM), Hand: func(m *ice.Message, arg ...string) { if kit.HasPrefixList(arg, ctx.ACTION) { m.Cmdy(DREAM, arg) @@ -79,7 +83,7 @@ func init() { m.Push("", value, kit.Split("time,name,icons,repos,binary,module,version")) m.Push(mdb.TEXT, value[nfs.REPOS]).Push(ORIGIN, origin) if _, ok := list[value[mdb.NAME]]; ok || arg[0] == ice.OPS { - m.PushButton(PORTAL, OPEN) + m.PushButton(PORTAL, DESKTOP, ADMIN, OPEN) } else if ice.Info.NodeType == WORKER || !aaa.IsTechOrRoot(m) { m.PushButton(PORTAL) } else { diff --git a/base/web/toast.go b/base/web/toast.go index 1d750059..ae306820 100644 --- a/base/web/toast.go +++ b/base/web/toast.go @@ -24,7 +24,7 @@ func init() { TOAST: {Help: "进度条", Actions: ice.MergeActions(ice.Actions{ ctx.PREVIEW: &ice.Action{Hand: func(m *ice.Message, arg ...string) { ProcessHashPodCmd(m, arg...) }}, mdb.PRUNES: &ice.Action{Name: "prunes status=done"}, - }, mdb.StatusHashAction(html.CHECKBOX, ice.TRUE, + }, 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) diff --git a/core/chat/message.css b/core/chat/message.css index ffe73df4..abf82261 100644 --- a/core/chat/message.css +++ b/core/chat/message.css @@ -32,6 +32,7 @@ fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list> fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.text div.content { white-space:pre; padding:var(--input-padding) var(--button-padding); } fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.plug>div.container>div.content div.item.text.path>input { width:var(--input-width); } fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.plug>div.container>div.content fieldset.xterm.story>form.option>div.item.hash input { width:var(--input-width); } +fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.plug>div.container>div.content fieldset.iframe.story>form.option>div.item.hash input { width:var(--input-width); } fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.plug>div.container>div.content { box-shadow:var(--box-shadow); } fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.plug>div.container>div.content:hover { box-shadow:var(--notice-box-shadow); } fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item>div.container>div.content { display:flex; align-items:center; border-radius:var(--plugin-radius); min-height:var(--header-height); width:fit-content; }