1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 01:04:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-01-28 08:07:11 +08:00
parent 775851f248
commit 5961931e3a
2 changed files with 1 additions and 9 deletions

View File

@ -1,5 +1,5 @@
(function() { const CURRENT_FILE = "web.code.inner:currentFile", SELECT_LINE = "web.code.inner.selectLine" (function() { const CURRENT_FILE = "web.code.inner:currentFile", SELECT_LINE = "web.code.inner.selectLine"
const VIEW_CREATE = "tabview.view.create", VIEW_REMOTE = "tabview.view.remove", LINE_SELECT = "tabview.line.select" const VIEW_CREATE = "tabview.view.create", VIEW_REMOVE = "tabview.view.remove", LINE_SELECT = "tabview.line.select"
Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.clear(can), can.onappend.style(can, code.INNER) Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.clear(can), can.onappend.style(can, code.INNER)
if (msg.Option(nfs.FILE)) { can.Option(nfs.FILE, msg.Option(nfs.FILE)) if (msg.Option(nfs.FILE)) { can.Option(nfs.FILE, msg.Option(nfs.FILE))
msg.Option(nfs.PATH) && can.Option(nfs.PATH, msg.Option(nfs.PATH)) msg.Option(nfs.PATH) && can.Option(nfs.PATH, msg.Option(nfs.PATH))

View File

@ -18,14 +18,6 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.require(["i
_value: function(can) { can.db.mode == mdb.INSERT && can.onmotion.delay(can, function() { can.current.text(can.ui.current.value) }) }, _value: function(can) { can.db.mode == mdb.INSERT && can.onmotion.delay(can, function() { can.current.text(can.ui.current.value) }) },
}, [""]) }, [""])
Volcanos(chat.ONFIGURE, { Volcanos(chat.ONFIGURE, {
recent: function(can, target, zone) { var total = 0
function show(msg, cb) { var list = {}; msg.Table(function(item) { var path = item.path+item.file; if (!list[path]) { list[path] = item, can.page.Append(can, target, cb(item, path)), total++ } }) }
can.runAction({}, code.FAVOR, ["_recent_file"], function(msg) {
show(msg, function(item, path) { return [{text: [path.split(ice.PS).slice(-2).join(ice.PS), html.DIV, html.ITEM], title: path, onclick: function(event) {
can.onimport.tabview(can, item.path, item.file)
}}] }), zone._total(total)
})
},
source: function(can, target, zone, path) { var args = can.base.getValid(can.misc.SearchHash(can), [can.Option(nfs.PATH), can.Option(nfs.FILE)]) source: function(can, target, zone, path) { var args = can.base.getValid(can.misc.SearchHash(can), [can.Option(nfs.PATH), can.Option(nfs.FILE)])
function show(target, zone, path) { can.run(can.request({}, {dir_root: path, dir_deep: true}), [nfs.PWD], function(msg) { can.onmotion.clear(can, target) function show(target, zone, path) { can.run(can.request({}, {dir_root: path, dir_deep: true}), [nfs.PWD], function(msg) { can.onmotion.clear(can, target)
if (path == nfs.SRC) { can.ui.zone.source.refresh = function() { show(target, zone, path) } } if (path == nfs.SRC) { can.ui.zone.source.refresh = function() { show(target, zone, path) } }