diff --git a/base/ctx/display.go b/base/ctx/display.go index d5202167..9673db67 100644 --- a/base/ctx/display.go +++ b/base/ctx/display.go @@ -67,7 +67,7 @@ func DisplayLocalInner(m *ice.Message, arg ...ice.Any) *ice.Message { return DisplayLocal(m, "code/inner", arg...) } func DisplayBase(m *ice.Message, file string, arg ...ice.Any) *ice.Message { - m.Option(ice.MSG_DISPLAY, m.MergeLink(kit.Select(kit.ExtChange(file, nfs.JS), file, strings.Contains(file, mdb.QS)), arg...)) + m.Option(ice.MSG_DISPLAY, kit.MergeURL(kit.Select(kit.ExtChange(file, nfs.JS), file, strings.Contains(file, mdb.QS)), arg...)) return Toolkit(m, "") } func Toolkit(m *ice.Message, arg ...string) *ice.Message { diff --git a/base/web/serve.go b/base/web/serve.go index 1d0e0d85..3ad9aade 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -5,6 +5,7 @@ import ( "net/url" "path" "regexp" + "runtime" "strings" ice "shylinux.com/x/icebergs" @@ -228,7 +229,9 @@ func init() { tcp.HOST: {Help: "公网", Hand: func(m *ice.Message, arg ...string) { m.Echo(kit.Formats(PublicIP(m))) }}, cli.SYSTEM: {Help: "系统", Hand: func(m *ice.Message, arg ...string) { cli.Opens(m, "System Settings.app") }}, cli.START: {Name: "start dev proto host port=9020 nodename username usernick", Hand: func(m *ice.Message, arg ...string) { - m.Cmd(nfs.SAVE, "etc/local.sh", m.Spawn(ice.Maps{"pwd": kit.Path(""), "user": kit.UserName(), "args": kit.JoinCmds(arg...)}).Template("local.sh")+lex.NL) + if runtime.GOOS == cli.LINUX { + m.Cmd(nfs.SAVE, "etc/local.sh", m.Spawn(ice.Maps{"pwd": kit.Path(""), "user": kit.UserName(), "args": kit.JoinCmds(arg...)}).Template("local.sh")+lex.NL) + } _serve_start(m) }}, SERVE_START: {Hand: func(m *ice.Message, arg ...string) { @@ -243,7 +246,9 @@ func init() { ssh.PrintQRCode(m, tcp.PublishLocalhost(m, _serve_address(m))) cli.Opens(m, mdb.Config(m, cli.OPEN)) }) - m.Cmd("", PROXY_CONF, ice.Info.NodeName) + if runtime.GOOS == cli.LINUX { + m.Cmd("", PROXY_CONF, ice.Info.NodeName) + } }}, PROXY_CONF: {Name: "proxyConf name* port path", Hand: func(m *ice.Message, arg ...string) { if dir := m.OptionDefault(nfs.PATH, PROXY_PATH); nfs.Exists(m, dir) { diff --git a/core/chat/macos/desktop.go b/core/chat/macos/desktop.go index 76b8384d..4dcb800c 100644 --- a/core/chat/macos/desktop.go +++ b/core/chat/macos/desktop.go @@ -25,7 +25,6 @@ func init() { DeskAppend(m, "Photos.png", web.WIKI_FEEL, ctx.ARGS, nfs.USR_LOCAL_IMAGE) } else { DeskAppend(m, "Photos.png", web.WIKI_FEEL, ctx.ARGS, nfs.USR_ICONS) - } DeskAppend(m, "Grapher.png", web.WIKI_DRAW) DeskAppend(m, "Calendar.png", web.TEAM_PLAN) diff --git a/core/code/webpack.go b/core/code/webpack.go index 80bd59f7..9f83dce1 100644 --- a/core/code/webpack.go +++ b/core/code/webpack.go @@ -82,10 +82,16 @@ func _webpack_cache(m *ice.Message, dir string, write bool) { }) mdb.HashSelects(m).Sort(nfs.PATH).Table(func(value ice.Maps) { defer fmt.Fprintln(js, "") - if p := value[nfs.PATH]; kit.Ext(p) == nfs.CSS { + if p := value[nfs.PATH]; kit.HasPrefix(p, nfs.SRC, nfs.USR) { + if kit.Ext(p) == nfs.CSS { + _webpack_css(m, css, js, p) + } else { + _webpack_js(m, js, p) + } + } else if kit.Ext(p) == nfs.CSS { _webpack_css(m, css, js, path.Join(nfs.USR_MODULES, p)) } else { - p = kit.Select(path.Join(p, LIB, kit.Keys(p, JS)), p, kit.Ext(p) == nfs.JS) + // p = kit.Select(path.Join(p, LIB, kit.Keys(p, JS)), p, kit.Ext(p) == nfs.JS) _webpack_node(m, js, path.Join(nfs.USR_MODULES, p)) } })