mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
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})
|
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) {
|
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 {
|
if m.Option(mdb.TYPE) == ORIGIN {
|
||||||
m.ProcessOpen(SpideOrigin(m, m.Option(mdb.NAME)))
|
m.ProcessOpen(SpideOrigin(m, m.Option(mdb.NAME)))
|
||||||
} else if p := ProxyDomain(m, m.Option(mdb.NAME)); p != "" {
|
} 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
|
return false
|
||||||
}
|
}
|
||||||
p := path.Join(strings.TrimPrefix(r.URL.Path, nfs.P))
|
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/") {
|
if kit.HasPrefix(p, "var/", "usr/local/") {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -304,6 +304,10 @@ const SPACE = "space"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
"p": {Help: "资源", Actions: ApiWhiteAction(), Hand: func(m *ice.Message, arg ...string) {
|
"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) {
|
if kit.IsIn(arg[0], ice.SRC, ice.USR) {
|
||||||
ShareLocalFile(m, arg...)
|
ShareLocalFile(m, arg...)
|
||||||
} else {
|
} else {
|
||||||
|
@ -98,9 +98,9 @@ func init() {
|
|||||||
list := m.Spawn(ice.Maps{ice.MSG_FIELDS: ""}).CmdMap(SPACE, mdb.NAME)
|
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) {
|
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]]++
|
stat[value[mdb.TYPE]]++
|
||||||
if value[nfs.BINARY] == "" {
|
// if value[nfs.BINARY] == "" {
|
||||||
value[nfs.BINARY] = origin + S(value[mdb.NAME])
|
value[nfs.BINARY] = origin + S(value[mdb.NAME])
|
||||||
}
|
// }
|
||||||
m.Push("", value, kit.Split("time,type,name,icons,repos,binary,module,version"))
|
m.Push("", value, kit.Split("time,type,name,icons,repos,binary,module,version"))
|
||||||
if _, ok := list[value[mdb.NAME]]; ok {
|
if _, ok := list[value[mdb.NAME]]; ok {
|
||||||
m.Push("exists", ice.TRUE)
|
m.Push("exists", ice.TRUE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user