1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-11-07 09:30:14 +08:00
parent 1a71629774
commit 60f81b5d51
3 changed files with 9 additions and 10 deletions

View File

@ -44,7 +44,7 @@ var ice = {
MSG_DAEMON: "sess.daemon", LOG_DISABLE: "log.disable", LOG_TRACEID: "log.id",
ErrWarn: "warn: ", ErrNotLogin: "not login: ", ErrNotRight: "not right: ", ErrNotValid: "not valid: ", ErrNotFound: "not found: ",
NFS: "nfs", USR: "usr", USR_VOLCANOS: "usr/volcanos/", CAN_PLUGIN: "can._plugin",
NFS: "nfs", USR: "usr", CAN_PLUGIN: "can._plugin",
}
var ctx = {
@ -128,13 +128,10 @@ var nfs = {
DIR: "dir", CAT: "cat", DEFS: "defs", PACK: "pack", TRASH: "trash", DIR_ROOT: "dir_root",
COPY: "copy", EDIT: "edit", SAVE: "save", LOAD: "load", FIND: "find", GREP: "grep", TAGS: "tags",
SUBJECT: "subject", CONTENT: "content", RECENT: "recent", SCRIPT: "script", SOURCE: "source", TARGET: "target",
REPOS: "repos",
IMAGE: "image",
REPOS: "repos", IMAGE: "image",
MODULE: "module", SCRIPT: "script",
BINARY: "binary",
VERSION: "version",
TEMPLATE: "template",
BRANCH: "branch", MASTER: "master",
BRANCH: "branch", VERSION: "version",
TEMPLATE: "template", BINARY: "binary",
PUSH: "push", PULL: "pull",
PATH: "path", FILE: "file", LINE: "line", SIZE: "size",
REPLACE: "replace", FROM: "from", TO: "to",
@ -142,6 +139,7 @@ var nfs = {
TXT: "txt", PNG: "png", WEBM: "webm",
_CSS: ".css", _JS: ".js",
PWD: "./", SRC: "src/", USR: "usr/", USR_LOCAL_WORK: "usr/local/work/", SRC_DOCUMENT: "src/document/", SRC_TEMPLATE: "src/template/",
USR_ICONS: "usr/icons/", USR_GEOAREA: "usr/geoarea/", USR_VOLCANOS: "usr/volcanos/",
DF: ice.DF, PS: ice.PS, PT: ice.PT,
}
var cli = {

View File

@ -94,9 +94,9 @@ Volcanos(chat.ONPLUGIN, {
{type: html.TD, list: can.core.List(list, function(item, index) { var vimer
if (index == 1) { var _ls = /(https*:\/\/[^/]+)\/*([^:]+):([0-9]+):([0-9]+)/.exec(list[1]); _ls[2] = _ls[2].split(ice.QS)[0]
return {view: [html.ITEM, html.SPAN], list: [{text: lex.SP+can.page.unicode.close+lex.SP}, {text: [(_ls[1] == location.origin? "": _ls[1])+_ls[2]+nfs.DF+_ls[3], "", nfs.PATH], onclick: function(event) {
if (can.onexport.record(can, list[1], mdb.LINK, {time: list[0], link: list[1], type: list[2], path: ice.USR_VOLCANOS, file: _ls[2], line: _ls[3]})) { return }
if (can.onexport.record(can, list[1], mdb.LINK, {time: list[0], link: list[1], type: list[2], path: nfs.USR_VOLCANOS, file: _ls[2], line: _ls[3]})) { return }
if (vimer) { return can.page.Remove(can, vimer._target), vimer = null }
vimer = can.onappend.plugin(_can, {index: web.CODE_INNER, args: [ice.USR_VOLCANOS, _ls[2], _ls[3]]}, function(sub) {}, event.target.parentNode)
vimer = can.onappend.plugin(_can, {index: web.CODE_INNER, args: [nfs.USR_VOLCANOS, _ls[2], _ls[3]]}, function(sub) {}, event.target.parentNode)
}}]}
} if (!can.base.isObject(item)) { return item && {text: (index > 0? lex.SP: "")+item} }
return {view: [mdb.DATA, html.SPAN], _init: function(target) {

View File

@ -8,7 +8,8 @@ const VIEW_CREATE = "tabview.view.create", VIEW_REMOVE = "tabview.view.remove",
Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Split(can.Option(nfs.PATH), mdb.FS); can.Option(nfs.PATH, paths[0])
can.Mode(msg.Option("mode")||can.Mode()), can.Option(nfs.FILE) == " " && can.Option(nfs.FILE, "")
if (can.Mode() == ice.MSG_RESULT) { msg.result = msg.result||[can._output.innerHTML], can.Mode(chat.SIMPLE), can.sup.Mode(chat.SIMPLE) }
can.core.List(paths.concat(can.core.Split(msg.Option(nfs.REPOS))), function(p) { if (can.base.beginWith(p, nfs.USR_LOCAL_WORK) || can.base.endWith(p, "-dict/")) { return }
can.core.List(paths.concat(can.core.Split(msg.Option(nfs.REPOS))), function(p) {
if (can.base.beginWith(p, nfs.USR_LOCAL_WORK) || can.base.endWith(p, "-dict/") || can.base.isIn(p, nfs.USR_ICONS, nfs.USR_GEOAREA)) { return }
if (p && paths.indexOf(p) == -1 && p[0] != nfs.PS) { paths.push(p) }
}), can.onmotion.clear(can), can.onappend.style(can, code.INNER), can.sup.onimport._process = function(_can, msg) {
if (msg.OptionProcess() == ice.PROCESS_REWRITE) {