mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
add some
This commit is contained in:
parent
bb62f1eca3
commit
aad3f75d8b
24
const.js
24
const.js
@ -391,13 +391,27 @@ var icon = {
|
||||
record1: "bi bi-images", record2: "bi bi-record-circle", record: "bi bi-record-circle",
|
||||
"export": "bi bi-box-arrow-up", "import": "bi bi-box-arrow-in-down",
|
||||
|
||||
version: "bi bi-tags",
|
||||
compile: "bi bi-tools",
|
||||
publish: "bi bi-send-check",
|
||||
upgrade: "bi bi-rocket-takeoff",
|
||||
install: "bi bi-box-arrow-in-down",
|
||||
runtime: "bi bi-info-square",
|
||||
compile: "bi bi-tools", publish: "bi bi-send-check", version: "bi bi-tags", upgrade: "bi bi-rocket-takeoff", install: "bi bi-box-arrow-in-down",
|
||||
// vimer: "bi bi-code-slash",
|
||||
vimer: "bi bi-file-earmark-code",
|
||||
|
||||
word: "bi bi-book",
|
||||
repos: "bi bi-git", build: "bi bi-tools", tag: "bi bi-tags",
|
||||
xterm: "bi bi-terminal", cmds: "bi bi-terminal",
|
||||
repos: "bi bi-git",
|
||||
vimer: "bi bi-file-earmark-code",
|
||||
build: "bi bi-tools",
|
||||
xterm: "bi bi-terminal",
|
||||
cmds: "bi bi-terminal",
|
||||
tag: "bi bi-tags",
|
||||
|
||||
path: "bi bi-folder2", file: "bi bi-file-earmark-text", line: "bi bi-sort-numeric-down",
|
||||
hash: "bi bi-hash", zone: "bi bi-diagram-3", id: "bi bi-sort-numeric-down",
|
||||
branch: "bi bi-diagram-3", commit: "bi bi-hash", message: "bi bi-info-square",
|
||||
domain: "bi bi-globe", "client.name": "bi bi-globe",
|
||||
machine: "bi bi-pc-display", port: "bi bi-hash",
|
||||
arch: "bi bi-cpu", os: "bi bi-ubuntu",
|
||||
|
||||
portal: "bi bi-globe",
|
||||
desktop: "bi bi-window-desktop", admin: "bi bi-window-sidebar", dream: "bi bi-grid-3x3-gap", space: "bi bi-grid-3x3-gap",
|
||||
|
10
frame.js
10
frame.js
@ -279,7 +279,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
})
|
||||
},
|
||||
_output: function(can, msg, display, cb, output, status, action) { display = display||chat.PLUGIN_TABLE_JS, output = output||can._output
|
||||
if (msg.IsErr()) { return can.user.toastFailure(can, msg.Result()) }
|
||||
if (msg.IsErr()) { return can.onappend.style(can, "warn", can.user.toastFailure(can, msg.Result())._target) }
|
||||
can.misc.Search(can, log.DEBUG) == ice.TRUE && can.base.beginWith(display, "/require/src/") && delete(Volcanos.meta.cache[display])
|
||||
Volcanos(display, {_root: can._root, _follow: can.core.Keys(can._follow, display), _fields: can._target, _target: output, _path: display||chat.PLUGIN_TABLE_JS,
|
||||
_legend: can._legend, _option: can._option, _action: action||can._action, _output: output, _status: status||can._status,
|
||||
@ -373,7 +373,10 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
},
|
||||
input: function(can, item, value, target, style) { if ([html.BR, html.HR].indexOf(item.type) > -1) { return can.page.Append(can, target, [item]) }
|
||||
var _icon = [], _item = can.base.Copy({className: "", type: "", name: ""}, item), input = can.page.input(can, _item, value)
|
||||
if (item.type == html.SELECT) { can.core.List(input.list, function(item) { item.inner = can.user.trans(can, item.inner, item._trans, html.INPUT) }) }
|
||||
if (item.type == html.SELECT) {
|
||||
can.core.List(input.list, function(item) { item.inner = can.user.trans(can, item.inner, item._trans, html.INPUT) })
|
||||
item.icon = item.icon||icon[item.name]
|
||||
}
|
||||
if (item.type == html.BUTTON && !input.value) {
|
||||
if (item.name != item.value && item.value) {
|
||||
input.value = item.value
|
||||
@ -392,9 +395,10 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
can.onmotion.filter(can, event.target.value)
|
||||
} }, _icon.push({icon: mdb.DELETE, onclick: function(event) { _input.value = "", input.onkeyup({target: event.target.previousSibling}) }})
|
||||
if (item.name == html.FILTER) { item.icon = item.icon||icon.search }
|
||||
item.icon = item.icon||icon[item.name]
|
||||
} if (item.range) { input._init = function(target) { can.onappend.figure(can, item, target, function(sub, value, old) { target.value = value, can.core.CallFunc([can.onaction, item.name], [event, can, item.name]) }) } }
|
||||
var _style = can.page.buttonStyle(can, item.name)
|
||||
var _input = can.page.Append(can, target, [{view: [[html.ITEM].concat(style, [item.type, item.name, item._className, html.FLEX], _style)], list: [item.icon && {icon: item.icon}, input].concat(_icon), _init: function(target, _input) {
|
||||
var _input = can.page.Append(can, target, [{view: [[html.ITEM].concat(style, [item.type, item.name, item._className, html.FLEX , item.icon? "_icon": ""], _style)], list: [item.icon && {icon: item.icon}, input].concat(_icon), _init: function(target, _input) {
|
||||
if (item.type == html.SELECT) {
|
||||
_input.select.value = value||_item.value||_item.values[0]
|
||||
can.onappend.select(can, _input.select, _item)
|
||||
|
45
index.css
45
index.css
@ -222,13 +222,14 @@ fieldset.Action>div.toast { height:fit-content; width:fit-content; overflow:auto
|
||||
body.mobile fieldset.Action>div.toast {
|
||||
bottom:calc(var(--footer-height) + var(--action-height));
|
||||
}
|
||||
body.mobile fieldset.Action>div.toast>div.toast { margin-bottom:10px; box-shadow:var(--notice-box-shadow); }
|
||||
body.mobile fieldset.Action>div.toast>div.toast { margin-bottom:10px; }
|
||||
fieldset.Action>div.toast>div.toast { margin:var(--plugin-margin); position:static; transition:all 1s; }
|
||||
div.toast.float div.title { color:var(--notice-bg-color); font-style:italic; white-space:pre; padding:0 var(--input-padding); max-width:300px; overflow:auto; float:left; cursor:copy; }
|
||||
div.toast.float div.close { color:var(--notice-bg-color); float:right; cursor:pointer; }
|
||||
div.toast.float div.close:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
||||
div.toast.float div.duration { color:var(--disable-fg-color); float:right; }
|
||||
div.toast.float div.content { color:var(--notice-bg-color); white-space:pre-line; text-align:center; padding:var(--input-padding); margin-bottom:var(--input-margin); min-height:28px; }
|
||||
div.toast.warn.float div.content { white-space:pre; text-align:left; display:block; overflow:auto; }
|
||||
div.toast.float div.progress { border:var(--box-notice); margin-left:0px; height:5px; }
|
||||
div.toast.float div.progress div.current { background-color:var(--progress-bg-color); height:3px; }
|
||||
div.toast.float div.action:not(.hide) { display:flex; flex-direction:row-reverse; gap:var(--button-margin); }
|
||||
@ -244,7 +245,6 @@ body>div.carte div.item span.icon.next { line-height:22px; height:22px; float:ri
|
||||
body>div.carte.select.float>div.item { text-align:center; }
|
||||
body>div.carte.header.avatar img { width:370px; }
|
||||
body>div.input { padding:var(--plugin-padding); }
|
||||
body>div.input:hover { box-shadow:var(--notice-box-shadow); }
|
||||
body>div.input>legend { margin-left:122px; }
|
||||
body>div.input tr { margin:var(--button-margin); }
|
||||
body>div.input td { padding:var(--table-padding); }
|
||||
@ -316,7 +316,7 @@ fieldset.plug { position:sticky; bottom:0; float:right; }
|
||||
div.float { position:fixed; }
|
||||
div.output { position:relative; } div.content { position:relative; }
|
||||
div.output>div.code { position:sticky; left:0; }
|
||||
div.output>div.code>img { margin-bottom:-3px; }
|
||||
div.output>div.code>img { margin:5px; }
|
||||
div.output.flex { overflow:hidden; align-items:flex-start; justify-content: flex-start; }
|
||||
div.layout.flex>* { float:left; clear:none; }
|
||||
div.flex:not(.hide) { display:flex; align-items:center; justify-content:center; }
|
||||
@ -463,7 +463,11 @@ div.output.card>div.item:hover { box-shadow:var(--notice-bg-color) 2px 2px 8px;
|
||||
div.output.card>div.item>div.action>input { box-shadow:var(--input-box-shadow); }
|
||||
fieldset:not(.panel):not(.full):not(.cmd) { box-shadow:var(--plugin-box-shadow); }
|
||||
fieldset:not(.panel):not(.full):not(.cmd):hover { box-shadow:var(--notice-box-shadow); }
|
||||
body>div.carte:hover { box-shadow:var(--notice-box-shadow); }
|
||||
body>div.input:hover { box-shadow:var(--notice-box-shadow); }
|
||||
fieldset.Action>div.toast>div.toast:hover { box-shadow:var(--notice-box-shadow); }
|
||||
div.float { box-shadow:var(--plugin-box-shadow); }
|
||||
div.float:hover { box-shadow:var(--notice-box-shadow); }
|
||||
/* font */
|
||||
body.windows { --code-font-family:"Courier New"; }
|
||||
body { font-family:var(--body-font-family); }
|
||||
@ -512,18 +516,22 @@ i.bi.bi-toggle-on:hover { color:var(--notice-bg-color); }
|
||||
fieldset>legend>i { margin-right:var(--input-margin); }
|
||||
form.option>div.item.icon { position:relative; height:var(--action-height); overflow:hidden; user-select:none; }
|
||||
form.option>div.item.icon { font-size:var(--icon-font-size); padding:0 var(--input-padding); }
|
||||
form.option>div.item.icon.menu { font-size:28px; line-height:28px; display:flex; align-items:flex-start; display:none; }
|
||||
form.option>div.item.icon.refresh { font-size:28px; line-height:28px; display:flex; align-items:flex-start; }
|
||||
form.option>div.item.icon.goback { font-size:28px; line-height:28px; display:flex; align-items:flex-start; }
|
||||
form.option>div.item.icon.menu { font-size:28px; line-height:24px; display:flex; align-items:flex-start; display:none; }
|
||||
form.option>div.item.icon.refresh { font-size:28px; line-height:24px; display:flex; align-items:flex-start; }
|
||||
form.option>div.item.icon.goback { font-size:28px; line-height:24px; display:flex; align-items:flex-start; }
|
||||
form.option>div.icon.delete { font-size:20px; line-height:32px; display:flex; align-items:flex-start; }
|
||||
form.option>div.item.icon.play { font-size:16px; }
|
||||
body.windows form.option>div.item.icon.delete { line-height:31px; display:flex; align-items:flex-start; }
|
||||
body.windows form.option>div.item.icon.menu { font-size:22px; line-height:32px; }
|
||||
body.windows form.option>div.item.icon.refresh { font-size:24px; line-height:28px; }
|
||||
body.windows form.option>div.item.icon.goback { font-size:24px; line-height:28px; }
|
||||
div.item.text { position:relative; }
|
||||
div.item.text.filter input { padding-left:22px; }
|
||||
div.item.text.filter input { padding-left:24px; }
|
||||
div.item.text._icon input { padding-left:24px; }
|
||||
div.item.select._icon i:first-child { color:var(--disable-fg-color); position:absolute; left:0; padding:var(--input-padding); }
|
||||
div.item.select._icon:hover i:first-child { color:unset; }
|
||||
div.item.text>input { width:var(--input-width); height:var(--action-height); }
|
||||
div.item.text.id>input { width:var(--button-width); }
|
||||
div.item.text.id>input { width:80px; }
|
||||
div.item.text.url>input { width:var(--river-width); }
|
||||
div.item.text.line>input { width:var(--button-width) !important; }
|
||||
div.item.text.limit>input { width:var(--button-width); }
|
||||
@ -531,7 +539,8 @@ div.item.text.offend>input { width:var(--button-width); }
|
||||
div.item.text.path>input { width:var(--project-width); }
|
||||
div.item.text.filter>input { width:var(--project-width); }
|
||||
div.item.text.will>input { border:var(--box-notice); }
|
||||
div.item.text>i:first-child { position:absolute; left:0; padding:var(--input-padding); }
|
||||
div.item.text>i:first-child { color:var(--disable-fg-color); position:absolute; left:0; padding:var(--input-padding); }
|
||||
div.item.text:hover>i:first-child { color:unset; }
|
||||
div.item.text>span.icon { font-size:var(--icon-font-size); padding:var(--input-padding); position:absolute; right:0; visibility:hidden; }
|
||||
div.item.text:hover>span.icon { visibility:visible; }
|
||||
div.item.button { position:relative; height:var(--action-height); }
|
||||
@ -542,9 +551,9 @@ div.item.button.select:hover>span.icon { visibility:visible; }
|
||||
div.item.button.create { display:flex; align-items:flex-start; }
|
||||
div.item.button.insert { display:flex; align-items:flex-start; }
|
||||
div.item.button.refresh { display:flex; align-items:flex-start; }
|
||||
div.item.button.create>span.icon { font-size:28px; line-height:28px; height:var(--action-height); }
|
||||
div.item.button.insert>span.icon { font-size:28px; line-height:28px; height:var(--action-height); }
|
||||
div.item.button.refresh>span.icon { font-size:28px; line-height:28px; height:var(--action-height); }
|
||||
div.item.button.create>span.icon { font-size:28px; line-height:26px; height:var(--action-height); }
|
||||
div.item.button.insert>span.icon { font-size:28px; line-height:26px; height:var(--action-height); }
|
||||
div.item.button.refresh>span.icon { font-size:28px; line-height:26px; height:var(--action-height); }
|
||||
body.windows div.item.button.refresh>span.icon { font-size:22px; line-height:30px; }
|
||||
div.item.button._space.icons { margin-left:var(--action-height); flex-grow:1; }
|
||||
div.item.button._space.icons:hover { background-color:unset; cursor:unset; }
|
||||
@ -575,10 +584,18 @@ fieldset.story>div.action>div.button.icons>input { display:none; }
|
||||
fieldset.plug>form.option>div.button.icons>input { display:none; }
|
||||
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); min-width:40px; max-width:var(--url-input-width); height:var(--action-height); overflow:auto; }
|
||||
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);
|
||||
height:var(--action-height);
|
||||
min-width:80px;
|
||||
/* max-width:var(--url-input-width); */
|
||||
overflow:auto;
|
||||
}
|
||||
fieldset>form.option>div.text._icon>span.value { padding-left:24px; }
|
||||
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)>i:first-child { display:none; } */
|
||||
fieldset.float:not(.plug)>form.option>div.text:not(.filter)>input { display:none; }
|
||||
fieldset.float:not(.plug)>form.option>div.text.filter>span.value { display:none; }
|
||||
fieldset.float:not(.plug)>form.option>div.text>span.icon { display:none; }
|
||||
|
12
lib/page.js
12
lib/page.js
@ -87,13 +87,12 @@ Volcanos("page", {
|
||||
} else if (item.td) { type = html.TR, item.list = item.td.map(function(text) { return can.base.isObject(text)? text: {text: [text||"", html.TD]} }) }
|
||||
// if (type == html.SELECT) { data.title = can.user.trans(can, data.title||name) }
|
||||
if (type == html.INPUT) {
|
||||
if (data.type == html.TEXT||data.type == html.PASSWORD||!data.type) {
|
||||
data.placeholder = (data.placeholder||name||"").split(nfs.PT).pop(), data.title = can.user.trans(can, data.title||data.placeholder)
|
||||
data.autocomplete = data.autocomplete||"off"
|
||||
if (data.type == html.TEXT || data.type == html.PASSWORD || !data.type) { data.autocomplete = data.autocomplete||"off"
|
||||
data.placeholder = (data.placeholder||name||"").split(nfs.PT).pop(), data.title = can.user.trans(can, data.title||data.placeholder, null, html.INPUT)
|
||||
} else if (data.type == html.BUTTON) {
|
||||
// data.value = can.user.trans(can, data.value)
|
||||
}
|
||||
} if (type == html.TEXTAREA) { data.placeholder = can.user.trans(can, (data.placeholder||name||"").split(nfs.PT).pop()) }
|
||||
} if (type == html.TEXTAREA) { data.placeholder = can.user.trans(can, (data.placeholder||name||"").split(nfs.PT).pop(), null, html.INPUT) }
|
||||
can.core.List(["className", "placeholder", "title"], function(key) { data[key] || delete(data[key]) })
|
||||
name && (data.name = name); var node = can.page.Create(can, type, data)
|
||||
value[type] = value[name] = value[can.core.Split(data.className)[0]] = node, value._target = value._target||node, value.first = value.first||node, value.last = node
|
||||
@ -369,7 +368,10 @@ Volcanos("page", {
|
||||
case html.TEXTAREA: input.type = html.TEXTAREA // no break
|
||||
case html.USERNAME: // no break
|
||||
case html.PASSWORD: // no break
|
||||
case html.TEXT: item.className||can.page.ClassList.add(can, item, ctx.ARGS), item.name = item.name||item.type, item.value = value||item.value||""; break
|
||||
case html.TEXT:
|
||||
item.className||can.page.ClassList.add(can, item, ctx.ARGS), item.name = item.name||item.type, item.value = value||item.value||"";
|
||||
item.placeholder = item.placeholder||item.name
|
||||
break
|
||||
case html.UPLOAD: item.type = html.FILE, input.name = html.UPLOAD; break
|
||||
case html.BUTTON: item.value = item.value||item.name||mdb.LIST; break
|
||||
} return input
|
||||
|
@ -159,7 +159,8 @@ Volcanos(chat.ONENGINE, {_engine: function(event, sup, msg, can, cmds, cb) {
|
||||
if (typeof item == code.FUNCTION) { item = item(can) } if (item) { return item.index||item }
|
||||
})), function(msg) {
|
||||
can.core.List(storm.index, function(item) { if (!item || typeof item == code.FUNCTION) { return }
|
||||
msg.Push(ctx.ARGS, JSON.stringify(item.args||[])).Push(ctx.STYLE, item.style||"").Push(ctx.DISPLAY, item.display||"")
|
||||
msg.Push(ctx.ARGS, JSON.stringify(item.args||[]))
|
||||
msg.Push(ctx.STYLE, item.style||"").Push(ctx.DISPLAY, item.display||"")
|
||||
msg.Push(web.SPACE, item.space||"").Push("_ismain", ice.TRUE)
|
||||
}), cb(msg)
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ fieldset.Header>div.output div.item.avatar { padding:0; }
|
||||
fieldset.Header>div.output div.item.avatar>img { height:var(--header-height); clip-path:circle(40%); }
|
||||
fieldset.Header>div.output div.state { float:right; }
|
||||
fieldset.Header>div.output div.search.title { padding:7px 5px; margin-left:15px; }
|
||||
fieldset.Header>div.output div.search>i { padding:7px; left:3px; }
|
||||
fieldset.Header>div.output div.search>i { color:unset; padding:7px; left:3px; }
|
||||
fieldset.Header>div.output div.search>input { padding-left:25px; }
|
||||
fieldset.Header>div.output div.search>span.icon { padding:var(--input-padding) var(--button-padding); }
|
||||
fieldset.Header>div.output div.Action>div.tabs { padding-left:40px; height:100%; overflow:auto; }
|
||||
|
@ -133,7 +133,8 @@ Volcanos(chat.ONEXPORT, {width: function(can) { return can._target.offsetWidth }
|
||||
}
|
||||
}) },
|
||||
})
|
||||
Volcanos(chat.ONENGINE, {_engine: function(event, can, msg, panel, cmds, cb) {
|
||||
Volcanos(chat.ONENGINE, {
|
||||
_engine: function(event, can, msg, panel, cmds, cb) {
|
||||
if (typeof can.river == code.FUNCTION) { can.river = can.river(can) } var list = can.river
|
||||
cmds.length == 0 && can.core.ItemOrder(list, mdb.ORDER, function(key, value) { if (!value) { return }
|
||||
if (value.debug && can.misc.Search(can, ice.MSG_DEBUG) != ice.TRUE) { return }
|
||||
@ -147,5 +148,6 @@ Volcanos(chat.ONENGINE, {_engine: function(event, can, msg, panel, cmds, cb) {
|
||||
msg.Push({hash: key, name: can.user.isEnglish(can)? key: value.name, icon: value.icon||"", main: value.main||false})
|
||||
}
|
||||
}), can.base.isFunc(cb) && cb(msg); return true
|
||||
}})
|
||||
},
|
||||
})
|
||||
})()
|
||||
|
@ -1,5 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_process: function(can, msg) { if (msg.IsErr()) { can.user.toastFailure(can, msg.Result()); }
|
||||
_process: function(can, msg) {
|
||||
if (msg.IsErr()) { can.onappend.style(can, "warn", can.user.toastFailure(can, msg.Result())._target) }
|
||||
if (can.onimport[msg.OptionProcess()]) { return can.core.CallFunc([can.onimport, msg.OptionProcess()], {can: can, sub: can.sub, msg: msg, arg: msg.Option("_arg")}), true } },
|
||||
_location: function(can, msg, arg) { can.user.jumps(arg) },
|
||||
_replace: function(can, msg, arg) { location.replace(arg) },
|
||||
|
Loading…
x
Reference in New Issue
Block a user