1
0
mirror of https://shylinux.com/x/icebergs synced 2025-05-07 13:46:54 +08:00
This commit is contained in:
harveyshao 2023-02-15 10:30:09 +08:00
parent eceea605ad
commit aa2e020629

View File

@ -166,15 +166,12 @@ func init() {
_serve_start(m) _serve_start(m)
}}, }},
SERVE_START: {Hand: func(m *ice.Message, arg ...string) { SERVE_START: {Hand: func(m *ice.Message, arg ...string) {
domain := m.Cmdx(SPACE, DOMAIN) if domain := m.Cmdx(SPACE, DOMAIN); ice.Info.Colors {
if ice.Info.Colors {
m.Sleep30ms().Cmd(ssh.PRINTF, kit.Dict(nfs.CONTENT, "\r"+ice.Render(m, ice.RENDER_QRCODE, domain)+ice.NL)).Cmd(ssh.PROMPT) m.Sleep30ms().Cmd(ssh.PRINTF, kit.Dict(nfs.CONTENT, "\r"+ice.Render(m, ice.RENDER_QRCODE, domain)+ice.NL)).Cmd(ssh.PROMPT)
} else {
m.Sleep30ms().Cmd(ssh.PRINTF, kit.Dict(nfs.CONTENT, "\r"+domain+ice.NL)).Cmd(ssh.PROMPT)
} }
switch runtime.GOOS { switch runtime.GOOS {
case cli.WINDOWS: case cli.WINDOWS:
m.Cmd(cli.SYSTEM, "explorer.exe", domain) m.Cmd(cli.SYSTEM, "explorer.exe", "http://localhost:"+m.Option(tcp.PORT))
} }
}}, }},
SERVE_REWRITE: {Hand: func(m *ice.Message, arg ...string) { SERVE_REWRITE: {Hand: func(m *ice.Message, arg ...string) {