1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-02-25 20:35:07 +08:00
parent 6b7d66c572
commit 5632a7816f
5 changed files with 16 additions and 16 deletions

View File

@ -32,10 +32,13 @@ var ice = {
MSG_ACTION: "_action", MSG_STATUS: "_status",
MSG_PROCESS: "_process", MSG_DISPLAY: "_display", MSG_TOOLKIT: "_toolkit",
MSG_USERNICK: "user.nick", MSG_USERNAME: "user.name", MSG_USERROLE: "user.role", MSG_LANGUAGE: "user.lang",
MSG_BG: "sess.bg", MSG_FG: "sess.fg",
MSG_COST: "sess.cost", MSG_MODE: "sess.mode", MSG_THEME: "sess.theme", MSG_TITLE: "sess.title", MSG_RIVER: "sess.river", MSG_STORM: "sess.storm",
MSG_DAEMON: "sess.daemon", LOG_DISABLE: "log.disable", LOG_TRACEID: "log.id",
MSG_USERWEB: "user.web", MSG_USERPOD: "user.pod",
MSG_USERROLE: "user.role", MSG_USERNAME: "user.name", MSG_USERNICK: "user.nick", MSG_LANGUAGE: "user.lang",
MSG_TITLE: "sess.title", MSG_THEME: "sess.theme", MSG_BG: "sess.bg", MSG_FG: "sess.fg", MSG_DAEMON: "sess.daemon",
LOG_DISABLE: "log.disable", LOG_TRACEID: "log.id",
MSG_RIVER: "sess.river", MSG_STORM: "sess.storm",
MSG_COST: "sess.cost", MSG_MODE: "sess.mode",
MSG_NODETYPE: "node.type", TABLE_CHECKBOX: "table.checkbox",
FROM_DAEMON: "from.daemon",

View File

@ -183,9 +183,10 @@ Volcanos("misc", {
return socket
},
ResourceFavicon(can) { return can.misc.Resource(can, nfs.SRC_MAIN_ICO) },
Resource(can, path, space) {
if (can.base.beginWith(path, web.HTTP, nfs.PS)) { return path }
return can.base.MergeURL(nfs.REQUIRE+path+_version, ice.POD, space||can.ConfSpace()||can.misc.Search(can, ice.POD))
Resource(can, path, space, serve) { if (can.base.beginWith(path, web.HTTP, nfs.PS)) { return path }
var p = can.base.MergeURL(nfs.REQUIRE+path+_version, ice.POD, space||can.ConfSpace()||can.misc.Search(can, ice.POD))
if (serve && serve.indexOf(location.origin) == -1) { var u = can.base.ParseURL(serve); p = u.origin + p }
return p
},
ShareLocal(can, path, space) { if (can.base.beginWith(path, web.HTTP, nfs.PS)) { return path }
return can.base.MergeURL(nfs.SHARE_LOCAL+path+_version, ice.POD, space||can.ConfSpace())

View File

@ -14,7 +14,7 @@ Volcanos(chat.ONIMPORT, {
_cookie: function(can, msg) { can.misc.Cookie(can, msg._arg[0], msg._arg[1]), can.Update() },
_session: function(can, msg) { can.misc.sessionStorage(can, msg._arg[0], msg._arg[1]), can.Update() },
_field: function(can, msg, cb) { var height = can.base.Max(html.STORY_HEIGHT, can.ConfHeight()-2*html.ACTION_HEIGHT), width = can.ConfWidth()
msg.Table(function(item) { can.onappend._plugin(can, item, {space: can.ConfSpace(), index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) {
msg.Table(function(item) { can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) {
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX); can.run(can.request(event, {pod: item.space}), (msg[ice.MSG_PREFIX]? msg[ice.MSG_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) }
if (item.style != html.FLOAT && can.base.isIn(sub.ConfIndex(), wiki.PORTAL, chat.IFRAME, chat.DESKTOP, wiki.WORD, code.VIMER,)) { height = can.base.Max(can.onexport.outputHeight(can), can.ConfHeight(), 480) }
can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, true), cb && cb(sub)
@ -298,12 +298,8 @@ Volcanos(chat.ONEXPORT, {_output: function(can, msg) {},
statusHeight: function(can) {
return can.page.ClassList.has(can, can._target, html.OUTPUT) || !can.page.isDisplay(can._status) || (can._target.offsetHeight > 0 && can._status.offsetHeight == 0) ||
can._status.innerHTML == "" && !can.page.ClassList.has(can, can._target, html.PLUG)? 0: html.STATUS_HEIGHT },
link: function(can) {
var args = can.Option();
args.pod = can.ConfSpace(), args.cmd = can.ConfIndex();
can.core.Item(args, function(key, value) {
if (!value) { delete(args[key]) }
})
link: function(can) { var args = can.Option(); args.pod = can.ConfSpace(), args.cmd = can.ConfIndex()
can.core.Item(args, function(key, value) { !value && delete(args[key]) })
return can.misc.MergePodCmd(can, args, true) },
args: function(can) { return can.Option() },
close: function(can, msg) {},

View File

@ -90,7 +90,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
}}]) },
icon: function(can, msg, target, cb) {
msg.Table(function(value) {
var icon = can.misc.Resource(can, value.icon||can.page.drawText(can, value.name, 80), value.space||can.ConfSpace())
var icon = can.misc.Resource(can, value.icons||value.icon||can.page.drawText(can, value.name, 80), value.space||msg.Option(ice.MSG_USERPOD), msg.Option(ice.MSG_USERWEB))
return can.page.Append(can, target, [{view: [[html.ITEM, value.status]], list: [{view: html.ICON, list: [{img: icon}]}, {view: [mdb.NAME, "", value.name]}], _init: function(target) {
cb && cb(target, value)
}, onclick: function(event) { can.sup.onexport.record(can.sup, value.name, mdb.NAME, value) }}])._target

View File

@ -106,7 +106,7 @@ var Volcanos = shy({iceberg: "", volcano: "", frame: chat.FRAME_JS, _cache: {},
isAutoMode: function() { return can.Mode() == "" },
Mode: function(value) { return can.Conf(ice.MODE, value) },
ConfDefault: function(value) { can.core.Item(value, function(k, v) { can.Conf(k) || can.Conf(k, v) }) },
ConfSpace: function() { return can.Conf(web.SPACE)||can.Conf("_space")||"" },
ConfSpace: function() { return can.Conf("_space")||can.Conf(web.SPACE)||"" },
ConfIndex: function() { return can.Conf("_command")||can.Conf(ctx.INDEX)||can.Conf("_index") },
ConfHeight: function(value) { return can.Conf(html.HEIGHT, value) },
ConfWidth: function(value) { return can.Conf(html.WIDTH, value) },