1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-08-25 17:49:43 +08:00
parent 02b707e79f
commit c0a8cdc167
6 changed files with 8 additions and 6 deletions

View File

@ -297,7 +297,7 @@ func init() {
})
}
func HostPort(m *ice.Message, host, port string, arg ...string) string {
func HostPort(m *ice.Message, host, port string) string {
if host == "" {
host = kit.ParseURL(UserHost(m)).Hostname()
}
@ -306,7 +306,7 @@ func HostPort(m *ice.Message, host, port string, arg ...string) string {
} else if port == "443" {
return kit.Format("https://%s", host)
} else {
return kit.Format("%s://%s:%s", kit.ParseURL(UserHost(m)).Scheme, host, port)
return kit.Format("http://%s:%s", host, port)
}
}
func PublicIP(m *ice.Message) ice.Any {

View File

@ -72,7 +72,7 @@ body.light fieldset.macos.desktop>div.output>fieldset.macos { background-color:#
body.light fieldset.macos.desktop>div.output>fieldset.macos.notifications { background-color:transparent; }
body.light fieldset.macos.desktop>div.output>fieldset.macos.notifications div.item { background-color:#daefff99; }
body.light fieldset.macos.desktop>div.output>div.desktop>fieldset { background-color:#dee1e6; }
body.light fieldset.macos.desktop>div.output>div.desktop fieldset input:not(:hover) { background-color:white; }
/* body.light fieldset.macos.desktop>div.output>div.desktop fieldset input:not(:hover) { background-color:white; } */
body.light fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(odd) { background-color:#f4f5f5; }
body.light fieldset.macos.desktop>div.output>div.desktop fieldset table.content tbody tr:nth-child(even) { background-color:white; }
body.light fieldset.macos.desktop>div.output>div.desktop fieldset>div.output.card>div.item { border:#d3d4d4 solid 1px; }

View File

@ -110,7 +110,7 @@ func _install_spawn(m *ice.Message, arg ...string) {
m.Option(INSTALL, _INSTALL)
}
nfs.DirDeepAll(m.Spawn(), path.Join(source, m.Option(INSTALL)), "", func(value ice.Maps) {
m.Cmd(nfs.LINK, path.Join(target, value[nfs.PATH]), path.Join(source, m.Option(INSTALL), value[nfs.PATH]))
m.Cmd(nfs.LINK, path.Join(target, value[nfs.PATH]), path.Join(source, m.Option(INSTALL), value[nfs.PATH]), kit.Dict(ice.LOG_DISABLE, ice.TRUE))
})
}
func _install_start(m *ice.Message, arg ...string) {

View File

@ -31,7 +31,8 @@ func _xterm_get(m *ice.Message, h string) xterm.XTerm {
text := strings.Split(value[mdb.TEXT], lex.NL)
ls := kit.Split(strings.Split(kit.Select(ISH, value[mdb.TYPE]), " # ")[0])
kit.If(value[nfs.PATH] != "" && !strings.HasSuffix(value[nfs.PATH], nfs.PS), func() { value[nfs.PATH] = path.Dir(value[nfs.PATH]) })
term, e := xterm.Command(m, value[nfs.PATH], kit.Select(ls[0], cli.SystemFind(m, ls[0])), ls[1:]...)
m.Debug("command %v %v", ls, value)
term, e := xterm.Command(m, value[nfs.PATH], kit.Select(ls[0], cli.SystemFind(m, ls[0], value[nfs.PATH])), ls[1:]...)
if m.Warn(e) {
return nil
}

View File

@ -146,7 +146,7 @@ func (m *Message) _command(arg ...Any) *Message {
}
}
}
if count := kit.Int(m.Option(MSG_COUNT, kit.Format(kit.Int(m.Option(MSG_COUNT))+1))); m.Warn(count > 300, ErrTooDeepCount) {
if count := kit.Int(m.Option(MSG_COUNT, kit.Format(kit.Int(m.Option(MSG_COUNT))+1))); m.Warn(count > 30000, ErrTooDeepCount) {
panic(count)
}
list := kit.Simple(args...)

View File

@ -42,6 +42,7 @@ func Command(m *ice.Message, dir string, cli string, arg ...string) (XTerm, erro
if path.Base(cli) == "ish" {
return NewITerm(m)
}
m.Debug("command %v %v", cli, arg)
cmd := exec.Command(cli, arg...)
cmd.Dir = nfs.MkdirAll(m, kit.Path(dir))
cmd.Env = append(cmd.Env, os.Environ()...)