1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-10-06 22:19:11 +08:00
parent f34d04c775
commit 97e784c584
8 changed files with 21 additions and 15 deletions

View File

@ -285,12 +285,10 @@ var chat = {
HEADER: "Header", ACTION: "Action", FOOTER: "Footer", HEADER: "Header", ACTION: "Action", FOOTER: "Footer",
libs: ["base.js", "core.js", "date.js", "misc.js", "page.js", "user.js"].map(function(p) { return "/lib/"+p }), libs: ["base.js", "core.js", "date.js", "misc.js", "page.js", "user.js"].map(function(p) { return "/lib/"+p }),
panel_list: [{name: "Header", style: "head"}, {name: "River", style: "left"}, {name: "Action", style: "main"}, {name: "Search", style: "auto"}, {name: "Footer", style: "foot"}], panel_list: [{name: "Header", style: "head"}, {name: "River", style: "left"}, {name: "Action", style: "main"}, {name: "Search", style: "auto"}, {name: "Footer", style: "foot"}],
plugin_list: [ plugin_list: ["state.js", "input.js", "table.js",
"state.js",
"input.js",
"table.js",
"input/key.js", "input/key.js",
"input/date.js", "input/date.js",
].concat(navigator.userAgent.indexOf("Mobile") > -1? []: [
"story/json.js", "story/json.js",
"story/stats.js", "story/stats.js",
"story/spides.js", "story/spides.js",
@ -304,7 +302,7 @@ var chat = {
"local/wiki/feel.js", "local/wiki/feel.js",
"local/wiki/word.js", "local/wiki/word.js",
"local/team/plan.js", "local/team/plan.js",
].map(function(p) { return "/v/plugin/"+p }), ]).map(function(p) { return "/v/plugin/"+p }),
PLUGIN_LOCAL: "/plugin/local/", PLUGIN_STORY: "/plugin/story/", PLUGIN_INPUT: "/plugin/input/", PLUGIN_LOCAL: "/plugin/local/", PLUGIN_STORY: "/plugin/story/", PLUGIN_INPUT: "/plugin/input/",
PLUGIN_INPUT_JS: "/plugin/input.js", PLUGIN_TABLE_JS: "/plugin/table.js", PLUGIN_STATE_JS: "/plugin/state.js", PLUGIN_INPUT_JS: "/plugin/input.js", PLUGIN_TABLE_JS: "/plugin/table.js", PLUGIN_STATE_JS: "/plugin/state.js",
FRAME_JS: "/v/frame.js", FRAME_JS: "/v/frame.js",

View File

@ -711,7 +711,7 @@ Volcanos(chat.ONAPPEND, {
can.page.SelectChild(can, can._option, html.DIV_ITEM_TEXT, function(target) { can.page.ClassList.set(can, target, "will", can.page.ClassList.has(can, target, key)) }) can.page.SelectChild(can, can._option, html.DIV_ITEM_TEXT, function(target) { can.page.ClassList.set(can, target, "will", can.page.ClassList.has(can, target, key)) })
}, _init: function(target) { }, _init: function(target) {
if (msg.IsDetail() && key != "key") { can.onappend.style(can, key, target.parentNode) } if (msg.IsDetail() && key != "key") { can.onappend.style(can, key, target.parentNode) }
if (option.indexOf(key) > -1) { can.onappend.style(can, "k-"+value, target.parentNode) } if (option.indexOf(key) > -1) { can.onappend.style(can, "k-"+(value.split(">").pop()), target.parentNode) }
if (key == mdb.TYPE) { can.onappend.style(can, value, target.parentNode) } if (key == mdb.TYPE) { can.onappend.style(can, value, target.parentNode) }
if (key == mdb.STATUS) { can.onappend.style(can, value, target.parentNode) } if (key == mdb.STATUS) { can.onappend.style(can, value, target.parentNode) }
if (key == mdb.ENABLE) { can.onappend.style(can, value == ice.FALSE? mdb.DISABLE: mdb.ENABLE, target.parentNode) } if (key == mdb.ENABLE) { can.onappend.style(can, value == ice.FALSE? mdb.DISABLE: mdb.ENABLE, target.parentNode) }

View File

@ -119,6 +119,12 @@ table.content th.select[data-asc="0"] i.bi-sort-up { display:none; }
table.content th.select[data-asc="1"] i.bi-sort-down-alt { display:none; } table.content th.select[data-asc="1"] i.bi-sort-down-alt { display:none; }
table.content td.option { cursor:pointer; } table.content td.option { cursor:pointer; }
table.content td { padding:var(--table-padding); } table.content td { padding:var(--table-padding); }
fieldset.log.debug table.content td:last-child {
// white-space:pre-line;
// word-break:break-all;
white-space:pre;
max-width:800px; min-width:600px;
}
table.content td i { padding:var(--input-padding); } table.content td i { padding:var(--input-padding); }
table.content:not(.detail) td img { height:48px; width:auto; } table.content:not(.detail) td img { height:48px; width:auto; }
table.content:not(.detail) td input.icons { display:none; } table.content:not(.detail) td input.icons { display:none; }
@ -195,7 +201,8 @@ div.item.card div.title span.status { border:var(--box-notice); color:var(--noti
div.item.card div.status { font-size:12px; color:gray; } div.item.card div.status { font-size:12px; color:gray; }
div.item.card div.status span { margin-right:5px; } div.item.card div.status span { margin-right:5px; }
div.item.card div.action { max-width:100%; display:flex; align-items:center; } div.item.card div.action { max-width:100%; display:flex; align-items:center; }
div.item.card div.action { position:absolute; right:0; } div.item.card div.action { position:absolute; right:0; }
div.item.card div.title div.action { top:0; }
body:not(.mobile) div.item.card div.action { z-index:1; } body:not(.mobile) div.item.card div.action { z-index:1; }
div.item.card div.action input[type=button] { background-color:transparent; border:none; color:var(--notice-bg-color); margin-left:5px; } div.item.card div.action input[type=button] { background-color:transparent; border:none; color:var(--notice-bg-color); margin-left:5px; }
div.item.card div.action input[type=button].danger { color:var(--danger-bg-color) } div.item.card div.action input[type=button].danger { color:var(--danger-bg-color) }

View File

@ -16,10 +16,7 @@ Volcanos("user", {
connectWifi: function(can, ssid, password, cb, cbs) {}, connectWifi: function(can, ssid, password, cb, cbs) {},
getClipboard: function(can, cb) {}, getClipboard: function(can, cb) {},
enableDebug: function(can) {}, enableDebug: function(can) {},
init: function(can, content, icons) { init: function(can, content, icons) { can.user.agent.cmd = can, can.user.agent._init_content = content, can.user.agent._init_icons = icons }, _init_content: [],
can.user.agent.cmd = can, can.user.agent._init_content = content
can.user.agent._init_icons = icons
}, _init_content: [],
}, info: {}, }, info: {},
isIPad: false, isIPad: false,
isTesla: navigator.userAgent.indexOf("Tesla") > -1, isTesla: navigator.userAgent.indexOf("Tesla") > -1,

View File

@ -106,6 +106,7 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
can.onengine.signal(can, chat.ONTHEMECHANGE, can.request(event, {theme: can.__theme = can.onimport._theme(can, theme)})), can.onimport.theme(can) can.onengine.signal(can, chat.ONTHEMECHANGE, can.request(event, {theme: can.__theme = can.onimport._theme(can, theme)})), can.onimport.theme(can)
})), can.onimport.theme(can, can.misc.Search(can, "theme")||"") })), can.onimport.theme(can, can.misc.Search(can, "theme")||"")
can.onaction._menus[3] = [aaa.LANGUAGE, ice.AUTO].concat(can.core.List(msg["language.list"], function(item) { return can.base.trimSuffix(item, nfs._JS) })) can.onaction._menus[3] = [aaa.LANGUAGE, ice.AUTO].concat(can.core.List(msg["language.list"], function(item) { return can.base.trimSuffix(item, nfs._JS) }))
can.user.isMobile && (msg["theme.list"] = ["dark.css", "light.css"])
can.onaction._menus[2] = [chat.THEME, ice.AUTO].concat(can.core.List(msg["theme.list"], function(item) { return can.base.trimSuffix(item, nfs._CSS) })) can.onaction._menus[2] = [chat.THEME, ice.AUTO].concat(can.core.List(msg["theme.list"], function(item) { return can.base.trimSuffix(item, nfs._CSS) }))
can.require(can.core.List(msg["theme.list"], function(item) { return nfs.SRC_TEMPLATE+web.CHAT_HEADER+"/theme/"+item }), function() { can.require(can.core.List(msg["theme.list"], function(item) { return nfs.SRC_TEMPLATE+web.CHAT_HEADER+"/theme/"+item }), function() {
if (can.base.beginWith(location.pathname, nfs.WIKI_PORTAL, web.CHAT_CMD+web.WIKI_PORTAL, web.CHAT_CMD+web.CHAT_OAUTH_CLIENT)) { return show(msg) } if (can.base.beginWith(location.pathname, nfs.WIKI_PORTAL, web.CHAT_CMD+web.WIKI_PORTAL, web.CHAT_CMD+web.CHAT_OAUTH_CLIENT)) { return show(msg) }

View File

@ -51,7 +51,7 @@ fieldset.inner.cmd>div.output>div.layout>div.tabs>div.head>div.avatar { padding:
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.head>div.qrcode i { margin-top:3px; } fieldset.inner.cmd>div.output>div.layout>div.tabs>div.head>div.qrcode i { margin-top:3px; }
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.head>div.avatar>img { height:32px; clip-path:circle(40%); } fieldset.inner.cmd>div.output>div.layout>div.tabs>div.head>div.avatar>img { height:32px; clip-path:circle(40%); }
fieldset.inner.cmd>div.output>div.layout>div.path:not(.hide) { display:flex; } fieldset.inner.cmd>div.output>div.layout>div.path:not(.hide) { display:flex; }
fieldset.inner.cmd>div.output>div.layout>div.plug { box-shadow:var(--th-box-shadow); height:var(--action-height); overflow:auto; } fieldset.inner.cmd>div.output>div.layout>div.plug { box-shadow:var(--th-box-shadow); background-color:var(--plugin-bg-color); height:var(--action-height); overflow:auto; }
fieldset.inner.cmd>div.output>div.layout>div.plug>legend { padding:0 var(--input-padding); padding-right:0; margin-right:0; float:right; } fieldset.inner.cmd>div.output>div.layout>div.plug>legend { padding:0 var(--input-padding); padding-right:0; margin-right:0; float:right; }
fieldset.inner.cmd>div.output>div.layout>div.plug>legend:hover { box-shadow:var(--notice-box-shadow); } fieldset.inner.cmd>div.output>div.layout>div.plug>legend:hover { box-shadow:var(--notice-box-shadow); }
fieldset.inner.cmd>div.output>div.layout>div.plug>legend>span.remove { padding:0 var(--input-padding); } fieldset.inner.cmd>div.output>div.layout>div.plug>legend>span.remove { padding:0 var(--input-padding); }

View File

@ -290,6 +290,7 @@ Volcanos(chat.ONIMPORT, {
}, },
myField: function(can, sub) { myField: function(can, sub) {
sub.onexport._output = function(_sub) { sub.onexport._output = function(_sub) {
_sub._stacks_current = can._stacks_current, _sub._stacks_root = can._stacks_root
can.core.Item(can.onimport, function(key, value) { _sub.onimport[key] = _sub.onimport[key]||value }) can.core.Item(can.onimport, function(key, value) { _sub.onimport[key] = _sub.onimport[key]||value })
can.core.Item(can.onaction, function(key, value) { _sub.onaction[key] = _sub.onaction[key]||value }) can.core.Item(can.onaction, function(key, value) { _sub.onaction[key] = _sub.onaction[key]||value })
can.core.Item(can.onexport, function(key, value) { _sub.onexport[key] = _sub.onexport[key]||value }) can.core.Item(can.onexport, function(key, value) { _sub.onexport[key] = _sub.onexport[key]||value })
@ -334,15 +335,15 @@ Volcanos(chat.ONIMPORT, {
}, can.base.Obj(sub.Conf("field.option"))), cmds, cb) }, can.base.Obj(sub.Conf("field.option"))), cmds, cb)
} }
can.onimport.myField(can, sub), can.onmotion.slideIn(sub) can.onimport.myField(can, sub), can.onmotion.slideIn(sub)
sub.onexport.output = function(_sub, msg) { _sub._stacks_current = can._stacks_current, _sub._stacks_root = can._stacks_root sub.onexport.output = function(_sub, msg) {
sub._select(), msg.Option(ice.MSG_ACTION) && can.onappend._action(sub, msg.Option(ice.MSG_ACTION), _action, null, true) sub._select(), msg.Option(ice.MSG_ACTION) && can.onappend._action(sub, msg.Option(ice.MSG_ACTION), _action, null, true)
sub.sub.onaction._goback = goback sub.sub.onaction._goback = goback
} }
sub.onimport._field = function(msg) { var sup = sub; can.onmotion.clear(can, sub._output) sub.onimport._field = function(msg) { var sup = sub; can.onmotion.clear(can, sub._output)
msg.Table(function(value) { value.style = html.OUTPUT msg.Table(function(value) { value.style = html.OUTPUT
can.onappend.plugin(can, value, function(sub) { can.onappend.plugin(can, value, function(sub) {
can.onimport.myField(can, sub)
sub.onexport.output = function(_sub, msg) { sub.onexport.output = function(_sub, msg) {
_sub._stacks_current = can._stacks_current, _sub._stacks_root = can._stacks_root
can.onimport.myOption(sub) can.onimport.myOption(sub)
} }
var run = sub.run; sub.run = function(event, cmds, cb) { var run = sub.run; sub.run = function(event, cmds, cb) {
@ -438,7 +439,7 @@ Volcanos(chat.ONIMPORT, {
authView: function(can, value) { return can.base.isIn(value.auth_status, "issued", "2") && {view: [aaa.AUTH, html.SPAN], list: [{icon: "bi bi-patch-check-fill", style: {color: "var(--notice-bg-color)"}}]} }, authView: function(can, value) { return can.base.isIn(value.auth_status, "issued", "2") && {view: [aaa.AUTH, html.SPAN], list: [{icon: "bi bi-patch-check-fill", style: {color: "var(--notice-bg-color)"}}]} },
timeView: function(can, value, key) { timeView: function(can, value, key) {
if (key) { return {text: [can.user.trans(can, key, null, html.INPUT)+": "+can.base.TimeTrim(value[key]), "", mdb.TIME]} } if (key) { return {text: [can.user.trans(can, key, null, html.INPUT)+": "+can.base.TimeTrim(value[key]), "", mdb.TIME]} }
return {text: [can.base.TimeTrim(value[key]||value.updated_at||value.created_at), "", mdb.TIME]} return {text: [can.base.TimeTrim(value[key]||value.updated_at||value.created_at||value.time), "", mdb.TIME]}
}, },
unitView: function(can, value, key, unit) { if (!value[key]) { return } unitView: function(can, value, key, unit) { if (!value[key]) { return }
return {text: [[can.user.trans(can, key, null, html.INPUT)+":", value[key]].concat(unit? [unit]: []).join(" "), "", key]} return {text: [[can.user.trans(can, key, null, html.INPUT)+":", value[key]].concat(unit? [unit]: []).join(" "), "", key]}
@ -504,6 +505,7 @@ Volcanos(chat.ONACTION, {
can.onaction._goback && can.onaction._goback(event) can.onaction._goback && can.onaction._goback(event)
}, },
onslideleft: function(event, can, data, direction) { onslideleft: function(event, can, data, direction) {
return
var button = can.base.Obj(can._msg.Option("_action"), [])[0]; if (!button) { return } var button = can.base.Obj(can._msg.Option("_action"), [])[0]; if (!button) { return }
can.run({}, [ctx.ACTION, button].concat(can.base.trim(can.core.Item(can.Option(), function(key, value) { return value })))) can.run({}, [ctx.ACTION, button].concat(can.base.trim(can.core.Item(can.Option(), function(key, value) { return value }))))
}, },

View File

@ -116,6 +116,7 @@ var Volcanos = shy({iceberg: "", volcano: "", frame: chat.FRAME_JS, _cache: {},
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(space) { if (space) { can.Conf(web.SPACE, space) } return can.Conf("_space")||can.Conf(web.SPACE)||can.Conf("pod")||"" }, ConfSpace: function(space) { if (space) { can.Conf(web.SPACE, space) } return can.Conf("_space")||can.Conf(web.SPACE)||can.Conf("pod")||"" },
ConfIndex: function(index) { if (index) { can.Conf(ctx.INDEX, index) } return can.Conf("_command")||can.Conf(ctx.INDEX)||can.Conf("_index") }, ConfIndex: function(index) { if (index) { can.Conf(ctx.INDEX, index) } return can.Conf("_command")||can.Conf(ctx.INDEX)||can.Conf("_index") },
ConfIcons: function() { return can.Conf(mdb.ICONS) },
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)||can._output.offsetWidth }, ConfWidth: function(value) { return can.Conf(html.WIDTH, value)||can._output.offsetWidth },
ConfHelp: function() { return can.Conf("help") }, ConfHelp: function() { return can.Conf("help") },