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

add MergeLink

This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-04 17:33:42 +08:00
parent 970cc8b523
commit 9135c80974
8 changed files with 21 additions and 16 deletions

View File

@ -192,9 +192,11 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
skip || can.Conf(ice.AUTO) == cli.DELAY || auto && auto.click()
}
if (meta.inputs.length == 0) { return }
var _can = can._fields? can.sup: can
if (!can.page.tagis(_can._target, html.FIELDSET_PLUGIN)) { return }
can.user.isMobile || meta._help && add({type: html.BUTTON, name: ice.HELP, onclick: function(event) { can.onappend._float(can, {index: web.WIKI_WORD}, [meta._help]) }}, function() {})
can.user.isMobile || can.misc.Search(can, ice.MSG_DEBUG) == ice.TRUE && add({type: html.BUTTON, name: "vimer", _trans: "源码", onclick: function(event) {
var _can = can._fields? can.sup: can, value = "查看源码"; _can.onaction[value](event, _can, value, _can.sub)
var value = "查看源码"; _can.onaction[value](event, _can, value, _can.sub)
}}, function() {})
})
},
@ -222,6 +224,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
}), item), "", action)
})
if (list.length == 0) { return meta }
// if (!can.page.tagis(can, html.FIELDSET_PLUGIN)) { return meta }
var _can = can._fields? can.sup: can
can.user.isMobile || can.isCmdMode() || can.base.beginWith(can.ConfIndex(), "can.") || can.page.tagis(can._fields||can._target, html.FIELDSET_PANEL, html.FIELDSET_PLUG) || action == can._action && can.page.Append(can, action,
can.core.Item({full: "切换全屏", open: "打开链接"}, function(key, value) {

View File

@ -651,7 +651,7 @@ fieldset.cmd>div.action>div.tabs.select { border-bottom:var(--notice-bg-color) s
fieldset.cmd>div.status>legend.select { border-top:var(--notice-bg-color) solid 2px; }
fieldset.cmd>div.output>div.project div.item.select { border-right:var(--notice-bg-color) solid 4px; }
fieldset.plug>div.output table.content { width:100%; }
fieldset.plug.dream.zone>div.output>div.item { display:flex; padding:var(--input-padding); }
fieldset.plug.dream.zone>div.output>div.item { display:flex; padding:var(--input-padding); margin:var(--input-margin); }
fieldset.plug.dream.zone>div.output>div.item>img { margin-right:var(--input-margin); }
fieldset.plug.dream.zone>div.output>div.item>span { line-height:var(--action-height); }
body>div.carte.header.avatar img { width:370px; }

View File

@ -1,6 +1,6 @@
fieldset.Header>div.output { line-height:21px; height:var(--header-height); overflow:hidden; }
fieldset.Header>div.output div.item { background-color:var(--panel-output-bg-color); padding:13.5px; height:var(--header-height); float:left; }
fieldset.Header>div.output div.item.title:first-child { font-size:var(--legend-font-size); font-style:italic; font-weight:bold; overflow:hidden; }
fieldset.Header>div.output div.item.title:first-child { font-size:var(--legend-font-size); font-style:italic; font-weight:bold; white-space:pre; overflow:hidden; }
fieldset.Header>div.output div.item.title img { height:var(--action-height); width:var(--action-height); }
fieldset.Header>div.output div.item.theme { user-select:none; }
fieldset.Header>div.output div.item.theme>i { margin-right:0; }

View File

@ -118,7 +118,7 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
can.onimport.theme(can, can.onimport._theme(can, target.className == icon.SUN? html.DARK: html.LIGHT))
}) },
language: function(event, can) { can.onimport.language(can, can.user.info.language.indexOf("zh") == 0? "en-us": "zh-cn") },
email: function(event, can) { can.user.input(can.request(event, {to: can.user.info.email, subject: can.user.title()}), can, ["to", "subject","content"], function(args) {
email: function(event, can) { can.user.input(can.request(event, {to: can.user.info.email, subject: can.user.title()}), can, [{name: "to", _trans: "收件人", need: "must"}, "subject","content"], function(args) {
can.runAction(event, aaa.EMAIL, args, function() { can.user.toastSuccess(can) })
}) },
toimage: function(event, can) { can.onmotion.clearCarte(can), can.user.toimage(can, can.user.title(), can._target.parentNode) },

View File

@ -46,9 +46,9 @@ fieldset.inner.cmd>div.output>div.layout>div.path span.func { padding:var(--inpu
fieldset.inner.cmd>div.output>div.layout>div.path span.mode { padding:var(--input-padding); margin-left:80px; }
body.mobile fieldset.inner.cmd>div.output>div.layout>div.path span.func { display:none; }
body.mobile fieldset.inner.cmd>div.output>div.layout>div.path span.mode { display:none; }
body:not(.mobile) fieldset.inner.cmd>div.output>div.layout>fieldset.plug { bottom:var(--action-height); }
fieldset.inner.cmd>div.output>div.layout>div.path span.space { flex-grow:1; }
fieldset.inner.cmd>div.output>div.layout>div.path span.view { font-size:22px; padding:0 var(--input-padding); margin-top:-5px; float:right; }
body:not(.mobile) fieldset.inner.cmd>div.output>div.layout>fieldset.plug { bottom:var(--action-height); }
fieldset.inner.cmd>div.output>div.layout>fieldset.plug.output { white-space:pre; }
fieldset.inner.cmd>div.output>div.layout>div.plug { height:var(--action-height); position:fixed; right:0; bottom:0; overflow:auto; }
fieldset.inner.cmd>div.output>div.layout>div.plug>legend { font-size:var(--legend-font-size); font-style:italic; float:right; }
@ -56,6 +56,7 @@ fieldset.inner.cmd>div.output>div.layout>div.plug>legend { padding:0 var(--input
fieldset.inner.cmd>div.output>div.layout>div.plug>legend>span.remove { padding:var(--input-padding); }
fieldset.inner.cmd>div.output>div.layout>div.plug>legend>span.remove:hover { background-color:var(--hover-bg-color); }
fieldset.inner.cmd>div.output>div.layout>div.plug>legend:not(:hover)>span.remove { visibility:hidden; }
fieldset.inner>div.output>div.layout>div.layout>div.profile fieldset.xterm.story>form.option>div.item.hash input { width:120px; }
div.path span.item { padding:var(--input-padding); }
div.carte.cmd.float { font-size:var(--code-font-size); } div.carte.cmd.float div.item { padding:var(--input-padding); }
div.carte.path.float { font-size:var(--code-font-size); } div.carte.path.float div.item { padding:var(--input-padding); }

View File

@ -1,6 +1,5 @@
(function() {
const RECOVER_TABS = "recover:tabs"
const RECOVER_TOOL = "recover:tool"
const RECOVER_TABS = "recover:tabs", RECOVER_TOOL = "recover:tool"
const PROJECT_HIDE = "project:hide", TABVIEW_HIDE = "tabview:hide"
const PROFILE_ARGS = "profile:args:", DISPLAY_ARGS = "display:args:"
const CURRENT_FILE = "web.code.inner:currentFile", SELECT_LINE = "selectLine"
@ -23,7 +22,6 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp
}
can.db = {paths: paths, tabview: {}, history: [], _history: [], toolkit: {}}, can.db.tabview[can.onexport.keys(can)] = msg
can.ui = can.onappend.layout(can, [html.PROJECT, [html.TABS, nfs.PATH, [html.CONTENT, html.PROFILE], html.DISPLAY, html.PLUG]])
// can.onimport.layout(can)
can.ui._content = can.ui.content, can.ui._profile = can.ui.profile, can.ui._display = can.ui.display, can.onmotion.hidden(can, can.ui.plug)
can.onmotion.hidden(can, can.ui.profile), can.onmotion.hidden(can, can.ui.display)
if (can.Conf(ctx.STYLE) == html.OUTPUT) { can.onmotion.hidden(can, can.ui.project), can.page.style(can, can.ui.content, html.HEIGHT, "") }

View File

@ -42,7 +42,12 @@ Volcanos(chat.ONFIGURE, {
)}; return item
}); cache = can.onimport.tree(can, list, nfs.PATH, nfs.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target, cache)
}, true) } if (path.length == 1) { return show(target, zone, path[0]) } can.page.Remove(can, zone._action)
can.onimport.zone(can, can.core.List(path, function(path) { return kit.Dict(mdb.NAME, path, path == args[0]? chat._INIT: chat._DELAY_INIT, function(target, zone) { show(target, zone, path) }) }), target)
can.onimport.zone(can, can.core.List(path, function(path) { return kit.Dict(mdb.NAME, path, path == args[0]? chat._INIT: chat._DELAY_INIT, function(target, zone) {
show(target, zone, path)
zone._toggle = function() {
zone._layout()
}
}) }), target)
},
space: function(can, target, zone) { can.onimport._zone(can, zone, web.DREAM, function(sub, msg) {
sub.onimport._open = function(_, msg, arg) { var link = can.misc.ParseURL(can, arg)

View File

@ -1,6 +1,5 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
can.onappend.style(can, can.Conf("style"))
can.onmotion.clear(can, target)
can.onmotion.clear(can, target), can.onappend.style(can, can.Conf(ctx.STYLE))
if (can.Mode() == html.ZONE) { return can.onimport._vimer_zone(can, msg, target) }
var cbs = can.onimport[can.Conf(ctx.STYLE)||msg.Option(ctx.STYLE)]; if (can.base.isFunc(cbs)) {
can.onappend.style(can, can._args[ctx.STYLE], target), can.core.CallFunc(cbs, {can: can, msg: msg, target: target})
@ -36,7 +35,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
zone._menu = shy({_trans: sub._trans}, action.concat(can.base.Obj(msg.Option(ice.MSG_ACTION), [])), function(event, button, meta, carte) {
sub.Update(event, [ctx.ACTION, button]), carte.close()
}), can.user.toastSuccess(can)
}, zone._target = sub._target, can.ui.zone[zone.name].refresh = function() { sub.Update() }
}, can.ui.zone[zone.name].refresh = function() { sub.Update() }
}, zone._target) } },
zone: function(can, list, target) {
return can.page.Append(can, target, can.core.List(list, function(zone) { can.base.isString(zone) && (zone = {name: zone}); if (!zone) { return }
@ -48,14 +47,13 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
})
count && can.page.SelectChild(can, target, "", function(target) {
can.page.SelectChild(can, target, html.DIV_LIST, function(target) {
can.page.style(can, target, html.HEIGHT, can.page.isDisplay(target)? height/count: "")
can.page.style(can, target, html.HEIGHT, can.page.isDisplay(target)? can.base.Min(height/count, 120): "")
})
})
}
return {view: [[html.ZONE, zone.name]], list: [
{view: html.ITEM, list: [{text: can.user.trans(can, zone.name)}], _init: function(target) { zone._legend = target }, onclick: function() {
if (zone._delay_init) { zone._delay_init(zone._target, zone), delete(zone._delay_init) }
zone.toggle(), zone._toggle && zone._toggle()
if (zone._delay_init) { zone._delay_init(zone._target, zone), delete(zone._delay_init) } zone.toggle(), zone._toggle && zone._toggle()
}, oncontextmenu: function(event) { var menu = zone._menu
menu? can.user.carteRight(event, can, menu.meta, menu.list||can.core.Item(menu.meta), can.base.isFunc(menu)? menu: function(event, button, meta, carte) {
can.runAction(event, button), carte.close()
@ -74,7 +72,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
can.core.Item(list, function(name, button) { can.onimport._icon(can, name, button, zone._legend) })
}
zone.refresh = function() { can.onmotion.clear(can, target), zone._init(target, zone) }
zone.toggle = function(show) { can.onmotion.toggle(can, zone._action, show), can.onmotion.toggle(can, zone._target, show) }
zone.toggle = function(show) { can.onmotion.toggle(can, zone._target, show), can.onmotion.toggle(can, zone._action, show) }
can.base.isFunc(zone._init)? (zone._menu = zone._init(target, zone)||zone._menu): zone.toggle(false)
}},
]}