From aa2e02062946837264862e04269b4ba0557d6724 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Wed, 15 Feb 2023 10:30:09 +0800 Subject: [PATCH] opt some --- base/web/serve.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/base/web/serve.go b/base/web/serve.go index b7b5d7b7..413a2292 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -166,15 +166,12 @@ func init() { _serve_start(m) }}, SERVE_START: {Hand: func(m *ice.Message, arg ...string) { - domain := m.Cmdx(SPACE, DOMAIN) - if ice.Info.Colors { + if domain := m.Cmdx(SPACE, DOMAIN); 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) - } else { - m.Sleep30ms().Cmd(ssh.PRINTF, kit.Dict(nfs.CONTENT, "\r"+domain+ice.NL)).Cmd(ssh.PROMPT) } switch runtime.GOOS { 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) {