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

opt website

This commit is contained in:
harveyshao 2022-02-10 17:51:52 +08:00
parent 7fdd934211
commit 472b856a8e
5 changed files with 52 additions and 23 deletions

View File

@ -1,6 +1,6 @@
body { background-color:black; color:cyan; margin:0; padding:0; font-size:14px; }
h1, h2, h3 { clear:both; }
a { color:yellow; }
/* a { color:yellow; } */
.hide, .hidden { display:none; }
tr.show { background-color:red; }
@ -152,7 +152,7 @@ body>div.toast div.progress { height:10px; border:solid 2px green; margin-left:-
body>div.toast div.progress div.current { height:10px; background-color:red; }
body>div.toast div.action div.item { float:left; }
body>div.carte { background-color:#295b61; color:white; min-width:80px; padding:4px; position:fixed; z-index:0; }
body>div.carte { background-color:#295b61; color:white; min-width:80px; padding:4px; position:fixed; z-index:10; }
body>div.carte div.item { padding:3px 12px; }
body>div.input { background-color:#0d4142a6; position:fixed; z-index:0; }
body>div.input div.item { float:left; }
@ -181,7 +181,8 @@ body>div.upload input[type=file] { width:240px; }
textarea { tab-size:2; }
input, select, option, table.content, div.item, div.code, code.story, div.story[data-type=spark] { font-size:1.1rem; font-family:monospace; }
legend { font-size:1.2rem; }
fieldset>div.status>div.item>label { font-size:0.6rem; color:#bdb8b8e0; }
/* fieldset>div.status>div.item>label { font-size:0.6rem; color:#bdb8b8e0; } */
fieldset>div.status>div.item>label { font-size:0.6rem; }
body>div.toast div.title { color:#cae850; }
body>div.toast div.duration { color:gray; }
@ -212,11 +213,13 @@ body.white table td>input[type=button][value=启动] { background-color:#52ce78;
body.white table td>input[type=button][name=create] { background-color:blue; }
body.white table td>input[type=button][name=remove] { background-color:red; }
body.white fieldset>div.status>div.item>label { font-size:0.6rem; color:#cefbfbe0; }
/* body.white fieldset>div.status>div.item>label { font-size:0.6rem; color:#cefbfbe0; } */
body.white fieldset>div.status>div.item>label { font-size:0.6rem; }
body.white fieldset.Action { color:black; }
body.white fieldset.Action>div.action { color:white; }
body.white fieldset.Action>div.action div.item { height:21px; }
body.white fieldset.Action fieldset.plugin { background-color:#ffffff78; }
body.white fieldset.Action fieldset.plugin.full { background-color:#ffffffff; }
body.white fieldset.Action fieldset.plugin legend { background-color:#339999; color:white; border-radius:10px 10px 10px 10px; }
body.white fieldset.input table { color:white; }
body.white>div.input textarea { border:2px solid #14a58e; border-radius:6px; }

View File

@ -10,6 +10,20 @@ fieldset.Action>div.action {
position:absolute;
}
fieldset.Action div.output fieldset.plugin.Full>legend {
float:left;
}
body.white fieldset.Action div.output fieldset.plugin.Full {
background-color:#cce0f4eb;
}
fieldset.Action div.output fieldset.plugin.Full {
position:fixed; left:0; top:0;
background-color:#073947f2;
overflow:auto;
margin:0;
z-index:1;
}
fieldset.Action div.output fieldset.plugin:hover {
box-shadow:4px 4px 12px 6px #626bd0;
}

View File

@ -1,5 +1,5 @@
Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, cb, target) {
can.Conf(aaa.USERNICK, msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNAME)||can.Conf(aaa.USERNICK))
can.Conf(aaa.USERNICK, msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNICK)||msg.Option(ice.MSG_USERNAME)||can.Conf(aaa.USERNICK))
can.onmotion.clear(can)
can.onimport._agent(can, msg, target)

View File

@ -92,9 +92,15 @@ fieldset.word fieldset.story:hover {
fieldset.word.float {
width:-webkit-fill-available;
position:fixed; left:0; top:0;
z-index:10;
}
body.white fieldset.word.float {
background-color:aliceblue;
color:black;
}
fieldset.word.float>div.action {
display:contents;
}
fieldset.word.float>div.output {
background-color:#f0f8ff80;
overflow:auto;
@ -108,7 +114,7 @@ fieldset.word.float>div.output>div.project {
z-index:100;
}
fieldset.word.float div.content div.page {
background-color:#194c79d4;
/* background-color:#194c79d4; */
margin-top:30px;
display:none;
}

View File

@ -72,23 +72,24 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, conf,
},
})
Volcanos("onaction", {help: "交互操作", list: [
"共享工具", "打开链接", "生成链接", "生成脚本", "生成图片", "清空参数", "刷新数据", "刷新页面", [
"其它 ->", "复制数据", "下载数据", "清空数据", "删除工具", "摄像头", "生成图片",
"共享工具", "切换全屏", "打开链接", "生成链接", "生成图片", "生成脚本", "刷新数据", "刷新页面", [
"其它 ->", "清空参数", "复制数据", "下载数据", "清空数据", "删除工具", "摄像头",
],
], _init: function(can, msg, list, cb, target) {},
_engine: function(event, can, button) {
can.Update(event, [ctx.ACTION, button].concat(can.Input([], true)))
},
"刷新页面": function(event, can) {
var sub = can.core.Value(can._outputs, "-1"), msg = sub._msg
can.core.CallFunc([sub, chat.ONIMPORT, "_init"], {can: sub, msg: msg, list: msg.result||msg.append||[], cb: function(msg) {
}, target: can._output})
},
_engine: function(event, can, button) { can.Update(event, [ctx.ACTION, button].concat(can.Input([], true))) },
"共享工具": function(event, can) { var meta = can.Conf()
can.onmotion.share(event, can, [{name: chat.TITLE, value: meta.name}, {name: chat.TOPIC, values: [cli.WHITE, cli.BLACK]}], [
mdb.NAME, meta.index, mdb.TEXT, JSON.stringify(can.Input([], true)),
])
},
"切换全屏": function(event, can) {
if (can.page.ClassList.neg(can, can._target, "Full")) {
can.page.style(can, can._output, "height", window.innerHeight-(can._status.innerText? 2: 1)*html.ACTION_HEIGHT-2*html.PLUGIN_MARGIN, "min-width", window.innerWidth-2*html.PLUGIN_MARGIN)
} else {
can.page.style(can, can._output, "height", "", "min-width", "")
}
},
"打开链接": function(event, can) { var meta = can.Conf()
var pre = "/chat/cmd/"; if (can.user.mod.isPod) { pre = "/chat/pod/"+can.misc.Search(can, ice.POD)+"/cmd/" }
var args = can.Option(); args._path = pre+(meta.index||can.core.Keys(meta.ctx, meta.cmd))
@ -104,6 +105,11 @@ Volcanos("onaction", {help: "交互操作", list: [
can.user.copy(event, can, url)
can.onmotion.share(event, can, [], [mdb.LINK, url])
},
"生成图片": function(event, can) { can.onmotion.toimage(event, can, can._name) },
// "生成图片": function(event, can) {
// can.user.toPNG(can, "hi.png", can._target.outerHTML, can.Conf(html.HEIGHT), can.Conf(html.WIDTH))
// },
"生成脚本": function(event, can, button) { var conf = can.Conf()
var args = can.Input("", true).join(ice.SP); var list = [
"export ctx_dev="+location.origin+"; ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp;"+" source $ctx_temp "+(conf.index||"")+ice.SP+args,
@ -117,13 +123,17 @@ Volcanos("onaction", {help: "交互操作", list: [
can.onmotion.story.auto(can, ui._target)
can.user.copy(event, can, list[0])
},
"生成图片": function(event, can) { can.onmotion.toimage(event, can, can._name) },
"刷新数据": function(event, can) { can.Update({}, can.Input([], true)) },
"刷新页面": function(event, can) {
var sub = can.core.Value(can._outputs, "-1"), msg = sub._msg
can.core.CallFunc([sub, chat.ONIMPORT, "_init"], {can: sub, msg: msg, list: msg.result||msg.append||[], cb: function(msg) {
}, target: can._output})
},
"保存参数": function(event, can) { can.search(event, ["River.ondetail.保存参数"]) },
"清空参数": function(event, can) {
can.page.SelectArgs(can, can._option, "", function(item) { return item.value = "" })
},
"刷新数据": function(event, can) { can.Update({}, can.Input([], true)) },
"复制数据": function(event, can) { var meta = can.Conf(), msg = can._msg
var res = [msg.append && msg.append.join(",")]; msg.Table(function(line, index, array) {
res.push(can.core.Item(line, function(key, value) { return value }).join(","))
@ -142,10 +152,6 @@ Volcanos("onaction", {help: "交互操作", list: [
},
"清空数据": function(event, can) { can.onmotion.clear(can, can._output) },
"删除工具": function(event, can) { can.page.Remove(can, can._target) },
// "生成图片": function(event, can) {
// can.user.toPNG(can, "hi.png", can._target.outerHTML, can.Conf(html.HEIGHT), can.Conf(html.WIDTH))
// },
"摄像头": function(event, can) {
var constraints = {audio: false, video: {width: 200, height: 200}}
var ui = can.page.Append(can, can._output, [{view: ctx.ACTION}, {view: "capture", list: [{type: "video", _init: function(item) {