forked from x/icebergs
add some
This commit is contained in:
parent
95ba9fc6cd
commit
bc6e12a6f0
@ -84,9 +84,6 @@ func _space_fork(m *ice.Message) {
|
||||
safe = aaa.IsTechOrRoot(m)
|
||||
}
|
||||
}
|
||||
if m.Option(mdb.ICONS) != "" && !kit.HasPrefix(m.Option(mdb.ICONS), nfs.PS, HTTP) {
|
||||
// m.Option(mdb.ICONS, kit.MergeURL(nfs.P+m.Option(mdb.ICONS), ice.POD, name))
|
||||
}
|
||||
args := kit.Simple(mdb.TYPE, m.Option(mdb.TYPE), mdb.NAME, name, mdb.TEXT, text, m.OptionSimple(mdb.ICONS, mdb.TIME, nfs.MODULE, nfs.VERSION, cli.DAEMON))
|
||||
args = append(args, aaa.USERNICK, m.Option(ice.MSG_USERNICK), aaa.USERNAME, m.Option(ice.MSG_USERNAME), aaa.USERROLE, m.Option(ice.MSG_USERROLE))
|
||||
args = append(args, cli.SYSTEM, m.Option(cli.GOOS))
|
||||
@ -194,14 +191,6 @@ func _space_exec(m *ice.Message, name string, source, target []string, c *websoc
|
||||
m.Optionv(ice.MSG_OPTION, []string{})
|
||||
break
|
||||
}
|
||||
icons := m.Option(mdb.ICONS)
|
||||
if !strings.HasPrefix(icons, HTTP) {
|
||||
if !strings.HasPrefix(icons, nfs.PS) {
|
||||
icons = nfs.P + icons
|
||||
}
|
||||
icons = SpideOrigin(m, name) + icons
|
||||
}
|
||||
m.Option(mdb.ICONS, icons)
|
||||
args := m.OptionSimple(mdb.ICONS, mdb.TIME, nfs.MODULE, nfs.VERSION, AGENT, cli.SYSTEM)
|
||||
kit.If(name == ice.OPS, func() { args = append(args, m.OptionSimple(mdb.TEXT)...) })
|
||||
mdb.HashModify(m, mdb.HASH, name, ParseUA(m), args)
|
||||
@ -338,7 +327,7 @@ func init() {
|
||||
m.Cmd(SERVE, m.ActionKey(), arg)
|
||||
return
|
||||
}
|
||||
m.Option(mdb.ICONS, "")
|
||||
m.Options(mdb.ICONS, "")
|
||||
kit.If(ice.Info.NodeMain, func(cmd string) { RenderPodCmd(m, "", cmd) }, func() { RenderMain(m) })
|
||||
}},
|
||||
ice.INFO: {Role: aaa.VOID, Hand: func(m *ice.Message, arg ...string) {
|
||||
@ -430,9 +419,16 @@ func init() {
|
||||
m.PushButton(kit.Select(OPEN, LOGIN, value[mdb.TYPE] == LOGIN), mdb.REMOVE)
|
||||
})
|
||||
m.RewriteAppend(func(value, key string, index int) string {
|
||||
if key == mdb.ICONS {
|
||||
if !kit.HasPrefix(value, nfs.PS, HTTP) {
|
||||
value = kit.MergeURL(nfs.P+value, ice.POD, kit.Keys(m.Option(ice.MSG_USERPOD), m.Appendv(mdb.NAME)[index]))
|
||||
if key == mdb.ICONS && !kit.HasPrefix(value, HTTP) {
|
||||
if m.Appendv(mdb.TYPE)[index] == ORIGIN {
|
||||
if !kit.HasPrefix(value, nfs.PS) {
|
||||
value = kit.MergeURL(nfs.P + value)
|
||||
}
|
||||
value = kit.MergeURL2(m.Appendv(mdb.TEXT)[index], value)
|
||||
} else {
|
||||
if !kit.HasPrefix(value, nfs.PS) {
|
||||
value = kit.MergeURL(nfs.P+value, ice.POD, kit.Keys(m.Option(ice.MSG_USERPOD), m.Appendv(mdb.NAME)[index]))
|
||||
}
|
||||
}
|
||||
}
|
||||
return value
|
||||
|
@ -50,6 +50,7 @@ func init() {
|
||||
m.Cmdy(web.SPACE, arg[0], arg[2], arg[3:])
|
||||
} else {
|
||||
m.Options(m.Cmd(web.SPACE, arg[0]).AppendSimple())
|
||||
m.Options(mdb.ICONS, "")
|
||||
web.RenderPodCmd(m, arg[0], arg[2], arg[3:])
|
||||
}
|
||||
}
|
||||
|
2
init.go
2
init.go
@ -126,7 +126,7 @@ func Run(arg ...string) string {
|
||||
conf.Wait()
|
||||
os.Exit(kit.Int(Pulse.Option(EXIT)))
|
||||
default:
|
||||
_forever = true
|
||||
_forever = false
|
||||
Pulse.Cmdy(INIT).Cmdy(arg)
|
||||
kit.If(strings.TrimSpace(Pulse.Result()) == "" && Pulse.Length() > 0, func() { Pulse.TableEcho() })
|
||||
kit.If(Pulse.Result() != "" && !strings.HasSuffix(Pulse.Result(), NL), func() { Pulse.Echo(NL) })
|
||||
|
@ -155,9 +155,8 @@ func init() {
|
||||
cli.MAKE: {Help: "构建", Icon: "bi bi-tools", Hand: func(m *ice.Message, arg ...string) {
|
||||
kit.If(m.Option(mdb.HASH), func(p string) { mdb.Config(m, CURRENT, p) })
|
||||
m.Options(m.Cmd("", kit.Select(mdb.Config(m, CURRENT), arg, 0)).AppendSimple())
|
||||
kit.If(m.Option(cli.PWD), func(p string) {
|
||||
// kit.If(p == kit.Path(ice.USR_VOLCANOS+PUBLISH_CLIENT_MP), func() { _ide_autogen_utils(m); _ide_autogen_pages(m) })
|
||||
})
|
||||
// _ide_autogen_utils(m)
|
||||
// _ide_autogen_pages(m)
|
||||
m.Cmd("", AUTO_PREVIEW)
|
||||
}},
|
||||
web.ADMIN: {Hand: func(m *ice.Message, arg ...string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user