forked from x/icebergs
add some
This commit is contained in:
parent
d3ba62cc61
commit
51ae44aeb3
@ -423,6 +423,15 @@ func init() {
|
||||
m.Cmd(SPACE, m.Option(mdb.NAME), SPIDE, DEV_CREATE_TOKEN, ice.Maps{CLIENT_NAME: ice.DEV, TOKEN: token})
|
||||
}},
|
||||
OPEN: {Role: aaa.VOID, Hand: func(m *ice.Message, arg ...string) {
|
||||
if kit.IsIn(m.Option(mdb.NAME), "20240724-community") || kit.HasPrefixList(arg, ctx.RUN) {
|
||||
if !kit.HasPrefixList(arg, ctx.RUN) {
|
||||
defer m.Push(TITLE, m.Option(mdb.NAME))
|
||||
defer m.Push("_width", "390")
|
||||
defer m.Push("_height", "844")
|
||||
}
|
||||
ctx.ProcessFloat(m, CHAT_IFRAME, S(m.Option(mdb.NAME)), arg...)
|
||||
return
|
||||
}
|
||||
if m.Option(mdb.TYPE) == ORIGIN {
|
||||
m.ProcessOpen(SpideOrigin(m, m.Option(mdb.NAME)))
|
||||
} else if p := ProxyDomain(m, m.Option(mdb.NAME)); p != "" {
|
||||
|
@ -108,7 +108,7 @@ func _serve_static(msg *ice.Message, w http.ResponseWriter, r *http.Request) boo
|
||||
return false
|
||||
}
|
||||
p := path.Join(strings.TrimPrefix(r.URL.Path, nfs.P))
|
||||
if pp := path.Join(nfs.USR_LOCAL_WORK, msg.Option(ice.POD)); ispod && nfs.Exists(msg, pp) {
|
||||
if pp := path.Join(nfs.USR_LOCAL_WORK, msg.Option(ice.POD)); ispod && nfs.Exists(msg, pp) && !strings.HasPrefix(p, "require/") {
|
||||
if kit.HasPrefix(p, "var/", "usr/local/") {
|
||||
return false
|
||||
}
|
||||
|
@ -304,6 +304,10 @@ const SPACE = "space"
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
"p": {Help: "资源", Actions: ApiWhiteAction(), Hand: func(m *ice.Message, arg ...string) {
|
||||
if arg[0] == "require" {
|
||||
m.Cmdy("/require/", arg[1:])
|
||||
return
|
||||
}
|
||||
if kit.IsIn(arg[0], ice.SRC, ice.USR) {
|
||||
ShareLocalFile(m, arg...)
|
||||
} else {
|
||||
|
@ -98,9 +98,9 @@ func init() {
|
||||
list := m.Spawn(ice.Maps{ice.MSG_FIELDS: ""}).CmdMap(SPACE, mdb.NAME)
|
||||
m.SetAppend().Spawn().SplitIndex(m.Cmdx(SPIDE, arg[0], dream, kit.Dict(mdb.ConfigSimple(m, CLIENT_TIMEOUT)))).Table(func(value ice.Maps) {
|
||||
stat[value[mdb.TYPE]]++
|
||||
if value[nfs.BINARY] == "" {
|
||||
value[nfs.BINARY] = origin + S(value[mdb.NAME])
|
||||
}
|
||||
// if value[nfs.BINARY] == "" {
|
||||
value[nfs.BINARY] = origin + S(value[mdb.NAME])
|
||||
// }
|
||||
m.Push("", value, kit.Split("time,type,name,icons,repos,binary,module,version"))
|
||||
if _, ok := list[value[mdb.NAME]]; ok {
|
||||
m.Push("exists", ice.TRUE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user