mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt some
This commit is contained in:
parent
20ac545320
commit
dfb425bdb5
2
frame.js
2
frame.js
@ -392,7 +392,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
return ui.scrollbar
|
return ui.scrollbar
|
||||||
},
|
},
|
||||||
select: function(can, select, item) { var carte
|
select: function(can, select, item) { var carte
|
||||||
return can.page.Append(can, select.parentNode, [{type: html.INPUT, data: {className: html.SELECT, type: html.BUTTON, name: item.name, value: item.value||item.values[0], title: item.name}, onclick: function(event) { var target = event.target
|
return can.page.Append(can, select.parentNode, [{type: html.INPUT, data: {className: html.SELECT, type: html.BUTTON, name: item.name, value: can.user.trans(can, item.value||item.values[0]), title: item.name}, onclick: function(event) { var target = event.target
|
||||||
if (carte) { return carte.close(), carte = null } carte = can.user.carte(event, can, {}, item.values, function(event, button) {
|
if (carte) { return carte.close(), carte = null } carte = can.user.carte(event, can, {}, item.values, function(event, button) {
|
||||||
carte.close(), carte = null; if (target.value == button) { return }
|
carte.close(), carte = null; if (target.value == button) { return }
|
||||||
target.value = button, select.value = button, select.onchange && select.onchange({target: select})
|
target.value = button, select.value = button, select.onchange && select.onchange({target: select})
|
||||||
|
@ -30,8 +30,10 @@ table.content.full { width:100%; }
|
|||||||
table.content thead { position:sticky; top:2px; }
|
table.content thead { position:sticky; top:2px; }
|
||||||
table.content th { padding:2px 5px; }
|
table.content th { padding:2px 5px; }
|
||||||
table.content td { padding:2px 5px; }
|
table.content td { padding:2px 5px; }
|
||||||
table.content.action th:last-child { position:sticky; right:2px; max-width:190px; }
|
table.content.action th:last-child { position:sticky; right:2px; }
|
||||||
table.content.action td:last-child { position:sticky; right:2px; max-width:190px; }
|
table.content.action td:last-child { position:sticky; right:2px; }
|
||||||
|
table.content col.time { width:180px; }
|
||||||
|
table.content col.action { width:180px; }
|
||||||
h1 { text-align:center; margin:20px 0; } h2 { margin:20px 0; } h3 { margin:20px 0; }
|
h1 { text-align:center; margin:20px 0; } h2 { margin:20px 0; } h3 { margin:20px 0; }
|
||||||
hr, td.hr { border-bottom:var(--plugin-border-color) dashed 1px; margin:5px; }
|
hr, td.hr { border-bottom:var(--plugin-border-color) dashed 1px; margin:5px; }
|
||||||
ul { padding-left:20px; margin:20px 0; }
|
ul { padding-left:20px; margin:20px 0; }
|
||||||
@ -177,7 +179,7 @@ div.project div.zone>div.item { text-align:center; padding:3px; }
|
|||||||
div.project div.zone>div.item>div.icon { margin-left:3px; float:right; }
|
div.project div.zone>div.item>div.icon { margin-left:3px; float:right; }
|
||||||
div.project div.zone>div.list>div.zone>div.item { text-align:left; padding-left:20px; }
|
div.project div.zone>div.list>div.zone>div.item { text-align:left; padding-left:20px; }
|
||||||
div.project div.zone>div.list>div.zone>div.item:hover { margin-left:10px; transition:all 0.3s; }
|
div.project div.zone>div.list>div.zone>div.item:hover { margin-left:10px; transition:all 0.3s; }
|
||||||
fieldset>div.output div.project { border-right:var(--plugin-border-color) solid 1px; min-width:120px; max-width:230px; }
|
fieldset>div.output div.project { border-right:var(--plugin-border-color) solid 1px; width:230px; }
|
||||||
fieldset>div.output div.profile { border-left:var(--plugin-border-color) solid 1px; max-width:320px; }
|
fieldset>div.output div.profile { border-left:var(--plugin-border-color) solid 1px; max-width:320px; }
|
||||||
fieldset>div.output div.display { border-top:var(--plugin-border-color) solid 1px; }
|
fieldset>div.output div.display { border-top:var(--plugin-border-color) solid 1px; }
|
||||||
/* table card */
|
/* table card */
|
||||||
@ -201,6 +203,7 @@ div.action, div.output, div.status, div.project, div.content, div.profile, div.d
|
|||||||
legend, form.option, form.option>div.item, div.action, div.action>div.item, div.action>div.tabs, fieldset>div.status>div.item { float:left; }
|
legend, form.option, form.option>div.item, div.action, div.action>div.item, div.action>div.tabs, fieldset>div.status>div.item { float:left; }
|
||||||
fieldset.story, div.output, fieldset>div.status, div.project div.item, div.content:not(.item), div.code, div.story[data-type=spark] { clear:both; }
|
fieldset.story, div.output, fieldset>div.status, div.project div.item, div.content:not(.item), div.code, div.story[data-type=spark] { clear:both; }
|
||||||
div.output { position:relative; } div.layout.flex>* { float:left; clear:none; }
|
div.output { position:relative; } div.layout.flex>* { float:left; clear:none; }
|
||||||
|
div.output.flex { display:flex; }
|
||||||
fieldset.auto, fieldset.full, fieldset.float, div.float { position:fixed; z-index:100; }
|
fieldset.auto, fieldset.full, fieldset.float, div.float { position:fixed; z-index:100; }
|
||||||
fieldset.plug { position:absolute; bottom:0; right:0; }
|
fieldset.plug { position:absolute; bottom:0; right:0; }
|
||||||
fieldset.full { position:fixed; left:0; top:0; }
|
fieldset.full { position:fixed; left:0; top:0; }
|
||||||
|
@ -170,6 +170,8 @@ Volcanos("page", {
|
|||||||
},
|
},
|
||||||
AppendTable: function(can, msg, target, list, cb) { if (!msg.append||msg.append.length == 0) { return }
|
AppendTable: function(can, msg, target, list, cb) { if (!msg.append||msg.append.length == 0) { return }
|
||||||
var ui = can.page.Append(can, target, [{type: html.TABLE, list: [{type: html.THEAD}, {type: html.TBODY}]}])
|
var ui = can.page.Append(can, target, [{type: html.TABLE, list: [{type: html.THEAD}, {type: html.TBODY}]}])
|
||||||
|
can.page.Append(can, ui.table, [{type: "colgroup", list: can.core.List(list, function(key) { if (key[0] != "_") {
|
||||||
|
return {view: [key, "col"]} } }) }]),
|
||||||
can.page.Append(can, ui.thead, [{data: {dataset: {index: -1}}, th: can.core.List(list, function(key) { if (key[0] != "_") { return key } }) }])
|
can.page.Append(can, ui.thead, [{data: {dataset: {index: -1}}, th: can.core.List(list, function(key) { if (key[0] != "_") { return key } }) }])
|
||||||
can.page.Append(can, ui.tbody, can.core.List(msg.Table(), function(item, index, array) {
|
can.page.Append(can, ui.tbody, can.core.List(msg.Table(), function(item, index, array) {
|
||||||
return {dataset: {index: index}, td: can.core.List(list, function(key) { if (key[0] != "_") { return cb(can.page.Color(item[key]).trim(), key, index, item, array) } }) }
|
return {dataset: {index: index}, td: can.core.List(list, function(key) { if (key[0] != "_") { return cb(can.page.Color(item[key]).trim(), key, index, item, array) } }) }
|
||||||
|
@ -75,9 +75,10 @@ Volcanos("user", {
|
|||||||
cli.BEGIN, "开始", cli.START, "启动", cli.OPEN, "打开", cli.CLOSE, "关闭", cli.STOP, "停止", cli.END, "结束", cli.EXEC, "执行", cli.DONE, "完成", cli.RESTART, "重启",
|
cli.BEGIN, "开始", cli.START, "启动", cli.OPEN, "打开", cli.CLOSE, "关闭", cli.STOP, "停止", cli.END, "结束", cli.EXEC, "执行", cli.DONE, "完成", cli.RESTART, "重启",
|
||||||
cli.SYSTEM, "命令", cli.ORDER, "加载", cli.BUILD, "构建",
|
cli.SYSTEM, "命令", cli.ORDER, "加载", cli.BUILD, "构建",
|
||||||
code.XTERM, "终端", code.INNER, "源码", chat.IFRAME, "浏览", chat.LOCATION, "地图",
|
code.XTERM, "终端", code.INNER, "源码", chat.IFRAME, "浏览", chat.LOCATION, "地图",
|
||||||
html.PLUGIN, "插件", html.LABEL, "标签", html.HEIGHT, "高度", html.WIDTH, "宽度", ice.SHOW, "显示", ice.HIDE, "隐藏", chat.PROJECT, "项目", chat.PROFILE, "详情", chat.ACTIONS, "参数",
|
html.PLUGIN, "插件", html.LABEL, "标签", html.HEIGHT, "高度", html.WIDTH, "宽度", ice.SHOW, "显示", ice.HIDE, "隐藏", chat.PROJECT, "项目", chat.PROFILE, "详情", chat.ACTIONS, "操作",
|
||||||
"full", "全屏", "Close", "关闭", "Close Other", "关闭其它",
|
"full", "全屏", "Close", "关闭", "Close Other", "关闭其它",
|
||||||
"add", "添加",
|
"add", "添加", "opt", "优化", "fix", "修复", "message", "信息",
|
||||||
|
"max", "最大", "auto", "自动",
|
||||||
"confirm", "确定",
|
"confirm", "确定",
|
||||||
"today", "今天",
|
"today", "今天",
|
||||||
)[text]||text
|
)[text]||text
|
||||||
|
@ -27,7 +27,6 @@ Volcanos(chat.ONACTION, {list: [mdb.CREATE, web.SHARE, web.REFRESH], _init: func
|
|||||||
onsearch: function(can, msg, arg) { if (arg[0] == chat.STORM) { can.onexport.storm(can, msg, arg) } },
|
onsearch: function(can, msg, arg) { if (arg[0] == chat.STORM) { can.onexport.storm(can, msg, arg) } },
|
||||||
onlayout: function(can, layout) { can.user.isMobile || can.onmotion.toggle(can, can._target, !layout || layout == "tabs") },
|
onlayout: function(can, layout) { can.user.isMobile || can.onmotion.toggle(can, can._target, !layout || layout == "tabs") },
|
||||||
ontitle: function(can, msg) { can.misc.sessionStorage(can, CAN_RIVER, ""), can.misc.sessionStorage(can, CAN_STORM, "") },
|
ontitle: function(can, msg) { can.misc.sessionStorage(can, CAN_RIVER, ""), can.misc.sessionStorage(can, CAN_STORM, "") },
|
||||||
|
|
||||||
create: function(event, can) { can.user.input(can.request(event, {title: "创建群组"}), can, [
|
create: function(event, can) { can.user.input(can.request(event, {title: "创建群组"}), can, [
|
||||||
{name: mdb.TYPE, values: [aaa.TECH, aaa.ROOT, aaa.TECH, aaa.VOID], _trans: "类型"},
|
{name: mdb.TYPE, values: [aaa.TECH, aaa.ROOT, aaa.TECH, aaa.VOID], _trans: "类型"},
|
||||||
{name: mdb.NAME, value: "hi", _trans: "群名", need: "must"},
|
{name: mdb.NAME, value: "hi", _trans: "群名", need: "must"},
|
||||||
@ -38,14 +37,14 @@ Volcanos(chat.ONACTION, {list: [mdb.CREATE, web.SHARE, web.REFRESH], _init: func
|
|||||||
}) },
|
}) },
|
||||||
share: function(event, can) { can.core.CallFunc(can.ondetail.share, {event: event, can: can}) },
|
share: function(event, can) { can.core.CallFunc(can.ondetail.share, {event: event, can: can}) },
|
||||||
refresh: function(event, can) { can.misc.Search(can, {river: can.Conf(chat.RIVER), storm: can.Conf(chat.STORM)}) },
|
refresh: function(event, can) { can.misc.Search(can, {river: can.Conf(chat.RIVER), storm: can.Conf(chat.STORM)}) },
|
||||||
|
|
||||||
storm: function(event, can, river) { can.onmotion.select(can, can._output, html.DIV_ITEM, can.ui.river_list[river])
|
storm: function(event, can, river) { can.onmotion.select(can, can._output, html.DIV_ITEM, can.ui.river_list[river])
|
||||||
var list = can.ui.sublist[river]; if (list) { return can.onmotion.toggle(can, list) }
|
var list = can.ui.sublist[river]; if (list) { return can.onmotion.toggle(can, list) }
|
||||||
|
var next = event.target.nextSibling
|
||||||
can.run({}, [river, chat.STORM], function(msg) {
|
can.run({}, [river, chat.STORM], function(msg) {
|
||||||
if (msg.Length() == 0) { return can.user.isLocalFile? can.user.toastFailure(can, "miss data"): can.onengine.signal(can, chat.ONACTION_NOSTORM, can.request({}, {river: river})) }
|
if (msg.Length() == 0) { return can.user.isLocalFile? can.user.toastFailure(can, "miss data"): can.onengine.signal(can, chat.ONACTION_NOSTORM, can.request({}, {river: river})) }
|
||||||
var select = 0; list = can.page.Append(can, can._output, [{view: html.LIST, list: msg.Table(function(item, index) {
|
var select = 0; list = can.page.Append(can, can._output, [{view: html.LIST, list: msg.Table(function(item, index) {
|
||||||
return river == can._main_river && item.hash == can._main_storm && (select = index), can.onimport._storm(can, item, river)
|
return river == can._main_river && item.hash == can._main_storm && (select = index), can.onimport._storm(can, item, river)
|
||||||
}) }])._target, can.ui.sublist[river] = list, list.children.length > 0 && list.children[select].click(), event.target.nextSibling && can._output.insertBefore(list, event.target.nextSibling)
|
}) }])._target, can.ui.sublist[river] = list, list.children.length > 0 && list.children[select].click(), next && can._output.insertBefore(list, next)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
action: function(event, can, river, storm) {
|
action: function(event, can, river, storm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user