1
0
forked from x/volcanos
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-04-07 23:14:14 +08:00
parent 9d635cb45e
commit b0d687654e
7 changed files with 20 additions and 29 deletions

View File

@ -380,7 +380,7 @@ var html = {value: {
PAGE: "page", TABS: "tabs", MENU: "menu", NODE: "node", PLUG: "plug",
ZONE: "zone", LIST: "list", ITEM: "item", NAME: "name", ICON: "icon", VIEW: "view",
HEAD: "head", LEFT: "left", MAIN: "main", FOOT: "foot", AUTO: "auto", SHOW: "show", HIDE: "hide",
PLUGIN: "plugin", LAYOUT: "layout", PROJECT: "project", DISPLAY: "display", PROFILE: "profile", CONTENT: "content",
PLUGIN: "plugin", LAYOUT: "layout", PROJECT: "project", DISPLAY: "display", PROFILE: "profile", CONTENT: "content", TABVIEW: "tabview",
DIV_PAGE: "div.page", DIV_TABS: "div.tabs", DIV_PATH: "div.path", DIV_CODE: "div.code", DIV_PLUG: "div.plug",
DIV_ZONE: "div.zone", DIV_LIST: "div.list", DIV_ITEM: "div.item", DIV_NAME: "div.name", SPAN_ITEM: "span.item", SPAN_ICON: "span.icon", SPAN_NAME: "span.name",
DIV_CONTENT: "div.content", TABLE_CONTENT: "table.content", TABLE_LAYOUT: "table.layout", DIV_TOGGLE: "div.toggle",
@ -400,13 +400,14 @@ var icon = {
portal: "bi bi-globe", desktop: "bi bi-window-desktop", admin: "bi bi-window-sidebar",
dream: "bi bi-box", space: "bi bi-box", store: "bi bi-shop",
word: "bi bi-book", repos: "bi bi-git", vimer: "bi bi-bug", build: "bi bi-tools", xterm: "bi bi-terminal",
matrix: "bi bi-grid-3x3-gap",
feel: "bi bi-images",
plan: "bi bi-calendar4-week",
status: "bi bi-git",
sso: "bi bi-shield-check", login: "bi bi-person-check", token: "bi bi-key",
username: "bi bi-person-gear", nodename: "bi bi-globe",
domain: "bi bi-globe", origin: "bi bi-globe",
// vendor: "bi bi-box-arrow-up-right",
vendor: "bi bi-shop",
domain: "bi bi-globe", origin: "bi bi-globe", vendor: "bi bi-shop",
full: "bi bi-arrows-fullscreen", open: "bi bi-box-arrow-up-right",
more: "bi bi-three-dots-vertical", actions: "bi bi-three-dots",
search: "bi bi-search", favor: "bi bi-star",
@ -428,7 +429,6 @@ var icon = {
compile: "bi bi-tools",
publish: "bi bi-send-check",
upgrade: "bi bi-rocket-takeoff",
// install: "bi bi-box-arrow-in-down",
install: "bi bi-cloud-download",
runtime: "bi bi-info-square",
template: "bi bi-file-earmark-medical",
@ -438,14 +438,14 @@ var icon = {
qrcode: "bi bi-qr-code",
main: "bi bi-house-door", top: "bi bi-globe",
configs: "bi bi-gear", config: "bi bi-gear", conf: "bi bi-gear", logs: "bi bi-calendar4-week", tag: "bi bi-tags",
branch: "bi bi-diagram-3", commit: "bi bi-hash", message: "bi bi-info-square",
branch: "bi bi-diagram-3", commit: "bi bi-hash",
message: "bi bi-wechat",
preview: "bi bi-window-stack", show: "bi bi-window-stack",
display: "bi bi-window-desktop", exec: "bi bi-window-desktop",
chat: "bi bi-chat-dots", help: "bi bi-question-square", doc: "bi bi-question-square",
record: "bi bi-record-circle", record1: "bi bi-images", record2: "bi bi-record-circle",
// message: "bi bi-wechat",
"client.name": "bi bi-globe",
machine: "bi bi-pc-display", port: "bi bi-hash",
arch: "bi bi-cpu", os: "bi bi-ubuntu",

View File

@ -734,16 +734,15 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
return ui
},
tabview: function(can, meta, list, target) { var ui = can.page.Append(can, target, [html.ACTION, html.OUTPUT])
can.onappend.style(can, "tabview", ui.action), can.onappend.style(can, html.FLEX, ui.action)
can.onappend.style(can, html.TABVIEW, ui.action), can.onappend.style(can, html.FLEX, ui.action)
var _meta = meta; if (meta.Table) { _meta = {}, meta.Table(function(value) { _meta[value.index] = value }) }
can.core.List(can.base.getValid(list, can.core.Item(_meta)), function(name, index) { var item = _meta[name]
ui[name] = can.page.Append(can, ui.action, [{view: [html.TABS, html.DIV, item.title||can.user.trans(can, name)], onclick: function(event) {
can.onmotion.select(can, ui.action, html.DIV_TABS, event.target)
if (can.onmotion.cache(can, function() { return name }, ui.output)) { return }
if (typeof item == code.FUNCTION) { return item(ui.output) }
item.type = item.type||"story"
can.onappend.plugin(can, item, function(sub) {
sub.onimport.size(sub, sub.ConfHeight(), sub.ConfWidth(), false)
item.type = item.type||chat.STORY, can.onappend.plugin(can, item, function(sub) {
sub.onimport.size(sub, sub.ConfHeight(), sub.ConfWidth(), false)
sub.onexport._output = function() {
sub.onimport.size(sub, sub.ConfHeight(), sub.ConfWidth(), false)
}

View File

@ -76,13 +76,12 @@ body {
body.en { --card-button:3; }
body.mobile { --footer-height:60px; --qrcode-height:284px; --svg-font-size:13px; }
body.width1 { /* 320-640 手机竖屏 */
--river-width:280px; --project-width:120px; --input-width:80px; --url-input-width:160px; --form-width:290px;
--river-margin:0; --plugin-margin:0; --button-margin:5px;
--project-width:120px; --river-width:280px; --input-width:80px; --url-input-width:160px; --form-width:290px;
--river-margin:0; --plugin-margin:0; --legend-margin:5px; --button-margin:5px;
--table-button:2; --card-button:3;
--legend-margin:5px;
}
body.width2 { /* 640-960 手机横屏 平板竖屏 笔记本调试 */
--input-width:80px; --url-input-width:160px;
--input-width:80px; --url-input-width:160px;
}
body.width3 { /* 960-1280 平板横屏 */
--float-width:1000px;
@ -93,8 +92,7 @@ body.width4 { /* 1280-1600 笔记本 显示器调试 */
body.width5 { /* 1600-1920 */
}
body.width6 { /* 1920-2240 显示器 */
--river-width:280px; --input-width:180px; --card-height:160px;
--project-width:280px; --qrcode-width:420px;
--project-width:280px; --river-width:280px; --input-width:180px; --url-input-width:1000px; --qrcode-width:420px; --card-height:160px;
--float-height:640px; --float-width:1400;
}
/* element */

View File

@ -184,7 +184,7 @@ Volcanos("misc", {
res.Option(ice.LOG_TRACEID, msg.Option(ice.LOG_TRACEID))
res.Option(ice.MSG_DEBUG, msg.Option(ice.MSG_DEBUG))
socket.send(JSON.stringify(res))
}, msg.detail = data.detail||[], msg.Copy(data)
}, msg.detail = data.detail||[], msg.Copy(data), msg[ice.MSG_TARGET] = data[ice.MSG_TARGET]||[]
try { msg.Option(ice.LOG_DISABLE) != ice.TRUE && can.misc.Log(html.WSS, ice.MSG_DETAIL, msg.detail, msg, _msg)
can.core.CallFunc(cb, {event: event, msg: msg, cmd: msg.detail[0], arg: msg.detail.slice(1), cb: function() { msg.Reply() }})
} catch (e) { can.misc.Warn(e), msg.Reply() }

View File

@ -198,10 +198,8 @@ Volcanos("user", {
item.type = item.type||(item.values? html.SELECT: item.name == html.TEXT? html.TEXTAREA: html.TEXT), need[item.name] = item.need
item._init = function(target) {
if (item.name && item.name != ctx.ACTION) { target.value = item.value||msg.Option(item.name)||can.Option(item.name)||target.value||"" }
// if (item.name && item.name != ctx.ACTION) { target.value = item.value||msg.Option(item.name)||can.Option(item.name)||can.Status(item.name)||target.value||"" }
item.mode = chat.SIMPLE, can.onappend.figure(can, can.base.Copy({space: msg.Option(web.SPACE), run: function(event, cmds, cb) { var _msg = can.request(event, {_handle: ice.TRUE, action: msg.Option(html.ACTION)}, msg, can.Option())
can.page.Select(can, ui.table, html.OPTION_ARGS, function(item) { item.name && item.value && _msg.Option(item.name, item.value) })
;(item.run||can.run)(event, cmds, cb, true)
can.page.Select(can, ui.table, html.OPTION_ARGS, function(item) { item.name && item.value && _msg.Option(item.name, item.value) }); (item.run||can.run)(event, cmds, cb, true)
}, _enter: function(event) { return action.submit(event, can, html.SUBMIT), true }}, item), target)
}, item.onkeydown = function(event) { if (event.key == code.ESCAPE) { event.target.blur() } }
item.placeholder = can.user.trans(can, item.placeholder||item.name, null, html.INPUT)

View File

@ -4,13 +4,7 @@ fieldset.Footer>div.output div.item { padding:7px; height:var(--footer-height);
fieldset.Footer:not(.tabview)>div.output div.title:first-child { font-weight:bold; text-align:center; width:var(--river-width); }
fieldset.Footer>div.output div.state { font-family:var(--status-font-family); float:right; line-height:18px; }
fieldset.Footer>div.output div.state label { font-size:var(--status-font-size); }
fieldset.Footer>div.output div.toast {
font-family:var(--status-font-family); line-height:18px;
max-width:640px; overflow:auto; float:right;
}
body.width6 fieldset.Footer>div.output div.toast {
max-width:1000px;
}
fieldset.Footer>div.output div.toast { font-family:var(--status-font-family); line-height:18px; max-width:var(--url-input-width); overflow:auto; float:right; }
fieldset.Footer>div.output div.cmd { padding:0; margin-left:20px; }
fieldset.Footer>div.output input[type=button] { background-color:transparent; }
fieldset.Footer>div.output div.cmd>input[name=cmd] { padding-left:30px; }

View File

@ -29,7 +29,9 @@ Volcanos(chat.ONACTION, {_init: function(can) { can.onmotion.hidden(can) }, list
if (event.key == code.ENTER) { can.onkeymap.prevent(event); if (event.shiftKey) { return can.page.SelectOne(can, can.ui.content, [html.TBODY, html.TR, html.TD], function(target) { target.click() }) }
return event.ctrlKey? can.onaction.done(event, can): can.ui.input(event, event.target.value)
} if (event.ctrlKey) { return event.key == "0"? can.onaction.clear(event, can): can.onkeymap.selectCtrlN(event, can, can.ui.content, [html.TBODY, html.TR], function(target) { target.firstChild.click() }) }
event.key.length == 1 && can.onmotion.delayOnce(can, function() { can.onmotion.tableFilter(can, can.ui.content, event.target.value) }, 100, can._delay_filter = can._delay_filter||[])
event.key.length == 1 && can.onmotion.delayOnce(can, function() {
can.onmotion.tableFilter(can, can.ui.content, event.target.value)
}, 100, can._delay_filter = can._delay_filter||[])
}}), null, null, null, 10)
var key = can.misc.Search(can, "_search"); key && can.onmotion.delay(can, function() { can.onaction.onopensearch(can, can.request({}), "*", key) }, 1000)
},