1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-07-11 11:04:57 +08:00
parent a258be41cf
commit 1fe6bf2adc
5 changed files with 21 additions and 8 deletions

View File

@ -538,7 +538,7 @@ Volcanos(chat.ONLAYOUT, {_init: function(can, target) { target = target||can._ro
if (can.user.isMobile && can.user.isLandscape()) { return }
can.page.SelectChild(can, field, html.DIV_OUTPUT, function(output) { can.page.styleHeight(can, output, height) })
}), can.onengine.signal(can, chat.ONSIZE, can.request({}, {height: height, width: width}))
can.page.style(can, document.body, kit.Dict(html.OVERFLOW, html.HIDDEN))
can.user.isMobile && can.user.isLandscape() || can.page.style(can, document.body, kit.Dict(html.OVERFLOW, html.HIDDEN))
// can.user.isMobile && can.page.style(can, document.body, kit.Dict(html.OVERFLOW, html.HIDDEN))
},
expand: function(can, target, width) { var n = parseInt(target.offsetWidth/(width+20)); width = target.offsetWidth/n - 20
@ -703,6 +703,11 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
move: function(can, target, layout) { layout && can.page.style(can, target, layout), can.onmotion.resize(can, target, function() {}) },
resize: function(can, target, cb, top) { var begin, action
target.onclick = function(event) {
if (can.page.tagis(event.target, html.DIV) && can.page.ClassList.has(can, event.target, html.FLOAT)) {
} else if (can.page.tagis(event.target, html.FIELDSET)) {
} else {
return
}
if (can.page.tagis(event.target, html.INPUT)) { return }
can.onmotion.delay(can, function() { can.onmotion.clearCarte(can) })
can.onkeymap.prevent(event)

View File

@ -29,11 +29,11 @@ table.content.full { width:100%; }
table.content thead { position:sticky; top:2px; }
table.content th { padding:2px 5px; }
table.content td { padding:2px 5px; }
table.content.action th:last-child { position:sticky; right:2px; }
table.content.action td:last-child { position:sticky; right:2px; }
table.content.action th:last-child { position:sticky; right:2px; max-width:180px; }
table.content.action td:last-child { position:sticky; right:2px; max-width:180px; }
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; }
ul { padding-left:40px; margin:20px 0; }
ul { padding-left:20px; margin:20px 0; }
kbd { padding:0 10px; }
img { margin-bottom:-8px; }
/* fieldset */
@ -88,6 +88,7 @@ body>div.input textarea { height:120px; width:240px; }
body>div.input div.action { width:100%; }
body>div.input div.action>div.item { margin:5px; float:right; }
body>div.input div.action>div.item>input[type=button] { width:110px; }
body>div.input.login>div.output { text-align:center; }
body>div.upload div.action input[type=file] { width:320px; }
body>div.upload div.output { border:var(--notice-fg-color) solid 1px; }
body>div.upload div.output div.progress { background-color:var(--progress-bg-color); height:10px; width:0; }
@ -235,7 +236,8 @@ table.content.action td:last-child { background-color:var(--th-bg-color); }
h1:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
h2:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
h3:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
kbd:hover { background-color:white; color:black; }
kbd:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
/* kbd:hover { background-color:white; color:black; } */
samp:hover { background-color:white; color:black; }
div.item:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
div.item.select { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }

View File

@ -87,7 +87,8 @@ Volcanos("user", {
toastSuccess: function(can, content, title) { return can.user.toast(can, {content: "\u2705 "+(content||ice.SUCCESS), title: title, caller: 2}) },
toastFailure: function(can, content, title) { return can.user.toast(can, {content: "\u274C "+(content||ice.FAILURE), title: title, duration: 10000, caller: 2}) },
toast: function(can, content, title, duration, progress, caller) {
var meta = can.base.isObject(content)? content: {content: content, title: title||can.Conf(ctx.INDEX)||can._name.split(nfs.PS).slice(-2).join(nfs.PS), duration: duration, progress: progress, caller: caller}
var meta = can.base.isObject(content)? content: {content: content, duration: duration, progress: progress, caller: caller}
meta.title = meta.title||can.Conf(ctx.INDEX)||can._name.split(nfs.PS).slice(-2).join(nfs.PS)
var width = meta.width||400; if (width < 0) { width = window.innerWidth + width } meta.action = meta.action||[""]
var ui = can.page.Append(can, document.body, [{view: [[chat.TOAST, chat.FLOAT]], style: {left: (window.innerWidth-width)/2, width: width, top: can.page.height()/2}, list: [
{text: [meta.title||"", html.DIV, html.TITLE], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }},

View File

@ -35,7 +35,9 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
language: function(can, language) { can.runAction(event, aaa.LANGUAGE, [language == ice.AUTO? "": language], function(msg) {
can.user.toastConfirm(can, "reload page for "+language, "language", function() { can.user.reload(true) })
}) },
theme: function(can, theme) { theme && can.misc.localStorage(can, "can.theme", can._theme = theme == ice.AUTO? "": theme) && can.onengine.signal(can, chat.ONTHEMECHANGE, can.request(event, {theme: theme})), can.user.theme(can, can.onexport.theme(can)) },
theme: function(can, theme) { theme && can.runAction({}, "theme", [theme])
theme && can.misc.localStorage(can, "can.theme", can._theme = theme == ice.AUTO? "": theme) && can.onengine.signal(can, chat.ONTHEMECHANGE, can.request(event, {theme: theme})), can.user.theme(can, can.onexport.theme(can))
},
menu: function(can, cmds, cb, trans) { can.base.isString(cmds) && (cmds = [cmds])
return can.page.Append(can, can._output, [{view: cmds[0], list: can.core.List(can.base.getValid(cmds.slice(1), [cmds[0]]), function(item) {
return can.base.isString(item)? /* 1.string */ {view: [[html.ITEM, html.MENU], "", can.user.trans(can, item, trans)], onclick: function(event) { can.base.isFunc(cb) && cb(event, item, [item]) }}:

View File

@ -12,7 +12,7 @@ fieldset.inner>div.output div.content td.text span.constant { color:var(--code-c
fieldset.inner>div.output div.content td.text span.string { color:var(--code-string); }
fieldset.inner>div.output div.content td.text span.object { color:var(--code-object); }
fieldset.inner>div.output>div.project { width:230px; }
fieldset.inner>div.output>div.project * { font-size:14px; outline:none; }
fieldset.inner>div.output>div.project * { font-size:14px; font-family:monospace; outline:none; }
fieldset.inner>div.output>div.project div.action { width:100%; }
fieldset.inner>div.output>div.project input[type=text] { box-shadow:none; }
fieldset.inner>div.output>div.project div.zone>div.item span.icon { font-size:20px; line-height:16px; width:20px; float:right; display:none; }
@ -35,6 +35,8 @@ fieldset.inner.cmd>div.output>div.layout>div.tabs { height:38px; display:block;
fieldset.inner.cmd>div.output>div.layout>div.tabs.hide { display:none; }
fieldset.inner.cmd>div.output>div.layout>div.tabs>div { padding:10px; height:38px; float:left; }
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.icon { font-size:26px; line-height:32px; padding:2px 5px; position:sticky; top:0; }
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.tabs.select { background-color:var(--output-bg-color); }
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.tabs:hover { background-color:var(--output-bg-color); }
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.tabs>span { font-style:italic; }
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.tabs>span.icon { padding:0 5px; }
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.usernick { float:right; position:sticky; top:0; }
@ -52,6 +54,7 @@ fieldset.inner.cmd>div.output>div.layout>div.display>div.status { position:stick
fieldset.inner.cmd>legend { display:none; }
fieldset.inner.cmd>form.option { display:none; }
fieldset.inner.cmd>div.action { display:none; }
fieldset.inner.cmd>div.output { overflow:hidden; }
fieldset.inner.cmd>div.status { display:none; }
body.dark fieldset.inner>div.output div.content tr.line:hover { background-color:unset; }
body.white fieldset.inner.cmd>div.output { background-color:aliceblue; }