1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-05-28 18:48:36 +08:00
parent 4e03450ce2
commit 745ea23b48
4 changed files with 20 additions and 12 deletions

View File

@ -480,7 +480,7 @@ func init() {
VERSION: {Hand: func(m *ice.Message, arg ...string) {
m.Cmdy("web.code.version")
}},
nfs.GOWORK: {Name: "gowork name", Help: "工作区", Hand: func(m *ice.Message, arg ...string) {
nfs.GOWORK: {Name: "gowork name", Help: "工作区", Icon: "bi bi-exclude", Hand: func(m *ice.Message, arg ...string) {
m.Cmd(cli.SYSTEM, cli.GO, "work", "init")
kit.For([]string{".", nfs.USR_RELEASE, nfs.USR_ICEBERGS, nfs.USR_TOOLKITS}, func(p string) { m.Cmd(cli.SYSTEM, cli.GO, "work", "use", p) })
DreamEach(m, m.Option(mdb.NAME), "", func(name string) { m.Cmd(cli.SYSTEM, cli.GO, "work", "use", path.Join(ice.USR_LOCAL_WORK, name)) })

View File

@ -14,18 +14,18 @@ import (
func _matrix_list(m *ice.Message, domain, typ string, value ice.Maps, fields ...string) (server, icons, types []string) {
value[DOMAIN], value[mdb.TYPE] = domain, typ
istech, isdebug := typ == SERVER || kit.IsIn(value[aaa.ACCESS], aaa.TECH, aaa.ROOT), m.IsDebug()
// istech, isdebug := typ == SERVER || kit.IsIn(value[aaa.ACCESS], aaa.TECH, aaa.ROOT), m.IsDebug()
istech := typ == SERVER || kit.IsIn(value[aaa.ACCESS], aaa.TECH, aaa.ROOT)
compile := kit.Select("", kit.Select(COMPILE, UPGRADE, typ == SERVER), istech)
vimer := kit.Select("", VIMER, istech && isdebug)
button := []ice.Any{PORTAL, DESKTOP, DREAM, ADMIN, OPEN, compile, MESSAGE}
kit.If(istech, func() { button = append(button, WORD, STATUS) })
kit.If(istech && isdebug, func() { button = append(button, vimer, cli.RUNTIME, XTERM) })
button := []ice.Any{PORTAL, DESKTOP, ADMIN, WORD, OPEN, compile, DREAM}
kit.If(istech, func() { button = append(button, STATUS) })
kit.If(istech, func() { button = append(button, VIMER, cli.RUNTIME, XTERM) })
m.PushRecord(value, fields...).PushButton(button...)
button = []ice.Any{PORTAL, DESKTOP, MESSAGE, ADMIN, OPEN, compile}
kit.If(istech, func() { button = append(button, WORD, STATUS) })
kit.If(istech && isdebug, func() { button = append(button, vimer, cli.RUNTIME, XTERM, cli.STOP) })
button = []ice.Any{PORTAL, DESKTOP, ADMIN, WORD, OPEN, compile}
kit.If(istech, func() { button = append(button, STATUS) })
kit.If(istech, func() { button = append(button, VIMER, cli.RUNTIME, XTERM, cli.STOP) })
m.Cmd(Space(m, domain), DREAM).Table(func(value ice.Maps) {
switch value[mdb.TYPE] {
case WORKER:

View File

@ -1,4 +1,5 @@
$project div.list { border-left:var(--box-notice3); margin-left:25px; }
$project div.list { margin-left:25px; }
// $project div.list { border-left:var(--box-notice3); margin-left:25px; }
$content>div.item { box-shadow:var(--th-box-shadow); border:var(--plugin-border); border-radius:var(--plugin-radius); }
$content>div.item:hover { box-shadow:var(--notice-box-shadow); }
$content>div.item div.title div.label { font-size:var(--status-font-size); font-weight:normal; margin-top:var(--input-margin); }

View File

@ -128,9 +128,16 @@ func init() {
// kit.If(m.IsDebug(), func() { list = append(list, cli.RUNTIME) })
}},
web.DREAM_ACTION: {Hand: func(m *ice.Message, arg ...string) { web.DreamProcess(m, "", cli.SH, arg...) }},
}, web.DreamTablesAction(), mdb.HashAction(mdb.FIELD, "time,hash,type,name,text,path")), Hand: func(m *ice.Message, arg ...string) {
}, web.DreamTablesAction(), mdb.HashAction(mdb.FIELD, "time,hash,type,name,text,path,daemon")), Hand: func(m *ice.Message, arg ...string) {
if mdb.HashSelect(m, arg...); len(arg) == 0 {
m.Action(mdb.CREATE)
list := m.CmdMap(web.SPACE, mdb.NAME)
m.Table(func(value ice.Maps) {
if list[value[cli.DAEMON]] == nil {
m.Push(mdb.STATUS, web.OFFLINE)
} else {
m.Push(mdb.STATUS, web.ONLINE)
}
})
} else {
kit.If(m.Length() == 0, func() {
kit.If(arg[0] == cli.SH, func() {