From bbb49944228f270276776a288797978d1f5aeeba Mon Sep 17 00:00:00 2001 From: shy Date: Sat, 13 Jan 2024 08:47:16 +0800 Subject: [PATCH] add some --- base/web/option.go | 6 +++++- core/chat/action.go | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/base/web/option.go b/base/web/option.go index 6fd00868..9ca797fe 100644 --- a/base/web/option.go +++ b/base/web/option.go @@ -128,7 +128,11 @@ func Toast(m *ice.Message, text string, arg ...ice.Any) *ice.Message { // [title var Icons = map[string]string{ice.PROCESS: "🕑", ice.FAILURE: "❌", ice.SUCCESS: "✅"} func toastContent(m *ice.Message, state string, arg ...ice.Any) string { - return kit.JoinWord(kit.Simple(Icons[state], m.ActionKey(), state, arg)...) + if len(arg) == 0 { + return kit.JoinWord(kit.Simple(Icons[state], m.ActionKey(), state)...) + } else { + return kit.JoinWord(kit.Simple(Icons[state], arg)...) + } } func ToastSuccess(m *ice.Message, arg ...ice.Any) { Toast(m, toastContent(m, ice.SUCCESS, arg...), "", "1s") diff --git a/core/chat/action.go b/core/chat/action.go index 58f0ce7e..e8cfd205 100644 --- a/core/chat/action.go +++ b/core/chat/action.go @@ -82,6 +82,9 @@ func init() { ctx.OptionFromConfig(m, MENUS) _action_list(m, arg[0], arg[1]) } else { + if arg[2] == "web.chat.island.portal" { + m.Option(ice.MSG_USERROLE, aaa.VOID) + } _action_exec(m, arg[0], arg[1], arg[2], arg[3:]...) } }},