1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-09-24 13:10:56 +08:00
parent 56b87e9e78
commit 7ab38ec81f
3 changed files with 42 additions and 42 deletions

View File

@ -187,8 +187,13 @@ func init() {
func Upload(m *ice.Message) []string {
if up := kit.Simple(m.Optionv(ice.MSG_UPLOAD)); len(up) == 1 {
if m.Cmdy(CACHE, UPLOAD).Optionv(ice.MSG_UPLOAD, kit.Simple(m.Append(mdb.HASH), m.Append(mdb.NAME), m.Append(nfs.SIZE))); m.Option(ice.MSG_USERPOD) != "" {
if nfs.Exists(m, "usr/local/work/"+m.Option(ice.MSG_USERPOD)) {
m.Cmd(nfs.LINK, path.Join("usr/local/work/"+m.Option(ice.MSG_USERPOD), m.Append(nfs.FILE)), m.Append(nfs.FILE))
m.Cmd(SPACE, m.Option(ice.MSG_USERPOD), CACHE, mdb.CREATE, m.AppendSimple(mdb.NAME, mdb.TEXT, nfs.FILE, nfs.SIZE))
} else {
m.Cmd(SPACE, m.Option(ice.MSG_USERPOD), SPIDE, ice.DEV, SPIDE_CACHE, http.MethodGet, tcp.PublishLocalhost(m, m.MergeLink(PP(SHARE, CACHE, m.Append(mdb.HASH)))))
}
}
return kit.Simple(m.Optionv(ice.MSG_UPLOAD))
} else {
return up

View File

@ -166,7 +166,7 @@ func RenderPodCmd(m *ice.Message, pod, cmd string, arg ...ice.Any) {
if msg.Append(ctx.INDEX) == "web.code.vimer" {
m.Option(mdb.ICONS, msg.Option(ice.MSG_NODEICON))
}
m.OptionDefault(mdb.ICONS, m.Resource(kit.Select(ice.Info.NodeIcon, msg.Append(mdb.ICONS))))
m.OptionDefault(mdb.ICONS, m.Resource(kit.Select(ice.Info.NodeIcon, msg.Option(ice.MSG_NODEICON), msg.Append(mdb.ICONS))))
if !kit.IsIn(cmd, PORTAL, DESKTOP, ADMIN) {
pod = kit.Select(pod, msg.Option(ice.MSG_NODENAME))
m.OptionDefault(TITLE, kit.Select(cmd, msg.Append(mdb.HELP)+kit.Select("", " "+pod, pod != ""), !m.IsEnglish()))
@ -239,13 +239,8 @@ const (
CHAT_CMD = "web.chat.cmd"
TEAM_PLAN = "web.team.plan"
TEAM_GONGANXITONG_USER = "web.team.gonganxitong.user"
TEAM_GONGANXITONG_CITY = "web.team.gonganxitong.city"
TEAM_GONGANXITONG_DOMAIN = "web.team.gonganxitong.domain"
TEAM_RENZHENGSHOUQUAN_PORTAL = "web.team.renzhengshouquan.portal"
TEAM_RENZHENGSHOUQUAN_AUTH = "web.team.renzhengshouquan.auth"
TEAM_DASHBOARD_PORTAL = "web.team.dashboard.portal"
TEAM_DASHBOARD_SUMMARY = "web.team.dashboard.summary"
TEAM_STORAGE_PORTAL = "web.team.storage.portal"
TEAM_STORAGE_FILE = "web.team.storage.file"
)
func MessageInsertJSON(m *ice.Message, zone, name, text string, arg ...string) {

View File

@ -531,7 +531,7 @@ func init() {
Upload(m)
if pod := m.Option(ice.POD); pod != "" {
if ls := kit.Simple(m.Optionv(ice.MSG_UPLOAD)); len(ls) > 1 {
m.Cmd(SPACE, pod, SPIDE, ice.DEV, CACHE, SHARE_CACHE+ls[0])
// m.Cmd(SPACE, pod, SPIDE, ice.DEV, CACHE, SHARE_CACHE+ls[0])
}
m.Options(ice.POD, []string{}, ice.MSG_USERPOD, strings.TrimPrefix(pod, "ops.")).Cmdy(append(kit.List(ice.SPACE, pod), arg...)...)
return true