1
0
mirror of https://shylinux.com/x/icebergs synced 2025-06-26 10:27:31 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-06-28 18:39:11 +08:00
parent 82c0c14dea
commit 96dd7e96de
5 changed files with 31 additions and 32 deletions

View File

@ -238,12 +238,10 @@ func init() {
switch m.Option(ctx.ACTION) { switch m.Option(ctx.ACTION) {
case mdb.CREATE: case mdb.CREATE:
switch arg[0] { switch arg[0] {
case mdb.NAME, nfs.TEMPLATE: case mdb.NAME:
_dream_list(m, true).Cut("name,status,time") _dream_list(m, true).Cut("name,status,time")
return
case mdb.ICONS: case mdb.ICONS:
mdb.HashInputs(m, arg) mdb.HashInputs(m, arg)
return
case nfs.BINARY: case nfs.BINARY:
m.Cmdy(nfs.DIR, ice.BIN, "path,size,time", kit.Dict(nfs.DIR_TYPE, nfs.TYPE_BIN)) m.Cmdy(nfs.DIR, ice.BIN, "path,size,time", kit.Dict(nfs.DIR_TYPE, nfs.TYPE_BIN))
m.Cmd(nfs.DIR, ice.USR_LOCAL_WORK, kit.Dict(nfs.DIR_TYPE, nfs.TYPE_BOTH), func(value ice.Maps) { m.Cmd(nfs.DIR, ice.USR_LOCAL_WORK, kit.Dict(nfs.DIR_TYPE, nfs.TYPE_BOTH), func(value ice.Maps) {
@ -258,23 +256,26 @@ func init() {
} }
case STARTALL: case STARTALL:
DreamEach(m, "", cli.STOP, func(name string) { m.Push(arg[0], name) }) DreamEach(m, "", cli.STOP, func(name string) { m.Push(arg[0], name) })
return
case tcp.SEND: case tcp.SEND:
m.Cmd(SPACE, func(value ice.Maps) { m.Cmd(SPACE, func(value ice.Maps) {
kit.If(kit.IsIn(value[mdb.TYPE], SERVER), func() { m.Push(arg[0], value[mdb.NAME]) }) kit.If(kit.IsIn(value[mdb.TYPE], SERVER), func() { m.Push(arg[0], value[mdb.NAME]) })
}) })
return
}
switch arg[0] {
case mdb.NAME:
DreamEach(m, "", cli.START, func(name string) { m.Push(arg[0], name) })
case ctx.CMDS:
m.Cmdy(ctx.COMMAND)
case nfs.FILE:
m.Options(nfs.DIR_TYPE, nfs.TYPE_CAT, ice.MSG_FIELDS, nfs.PATH)
m.Cmdy(nfs.DIR, nfs.SRC).Cmdy(nfs.DIR, nfs.ETC).Cmdy(nfs.DIR, "")
default: default:
gdb.Event(m, DREAM_INPUTS, arg) switch arg[0] {
case mdb.NAME:
DreamEach(m, "", cli.START, func(name string) { m.Push(arg[0], name) })
case ctx.CMDS:
m.Cmdy(ctx.COMMAND)
case nfs.FILE:
m.Options(nfs.DIR_TYPE, nfs.TYPE_CAT, ice.MSG_FIELDS, nfs.PATH)
m.Cmdy(nfs.DIR, nfs.SRC).Cmdy(nfs.DIR, nfs.ETC).Cmdy(nfs.DIR, "")
case tcp.NODENAME:
m.Cmdy(SPACE, m.Option(mdb.NAME), SPACE, ice.INFO).CutTo(mdb.NAME, tcp.NODENAME)
case aaa.USERNAME:
m.Push(arg[0], m.Option(ice.MSG_USERNAME))
default:
gdb.Event(m, DREAM_INPUTS, arg)
}
} }
}}, }},
mdb.CREATE: {Name: "create name*=hi repos binary", Hand: func(m *ice.Message, arg ...string) { mdb.CREATE: {Name: "create name*=hi repos binary", Hand: func(m *ice.Message, arg ...string) {

View File

@ -113,7 +113,7 @@ func init() {
aaa.LOGOUT: {Role: aaa.VOID, Hand: aaa.SessLogout}, aaa.LOGOUT: {Role: aaa.VOID, Hand: aaa.SessLogout},
web.ONLINE: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(web.STREAM, web.ONLINE) }}, web.ONLINE: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(web.STREAM, web.ONLINE) }},
cli.QRCODE: {Hand: func(m *ice.Message, arg ...string) { cli.QRCODE: {Hand: func(m *ice.Message, arg ...string) {
link := m.OptionDefault(mdb.LINK, tcp.PublishLocalhost(m, m.Option(ice.MSG_USERWEB))) link := tcp.PublishLocalhost(m, m.OptionDefault(mdb.LINK, m.Option(ice.MSG_USERWEB)))
m.Push(mdb.NAME, link).PushQRCode(mdb.TEXT, kit.MergeURL(link, ice.FROM_DAEMON, m.Option(ice.MSG_DAEMON))) m.Push(mdb.NAME, link).PushQRCode(mdb.TEXT, kit.MergeURL(link, ice.FROM_DAEMON, m.Option(ice.MSG_DAEMON)))
}}, }},
mdb.CREATE: {Name: "create type*=plugin,qrcode,oauth name* help icons link order space index args", Hand: func(m *ice.Message, arg ...string) { mdb.HashCreate(m, m.OptionSimple()) }}, mdb.CREATE: {Name: "create type*=plugin,qrcode,oauth name* help icons link order space index args", Hand: func(m *ice.Message, arg ...string) { mdb.HashCreate(m, m.OptionSimple()) }},

View File

@ -39,8 +39,8 @@ fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.icon { box-shad
fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.icon.delete { display:none; } fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.icon.delete { display:none; }
fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.list.icons { margin:var(--button-margin) 0; } fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.list.icons { margin:var(--button-margin) 0; }
fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.back.icons { margin:var(--button-margin) 0; } fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.back.icons { margin:var(--button-margin) 0; }
fieldset.desktop>div.output>div.desktop>fieldset>form.option>div input { border-top:var(--input-border); } fieldset.desktop>div.output>div.desktop>fieldset>form.option>div input:not(:hover):not(:focus) { border-top:var(--input-border); }
fieldset.desktop>div.output>div.desktop>fieldset>div.action>div input { border-top:var(--input-border); } fieldset.desktop>div.output>div.desktop>fieldset>div.action>div input:not(:hover):not(:focus) { border-top:var(--input-border); }
fieldset.desktop>div.output>div.desktop>fieldset>div.action div.tabs:not(.select) { display:none; } fieldset.desktop>div.output>div.desktop>fieldset>div.action div.tabs:not(.select) { display:none; }
fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.text input:hover { border-top:var(--box-notice); } fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.text input:hover { border-top:var(--box-notice); }
fieldset.desktop>div.output>div.desktop>fieldset>div.action>div.text input:hover { border-top:var(--box-notice); } fieldset.desktop>div.output>div.desktop>fieldset>div.action>div.text input:hover { border-top:var(--box-notice); }

View File

@ -17,18 +17,7 @@ import (
const UPGRADE = "upgrade" const UPGRADE = "upgrade"
func init() { func init() {
Index.Merge(&ice.Context{Configs: ice.Configs{ Index.Merge(&ice.Context{Commands: ice.Commands{
UPGRADE: {Value: kit.Dict(
mdb.META, kit.Dict(mdb.FIELDS, "type,file,path"),
mdb.HASH, kit.Dict(
nfs.TARGET, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, ice.BIN, nfs.FILE, ice.ICE_BIN)),
ctx.CONFIG, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, nfs.SHY, nfs.FILE, ice.ETC_LOCAL_SHY)),
nfs.BINARY, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, nfs.TAR, nfs.FILE, "contexts.bin.tar.gz")),
nfs.SOURCE, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, nfs.TAR, nfs.FILE, "contexts.src.tar.gz")),
COMPILE, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, nfs.TAR, nfs.FILE, "go1.15.5", nfs.PATH, ice.USR_LOCAL)),
)),
},
}, Commands: ice.Commands{
UPGRADE: {Name: "upgrade item=target,config,binary,source,compile run restart", Help: "升级", Actions: ice.Actions{ UPGRADE: {Name: "upgrade item=target,config,binary,source,compile run restart", Help: "升级", Actions: ice.Actions{
cli.RESTART: {Hand: func(m *ice.Message, arg ...string) { m.Go(func() { m.Sleep30ms(ice.EXIT, 1) }) }}, cli.RESTART: {Hand: func(m *ice.Message, arg ...string) { m.Go(func() { m.Sleep30ms(ice.EXIT, 1) }) }},
}, Hand: func(m *ice.Message, arg ...string) { }, Hand: func(m *ice.Message, arg ...string) {
@ -64,5 +53,13 @@ func init() {
web.Toast(m, cli.RESTART) web.Toast(m, cli.RESTART)
} }
}}, }},
}, Configs: ice.Configs{
UPGRADE: {Value: kit.Dict(mdb.META, kit.Dict(mdb.FIELDS, "type,file,path"), mdb.HASH, kit.Dict(
nfs.TARGET, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, ice.BIN, nfs.FILE, ice.ICE_BIN)),
ctx.CONFIG, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, nfs.SHY, nfs.FILE, ice.ETC_LOCAL_SHY)),
nfs.BINARY, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, nfs.TAR, nfs.FILE, "contexts.bin.tar.gz")),
nfs.SOURCE, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, nfs.TAR, nfs.FILE, "contexts.src.tar.gz")),
COMPILE, kit.Dict(mdb.LIST, kit.List(mdb.TYPE, nfs.TAR, nfs.FILE, "go1.15.5", nfs.PATH, ice.USR_LOCAL)),
))},
}}) }})
} }

