forked from x/icebergs
add some
This commit is contained in:
parent
02b707e79f
commit
c0a8cdc167
@ -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 == "" {
|
if host == "" {
|
||||||
host = kit.ParseURL(UserHost(m)).Hostname()
|
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" {
|
} else if port == "443" {
|
||||||
return kit.Format("https://%s", host)
|
return kit.Format("https://%s", host)
|
||||||
} else {
|
} 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 {
|
func PublicIP(m *ice.Message) ice.Any {
|
||||||
|
@ -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 { 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>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 { 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(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 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; }
|
body.light fieldset.macos.desktop>div.output>div.desktop fieldset>div.output.card>div.item { border:#d3d4d4 solid 1px; }
|
||||||
|
@ -110,7 +110,7 @@ func _install_spawn(m *ice.Message, arg ...string) {
|
|||||||
m.Option(INSTALL, _INSTALL)
|
m.Option(INSTALL, _INSTALL)
|
||||||
}
|
}
|
||||||
nfs.DirDeepAll(m.Spawn(), path.Join(source, m.Option(INSTALL)), "", func(value ice.Maps) {
|
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) {
|
func _install_start(m *ice.Message, arg ...string) {
|
||||||
|
@ -31,7 +31,8 @@ func _xterm_get(m *ice.Message, h string) xterm.XTerm {
|
|||||||
text := strings.Split(value[mdb.TEXT], lex.NL)
|
text := strings.Split(value[mdb.TEXT], lex.NL)
|
||||||
ls := kit.Split(strings.Split(kit.Select(ISH, value[mdb.TYPE]), " # ")[0])
|
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]) })
|
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) {
|
if m.Warn(e) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
2
exec.go
2
exec.go
@ -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)
|
panic(count)
|
||||||
}
|
}
|
||||||
list := kit.Simple(args...)
|
list := kit.Simple(args...)
|
||||||
|
@ -42,6 +42,7 @@ func Command(m *ice.Message, dir string, cli string, arg ...string) (XTerm, erro
|
|||||||
if path.Base(cli) == "ish" {
|
if path.Base(cli) == "ish" {
|
||||||
return NewITerm(m)
|
return NewITerm(m)
|
||||||
}
|
}
|
||||||
|
m.Debug("command %v %v", cli, arg)
|
||||||
cmd := exec.Command(cli, arg...)
|
cmd := exec.Command(cli, arg...)
|
||||||
cmd.Dir = nfs.MkdirAll(m, kit.Path(dir))
|
cmd.Dir = nfs.MkdirAll(m, kit.Path(dir))
|
||||||
cmd.Env = append(cmd.Env, os.Environ()...)
|
cmd.Env = append(cmd.Env, os.Environ()...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user