1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 01:04:06 +08:00

opt portal

This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-12-28 10:00:33 +08:00
parent 6063fa8fab
commit 954e067c7e
3 changed files with 10 additions and 12 deletions

View File

@ -426,9 +426,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
item._enter = function(event, value) { if (event.ctrlKey) { run(event, mdb.MODIFY, [key, value]) } }
can.onmotion.modifys(can, event.target, function(event, value, old) { run(event, mdb.MODIFY, [key, value]) }, item)
}, onmouseout: function() {
can.page.SelectChild(can, can._option, html.DIV_ITEM_TEXT, function(target) {
can.page.ClassList.del(can, target, "will")
})
can.page.SelectChild(can, can._option, html.DIV_ITEM_TEXT, function(target) { can.page.ClassList.del(can, target, "will") })
}, onmouseover: function(event) {
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))
@ -441,7 +439,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
can.core.List(list, function(target) { can.onappend.style(can, "icons", target)
var _icon = can.Conf("feature._icons."+target.name)||icon[target.name]
can.page.insertBefore(can, [{icon: _icon, title: can.user.trans(can, target.name), onclick: target.onclick||function(event) {
can.Update(can.request(event, data), [ctx.ACTION, target.name])
can.Update(can.request(event, data, {_toast: "process"}), [ctx.ACTION, target.name]), can.onkeymap.prevent(event)
}}], target.nextSibling, target.parentNode)
})
can.page.SelectOne(can, target, html.SPAN, function(span) { can.core.List(span.style, function(key) { target.style[key] = span.style[key] }) })
@ -724,6 +722,7 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
},
scrollHold: function(can, cb, target) { target = target || can._output; var left = target.scrollLeft; cb(), target.scrollLeft = left },
scrollIntoView: function(can, target, margin) { if (can._scroll) { return } can._scroll = true, margin = margin||0
if (!target.parentNode) { return }
var offset = (target.offsetTop-margin) - target.parentNode.scrollTop, step = offset < 0? -20: 20
if (Math.abs(offset) > 1000) {
return target.parentNode.scrollTop = (target.offsetTop-margin), delete(can._scroll)

View File

@ -36,7 +36,7 @@ body {
--river-width:var(--project-width); --project-width:230px; --input-width:120px; --button-width:60px;
--action-height:32px; --status-height:var(--action-height); --footer-height:var(--action-height); --header-height:48px;
--plug-width:800px; --plug-height:480px; --story-height:var(--plug-height); --float-height:var(--story-height); --float-width:1000px; --desktop-width:1200px; --desktop-height:684px;
--textarea-height:96px; --qrcode-height:360px; --iframe-height:420px; --desktop-icon-size:80px;
--textarea-height:96px; --qrcode-height:360px; --iframe-height:420px; --desktop-icon-size:80px; --desktop-icon-margin:10px;
--river-margin:80px; --action-margin:200px;
--plugin-padding:10px; --plugin-margin:var(--plugin-padding);
--legend-padding:20px; --title-margin:var(--legend-padding);
@ -71,6 +71,7 @@ body.width3 { /* 960-1280 平板横屏 */
body.width4 { /* 1280-1600 笔记本 显示器调试 */
--plugin-padding:10px;
--action-button:6; --table-button:4;
--desktop-icon-margin:0;
}
body.width5 { /* 1600-1920 */
--plugin-padding:10px;
@ -105,7 +106,7 @@ table.content th.select[data-asc="0"] i.bi-sort-up { display:none; }
table.content td { padding:var(--table-padding); }
table.content td input.icons { display:none; }
table.content td i:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); cursor:pointer; }
table.content td i { padding:var(--input-padding); }
table.content td i { padding:var(--input-padding); font-size:20px; }
body:not(.mobile) fieldset.plugin:not(.plug):not(.float):not(.full):not(.cmd)>div.output>table.content td input.icons { display:unset; }
body:not(.mobile) fieldset.plugin:not(.plug):not(.float):not(.full):not(.cmd)>div.output>table.content td i { display:none; }
table.content.checkbox th:first-child { text-align:center; padding:var(--table-padding); position:sticky; left:2px; z-index:1; }
@ -128,7 +129,7 @@ iframe { height:var(--iframe-height); width:100%; }
/* fieldset */
fieldset>legend { box-shadow:var(--box-shadow); }
fieldset>form.option>div.item:not(.icon) { margin-right:var(--button-margin); box-shadow:var(--box-shadow); }
/* fieldset.story:not(.float)>form.option>div.item.icons:not(.icon) { margin-right:0; } */
// fieldset.story:not(.float)>form.option>div.item.icons:not(.icon) { margin-right:0; }
fieldset>form.option>div.item.textarea { width:100%; height:var(--textarea-height); }
fieldset>form.option>div.item.text.cmd { width:100%; }
fieldset>form.option>div.item.text.cmd>input { background-color:var(--code-bg-color); color:var(--code-fg-color); width:100%; }
@ -314,9 +315,7 @@ fieldset.plug>div.action>div.button.icons>input { display:none; }
fieldset.plug>form.option>div.icon:first-child { margin-left:var(--input-margin); }
fieldset>form.option>div.text>span.value {
line-height:calc(var(--action-height) - 2 * var(--input-padding));
white-space:pre; padding:var(--input-padding) var(--button-padding);
/* max-width:320px; */
height:var(--action-height); overflow:auto; }
white-space:pre; padding:var(--input-padding) var(--button-padding); max-width:320px; height:var(--action-height); overflow:auto; }
fieldset.plug>form.option>div.text>span.value { display:none; }
fieldset:not(.float)>form.option>div.text>span.value { display:none; }
fieldset.float:not(.plug)>form.option>div.text:not(.filter)>input { display:none; }

View File

@ -246,10 +246,10 @@ Volcanos(chat.ONEXPORT, {
title: function(can, title) { can.isCmdMode() && can.user.title(title) },
marginTop: function() { return 0 }, marginBottom: function() { return 0 },
actionHeight: function(can) { return can.page.ClassList.has(can, can._target, html.OUTPUT)? 0: html.ACTION_HEIGHT },
outputHeight: function(can) { var height = can.sub.ConfHeight() - can.onexport.outputMargin(can)
outputHeight: function(can) { var height = can.ConfHeight() - can.onexport.outputMargin(can)
if (can.user.isMobile) { return can.ConfHeight() - can.onexport.actionHeight(can) - can.onexport.statusHeight(can) }
can.page.SelectChild(can, can._output, html.TABLE, function(target) { height -= target.offsetHeight })
return can.base.Max(can.base.Min(height, can.sub.ConfHeight()/2), can.ConfHeight()-html.ACTION_HEIGHT, 320)
return can.base.Max(can.base.Min(height, can.ConfHeight()/2), can.ConfHeight()-html.ACTION_HEIGHT, 320)
},
outputMargin: function(can) { return 0 },
statusHeight: function(can) { return can.page.ClassList.has(can, can._target, html.OUTPUT) || !can.page.isDisplay(can._status) || can._status.innerHTML == "" || (can._target.offsetHeight > 0 && can._status.offsetHeight == 0)? 0: html.STATUS_HEIGHT },