mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
1a71629774
commit
60f81b5d51
12
const.js
12
const.js
@ -44,7 +44,7 @@ var ice = {
|
|||||||
MSG_DAEMON: "sess.daemon", LOG_DISABLE: "log.disable", LOG_TRACEID: "log.id",
|
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: ",
|
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 = {
|
var ctx = {
|
||||||
@ -128,13 +128,10 @@ var nfs = {
|
|||||||
DIR: "dir", CAT: "cat", DEFS: "defs", PACK: "pack", TRASH: "trash", DIR_ROOT: "dir_root",
|
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",
|
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",
|
SUBJECT: "subject", CONTENT: "content", RECENT: "recent", SCRIPT: "script", SOURCE: "source", TARGET: "target",
|
||||||
REPOS: "repos",
|
REPOS: "repos", IMAGE: "image",
|
||||||
IMAGE: "image",
|
|
||||||
MODULE: "module", SCRIPT: "script",
|
MODULE: "module", SCRIPT: "script",
|
||||||
BINARY: "binary",
|
BRANCH: "branch", VERSION: "version",
|
||||||
VERSION: "version",
|
TEMPLATE: "template", BINARY: "binary",
|
||||||
TEMPLATE: "template",
|
|
||||||
BRANCH: "branch", MASTER: "master",
|
|
||||||
PUSH: "push", PULL: "pull",
|
PUSH: "push", PULL: "pull",
|
||||||
PATH: "path", FILE: "file", LINE: "line", SIZE: "size",
|
PATH: "path", FILE: "file", LINE: "line", SIZE: "size",
|
||||||
REPLACE: "replace", FROM: "from", TO: "to",
|
REPLACE: "replace", FROM: "from", TO: "to",
|
||||||
@ -142,6 +139,7 @@ var nfs = {
|
|||||||
TXT: "txt", PNG: "png", WEBM: "webm",
|
TXT: "txt", PNG: "png", WEBM: "webm",
|
||||||
_CSS: ".css", _JS: ".js",
|
_CSS: ".css", _JS: ".js",
|
||||||
PWD: "./", SRC: "src/", USR: "usr/", USR_LOCAL_WORK: "usr/local/work/", SRC_DOCUMENT: "src/document/", SRC_TEMPLATE: "src/template/",
|
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,
|
DF: ice.DF, PS: ice.PS, PT: ice.PT,
|
||||||
}
|
}
|
||||||
var cli = {
|
var cli = {
|
||||||
|
@ -94,9 +94,9 @@ Volcanos(chat.ONPLUGIN, {
|
|||||||
{type: html.TD, list: can.core.List(list, function(item, index) { var vimer
|
{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]
|
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) {
|
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 }
|
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} }
|
} if (!can.base.isObject(item)) { return item && {text: (index > 0? lex.SP: "")+item} }
|
||||||
return {view: [mdb.DATA, html.SPAN], _init: function(target) {
|
return {view: [mdb.DATA, html.SPAN], _init: function(target) {
|
||||||
|
@ -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])
|
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, "")
|
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) }
|
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) }
|
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) {
|
}), can.onmotion.clear(can), can.onappend.style(can, code.INNER), can.sup.onimport._process = function(_can, msg) {
|
||||||
if (msg.OptionProcess() == ice.PROCESS_REWRITE) {
|
if (msg.OptionProcess() == ice.PROCESS_REWRITE) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user