1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
root 2025-02-05 09:44:27 +08:00
parent 0ef29edbad
commit b64a3b5725
3 changed files with 14 additions and 13 deletions

View File

@ -6,6 +6,7 @@ import (
"shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/mdb"
"shylinux.com/x/icebergs/base/nfs"
"shylinux.com/x/icebergs/base/tcp"
"shylinux.com/x/icebergs/base/web"
)
@ -24,15 +25,14 @@ func (s client) List(m *ice.Message, arg ...string) {
m.PushRecord(value, mdb.ICONS, web.CLIENT_NAME)
}
})
m.Action(s.Create)
m.Display("")
m.Action(s.Create).SortStrR(web.CLIENT_NAME).Display("")
} else {
m.SplitIndex(m.Cmdx(web.SPIDE, arg[0], "/c/"+m.Prefix("server"))).PushAction(s.Download)
m.SplitIndex(m.Cmdx(web.SPIDE, arg[0], web.C(m.Prefix(tcp.SERVER)))).PushAction(s.Download)
}
}
func (s client) Download(m *ice.Message, arg ...string) {
name := path.Base(m.Option(nfs.PATH))
web.GoToast(m.Message, func(toast func(string, int, int)) (res []string) {
name := path.Base(m.Option(nfs.PATH))
m.Cmd(web.SPIDE, m.Option(web.CLIENT_NAME), web.SPIDE_SAVE, nfs.USR_PUBLISH+name, "/publish/"+name, func(count, total, value int) {
toast(name, count, total)
})

View File

@ -1,11 +1,10 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) { can.ui = can.onappend.layout(can)
msg.Table(function(value) {
can.onimport.item(can, {icons: value.icons, name: value["client.name"]}, function(event, item, show, target) { can.db.client_name = item.name
can.onimport.item(can, {name: value[web.CLIENT_NAME], icons: value.icons}, function(event, item, show, target) { can.db.client_name = item.name
can.onimport.tabsCache(can, item, target, function(event) {
can.run(event, [item.name], function(msg) {
can.onappend.table(can, msg, null, can.ui.content)
can.onappend._status(can, msg)
can.onappend.table(can, msg, null, can.ui.content), can.onappend._status(can, msg)
})
})
})
@ -14,7 +13,7 @@ Volcanos(chat.ONIMPORT, {
})
Volcanos(chat.ONACTION, {
download: function(event, can) {
var msg = can.request(event); msg.Option("client.name", can.db.client_name)
var msg = can.request(event); msg.Option(web.CLIENT_NAME, can.db.client_name)
can.runAction(event, web.DOWNLOAD)
},
})

View File

@ -2,8 +2,10 @@ package publish
import (
"shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/cli"
"shylinux.com/x/icebergs/base/mdb"
"shylinux.com/x/icebergs/base/nfs"
"shylinux.com/x/icebergs/core/code"
)
type server struct {
@ -15,20 +17,20 @@ type server struct {
func (s server) Inputs(m *ice.Message, arg ...string) {
switch arg[0] {
case "path":
case nfs.PATH:
m.Cmdy(nfs.DIR, nfs.USR_PUBLISH, nfs.PATH)
case "compile":
case code.COMPILE:
m.Push(arg[0], "go")
m.Push(arg[0], "javac")
case "runtime":
case cli.RUNTIME:
m.Push(arg[0], "python")
m.Push(arg[0], "java")
m.Push(arg[0], "php")
case "os":
case cli.OS:
m.Push(arg[0], "Linux")
m.Push(arg[0], "macOS")
m.Push(arg[0], "Windows")
case "cpu":
case cli.CPU:
m.Push(arg[0], "amd64")
m.Push(arg[0], "x86")
m.Push(arg[0], "arm")