forked from x/icebergs
opt some
This commit is contained in:
parent
dfa2834e61
commit
35b06a3526
@ -241,7 +241,7 @@ func init() {
|
||||
})
|
||||
}},
|
||||
}, mdb.HashAction(mdb.SHORT, nfs.PATH, mdb.FIELD, "time,path,type,name,text")), Hand: func(m *ice.Message, arg ...string) {
|
||||
mdb.HashSelect(m, arg...).Table(func(index int, value ice.Maps, head []string) { m.PushAnchor(m.MergeWebsite(value[nfs.PATH])) })
|
||||
mdb.HashSelect(m, arg...).Tables(func(value ice.Maps) { m.PushAnchor(m.MergeWebsite(value[nfs.PATH])) })
|
||||
|
||||
if len(arg) == 0 { // 文件列表
|
||||
m.Cmd(nfs.DIR, SRC_WEBSITE, func(f os.FileInfo, p string) {
|
||||
@ -259,7 +259,7 @@ func init() {
|
||||
m.PushAnchor(m.MergeLink(m.Append(nfs.PATH)))
|
||||
}
|
||||
|
||||
if m.FieldsIsDetail() { // 文件预览
|
||||
if len(arg) > 0 { // 文件预览
|
||||
m.PushQRCode(mdb.SCAN, m.MergeURL2(m.Append(nfs.PATH)))
|
||||
m.EchoIFrame(m.Append(nfs.PATH))
|
||||
}
|
||||
|
@ -294,13 +294,13 @@ func (m *Message) MergeCmd(cmd string, arg ...Any) string {
|
||||
cmd = m.PrefixKey()
|
||||
}
|
||||
if m.Option(MSG_USERPOD) == "" {
|
||||
return kit.MergeURL2(kit.Select(Info.Domain, m.Option(MSG_USERWEB)), path.Join("/chat/cmd", cmd))
|
||||
return kit.MergeURL2(kit.Select(Info.Domain, m.Option(MSG_USERWEB)), path.Join("/chat", "cmd", cmd))
|
||||
}
|
||||
return kit.MergeURL2(kit.Select(Info.Domain, m.Option(MSG_USERWEB)), path.Join("cmd", cmd), arg...)
|
||||
return kit.MergeURL2(kit.Select(Info.Domain, m.Option(MSG_USERWEB)), path.Join("/chat", "pod", m.Option(MSG_USERPOD), "cmd", cmd), arg...)
|
||||
}
|
||||
func (m *Message) MergeWebsite(web string, arg ...Any) string {
|
||||
if m.Option(MSG_USERPOD) == "" {
|
||||
return kit.MergeURL2(kit.Select(Info.Domain, m.Option(MSG_USERWEB)), path.Join("/chat/website", web))
|
||||
return kit.MergeURL2(kit.Select(Info.Domain, m.Option(MSG_USERWEB)), path.Join("/chat", "website", web))
|
||||
}
|
||||
return kit.MergeURL2(kit.Select(Info.Domain, m.Option(MSG_USERWEB)), path.Join("website", web), arg...)
|
||||
return kit.MergeURL2(kit.Select(Info.Domain, m.Option(MSG_USERWEB)), path.Join("/chat", "pod", m.Option(MSG_USERPOD), "website", web), arg...)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user