forked from x/icebergs
add some
This commit is contained in:
parent
603c5ffb0c
commit
bae35d2ce3
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
FAVICON = "favicon"
|
||||
Mozilla = "Mozilla"
|
||||
Firefox = "Firefox"
|
||||
Safari = "Safari"
|
||||
|
@ -133,6 +133,7 @@ func RenderMain(m *ice.Message) *ice.Message {
|
||||
if m.IsCliUA() {
|
||||
return m.RenderDownload(path.Join(ice.USR_INTSHELL, ice.INDEX_SH))
|
||||
}
|
||||
m.Options(TITLE, kit.Select("localhost:9020", UserWeb(m).Host, m.Option(ice.MSG_USERPOD)))
|
||||
m.Options(nfs.SCRIPT, ice.SRC_MAIN_JS, nfs.VERSION, RenderVersion(m))
|
||||
m.OptionDefault(mdb.ICONS, "/require/"+ice.Info.NodeIcon)
|
||||
return m.RenderResult(kit.Renders(m.Cmdx(nfs.CAT, ice.SRC_MAIN_HTML), m))
|
||||
|
@ -128,7 +128,7 @@ func init() {
|
||||
kit.If(m.Option(ice.MSG_USERPOD), func(p string) {
|
||||
m.Option(ice.MSG_NODETYPE, m.Cmdx(web.SPACE, p, cli.RUNTIME, ice.MSG_NODETYPE))
|
||||
})
|
||||
m.Option("favicon", "/require/"+m.Cmd(web.SPACE, m.Option(ice.MSG_USERPOD), web.SPACE, ice.INFO).Append(mdb.ICONS))
|
||||
m.Option("favicon", m.Cmd(web.SPACE, m.Option(ice.MSG_USERPOD), web.SPACE, ice.INFO).Append(mdb.ICONS))
|
||||
m.Option(aaa.LANGUAGE, strings.ReplaceAll(strings.ToLower(kit.Select("", kit.Split(kit.GetValid(
|
||||
func() string { return kit.Select("", "zh-cn", strings.Contains(m.Option(ice.MSG_USERUA), "zh_CN")) },
|
||||
func() string { return kit.Select("", kit.Split(m.R.Header.Get(html.AcceptLanguage), ",;"), 0) },
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
"shylinux.com/x/icebergs/base/nfs"
|
||||
"shylinux.com/x/icebergs/base/web"
|
||||
"shylinux.com/x/icebergs/base/web/html"
|
||||
"shylinux.com/x/icebergs/core/chat"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
)
|
||||
@ -75,6 +76,7 @@ func CmdHashAction(arg ...string) ice.Actions {
|
||||
}
|
||||
}},
|
||||
mdb.SELECT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Option(html.FAVICON, m.Cmd(web.SPACE, ice.INFO).Append(mdb.ICONS))
|
||||
disableApp(mdb.HashSelect(m, arg...).Sort(mdb.NAME).Display(m.FileURI(file)))
|
||||
}},
|
||||
}, mdb.HashAction(mdb.SHORT, kit.Select("", arg, 0), mdb.FIELD, kit.Select("time,hash,icon,name,text,space,index,args", arg, 1), kit.Slice(arg, 2)))
|
||||
|
@ -5,7 +5,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) { can.page.style(can, can._ou
|
||||
].concat(msg.Table(function(item) {
|
||||
return {view: [html.ITEM], list: [{img: can.page.drawText(can, item.name||item.index, 25, 0, 20)}], onclick: function(event) { can.sup.onexport.record(can, item) }}
|
||||
}), [
|
||||
{view: [[html.MENU, html.TITLE]], list: [{img: can.misc.ResourceFavicon(can)}, {text: decodeURIComponent(can.ConfSpace()||can.misc.Search(can, ice.POD)||location.host)}],
|
||||
{view: [[html.MENU, html.TITLE]], list: [{img: can.misc.ResourceFavicon(can, msg.Option(html.FAVICON))}, {text: decodeURIComponent(can.ConfSpace()||can.misc.Search(can, ice.POD)||location.host)}],
|
||||
onclick: function(event) { can.sup.onexport.record(can, html.DESKTOP) }},
|
||||
{view: [[html.MENU, mdb.ICON, web.REFRESH], "", can.page.unicode.refresh], onclick: function(event) { can.user.reload(true) }},
|
||||
{view: [[html.MENU, mdb.ICON, mdb.CREATE], "", can.page.unicode.create], onclick: function(event) { can.sup.onexport.record(can, mdb.CREATE) }},
|
||||
|
@ -88,7 +88,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onmotion.toggle(can, can.ui.display, !project)
|
||||
can.onimport.layout(can)
|
||||
},
|
||||
layout: function(can) { can.ui.layout(can.ConfHeight(), can.ConfWidth())
|
||||
layout: function(can) { if (!can.ui.layout) { return }
|
||||
can.ui.layout(can.ConfHeight(), can.ConfWidth())
|
||||
can.ui.title && can.page.style(can, can.ui.message, html.HEIGHT, can.ui.content.offsetHeight-can.ui.title.offsetHeight)
|
||||
can.page.style(can, can._output, html.HEIGHT, can.ConfHeight())
|
||||
},
|
||||
|
@ -51,6 +51,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.sup.onimport.size(can.sup, can.sup.ConfHeight(), can.sup.ConfWidth())
|
||||
})
|
||||
},
|
||||
title: function(can, meta, target) { can.isCmdMode() && can.page.tagis(target, html.H1) && can.onexport && can.onexport.title(can, meta.text) },
|
||||
button: function(can, meta, target) { var item = can.base.Obj(meta.meta); target.onclick = function(event) { can.onaction.route(event, can, item.route) } },
|
||||
layout: function(can, height, width) { if (!can.ui.layout) { return }
|
||||
can.ui.layout(height, width), can.ConfHeight(can.ui.main.offsetHeight), can.ConfWidth(can.ui.main.offsetWidth)
|
||||
|
Loading…
x
Reference in New Issue
Block a user