1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-27 17:58:29 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-03-03 08:50:49 +08:00
parent d86c6db791
commit b15547d281
3 changed files with 4 additions and 3 deletions

View File

@ -200,7 +200,7 @@ func init() {
if opened {
return
}
switch host := "http://localhost:" + m.Option(tcp.PORT); runtime.GOOS {
switch host := kit.Format("http://localhost:%s/?debug=true", m.Option(tcp.PORT)); runtime.GOOS {
case cli.WINDOWS:
m.Cmd(cli.SYSTEM, "explorer", host)
case cli.DARWIN:

View File

@ -48,6 +48,7 @@ func _autogen_import(m *ice.Message, main string, ctx string, mod string) {
}
})
m.Cmd(nfs.SAVE, main, kit.Join(list, ice.NL))
m.Cmd(cli.SYSTEM, "goimports", "-w", main)
}
func _autogen_version(m *ice.Message) {
if mod := _autogen_mod(m, ice.GO_MOD); !nfs.ExistsFile(m, ".git") {
@ -122,9 +123,9 @@ func init() {
_autogen_script(m, p)
}
if p := path.Join(ice.SRC, m.Option(mdb.ZONE), kit.Keys(m.Option(mdb.NAME), GO)); !nfs.ExistsFile(m, p) {
_autogen_import(m, path.Join(ice.SRC, m.Option(cli.MAIN)), m.Option(mdb.ZONE), _autogen_mod(m, ice.GO_MOD))
_autogen_module(m, p)
}
_autogen_import(m, path.Join(ice.SRC, m.Option(cli.MAIN)), m.Option(mdb.ZONE), _autogen_mod(m, ice.GO_MOD))
m.Option(nfs.FILE, path.Join(m.Option(mdb.ZONE), kit.Keys(m.Option(mdb.NAME), GO)))
_autogen_version(m.Spawn())
}},

View File

@ -50,7 +50,7 @@ func (w WebView) OpenUrl(url string) { w.Cmd(cli.SYSTEM, cli.OPEN, url) }
func (w WebView) OpenApp(app string) { w.Cmd(cli.SYSTEM, cli.OPEN, "-a", app) }
func (w WebView) OpenCmd(cmd string) {
w.Cmd(nfs.SAVE, kit.HomePath(".bash_temp"), cmd)
w.Cmd(cli.SYSTEM, cli.OPEN, "-a", "Terminal")
w.Cmd(cli.SYSTEM, cli.OPEN, "-n", "-a", "Terminal")
}
func (w WebView) SetSize(width, height int) {
w.Cmd(nfs.SAVE, "etc/webview.size", kit.Format("%v,%v", width, height))