1
0
mirror of https://shylinux.com/x/icebergs synced 2025-05-03 20:07:01 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-13 08:47:16 +08:00
parent f3612ef710
commit bbb4994422
2 changed files with 8 additions and 1 deletions

View File

@ -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: "✅"} var Icons = map[string]string{ice.PROCESS: "🕑", ice.FAILURE: "❌", ice.SUCCESS: "✅"}
func toastContent(m *ice.Message, state string, arg ...ice.Any) string { 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) { func ToastSuccess(m *ice.Message, arg ...ice.Any) {
Toast(m, toastContent(m, ice.SUCCESS, arg...), "", "1s") Toast(m, toastContent(m, ice.SUCCESS, arg...), "", "1s")

View File

@ -82,6 +82,9 @@ func init() {
ctx.OptionFromConfig(m, MENUS) ctx.OptionFromConfig(m, MENUS)
_action_list(m, arg[0], arg[1]) _action_list(m, arg[0], arg[1])
} else { } 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:]...) _action_exec(m, arg[0], arg[1], arg[2], arg[3:]...)
} }
}}, }},