1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-08-04 14:55:09 +08:00
parent eb73841a72
commit a7014de914
4 changed files with 6 additions and 1 deletions

View File

@ -165,6 +165,9 @@ func _space_handle(m *ice.Message, safe bool, name string, c *websocket.Conn) {
} }
m.Info("what %v", msg.FormatStack(1, 100)) m.Info("what %v", msg.FormatStack(1, 100))
m.Info("what %v", msg.FormatChain()) m.Info("what %v", msg.FormatChain())
if kit.HasPrefixList(msg.Detailv(), "toast") {
break
}
if msg.Option("space.noecho") == "true" { if msg.Option("space.noecho") == "true" {
break break
} }

View File

@ -326,6 +326,7 @@ const ( // CTX
CTX_TITLE = "_title" CTX_TITLE = "_title"
CTX_TRANS = "_trans" CTX_TRANS = "_trans"
CTX_ICONS = "_icons" CTX_ICONS = "_icons"
CTX_STYLE = "_style"
) )
const ( // LOG const ( // LOG
LOG_CMDS = "cmds" LOG_CMDS = "cmds"

View File

@ -143,7 +143,7 @@ func MergeActions(arg ...Any) Actions {
h.Hand = MergeHand(v.Hand, h.Hand) h.Hand = MergeHand(v.Hand, h.Hand)
} else if k == CTX_EXIT { } else if k == CTX_EXIT {
h.Hand = MergeHand(h.Hand, v.Hand) h.Hand = MergeHand(h.Hand, v.Hand)
} else if h.Name, h.Help, h.Icon = kit.Select(v.Name, h.Name), kit.Select(v.Help, h.Help), kit.Select(v.Icon, h.Icon); h.Hand == nil { } else if h.Name, h.Help, h.Icon, h.Style = kit.Select(v.Name, h.Name), kit.Select(v.Help, h.Help), kit.Select(v.Icon, h.Icon), kit.Select(v.Style, h.Style); h.Hand == nil {
h.Hand = v.Hand h.Hand = v.Hand
} }
} }

View File

@ -170,6 +170,7 @@ func (c *Context) Merge(s *Context) *Context {
} }
} }
kit.Value(cmd.Meta, kit.Keys(CTX_ICONS, sub), action.Icon) kit.Value(cmd.Meta, kit.Keys(CTX_ICONS, sub), action.Icon)
kit.Value(cmd.Meta, kit.Keys(CTX_STYLE, sub), action.Style)
if action.Hand == nil { if action.Hand == nil {
continue continue
} }