1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-10-19 21:07:58 +08:00
parent 181adb5589
commit 3b43f9f0d6
6 changed files with 18 additions and 14 deletions

View File

@ -345,6 +345,9 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
},
board: function(can, text, target) { text && text.Result && (text = text.Result()); if (!text) { return }
var code = can.page.Append(can, target||can._output, [{text: [can.page.Color(text), html.DIV, html.CODE]}]).code
code.ondblclick = function(event) {
can.Option(mdb.KEY, window.getSelection().toString()) && can.Update()
}
if (text.indexOf("<fieldset") == 0) { can.page.Select(can, code, html.FIELDSET, function(target) { var data = target.dataset
data.index && can.onappend.plugin(can, {index: data.index, args: can.base.Split(data.args)}, function(sub) {
can.page.Modify(can, sub._legend, data.index.split(nfs.PT).pop())

View File

@ -280,7 +280,7 @@ div.content>div.toggle.project { top:20%; left:0; height:80px; width:unset; padd
div.content>div.toggle.profile { top:20%; right:0; height:80px; padding-top:25px; transform:scale(1, 3); border:none; }
div.content>div.toggle.display { left:20%; bottom:0; width:80px; text-align:center; transform:scale(3, 1); border:none; }
body.mobile div.project:not(.toggle) { border-right:var(--box-border); width:120px; flex:0 0 120px; }
div.project:not(.toggle) { border-right:var(--box-border); width:230px; flex:0 0 230px; }
div.output>div.project:not(.toggle) { border-right:var(--box-border); width:230px; flex:0 0 230px; }
div.profile:not(.toggle) { border-left:var(--box-border); width:50%; }
div.display:not(.toggle) { border-top:var(--box-border); }
/* table card */
@ -303,7 +303,7 @@ fieldset.output>div.item { display:none; }
fieldset>form.option, fieldset>div.action { display:contents; } form.option.hide, div.action.hide, .hidden, .hide { 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; }
legend, form.option, form.option>div.item, div.action, div.action>div.item, div.action>div.tabs, fieldset>div.status>div.item { float:left; }
fieldset.story, fieldset>div.output, fieldset>div.status, div.project div.item, div.content:not(.item), div.code, div.story[data-type=spark] { clear:both; }
fieldset.story, fieldset>div.output, fieldset>div.status, div.output>div.project div.item, div.content:not(.item), div.code, div.story[data-type=spark] { clear:both; }
fieldset.story { position:sticky; left:0; }
fieldset.full { position:fixed; left:0; top:0; }
fieldset.auto, fieldset.full, fieldset.float, div.float { position:fixed; z-index:100; box-shadow:var(--box-shadow); }

View File

@ -237,7 +237,7 @@ Volcanos("misc", {
FileLine: function(depth, length) { var file = this.fileLine(depth+1, length||9); return file.link },
fileLine: function(depth, length) { var list = this._stacks()
function split(i) { if (!list[i]) { return {} }
var ls = /(https*:\/\/[^/]+)*([^:]+):([0-9]+):([0-9]+)/.exec(list[i])
var ls = /(https*:\/\/[^/]+)*([^:]+):([0-9]+):([0-9]+)/.exec(list[i]); if (!ls) { return {} }
var name = ""; list[i].lastIndexOf(lex.TB) > 0 && (name = list[i].split(lex.TB).pop())
if (ls[0].indexOf(ice.QS) > -1) { ls[0] = ls[0].split(ice.QS)[0]+nfs.DF+ls[3]+nfs.DF+ls[4] }
return {name: name, link: ls[0], path: ls[2], file: ls[2].split(nfs.PS).slice(-length).join(nfs.PS), line: ls[3], cols: ls[4]}

View File

@ -133,19 +133,20 @@ Volcanos("user", {
var isinput = can.page.tagis(event.target, html.INPUT)
var ui = can.page.Append(can, document.body, [{view: [[chat.CARTE, meta._style||can.base.replaceAll(can.ConfIndex()||"", nfs.PT, lex.SP)||"", chat.FLOAT]], list: can.core.List(list, function(item, index) {
if (item === "") { return {type: html.HR} }
if (item == web.FILTER) {
return {input: [html.FILTER, function(event) { if (event.key == code.ESCAPE) { return carte.close() } can.onkeymap.selectItems(event, can, carte._target) }],
_init: function(target) { can.onmotion.delay(can, function() { target.placeholder = "search in "+(can.core.List(list, function(item) { if (item) { return item } }).length-1)+" items", target.focus() }) }
}
}
if (item == web.FILTER) { return {
input: [html.FILTER, function(event) { if (event.key == code.ESCAPE) { return carte.close() } can.onkeymap.selectItems(event, can, carte._target) } ],
_init: function(target) { can.onmotion.delay(can, function() { target.placeholder = "search in "+(can.core.List(list, function(item) { if (item) { return item } }).length-1)+" items", target.focus() }) }
} }
if (can.base.isString(item)||can.base.isNumber(item)) { var _style = can.page.buttonStyle(can, item)
return {view: [[html.ITEM, item, _style], html.DIV,
(isinput || meta._style == ice.CMD) && !trans? item: can.user.trans(can, item, trans)
], onclick: function(event) { click(event, item) }, onmouseenter: function(event) { remove_sub(carte) } }
return {
view: [[html.ITEM, item, _style], html.DIV, (isinput || meta._style == ice.CMD) && !trans? item: can.user.trans(can, item, trans)],
onmouseenter: function(event) { remove_sub(carte) },
onclick: function(event) { click(event, item) },
}
}
if (can.base.isArray(item)) {
function subs(event) { var sub = can.user.carte(event, can, meta, item.slice(1), cb||function(event, button) {
can.onimport && can.onimport[item[0]] && can.onimport[item[0]](can, button)
can.onimport && can.onimport[item[0]]? can.onimport[item[0]](can, button): click(event, button)
}, carte, trans); carte._sub = sub }
return {view: html.ITEM, list: [
{text: can.user.trans(can, item[0], trans)},

View File

@ -3,7 +3,7 @@ fieldset.Footer>div.output div.item { padding:7px; float:left; }
fieldset.Footer>div.output div.title:first-child { font-weight:bold; text-align:center; width:230px; overflow:auto; }
fieldset.Footer>div.output div.state { float:right; }
fieldset.Footer>div.output div.state label { font-size:12px; }
fieldset.Footer>div.output div.toast { float:right; }
fieldset.Footer>div.output div.toast { float:right; line-height:18px; }
fieldset.Footer>div.output div.cmd { padding:0; margin-left:10px; position:relative; }
fieldset.Footer>div.output div.cmd>i { padding:7px; position:absolute; }
fieldset.Footer>div.output div.cmd>input[name=cmd] { padding-left:30px; width:120px; transition:all 1s; }

View File

@ -270,7 +270,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp
content._root || sub.onimport.size(sub, height, width, true), can.onlayout.layout(can, height, width)
})
if (can.isCmdMode()) { can.ui.zone.source._layout(), can.ui.zone[can.Option(nfs.PATH)] && can.ui.zone[can.Option(nfs.PATH)]._layout() }
can.isCmdMode() && can._msg._tab.scrollIntoView()
try { can.isCmdMode() && can._msg._tab.scrollIntoView() } catch (e) {}
},
exts: function(can, url, cb) { var sub = can.db.toolkit[url.split(web.QS)[0]]; if (sub) { return can.base.isFunc(cb)? cb(sub): sub.select() }
can.onimport.toolkit(can, {index: ice.CAN_PLUGIN, display: (url[0] == nfs.PS || url.indexOf(web.HTTP) == 0? "": can.base.Dir(can._path))+url,