1
0
forked from x/volcanos
This commit is contained in:
harveyshao 2021-11-02 10:07:43 +08:00
parent e41bbd9861
commit 80b8277a1d
2 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
can.dir_root = msg.Option("dir_root")
can._tree = can.onimport._tree(can, msg.Table(), "path", "/")
if (!can._tree[""]) { return }
can._tree[""].name = can.dir_root.split("/").pop()
can._tree[""].name = can.dir_root.split("/").slice(-2)[0]
can.size = 30, can.margin = 30
can.onappend.plugin(can, {index: "web.wiki.draw", style: chat.OUTPUT}, function(sub) {

View File

@ -1,6 +1,7 @@
Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, list, cb, target) {
can.onmotion.clear(can), can.base.isFunc(cb) && cb(msg)
if (msg.Option("branch")) { return can.onappend.table(can, msg) }
can.onappend._status(can, ["from", "commit", "total", "max", "date", "text", "add", "del"])
can.msg = msg, can.data = msg.Table(), can.onimport._sum(can)
can.Action(chat.HEIGHT, msg.Option(chat.HEIGHT)||can.user.mod.isCmd? "max": can.user.isMobile&&can.user.isLandscape? "200": "400")