mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
opt some
This commit is contained in:
parent
8db22f281c
commit
b51e99983d
@ -3,7 +3,6 @@ package chat
|
||||
import (
|
||||
ice "github.com/shylinux/icebergs"
|
||||
"github.com/shylinux/icebergs/base/mdb"
|
||||
"github.com/shylinux/icebergs/base/web"
|
||||
kit "github.com/shylinux/toolkits"
|
||||
|
||||
"strings"
|
||||
@ -79,12 +78,14 @@ func init() {
|
||||
if strings.Contains(m.Option(ice.MSG_USERUA), "MicroMessenger") {
|
||||
return
|
||||
}
|
||||
m.Push("action", m.Cmdx(mdb.RENDER, web.RENDER.Button, "删除"))
|
||||
return
|
||||
}
|
||||
m.Push("detail", value)
|
||||
})
|
||||
m.Sort("time", "time_r")
|
||||
if len(arg) == 0 {
|
||||
m.PushAction("复制", "删除")
|
||||
m.Sort("time", "time_r")
|
||||
}
|
||||
}},
|
||||
},
|
||||
}, nil)
|
||||
|
4
misc.go
4
misc.go
@ -59,9 +59,11 @@ func (m *Message) AddCmd(cmd *Command) string {
|
||||
|
||||
func (m *Message) PushAction(list ...interface{}) {
|
||||
m.Table(func(index int, value map[string]string, head []string) {
|
||||
action := []string{}
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user