forked from x/icebergs
add some
This commit is contained in:
parent
41064a2809
commit
08b89ece9f
@ -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)))
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user