1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-07-14 12:58:42 +08:00
parent 7438f45e56
commit 80edcfd1be
3 changed files with 7 additions and 2 deletions

View File

@ -147,12 +147,15 @@ func init() {
})
}
func Opens(m *ice.Message, arg ...string) {
m.Debug("what %v", arg)
if !tcp.IsLocalHost(m, m.Option(ice.MSG_USERIP)) {
return
}
m.Debug("what %v", arg)
if len(arg) == 0 || arg[0] == "" {
return
}
m.Debug("what %v", arg)
switch runtime.GOOS {
case DARWIN:
if kit.Ext(arg[0]) == "app" {

View File

@ -190,6 +190,7 @@ func init() {
}},
SERVE_START: {Hand: func(m *ice.Message, arg ...string) {
m.Go(func() {
m.Option(ice.MSG_USERIP, "127.0.0.1")
cli.Opens(m, mdb.Config(m, cli.OPEN))
ssh.PrintQRCode(m, tcp.PublishLocalhost(m, _serve_address(m)))
})

View File

@ -1,10 +1,11 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) { can.require(["/plugin/local/wiki/word.js"]), can.Conf(html.PADDING, can.user.isMobile? 10: 40)
can.db = {nav: {}}, can.sup.onexport.link = function() { return can.db.prefix }
can.db = {nav: {}}
var p = "/cmd/web.wiki.portal"
can.db.prefix = location.pathname.indexOf(p) > 0? location.pathname.split(p)[0]+p: "/wiki/portal"
can.db.prefix = location.pathname.indexOf(p) > 0? location.pathname.split(p)[0]+p: "/wiki/portal/"
can.db.current = can.isCmdMode()? can.base.trimPrefix(location.pathname, can.db.prefix+"/", can.db.prefix): can.Option(nfs.PATH)
can.onmotion.clear(can)
can.sup.onexport.link = function() { return can.db.prefix }
can.ui = can.onappend.layout(can, [html.HEADER, [html.NAV, html.MAIN, html.ASIDE]], html.FLOW), can.onimport._scroll(can)
can.ui.header.innerHTML = msg.Append(html.HEADER), can.ui.nav.innerHTML = msg.Append(html.NAV)
if (msg.Append(html.NAV) == "") {