forked from x/icebergs
add some
This commit is contained in:
parent
9f7a0fe1e6
commit
1f0f42db7d
@ -49,6 +49,17 @@ func init() {
|
||||
m.Assert(m.Option(PORT) != "")
|
||||
nfs.Trash(m, path.Join(ice.USR_LOCAL_DAEMON, m.Option(PORT)))
|
||||
}},
|
||||
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
|
||||
switch arg[0] {
|
||||
case "server":
|
||||
m.Cmd(PORT, "socket", func(value ice.Maps) {
|
||||
switch value["status"] {
|
||||
case "LISTEN":
|
||||
m.Push(arg[0], strings.Replace(value["local"], "0.0.0.0", "127.0.0.1", 1))
|
||||
}
|
||||
})
|
||||
}
|
||||
}},
|
||||
"socket": {Hand: func(m *ice.Message, arg ...string) {
|
||||
parse := func(str string) int64 {
|
||||
port, _ := strconv.ParseInt(str, 16, 32)
|
||||
|
@ -104,6 +104,9 @@ func _serve_handle(key string, cmd *ice.Command, m *ice.Message, w http.Response
|
||||
m.OptionDefault(ice.MSG_HEIGHT, "480", ice.MSG_WIDTH, "320")
|
||||
m.Options(ice.MSG_USERWEB, _serve_domain(m), ice.MSG_USERPOD, m.Option(ice.POD))
|
||||
m.Options(ice.MSG_USERUA, r.Header.Get(UserAgent), ice.MSG_USERIP, r.Header.Get(ice.MSG_USERIP))
|
||||
m.Debug("what %v", m.Option(ice.MSG_USERWEB))
|
||||
m.Debug("what %v", CookieName(m.Option(ice.MSG_USERWEB)))
|
||||
|
||||
m.Options(ice.MSG_SESSID, kit.Select(m.Option(ice.MSG_SESSID), m.Option(CookieName(m.Option(ice.MSG_USERWEB)))))
|
||||
kit.If(m.Optionv(ice.MSG_CMDS) == nil, func() {
|
||||
kit.If(strings.TrimPrefix(r.URL.Path, key), func(p string) { m.Optionv(ice.MSG_CMDS, strings.Split(p, nfs.PS)) })
|
||||
|
@ -13,7 +13,7 @@ const IFRAME = "iframe"
|
||||
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
IFRAME: {Name: "iframe hash auto safari", Help: "浏览器", Actions: ice.MergeActions(ice.Actions{
|
||||
IFRAME: {Name: "iframe hash@key auto safari", Help: "浏览器", Actions: ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.Cmd("").Length() == 0 {
|
||||
m.Cmd(web.SPIDE, ice.OptionFields(web.CLIENT_NAME, web.CLIENT_ORIGIN), func(value ice.Maps) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg, cb) { if (can.isCmdMode()) { can.onappend.style(can, html.OUTPUT), can.ConfHeight(can.page.height()) }
|
||||
_init: function(can, msg, cb) { if (can.isCmdMode()) { can.onappend.style(can, html.OUTPUT), can.ConfHeight(can.page.height()||912), can.ConfWidth(can.page.width()||1690) }
|
||||
(!can.page.ClassList.has(can, document.body, cli.BLACK) || can.isCmdMode()) && can.onlayout.background(can, can.user.info.background||"/require/usr/icons/background.jpg", can._fields)
|
||||
can.ui = {}, can.base.isFunc(cb) && cb(msg), can.onmotion.clear(can)
|
||||
can.onimport._menu(can), can.onimport._dock(can), can.onimport._searchs(can), can.onimport._notifications(can), can.onimport.layout(can)
|
||||
@ -88,7 +88,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
},
|
||||
layout: function(can) {
|
||||
can.page.style(can, can._output, html.HEIGHT, can.ConfHeight(), html.WIDTH, can.ConfWidth())
|
||||
can.ui.dock && can.page.style(can, can.ui.dock._target, html.LEFT, can.base.Min((can.ConfWidth()-can.ui.dock._target.offsetWidth)/2, 0))
|
||||
can.ui.dock && can.page.style(can, can.ui.dock._target, html.LEFT, can.base.Min((can.ConfWidth()-(can.ui.dock._target.offsetWidth||502))/2, 0))
|
||||
},
|
||||
}, [""])
|
||||
Volcanos(chat.ONACTION, {list: ["full"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user