forked from x/icebergs
opt some
This commit is contained in:
parent
8db22f281c
commit
b51e99983d
@ -3,7 +3,6 @@ package chat
|
|||||||
import (
|
import (
|
||||||
ice "github.com/shylinux/icebergs"
|
ice "github.com/shylinux/icebergs"
|
||||||
"github.com/shylinux/icebergs/base/mdb"
|
"github.com/shylinux/icebergs/base/mdb"
|
||||||
"github.com/shylinux/icebergs/base/web"
|
|
||||||
kit "github.com/shylinux/toolkits"
|
kit "github.com/shylinux/toolkits"
|
||||||
|
|
||||||
"strings"
|
"strings"
|
||||||
@ -79,12 +78,14 @@ func init() {
|
|||||||
if strings.Contains(m.Option(ice.MSG_USERUA), "MicroMessenger") {
|
if strings.Contains(m.Option(ice.MSG_USERUA), "MicroMessenger") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Push("action", m.Cmdx(mdb.RENDER, web.RENDER.Button, "删除"))
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Push("detail", value)
|
m.Push("detail", value)
|
||||||
})
|
})
|
||||||
m.Sort("time", "time_r")
|
if len(arg) == 0 {
|
||||||
|
m.PushAction("复制", "删除")
|
||||||
|
m.Sort("time", "time_r")
|
||||||
|
}
|
||||||
}},
|
}},
|
||||||
},
|
},
|
||||||
}, nil)
|
}, nil)
|
||||||
|
4
misc.go
4
misc.go
@ -59,9 +59,11 @@ func (m *Message) AddCmd(cmd *Command) string {
|
|||||||
|
|
||||||
func (m *Message) PushAction(list ...interface{}) {
|
func (m *Message) PushAction(list ...interface{}) {
|
||||||
m.Table(func(index int, value map[string]string, head []string) {
|
m.Table(func(index int, value map[string]string, head []string) {
|
||||||
|
action := []string{}
|
||||||
for _, k := range kit.Simple(list...) {
|
for _, k := range kit.Simple(list...) {
|
||||||
m.Push(k, m.Cmdx("render", "button", k))
|
action = append(action, m.Cmdx("render", "button", k))
|
||||||
}
|
}
|
||||||
|
m.Push("操作", strings.Join(action, ""))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
func (m *Message) PushDetail(value interface{}, arg ...interface{}) *Message {
|
func (m *Message) PushDetail(value interface{}, arg ...interface{}) *Message {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user