1
0
forked from x/volcanos

opt const

This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-26 11:04:11 +08:00
parent 35fbfeaf95
commit 1c926185f9
2 changed files with 69 additions and 61 deletions

101
const.js
View File

@ -160,45 +160,53 @@ 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",
PATH: "path", FILE: "file", LINE: "line", SIZE: "size", PATH: "path", FILE: "file", LINE: "line", SIZE: "size",
REPOS: "repos", MODULE: "module", BRANCH: "branch", VERSION: "version",
BINARY: "binary", SCRIPT: "script", TEMPLATE: "template", MODULE: "module",
SOURCE: "source",
TARGET: "target",
BINARY: "binary",
SCRIPT: "script",
CLONE: "clone",
REPOS: "repos",
BRANCH: "branch",
VERSION: "version",
TEMPLATE: "template", SUBJECT: "subject", CONTENT: "content",
REPLACE: "replace", FROM: "from", TO: "to", REPLACE: "replace", FROM: "from", TO: "to",
SUBJECT: "subject", CONTENT: "content", RECENT: "recent", PUSH: "push", PULL: "pull",
SOURCE: "source", TARGET: "target",
CLONE: "clone", PUSH: "push", PULL: "pull",
RECENT: "recent",
IMAGE: "image", IMAGE: "image",
SH: "sh", SHY: "shy", GO: "go", JS: "js", CSS: "css", HTML: "html", SVG: "svg", _JS: ".js", _CSS: ".css",
TXT: "txt", CSV: "csv", JSON: "json", _JS: ".js", _CSS: ".css",
PNG: "png", WEBM: "webm", JS: "js", SVG: "svg", CSS: "css", HTML: "html",
GO: "go", SH: "sh", SHY: "shy", CSV: "csv", JSON: "json",
TXT: "txt", PNG: "png", WEBM: "webm",
PWD: "./", SRC: "src/", SRC_MAIN_ICO: "src/main.ico", PWD: "./", SRC: "src/", SRC_MAIN_ICO: "src/main.ico",
SRC_TEMPLATE: "src/template/", SRC_TEMPLATE: "src/template/", USR_LEARNING_PORTAL: "usr/learning/portal/",
USR_LEARNING_PORTAL: "usr/learning/portal/",
USR: "usr/", USR_LOCAL_WORK: "usr/local/work/", USR: "usr/", USR_LOCAL_WORK: "usr/local/work/",
USR_WEBSOCKET: "usr/websocket/", USR_GO_QRCODE: "usr/go-qrcode/", USR_GO_GIT: "usr/go-git/", USR_WEBSOCKET: "usr/websocket/", USR_GO_QRCODE: "usr/go-qrcode/", USR_GO_GIT: "usr/go-git/",
USR_ICONS: "usr/icons/", USR_GEOAREA: "usr/geoarea/", USR_PROGRAM: "usr/program/", USR_ICONS: "usr/icons/", USR_GEOAREA: "usr/geoarea/", USR_PROGRAM: "usr/program/",
USR_INTSHELL: "usr/intshell/", USR_VOLCANOS: "usr/volcanos/", USR_LEARNING: "usr/learning/", USR_INTSHELL: "usr/intshell/", USR_VOLCANOS: "usr/volcanos/", USR_LEARNING: "usr/learning/",
USR_NODE_MODULES: "usr/node_modules/", USR_NODE_MODULES: "usr/node_modules/",
REQUIRE: "/require/", REQUIRE_MODULES: "/require/modules/",
SHARE_LOCAL: "/share/local/",
SHARE_CACHE: "/share/cache/",
WIKI_PORTAL: "/wiki/portal/",
DF: ice.DF, PS: ice.PS, PT: ice.PT,
CHAT_RIVER: "/chat/river/", REQUIRE: "/require/", REQUIRE_MODULES: "/require/modules/",
CHAT_ACTION: "/chat/action/", SHARE_CACHE: "/share/cache/", SHARE_LOCAL: "/share/local/",
WIKI_PORTAL: "/wiki/portal/",
CHAT_RIVER: "/chat/river/", CHAT_ACTION: "/chat/action/",
DF: ice.DF, PS: ice.PS, PT: ice.PT,
} }
var cli = { var cli = {
RUNTIME: "runtime", SYSTEM: "system", DAEMON: "daemon", ORDER: "order", BUILD: "build", OPENS: "opens", RUNTIME: "runtime", SYSTEM: "system", DAEMON: "daemon",
BEGIN: "begin", END: "end", START: "start", RESTART: "restart", STOP: "stop", OPEN: "open", CLOSE: "close", BEGIN: "begin", END: "end", START: "start", RESTART: "restart", STOP: "stop", OPEN: "open", CLOSE: "close",
REBOOT: "reboot",
DELAY: "delay", OPENS: "opens", BUILD: "build", ORDER: "order", DELAY: "delay", REBOOT: "reboot",
PLAY: "play", STEP: "step", PLAY: "play", STEP: "step", DONE: "done", COST: "cost", FROM: "from", PWD: "pwd",
QRCODE: "qrcode", COLOR: "color", BLACK: "black", WHITE: "white", BLUE: "blue", RED: "red", GRAY: "gray", CYAN: "cyan", GREEN: "green", PURPLE: "purple", YELLOW: "yellow", QRCODE: "qrcode", COLOR: "color", BLACK: "black", WHITE: "white", BLUE: "blue", RED: "red", GRAY: "gray", CYAN: "cyan", GREEN: "green", PURPLE: "purple", YELLOW: "yellow",
MAGENTA: "magenta", SILVER: "silver", ALICEBLUE: "aliceblue", MAGENTA: "magenta", SILVER: "silver", ALICEBLUE: "aliceblue", TRANSPARENT: "transparent",
TRANSPARENT: "transparent",
LINUX: "linux", DARWIN: "darwin", WINDOWS: "windows", LINUX: "linux", DARWIN: "darwin", WINDOWS: "windows",
DONE: "done", COST: "cost", FROM: "from", PWD: "pwd",
} }
var log = { var log = {
INFO: "info", WARN: "warn", ERROR: "error", DEBUG: "debug", TRACE: "trace", INFO: "info", WARN: "warn", ERROR: "error", DEBUG: "debug", TRACE: "trace",
@ -216,14 +224,12 @@ var code = {
CMD: "Cmd", CTRL: "Ctrl", SPACE: "Space", BACKSPACE: "Backspace", ESC: "Esc", PS: "/", CMD: "Cmd", CTRL: "Ctrl", SPACE: "Space", BACKSPACE: "Backspace", ESC: "Esc", PS: "/",
} }
var wiki = { var wiki = {
DRAW: "draw", WORD: "word", PORTAL: "portal",
TITLE: "title", BRIEF: "brief", REFER: "refer", SPARK: "spark", SHELL: "shell", TITLE: "title", BRIEF: "brief", REFER: "refer", SPARK: "spark", SHELL: "shell",
ORDER: "order", TABLE: "table", CHART: "chart", IMAGE: "image", VIDEO: "video", ORDER: "order", TABLE: "table", CHART: "chart", IMAGE: "image", VIDEO: "video",
FIELD: "field", LOCAL: "local", PARSE: "parse", FIELD: "field", LOCAL: "local", PARSE: "parse",
WORD: "word",
NAVMENU: "navmenu", PREMENU: "premenu", CONTENT: "content", NAVMENU: "navmenu", PREMENU: "premenu", CONTENT: "content",
STORY_ITEM: ".story", H2: "h2.story", H3: "h3.story", STORY_ITEM: ".story", H2: "h2.story", H3: "h3.story",
PORTAL: "portal",
DRAW: "draw",
} }
var chat = { var chat = {
LIB: "lib", PAGE: "page", PANEL: "panel", PLUGIN: "plugin", STORY: "story", PLUG: "plug", LIB: "lib", PAGE: "page", PANEL: "panel", PLUGIN: "plugin", STORY: "story", PLUG: "plug",
@ -263,8 +269,7 @@ var chat = {
ONENGINE: "onengine", ONDAEMON: "ondaemon", ONAPPEND: "onappend", ONLAYOUT: "onlayout", ONMOTION: "onmotion", ONKEYMAP: "onkeymap", ONENGINE: "onengine", ONDAEMON: "ondaemon", ONAPPEND: "onappend", ONLAYOUT: "onlayout", ONMOTION: "onmotion", ONKEYMAP: "onkeymap",
ONIMPORT: "onimport", ONACTION: "onaction", ONDETAIL: "ondetail", ONEXPORT: "onexport", ONIMPORT: "onimport", ONACTION: "onaction", ONDETAIL: "ondetail", ONEXPORT: "onexport",
ONSYNTAX: "onsyntax", ONFIGURE: "onfigure", ONPLUGIN: "onplugin", ONSYNTAX: "onsyntax", ONFIGURE: "onfigure", ONPLUGIN: "onplugin", ONINPUTS: "oninputs",
ONINPUTS: "oninputs",
ONSIZE: "onsize", ONMAIN: "onmain", ONLOGIN: "onlogin", ONREMOTE: "onremote", ONSEARCH: "onsearch", ONSIZE: "onsize", ONMAIN: "onmain", ONLOGIN: "onlogin", ONREMOTE: "onremote", ONSEARCH: "onsearch",
ONRESIZE: "onresize", ONKEYUP: "onkeyup", ONKEYDOWN: "onkeydown", ONMOUSEENTER: "onmouseenter", ORIENTATIONCHANGE: "orientationchange", ONRESIZE: "onresize", ONKEYUP: "onkeyup", ONKEYDOWN: "onkeydown", ONMOUSEENTER: "onmouseenter", ORIENTATIONCHANGE: "orientationchange",
@ -284,8 +289,7 @@ var chat = {
WX_LOGIN_SCAN: "/chat/wx/login/action/scan", WX_LOGIN_SCAN: "/chat/wx/login/action/scan",
} }
var team = { var team = {
TASK: "task", PLAN: "plan", TASK: "task", PLAN: "plan", ASSET: "asset",
ASSET: "asset",
BEGIN_TIME: "begin_time", END_TIME: "end_time", BEGIN_TIME: "begin_time", END_TIME: "end_time",
LONG: "long", YEAR: "year", MONTH: "month", WEEK: "week", DAY: "day", HOUR: "hour", LONG: "long", YEAR: "year", MONTH: "month", WEEK: "week", DAY: "day", HOUR: "hour",
TASK_POD: "task.pod", TASK_ZONE: "task.zone", TASK_ID: "task.id", TASK_POD: "task.pod", TASK_ZONE: "task.zone", TASK_ID: "task.id",
@ -300,14 +304,14 @@ var http = {
Accept: "Accept", ContentType: "Content-Type", ApplicationJSON: "application/json", ApplicationFORM: "application/x-www-form-urlencoded", Accept: "Accept", ContentType: "Content-Type", ApplicationJSON: "application/json", ApplicationFORM: "application/x-www-form-urlencoded",
} }
var html = {value: { var html = {value: {
CODE_FONT_SIZE: 14, HEADER_HEIGHT: 48, ACTION_HEIGHT: 32, STATUS_HEIGHT: 32,
HEADER_HEIGHT: 48,
RIVER_WIDTH: 230, PROJECT_WIDTH: 230, RIVER_WIDTH: 230, PROJECT_WIDTH: 230,
ACTION_HEIGHT: 32, STATUS_HEIGHT: 32,
PLUG_WIDTH: 800, PLUG_HEIGHT: 480, STORY_HEIGHT: 480, FLOAT_HEIGHT: 480, FLOAT_WIDTH: 1200, DESKTOP_WIDTH: 1200, DESKTOP_HEIGHT: 684,
RIVER_MARGIN: 80, ACTION_MARGIN: 200, RIVER_MARGIN: 80, ACTION_MARGIN: 200,
PLUGIN_PADDING: 0, PLUGIN_MARGIN: 0, PLUGIN_PADDING: 0, PLUGIN_MARGIN: 0,
ACTION_BUTTON: 3, TABLE_BUTTON: 5}, ACTION_BUTTON: 3, TABLE_BUTTON: 5,
CODE_FONT_SIZE: 14,
PLUG_WIDTH: 800, PLUG_HEIGHT: 480, STORY_HEIGHT: 480, FLOAT_HEIGHT: 480, FLOAT_WIDTH: 1200, DESKTOP_WIDTH: 1200, DESKTOP_HEIGHT: 684,
},
FIELDSET: "fieldset", LEGEND: "legend", OPTION: "option", ACTION: "action", OUTPUT: "output", STATUS: "status", FIELDSET: "fieldset", LEGEND: "legend", OPTION: "option", ACTION: "action", OUTPUT: "output", STATUS: "status",
OPTION_ARGS: "select.args,input.args,textarea.args", INPUT_ARGS: "input.args,textarea.args", INPUT_BUTTON: "input[type=button]", INPUT_FILE: "input[type=file]", OPTION_ARGS: "select.args,input.args,textarea.args", INPUT_ARGS: "input.args,textarea.args", INPUT_BUTTON: "input[type=button]", INPUT_FILE: "input[type=file]",
FORM_OPTION: "form.option", DIV_ACTION: "div.action", DIV_OUTPUT: "div.output", DIV_STATUS: "div.status", FORM_OPTION: "form.option", DIV_ACTION: "div.action", DIV_OUTPUT: "div.output", DIV_STATUS: "div.status",
@ -320,10 +324,7 @@ var html = {value: {
SVG: "svg", IMG: "img", IMAGE: "image", VIDEO: "video", AUDIO: "audio", CANVAS: "canvas", IFRAME: "iframe", SVG: "svg", IMG: "img", IMAGE: "image", VIDEO: "video", AUDIO: "audio", CANVAS: "canvas", IFRAME: "iframe",
WSS: "wss", WEBVIEW: "webview", CHROME: "chrome", MOBILE: "mobile", LANDSCAPE: "landscape", WSS: "wss", WEBVIEW: "webview", CHROME: "chrome", MOBILE: "mobile", LANDSCAPE: "landscape",
BODY: "body", FORM: "form", LABEL: "label", TITLE: "title", INNER: "inner", SPACE: "space", CLICK: "click", BODY: "body", FORM: "form", LABEL: "label", TITLE: "title", INNER: "inner", SPACE: "space", CLICK: "click",
SELECT: "select", INPUT: "input", TEXT: "text", FILE: "file", TEXTAREA: "textarea", BUTTON: "button", SELECT: "select", INPUT: "input", TEXT: "text", FILE: "file", TEXTAREA: "textarea", BUTTON: "button", CHECKBOX: "checkbox",
CHECKBOX: "checkbox",
CONTAINER: "container",
MORE: "more",
CANCEL: "cancel", SUBMIT: "submit", UPLOAD: "upload", USERNAME: "username", PASSWORD: "password", CANCEL: "cancel", SUBMIT: "submit", UPLOAD: "upload", USERNAME: "username", PASSWORD: "password",
TABLE: "table", THEAD: "thead", TBODY: "tbody", TR: "tr", TH: "th", TD: "td", TABLE: "table", THEAD: "thead", TBODY: "tbody", TR: "tr", TH: "th", TD: "td",
HEADER: "header", NAV: "nav", MAIN: "main", ASIDE: "aside", FOOTER: "footer", HEADER: "header", NAV: "nav", MAIN: "main", ASIDE: "aside", FOOTER: "footer",
@ -333,22 +334,19 @@ var html = {value: {
HEIGHT: "height", WIDTH: "width", MIN_HEIGHT: "min-height", MAX_HEIGHT: "max-height", MIN_WIDTH: "min-width", MAX_WIDTH: "max-width", HEIGHT: "height", WIDTH: "width", MIN_HEIGHT: "min-height", MAX_HEIGHT: "max-height", MIN_WIDTH: "min-width", MAX_WIDTH: "max-width",
DISPLAY: "display", BLOCK: "block", NONE: "none", OVERFLOW: "overflow", HIDDEN: "hidden", SCROLL: "scroll", FLOAT: "float", CLEAR: "clear", BOTH: "both", DISPLAY: "display", BLOCK: "block", NONE: "none", OVERFLOW: "overflow", HIDDEN: "hidden", SCROLL: "scroll", FLOAT: "float", CLEAR: "clear", BOTH: "both",
LEFT: "left", TOP: "top", RIGHT: "right", BOTTOM: "bottom", LEFT: "left", TOP: "top", RIGHT: "right", BOTTOM: "bottom",
FLEX: "flex", FLOW: "flow", SCROLLBAR: "scrollbar", VERTICAL: "vertical", HORIZON: "horizon",
SCROLLBAR: "scrollbar", VISIBILITY: "visibility", TRANSPARENT: "transparent",
VISIBILITY: "visibility", NOTICE: "notice", DANGER: "danger", PICKER: "picker",
TRANSPARENT: "transparent",
VERTICAL: "vertical", HORIZON: "horizon",
NOTICE: "notice", DANGER: "danger",
TOIMAGE: "toimage",
CURSOR: "cursor", POINTER: "pointer", CROSSHAIR: "crosshair", MOVE: "move", RESIZE: "resize", CURSOR: "cursor", POINTER: "pointer", CROSSHAIR: "crosshair", MOVE: "move", RESIZE: "resize",
SIZE: "size", OPACITY: "opacity", VISIBLE: "visible", SIZE: "size", OPACITY: "opacity", VISIBLE: "visible",
CLASS: "class", DARK: "dark", LIGHT: "light", WHITE: "white", BLACK: "black", CLASS: "class", DARK: "dark", LIGHT: "light", WHITE: "white", BLACK: "black",
FILTER: "filter", TOGGLE: "toggle", EXPAND: "expand", SPEED: "speed", HOVER: "hover", HOVER_SELECT: "hover,select", FILTER: "filter", TOGGLE: "toggle", EXPAND: "expand", SPEED: "speed", HOVER: "hover", HOVER_SELECT: "hover,select",
NOT_HIDE: ":not(.hide)",
PICKER: "picker",
VALUE: "value",
TOIMAGE: "toimage", NOT_HIDE: ":not(.hide)",
CONTAINER: "container", FLEX: "flex", FLOW: "flow",
MORE: "more",
PAGE: "page", TABS: "tabs", MENU: "menu", NODE: "node", PLUG: "plug", PAGE: "page", TABS: "tabs", MENU: "menu", NODE: "node", PLUG: "plug",
ZONE: "zone", LIST: "list", ITEM: "item", NAME: "name", ICON: "icon", VIEW: "view", ZONE: "zone", LIST: "list", ITEM: "item", NAME: "name", ICON: "icon", VIEW: "view",
HEAD: "head", LEFT: "left", MAIN: "main", FOOT: "foot", AUTO: "auto", SHOW: "show", HIDE: "hide", HEAD: "head", LEFT: "left", MAIN: "main", FOOT: "foot", AUTO: "auto", SHOW: "show", HIDE: "hide",
@ -363,7 +361,6 @@ var html = {value: {
DIV_ITEM_SELECT: "div.item.select", DIV_ITEM_SELECT: "div.item.select",
DIV_TABS_SELECT: "div.tabs.select", DIV_TABS_SELECT: "div.tabs.select",
DIV_PROFILE: "div.profile", DIV_DISPLAY: "div.display", DIV_PROFILE: "div.profile", DIV_DISPLAY: "div.display",
VALUE: "value",
IMAGE_PNG: "image/png", VIDEO_WEBM: "video/webm", IMAGE_PNG: "image/png", VIDEO_WEBM: "video/webm",
} }

View File

@ -1,6 +1,20 @@
/* variable */ /* variable */
@media (prefers-color-scheme: light) { body { --plugin-bg-color:white; --plugin-fg-color:black; } } @media (prefers-color-scheme: light) {
@media (prefers-color-scheme: dark) { body { --plugin-bg-color:black; --plugin-fg-color:silver; } } body { --plugin-bg-color:white; --plugin-fg-color:black; }
body {
--code-comment:green; --code-keyword:darkblue;
--code-function:darkcyan; --code-constant:gray; --code-string:brown;
--code-object:purple; --code-datatype:cornflowerblue; --code-package:blue;
}
}
@media (prefers-color-scheme: dark) {
body { --plugin-bg-color:black; --plugin-fg-color:silver; }
body {
--code-comment:green; --code-keyword:royalblue;
--code-function:lightgreen; --code-constant:gray; --code-string:orange;
--code-object:silver; --code-datatype:lavender; --code-package:blue;
}
}
body { body {
--notice-bg-color:blue; --notice-fg-color:white; --notice-bg-color:blue; --notice-fg-color:white;
--danger-bg-color:red; --danger-fg-color:var(--notice-fg-color); --danger-bg-color:red; --danger-fg-color:var(--notice-fg-color);
@ -24,11 +38,7 @@ body {
--carte-bg-color:var(--plugin-bg-color); --carte-bg-color:var(--plugin-bg-color);
--code-bg-color:black; --code-fg-color:silver; --code-border-color:var(--notice-bg-color); --code-bg-color:black; --code-fg-color:silver; --code-border-color:var(--notice-bg-color);
--code-comment:green; --code-keyword:royalblue; --body-font-family:sans-serif; --code-font-family:monospace; --svg-font-family:var(--code-font-family);
--code-function:lightgreen; --code-constant:gray; --code-string:orange;
--code-object:silver; --code-datatype:lavender; --code-package:blue;
--code-font-family:monospace; --svg-font-family:var(--code-font-family);
--body-font-family:sans-serif;
--legend-font-family:var(--input-font-family); --status-font-family:var(--body-font-family); --legend-font-family:var(--input-font-family); --status-font-family:var(--body-font-family);
--input-font-family:cursive; --table-font-family:var(--body-font-family); --input-font-family:cursive; --table-font-family:var(--body-font-family);
@ -36,19 +46,20 @@ body {
--code-font-size:14px; --code-line-height:24px; --code-tabs-height:48px; --code-font-size:14px; --code-line-height:24px; --code-tabs-height:48px;
--svg-font-size:24px; --svg-stroke-width:1; --status-font-size:12px; --svg-font-size:24px; --svg-stroke-width:1; --status-font-size:12px;
--header-height:48px; --footer-height:var(--action-height); --action-height:32px; --status-height:var(--action-height);
--river-width:var(--project-width); --project-width:230px; --input-width:120px; --button-width:60px; --form-width:320px; --river-width:var(--project-width); --project-width:230px; --input-width:120px; --button-width:60px; --form-width:320px;
--action-height:32px; --status-height:var(--action-height); --footer-height:var(--action-height); --header-height:48px;
--desktop-height:684px; --float-height:480px; --plug-height:480px; --story-height:var(--float-height); --desktop-height:684px; --float-height:480px; --plug-height:480px; --story-height:var(--float-height);
--desktop-width:1200px; --float-width:1200px; --plug-width:1000px; --desktop-width:1200px; --float-width:1200px; --plug-width:1000px;
--textarea-height:96px; --qrcode-height:364px; --iframe-height:420px; --textarea-height:96px; --qrcode-height:364px; --iframe-height:420px;
--river-margin:80px; --action-margin:200px; --desktop-icon-size:80px; --river-margin:80px; --action-margin:200px; --desktop-icon-size:80px;
--plugin-padding:10px; --plugin-margin:var(--plugin-padding); --plugin-padding:10px; --plugin-margin:var(--plugin-padding);
--legend-padding:20px; --title-margin:var(--legend-padding); --legend-padding:20px; --title-margin:var(--legend-padding);
--button-padding:var(--plugin-padding); --button-margin:var(--button-padding); --button-padding:var(--plugin-padding); --button-margin:var(--button-padding);
--input-padding:5px; --input-margin:var(--input-padding); --input-padding:5px; --input-margin:var(--input-padding);
--table-padding:var(--button-padding); --table-padding:var(--button-padding);
--plugin-radius:var(--plugin-padding); --button-radius:var(--input-padding);
--action-button:10; --table-button:5; --action-button:10; --table-button:5;
--plugin-radius:var(--plugin-padding); --button-radius:var(--input-padding);
} }
input { font-family:var(--input-font-family); } input { font-family:var(--input-font-family); }
body { font-family:var(--body-font-family); } body { font-family:var(--body-font-family); }