1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-04-18 13:40:45 +08:00
parent 41064a2809
commit 08b89ece9f
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ func _command_list(m *ice.Message, name string) *ice.Message {
m.Spawn(m.Source()).Search(name, func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
icon := kit.Format(kit.Value(cmd.Meta, kit.Keys(ice.CTX_ICONS, key)))
m.Push(mdb.INDEX, kit.Keys(s.Prefix(), key))
m.Push(mdb.ICONS, kit.Select(cmd.Icon, icon, !strings.HasPrefix(icon, "bi ")))
m.Push(mdb.ICONS, kit.Select(cmd.Icon, icon, !kit.HasPrefix(icon, "bi ", "{")))
m.Push(mdb.NAME, kit.Format(cmd.Name)).Push(mdb.HELP, kit.Format(cmd.Help))
m.Push(mdb.LIST, kit.Format(cmd.List)).Push(mdb.META, kit.Format(cmd.Meta))
m.Push("_command", ShortCmd(kit.Keys(s.Prefix(), key)))

View File

@ -270,7 +270,7 @@ func (m *Message) Resource(file string, arg ...string) string {
return m.resource(file)
}
func (m *Message) resource(file string) string {
p := kit.FileLines(3)
p := kit.FileLines(-1)
kit.If(file == "", func() { p = kit.ExtChange(p, JS) }, func() {
if kit.HasPrefix(file, PS, HTTP) {
p = file