mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
6b7d66c572
commit
5632a7816f
11
const.js
11
const.js
@ -32,10 +32,13 @@ var ice = {
|
|||||||
MSG_ACTION: "_action", MSG_STATUS: "_status",
|
MSG_ACTION: "_action", MSG_STATUS: "_status",
|
||||||
MSG_PROCESS: "_process", MSG_DISPLAY: "_display", MSG_TOOLKIT: "_toolkit",
|
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_USERWEB: "user.web", MSG_USERPOD: "user.pod",
|
||||||
MSG_BG: "sess.bg", MSG_FG: "sess.fg",
|
MSG_USERROLE: "user.role", MSG_USERNAME: "user.name", MSG_USERNICK: "user.nick", MSG_LANGUAGE: "user.lang",
|
||||||
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_TITLE: "sess.title", MSG_THEME: "sess.theme", MSG_BG: "sess.bg", MSG_FG: "sess.fg", MSG_DAEMON: "sess.daemon",
|
||||||
MSG_DAEMON: "sess.daemon", LOG_DISABLE: "log.disable", LOG_TRACEID: "log.id",
|
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",
|
MSG_NODETYPE: "node.type", TABLE_CHECKBOX: "table.checkbox",
|
||||||
FROM_DAEMON: "from.daemon",
|
FROM_DAEMON: "from.daemon",
|
||||||
|
|
||||||
|
@ -183,9 +183,10 @@ Volcanos("misc", {
|
|||||||
return socket
|
return socket
|
||||||
},
|
},
|
||||||
ResourceFavicon(can) { return can.misc.Resource(can, nfs.SRC_MAIN_ICO) },
|
ResourceFavicon(can) { return can.misc.Resource(can, nfs.SRC_MAIN_ICO) },
|
||||||
Resource(can, path, space) {
|
Resource(can, path, space, serve) { if (can.base.beginWith(path, web.HTTP, nfs.PS)) { return path }
|
||||||
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))
|
||||||
return 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 }
|
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())
|
return can.base.MergeURL(nfs.SHARE_LOCAL+path+_version, ice.POD, space||can.ConfSpace())
|
||||||
|
@ -14,7 +14,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
_cookie: function(can, msg) { can.misc.Cookie(can, msg._arg[0], msg._arg[1]), can.Update() },
|
_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() },
|
_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()
|
_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) }
|
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) }
|
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)
|
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) {
|
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) ||
|
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 },
|
can._status.innerHTML == "" && !can.page.ClassList.has(can, can._target, html.PLUG)? 0: html.STATUS_HEIGHT },
|
||||||
link: function(can) {
|
link: function(can) { var args = can.Option(); args.pod = can.ConfSpace(), args.cmd = can.ConfIndex()
|
||||||
var args = can.Option();
|
can.core.Item(args, function(key, value) { !value && delete(args[key]) })
|
||||||
args.pod = can.ConfSpace(), args.cmd = can.ConfIndex();
|
|
||||||
can.core.Item(args, function(key, value) {
|
|
||||||
if (!value) { delete(args[key]) }
|
|
||||||
})
|
|
||||||
return can.misc.MergePodCmd(can, args, true) },
|
return can.misc.MergePodCmd(can, args, true) },
|
||||||
args: function(can) { return can.Option() },
|
args: function(can) { return can.Option() },
|
||||||
close: function(can, msg) {},
|
close: function(can, msg) {},
|
||||||
|
@ -90,7 +90,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
|||||||
}}]) },
|
}}]) },
|
||||||
icon: function(can, msg, target, cb) {
|
icon: function(can, msg, target, cb) {
|
||||||
msg.Table(function(value) {
|
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) {
|
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)
|
cb && cb(target, value)
|
||||||
}, onclick: function(event) { can.sup.onexport.record(can.sup, value.name, mdb.NAME, value) }}])._target
|
}, onclick: function(event) { can.sup.onexport.record(can.sup, value.name, mdb.NAME, value) }}])._target
|
||||||
|
2
proto.js
2
proto.js
@ -106,7 +106,7 @@ var Volcanos = shy({iceberg: "", volcano: "", frame: chat.FRAME_JS, _cache: {},
|
|||||||
isAutoMode: function() { return can.Mode() == "" },
|
isAutoMode: function() { return can.Mode() == "" },
|
||||||
Mode: function(value) { return can.Conf(ice.MODE, value) },
|
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) }) },
|
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") },
|
ConfIndex: function() { return can.Conf("_command")||can.Conf(ctx.INDEX)||can.Conf("_index") },
|
||||||
ConfHeight: function(value) { return can.Conf(html.HEIGHT, value) },
|
ConfHeight: function(value) { return can.Conf(html.HEIGHT, value) },
|
||||||
ConfWidth: function(value) { return can.Conf(html.WIDTH, value) },
|
ConfWidth: function(value) { return can.Conf(html.WIDTH, value) },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user