View File

@ -30,13 +30,14 @@ const FEEL = "feel"
func init() { func init() {
Index.MergeCommands(ice.Commands{ Index.MergeCommands(ice.Commands{
FEEL: {Name: "feel path=usr/icons/@key file=background.jpg auto upload record1 record2 actions", Help: "影音媒体", Icon: "Photos.png", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{ FEEL: {Name: "feel path=usr/icons/@key file=background.jpg auto upload record1 record2 fullscreen", Help: "影音媒体", Icon: "Photos.png", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
m.Push(arg[0], USR_LOCAL_IMAGE) m.Push(arg[0], USR_LOCAL_IMAGE)
m.Push(arg[0], USR_IMAGE) m.Push(arg[0], USR_IMAGE)
m.Push(arg[0], USR_AVATAR) m.Push(arg[0], USR_AVATAR)
m.Push(arg[0], USR_ICONS) m.Push(arg[0], USR_ICONS)
}}, }},
"fullscreen": {Name: "全屏", Icon: "bi bi-fullscreen"},
web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) { web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) {
up := kit.Simple(m.Optionv(ice.MSG_UPLOAD)) up := kit.Simple(m.Optionv(ice.MSG_UPLOAD))
m.Cmdy(web.CACHE, web.WATCH, m.Option(mdb.HASH), path.Join(m.Option(nfs.PATH), up[1])) m.Cmdy(web.CACHE, web.WATCH, m.Option(mdb.HASH), path.Join(m.Option(nfs.PATH), up[1]))
@ -76,7 +77,7 @@ func init() {
m.ProcessInner() m.ProcessInner()
} }
}}, }},
}, chat.FavorAction(), WikiAction("", "ico|png|PNG|jpg|JPG|jpeg|mp4|m4v|mov|MOV|webm"), mdb.HashAction(mdb.SHORT, nfs.PATH, mdb.FIELD, "time,path,name,cover")), Hand: func(m *ice.Message, arg ...string) { }, chat.FavorAction(), WikiAction("", "ico|png|PNG|jpg|JPG|jpeg|mp4|m4v|mov|MOV|webm|mp3"), mdb.HashAction(mdb.SHORT, nfs.PATH, mdb.FIELD, "time,path,name,cover")), Hand: func(m *ice.Message, arg ...string) {
if len(kit.Slice(arg, 0, 1)) == 0 { if len(kit.Slice(arg, 0, 1)) == 0 {
mdb.HashSelect(m) mdb.HashSelect(m)
if aaa.IsTechOrRoot(m) { if aaa.IsTechOrRoot(m) {