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

opt bash.grant

This commit is contained in:
harveyshao 2021-11-13 21:44:41 +08:00
parent 042d2e07e2
commit 50c87c19f5
4 changed files with 14 additions and 4 deletions

View File

@ -44,6 +44,9 @@ div.story[data-type=spark] span:hover {
cursor:copy;
}
.hidden {
display:none;
}
select {
height:25px; font-size:14px;
box-shadow: 4px 4px 10px 1px #626bd0;

View File

@ -1,5 +1,6 @@
Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg, list, cb, target) {
can.onmotion.float.auto(can, can._output, chat.CARTE)
can.onmotion.float.auto(can, window, chat.CARTE)
can.base.isFunc(cb) && cb()
},
onmain: function(can) { can._names = location.pathname

View File

@ -99,11 +99,16 @@ Volcanos("onaction", {help: "交互操作", list: [
can.search(event, ["Header.onaction.share"])
},
"生成脚本": function(event, can, button) { var conf = can.Conf()
var ui = can.user.toast(can, {title: button, duration: -1, width: -300,
content: '<div class="story" data-type="spark", data-name="shell">'+'<span>'+
var args = (conf.index||"")+ice.SP+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+can.Input("", true).join(ice.SP)+
'</span>'+'</div>', action: [cli.CLOSE],
" source $ctx_temp "+args, "ish_sys_dev_run_command "+args,
"ish_sys_dev_run_action", "ish_sys_dev_run_source",
]
var ui = can.user.toast(can, {title: button, duration: -1, width: -300,
content: '<div class="story" data-type="spark", data-name="shell">'+
'<label>$ </label>'+'<span>'+list.join("</span><br/><label>$ </label><span>")+'</span>'+'</div>',
action: [cli.CLOSE],
})
can.onmotion.story.auto(can, ui._target)
},

View File

@ -267,6 +267,7 @@ Volcanos.meta._load = function(url, cb) { _can_path = url
}
function cmd(tool) {
Volcanos({name: "chat", panels: [
{name: "Header", help: "标题栏", pos: "hidden", state: ["time", "usernick", "avatar"]},
{name: "cmd", help: "工作台", pos: chat.MAIN, tool: tool},
], main: {name: "cmd", list: []}, plugin: [
"/plugin/state.js",