diff --git a/const.js b/const.js index 1cad81dd..1864786a 100644 --- a/const.js +++ b/const.js @@ -366,7 +366,7 @@ var html = {value: { H1: "h1", H2: "h2", H3: "h3", UL: "ul", OL: "ol", LI: "li", BR: "br", HR: "hr", A: "a", SPAN: "span", CODE: "code", DIV: "div", SVG: "svg", IMG: "img", IMAGE: "image", VIDEO: "video", AUDIO: "audio", CANVAS: "canvas", IFRAME: "iframe", - WSS: "wss", WEBVIEW: "webview", CHROME: "chrome", MOBILE: "mobile", LANDSCAPE: "landscape", + WSS: "wss", WEBVIEW: "webview", CHROME: "chrome", WINDOWS: "windows", MOBILE: "mobile", LANDSCAPE: "landscape", BODY: "body", FORM: "form", LABEL: "label", TITLE: "title", INNER: "inner", SPACE: "space", CLICK: "click", SELECT: "select", INPUT: "input", TEXT: "text", FILE: "file", TEXTAREA: "textarea", BUTTON: "button", CHECKBOX: "checkbox", CANCEL: "cancel", SUBMIT: "submit", UPLOAD: "upload", USERNAME: "username", PASSWORD: "password", @@ -503,7 +503,9 @@ var icon = { cmds: "bi bi-terminal", localCreate: "bi bi-cloud-download", notifications: "bi bi-chat-right-text", - play: "bi bi-play-circle", app: "bi bi-box-arrow-down-left", + play: "bi bi-play-circle", + app: "bi bi-box-arrow-down-left", + dev: "bi bi-git", "Close": "bi bi-x-lg", "Close Other": "bi bi-x-lg", diff --git a/frame.js b/frame.js index 20241db9..38b29c67 100644 --- a/frame.js +++ b/frame.js @@ -203,6 +203,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { "project": {name: "menu", cb: function(event) { can.onaction["项目"](event, can) }}, run: {name: web.PLAY, cb: function(event) { can.Update(event) }}, list: {name: web.REFRESH, cb: function(event) { can.Update(event) }}, + refresh: {name: web.REFRESH, cb: function(event) { can.Update(event) }}, back: {name: "goback", cb: function(event) { can.onimport.back(event, can) }}, prev: {name: mdb.PREV, cb: function(event) { var sub = can.sub; sub.onaction && sub.onaction.prev? sub.onaction.prev(event, sub): can.onaction.prev(event, can) }}, next: {name: mdb.NEXT, cb: function(event) { var sub = can.sub; sub.onaction && sub.onaction.next? sub.onaction.next(event, sub): can.onaction.next(event, can) }}, @@ -453,7 +454,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { } 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, item.icon? "_icon": ""], _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, 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) @@ -567,7 +568,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { }, table: function(can, msg, cb, target, keys) { if (!msg || msg.Length() == 0) { return } var meta = can.base.Obj(msg.Option(mdb.META)) if (can.user.isMobile) { can.base.toLast(msg.append, mdb.TIME) } can.base.toLast(msg.append, web.LINK), can.base.toLast(msg.append, ctx.ACTION) - if (msg.append && msg.append[msg.append.length-1] == ctx.ACTION && can.core.List(msg[ctx.ACTION], function(item) { if (item) { return item } }).length == 0) { msg.append.pop() } + if (msg.append[msg.append.length-1] == ctx.ACTION && can.core.List(msg[ctx.ACTION], function(item) { if (item) { return item } }).length == 0) { msg.append.pop() } if (msg.append[msg.append.length-1] == ctx.ACTION && (!msg[ctx.ACTION] || msg[ctx.ACTION].length == 0)) { msg.append.pop() } var option = can.core.Item(can.Option()) var table = can.page.AppendTable(can, msg, target||can.ui.content||can._output, msg.append, cb||function(value, key, index, data, list) { var _value = value @@ -577,16 +578,23 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { function request(event) { delete(data.action); return can.request(event, data, can.Option()) } function run(event, cmd, arg) { can.misc.Event(event, can, function(msg) { can.run(request(event), [ctx.ACTION, cmd].concat(arg)) }) } function img(p) { return !msg.IsDetail()? can.page.Format(html.IMG, p, 48, 48): can.user.isMobile? can.page.Format(html.IMG, p, null, 320): can.page.Format(html.IMG, p, 320, null) } - // if (key == mdb.NAME && value) { _value = can.user.trans(can, value, null, html.INPUT) } if (key == mdb.ICON && value) { _value = can.base.contains(value, ".ico", ".png", ".jpg")? img(can.misc.Resource(can, data[key], data[ice.POD]||data[web.SPACE])): "" } if (key == mdb.ICONS && value) { _value = img(can.misc.Resource(can, data[key])) } if (key == nfs.IMAGE && value) { _value = can.core.List(can.core.Split(data[key]), function(item) { return img(can.misc.ShareCache(can, item, data.space)) }).join("") } - if (key == web.SPACE && value) { _value = can.page.Format(html.A, can.misc.MergePodCmd(can, {pod: value}), value) } + // if (key == web.SPACE && value) { _value = can.page.Format(html.A, can.misc.MergePodCmd(can, {pod: value}), value) } + // if (key == mdb.NAME && value) { _value = can.user.trans(can, value, null, html.INPUT) } if (key == mdb.HASH && can.ConfIndex() == web.TOKEN) { _value = value.slice(0, 4)+"****" } - if (key == web.TOKEN && value) { _value = value.slice(0, 4)+"****" } if (key == "secretKey" && value) { _value = value.slice(0, 4)+"****" } + if (key == web.TOKEN && value) { _value = value.slice(0, 4)+"****" } if (key == aaa.PASSWORD && value) { _value = "********" } + function onclick() { return false } + if (key == mdb.STATUS && can.base.isIn(value, mdb.DISABLE, ice.FALSE)) { _value = `` + function onclick() { run(event, mdb.MODIFY, [mdb.STATUS, mdb.ENABLE]); return true } + } + if (key == mdb.STATUS && can.base.isIn(value, mdb.ENABLE, ice.TRUE)) { _value = `` + function onclick() { run(event, mdb.MODIFY, [mdb.STATUS, mdb.DISABLE]); return true } + } if (key == mdb.ENABLE) { if (value == ice.TRUE) { _value = `` function onclick() { run(event, mdb.MODIFY, [key, ice.FALSE]); return true } @@ -601,12 +609,6 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { function onclick() { run(event, mdb.MODIFY, [key, ice.FALSE]); return true } } } - if (key == mdb.STATUS && can.base.isIn(value, mdb.DISABLE, ice.FALSE)) { _value = `` - function onclick() { run(event, mdb.MODIFY, [mdb.STATUS, mdb.ENABLE]); return true } - } - if (key == mdb.STATUS && can.base.isIn(value, mdb.ENABLE, ice.TRUE)) { _value = `` - function onclick() { run(event, mdb.MODIFY, [mdb.STATUS, mdb.DISABLE]); return true } - } return {className: option.indexOf(key) > -1? ice.MSG_OPTION: key == ctx.ACTION? ctx.ACTION: "", text: [ msg.IsDetail() && key == mdb.KEY? can.user.trans(can, _value, null, html.INPUT): _value, html.TD, ], onclick: function(event) { if (onclick()) { return } var target = event.target @@ -626,15 +628,14 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { }, onmouseover: function(event) { can.page.SelectChild(can, can._option, html.DIV_ITEM_TEXT, function(target) { can.page.ClassList.set(can, target, "will", can.page.ClassList.has(can, target, key)) }) }, _init: function(target) { - if (option.indexOf(key) > -1) { can.onappend.style(can, value, target.parentNode) } + if (option.indexOf(key) > -1) { can.onappend.style(can, "k-"+value, target.parentNode) } if (key == mdb.TYPE) { can.onappend.style(can, value, target.parentNode) } if (key == mdb.STATUS) { can.onappend.style(can, value, target.parentNode) } if (key == mdb.ENABLE) { can.onappend.style(can, value == ice.TRUE? mdb.ENABLE: mdb.DISABLE, target.parentNode) } if (key == mdb.DISABLE) { can.onappend.style(can, value == ice.FALSE? mdb.DISABLE: mdb.ENABLE, target.parentNode) } if (key == ctx.ACTION && msg.IsDetail()) { can.onappend.style(can, ctx.ACTION, target.parentNode) } key == ctx.ACTION && can.onappend.mores(can, target, data, msg.IsDetail()? 20: html.TABLE_BUTTON) - var list = can.page.Select(can, target, html.INPUT, function(target) { - var _icon = (can.page.icons(can, target.name)||{}).icon; + var list = can.page.Select(can, target, html.INPUT, function(target) { var _icon = (can.page.icons(can, target.name)||{}).icon if (_icon && typeof _icon == code.STRING || target.name == mdb.DELETE) { return target } }) can.core.List(list, function(target) { can.onappend.style(can, html.ICONS, target); @@ -643,16 +644,12 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { can.onengine.signal(can, "onevent", can.request(event, {_type: html.BUTTON})) can.Update(request(event)._event, [ctx.ACTION, target.name]), can.onkeymap.prevent(event) }}], target.nextSibling, target.parentNode) - }) - can.page.SelectOne(can, target, html.SPAN, function(span) { can.core.List(span.style, function(key) { target.style[key] = span.style[key] }) }) + }), can.page.SelectOne(can, target, html.SPAN, function(span) { can.core.List(span.style, function(key) { target.style[key] = span.style[key] }) }) }} }) - can.onappend.style(can, chat.CONTENT, table), msg.IsDetail() && can.onappend.style(can, mdb.DETAIL, table) - msg.append && msg.append[msg.append.length-1] == ctx.ACTION && can.onappend.style(can, ctx.ACTION, table) - if (msg.IsDetail()) { can.onappend.style(can, msg.Append(mdb.TYPE), table), can.onappend.style(can, msg.Append(mdb.STATUS), table) } - if (msg.Option(ice.TABLE_CHECKBOX) == ice.TRUE && !msg.IsDetail()) { can.onappend.checkbox(can, table, msg), can.onappend.style(can, html.CHECKBOX, table) } keys && can.page.RangeTable(can, table, can.core.List(keys, function(key) { return can.page.Select(can, table, html.TH, function(th, index) { if (th.innerHTML == key) { return index } })[0] })) - can.onmotion.orderShow(can, can.page.SelectOne(can, table, html.TBODY), html.TR) + can.onappend.style(can, chat.CONTENT, table), msg.append && msg.append[msg.append.length-1] == ctx.ACTION && can.onappend.style(can, ctx.ACTION, table) + if (msg.IsDetail()) { can.onappend.style(can, mdb.DETAIL, table), can.onappend.style(can, msg.Append(mdb.TYPE), table), can.onappend.style(can, msg.Append(mdb.STATUS), table) } can.onappend.style(can, html.FULL, table) return table }, @@ -951,8 +948,7 @@ Volcanos(chat.ONLAYOUT, {_init: function(can, target) { target = target||can._ro var rect = event.target == document.body? {left: can.page.width()/2, top: can.page.height()/2, right: can.page.width()/2, bottom: can.page.height()/2}: (event.currentTarget||event.target).getBoundingClientRect() var layout = right? {left: rect.right, top: rect.top}: {left: rect.left, top: rect.bottom} can.getActionSize(function(left, top, width, height) { - left = left||0, top = top||0, height = can.base.Max(height, can.page.height()-top) - -html.ACTION_HEIGHT-(can.isCmdMode()? 0: 20) + left = left||0, top = top||0, height = can.base.Max(height, can.page.height()-top)-html.ACTION_HEIGHT-(can.isCmdMode()? 0: 20) if (layout.top+target.offsetHeight > top+height) { if (!min || top+height-layout.top < min) { if (right) { @@ -962,7 +958,9 @@ Volcanos(chat.ONLAYOUT, {_init: function(can, target) { target = target||can._ro } } } - if (layout.left+target.offsetWidth > left+width-20) { + if (layout.left+target.offsetWidth > left+width-100 && right) { + layout.left = rect.left-target.offsetWidth-1 + } else if (layout.left+target.offsetWidth > left+width-20) { if (right) { layout.left = rect.left-target.offsetWidth-1 } else { diff --git a/index.css b/index.css index 616c5d3c..7e6ba8f3 100644 --- a/index.css +++ b/index.css @@ -38,7 +38,7 @@ body { --hover-bg-color:#5066b961; --hover-fg-color:var(--notice-fg-color); --body-font-family:sans-serif; --code-font-family:monospace; --project-width:230px; --river-width:var(--project-width); - --float-height:640px; --float-width:1200px; --desktop-icon-size:80px; + --float-height:640px; --float-width:1000px; --desktop-icon-size:80px; } body { --body-bg-color:var(--panel-bg-color); --body-fg-color:var(--plugin-fg-color); @@ -74,7 +74,7 @@ body { --input-width:140px; --button-width:60px; --form-width:360px; --url-input-width:480px; --card-width:300px; --card-height:160px; --qrcode-width:360px; --qrcode-height:363px; --story-height:var(--float-height); --iframe-height:420px; - --plug-height:var(--float-height); --plug-width:var(--float-width); + --plug-height:480px; --plug-width:var(--float-width); --desktop-height:684px; --desktop-width:var(--float-width); --desktop-menu-height:25px; --desktop-width:var(--float-width); --action-button:10; --table-button:5; --card-button:5; @@ -89,16 +89,15 @@ body { --icon-font-size:var(--legend-font-size); --svg-font-size:24px; --svg-stroke-width:1; } body.width6 { /* 1920-2240 大显示器 */ - --project-width:280px; --river-width:280px; --input-width:180px; --url-input-width:1000px; --qrcode-width:420px; --card-height:160px; - --plug-height:480px; --plug-width:1200px; + --project-width:280px; --river-width:280px; --input-width:180px; --url-input-width:1000px; + --qrcode-width:420px; --card-height:160px; + --float-width:1200px; } body.width5 { /* 1600-1920 */ } body.width4 { /* 1280-1600 笔记本 显示器调试 */ - --float-width:1000px; } body.width3 { /* 960-1280 平板横屏 */ - --float-width:1000px; } body.width2 { /* 640-960 手机横屏 平板竖屏 笔记本调试 */ --input-width:80px; --url-input-width:160px; @@ -110,7 +109,7 @@ body.width1 { /* 320-640 手机竖屏 */ } body.en { --card-button:3; } body.mobile { --footer-height:60px; --svg-font-size:13px; } -body.web.code.vimer.cmd { --code-line-height:24px; } +body.cmd.web.code.vimer { --code-line-height:24px; } /* element */ * { box-sizing:border-box; padding:0; border:0; margin:0; tab-size:4; } legend { padding:0 var(--legend-padding); } @@ -251,6 +250,7 @@ div.project div.zone>div.list>div.zone>div.item { text-align:left; padding-left: div.project div.zone>div.list>div.zone>div.item:hover { margin-left:var(--button-margin); transition:all .3s; } div.item>i.bi-chevron-down { float:right; transition:all .5s; } div.item.open>i.bi-chevron-down { rotate:-180deg; transition:all .3s; } +div.item.button { display:flex; align-items:center; } div.item.text.trans input:not([type=button]) { transition:all 1s; } div.item.text.trans input:not([type=button]):focus { width:var(--project-width); transition:all .5s; } div.toggle { background-color:var(--hover-bg-color); color:var(--disable-fg-color); font-size:var(--action-height); padding-top:38px; height:120px; position:absolute; } @@ -415,7 +415,11 @@ body>div.upload div.status div.size { text-align:center; } /* display */ fieldset:not(.Action) { position:relative; } fieldset>form.option:not(.hide), fieldset>div.action:not(.hide):not(.flex) { display:contents; } .hide, .hidden { display:none; } -body:not(.mobile) fieldset:not(.Action):not(.output):not(.cmd)>div.action:not(.hide):not(.flex) { display:flex; align-items:flex-end; overflow:hidden; } +body:not(.mobile) fieldset:not(.Action):not(.output):not(.cmd)>div.action:not(.hide):not(.flex) { + display:flex; + // align-items:flex-end; + overflow:hidden; +} fieldset.panel>legend, fieldset.panel>div.status { display:none; } fieldset.output>legend, fieldset.output>form.option, fieldset.output>div.action:not(.flex), fieldset.output>div.status, fieldset.output>div.item { display:none; } div.action, div.output, div.status, div.project, div.content, div.profile, div.display, table.content, table.content td, div.list, div.code, div.story, div.float, fieldset.float { overflow:auto; } @@ -575,7 +579,7 @@ fieldset>form.option div.item:not(.icon) { box-shadow:var(--input-box-shadow); } fieldset>form.option div.item.select { border-radius:var(--button-radius); } fieldset>form.option div.item.button { border-radius:var(--button-radius); } fieldset>div.action div.item.button { border-radius:var(--button-radius); } -fieldset>div.action div.item.button:last-child { margin-right:var(--button-margin); } +// fieldset>div.action div.item.button:last-child { margin-right:var(--button-margin); } fieldset.input.date.float>div.action div.item.button:last-child { margin-right:0; } fieldset>div.action div.item:not(.state) { box-shadow:var(--input-box-shadow); } fieldset>div.action>div.tabs:not(.state).select { box-shadow:var(--legend-box-shadow); } @@ -716,7 +720,7 @@ div.tabs>span.icon { font-size:var(--icon-font-size); font-style:normal; padding div.tabs.select>span.icon { visibility:visible; } div.tabs:hover>span.icon { visibility:visible; } fieldset.plugin>legend { font-style:italic; } -fieldset.plugin>form.option>div.button.icons>input { display:none; } +fieldset.plugin>form.option>div.button.icons { display:none; } fieldset.plugin>div.action>div.button.icons>input { display:none; } fieldset.Action.tabview>div.output>fieldset.plugin>div.action>div.item.full { display:none; } fieldset.Action:not(.tabview):not(.horizon):not(.grid) fieldset.plugin:not(.float):not(.full):not(.cmd)>form.option>div.icon.delete { display:none; } @@ -734,9 +738,9 @@ fieldset.panel>div.action>div.button.icons>span.icon { display:none; } fieldset.plugin.cmd>form.option>div.icon.delete { display:none; } fieldset.story>form.option>div.button.icons.list { margin-right:0; } fieldset.story>form.option>div.button.icons.back { margin-right:0; } -fieldset.story>form.option>div.button.icons>input { display:none; } +fieldset.story>form.option>div.button.icons { display:none; } fieldset.story>div.action>div.button.icons>input { display:none; } -fieldset.plug>form.option>div.button.icons>input { display:none; } +fieldset.plug>form.option>div.button.icons { display:none; } fieldset.plug>form.option>div.button.icons.back { display:none; } fieldset.plug>form.option>div.button.icons.list { display:none; } fieldset.plug>div.action>div.button.icons>input { display:none; } @@ -856,6 +860,7 @@ fieldset.desktop>div.action { color:silver; } fieldset.desktop>div.status { display:none; } fieldset.qrcode>div.output div.code { padding:0; } fieldset.xterm>div.output>div.project { font-family:var(--code-font-family); } +fieldset.xterm>div.output>div.project div.item.offline { color:var(--disable-fg-color); } fieldset.vimer>div.output>div.project div.item.modify { background-color:#00800036; } fieldset.vimer>div.output>div.project>div.zone.space div.item.stop { color:var(--disable-fg-color); } fieldset.vimer>div.output>div.project>div.zone.space fieldset>div.output>div.item { height:42px; } @@ -913,12 +918,17 @@ fieldset.plan>div.output>div.layout { height:100%; } fieldset.draw>form.option>div.item.pid>input { width:var(--button-width) !important; } fieldset.draw>div.output>div.layout>div.layout>div.profile table { width:100%; } fieldset.draw>div.output>div.layout>div.layout>div.profile { width:var(--project-width); flex:0 0 var(--project-width); } -fieldset.draw div.output svg { margin-bottom:-5px; } -fieldset.draw div.output svg { min-height:100%; } -// fieldset.draw div.output { display:flex; flex-direction:row; } -fieldset.draw.spides div.output svg text { cursor:pointer; } -fieldset.draw.spides div.output svg path { stroke-width:1; } -fieldset.draw.trends div.output { overflow:hidden; } +fieldset.draw>div.output>svg { margin-bottom:-5px; } +fieldset.draw>div.output>svg { min-height:100%; } +// fieldset.draw>div.output { display:flex; flex-direction:row; } +body.dark fieldset.plug.float { background-color:#000c; } +body.dark fieldset.plug.float>div.output { background-color:transparent; } +body.light fieldset.plug.float { background-color:#fffc; } +body.light fieldset.plug.float>div.output { background-color:transparent; } +fieldset.draw.spides>div.output>svg text { cursor:pointer; } +fieldset.draw.spides>div.output>svg path { stroke-width:1; } +fieldset.draw.trends>div.output { overflow:hidden; } +fieldset.draw.pie>div.output>svg { float:left; } fieldset.can.data>div.output { font-family:var(--code-font-family); font-size:var(--code-font-size); white-space:pre; } fieldset.can.data>div.output div.item:not(.hide) { display:flex; gap:5px; } fieldset.can.data>div.output div.view div.item:not(.hide) { display:block; } diff --git a/lib/page.js b/lib/page.js index 2fef3277..2c570a71 100644 --- a/lib/page.js +++ b/lib/page.js @@ -194,7 +194,9 @@ Volcanos("page", { }) }]) can.page.Append(can, ui.tbody, can.core.List(msg.Table(), function(item, index, array) { return {dataset: {index: index}, className: item[mdb.STATUS], td: can.core.List(list, function(key) { if (key[0] != "_") { return cb(can.page.Color(item[key]).trim(), key, index, item, array) } }) } - })); return can.page.OrderTable(can, ui._target) + })) + if (msg.Option(ice.TABLE_CHECKBOX) == ice.TRUE && !msg.IsDetail()) { can.onappend.checkbox(can, ui._target, msg), can.onappend.style(can, html.CHECKBOX, ui._target) } + return can.page.OrderTable(can, ui._target) }, OrderTable: function(can, table) { can.page.Select(can, table, html.TH, function(th, index) { th.onclick = function(event) { var dataset = event.currentTarget.dataset diff --git a/lib/user.js b/lib/user.js index 10f64b11..c6d37d28 100644 --- a/lib/user.js +++ b/lib/user.js @@ -57,10 +57,10 @@ Volcanos("user", { name.push(html.WIDTH+parseInt((can.page.width()+32)/320)) can.misc.isDebug(can) && name.push(log.DEBUG) can.user.info.userrole && name.push(can.user.info.userrole) - can.user.language(can) && name.push(can.core.Split(can.user.language(can), "-")[0]) + can.user.language(can) && name.push(can.core.Split(can.user.language(can), "-_.")[0]) can.user.mod.isCmd && name.push(chat.CMD), can.user.mod.cmd && name.push(can.user.mod.cmd.replaceAll(".", " ")) can.user.isMobile && name.push(html.MOBILE) && can.user.isLandscape() && name.push(html.LANDSCAPE) - can.user.isWebview && name.push(html.WEBVIEW), can.user.isWindows && name.push("windows") + can.user.isWindows && name.push(html.WINDOWS), can.user.isWebview && name.push(html.WEBVIEW) can.page.styleClass(can, document.body, name.join(lex.SP)) }, title: function(text) { if (window.webview) { return title(text) } return text && (document.title = text), document.title }, diff --git a/plugin/local/code/xterm.js b/plugin/local/code/xterm.js index 1679f7af..1e56acfb 100644 --- a/plugin/local/code/xterm.js +++ b/plugin/local/code/xterm.js @@ -7,7 +7,7 @@ Volcanos(chat.ONIMPORT, { } cb && cb(msg) }) }, _project: function(can, msg, hash) { msg.Table(function(value) { - value.nick = `${value.hash}(${value.name||value.type||"ish"})`, value._select = value.hash == hash[0] + value.nick = `${value.hash}(${value.name||value.type||"ish"}) ${value.status}`, value._select = value.hash == hash[0] can.onimport.item(can, value, function(event, item, show, target) { can.onimport.tabsCache(can, value, target, function() { can.onappend._status(can) value._term = can.onimport._connect(can, value, can.ui.content) @@ -28,10 +28,10 @@ Volcanos(chat.ONIMPORT, { return can.db[item.hash] = term }, _theme: function(can, item) { return can.base.Obj(item.theme)||( - can.getHeaderTheme() == html.LIGHT? {background: cli.WHITE, foreground: cli.BLACK, cursor: cli.BLUE}: - can.getHeaderTheme() == html.DARK? {foreground: cli.SILVER, cursor: cli.SILVER}: - can.getHeaderTheme() == chat.BLACK? {background: "#061c3c9e", foreground:cli.WHITE, cursor: cli.WHITE}: - {background: "#d5cfcf3b", foreground: cli.BLACK, cursor: cli.BLUE} + can.getHeaderTheme() == html.LIGHT? {background: "#0000", foreground: cli.BLACK, cursor: cli.BLUE}: + can.getHeaderTheme() == html.DARK? {background: "#0000", foreground:cli.SILVER, cursor: cli.SILVER}: + can.getHeaderTheme() == chat.BLACK? {background: "#0000", foreground:cli.WHITE, cursor: cli.WHITE}: + {background: "#0000", foreground: cli.BLACK, cursor: cli.BLUE} ) }, _resize: function(can, term, size) { can.runAction(can.request({}, size, term._item), web.RESIZE, [], function(msg) {}) diff --git a/plugin/story/pie.js b/plugin/story/pie.js index 5dd96095..e07038c9 100644 --- a/plugin/story/pie.js +++ b/plugin/story/pie.js @@ -1,5 +1,6 @@ Volcanos(chat.ONIMPORT, { _init: function(can, msg, cb) { can.page.requireDraw(can, function() { can.db.delay = 50 + can.onappend.style(can, "pie") can.list = can.onimport._data(can, msg, can.Conf(mdb.FIELD)||msg.append[1]||mdb.VALUE) can.core.List(can.list, function(item) { msg.Push("weight", item.value.weight = parseInt(item.span*100/360)+"%").Push(cli.COLOR, ' ') }) can.onaction.list = [], can.ui.display = can.page.Append(can, can._output, [html.DISPLAY])._target @@ -69,7 +70,7 @@ Volcanos(chat.ONIMPORT, { }, layout: function(can) { if (!can.ui || !can.ui.svg) { return } var height = can.base.Max(can.ConfHeight(), can.ConfWidth()/2), margin = 10, r = height/2-1*margin-margin - can.page.style(can, can.ui.display, html.WIDTH, can.ConfWidth()-height), can.ui.svg.Val(html.HEIGHT, height), can.ui.svg.Val(html.WIDTH, height) + can.page.style(can, can.ui.display, html.WIDTH, can.ConfWidth()-height-1), can.ui.svg.Val(html.HEIGHT, height), can.ui.svg.Val(html.WIDTH, height) can._draw = function(which) { can.onimport._draw(can, height/2-margin/2, can.ConfHeight()/2-margin/2, r, margin, which) }, can._draw(can.db.which||0) can.page.style(can, can._output, html.HEIGHT, can.ConfHeight(), html.WIDTH, can.ConfWidth()) },