forked from x/icebergs
opt some
This commit is contained in:
parent
7438f45e56
commit
80edcfd1be
@ -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" {
|
||||
|
@ -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)))
|
||||
})
|
||||
|
@ -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) == "") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user