diff --git a/base/web/html/html.go b/base/web/html/html.go
index 94f258ba..3a7e5a82 100644
--- a/base/web/html/html.go
+++ b/base/web/html/html.go
@@ -7,6 +7,7 @@ import (
)
const (
+ FAVICON = "favicon"
Mozilla = "Mozilla"
Firefox = "Firefox"
Safari = "Safari"
diff --git a/base/web/render.go b/base/web/render.go
index 79d4b945..01048cb6 100644
--- a/base/web/render.go
+++ b/base/web/render.go
@@ -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))
diff --git a/core/chat/header.go b/core/chat/header.go
index f19b6824..62896b0c 100644
--- a/core/chat/header.go
+++ b/core/chat/header.go
@@ -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) },
diff --git a/core/chat/macos/macos.go b/core/chat/macos/macos.go
index 1ebf00a7..68e31607 100644
--- a/core/chat/macos/macos.go
+++ b/core/chat/macos/macos.go
@@ -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)))
diff --git a/core/chat/macos/menu.js b/core/chat/macos/menu.js
index ca5c3620..5e818296 100644
--- a/core/chat/macos/menu.js
+++ b/core/chat/macos/menu.js
@@ -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) }},
diff --git a/core/chat/message.js b/core/chat/message.js
index eabde377..7fbf0559 100644
--- a/core/chat/message.js
+++ b/core/chat/message.js
@@ -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())
},
diff --git a/core/wiki/portal.js b/core/wiki/portal.js
index 88d804a2..dbbaddfa 100644
--- a/core/wiki/portal.js
+++ b/core/wiki/portal.js
@@ -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)