From 1039c3be65b509db18544a6779f3f2ff8fe64e88 Mon Sep 17 00:00:00 2001 From: shylinux Date: Fri, 8 Jan 2021 11:06:25 +0800 Subject: [PATCH] opt some --- frame.js | 19 +++++++++++-------- pane/River.css | 2 ++ pane/River.js | 4 ++-- pane/Search.js | 6 +++--- plugin/local/wiki/word.css | 7 +++---- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/frame.js b/frame.js index ef2dbf95..1df1c6b0 100644 --- a/frame.js +++ b/frame.js @@ -124,7 +124,7 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta, "nginx": {name: "代理 nginx", action: [ {name: "nginx", help: "代理", index: "web.wiki.word", args: ["usr/nginx-story/src/main.shy"]}, ]}, - "golang": {name: "编程 golang", action: [ + "context": {name: "编程 context", action: [ {name: "grafana", help: "可视化", index: "web.wiki.word", args: ["usr/golang-story/src/grafana/grafana.shy"]}, {name: "gogs", help: "代码库", index: "web.wiki.word", args: ["usr/golang-story/src/gogs/gogs.shy"]}, {name: "golang", help: "编程", index: "web.wiki.word", args: ["usr/golang-story/src/main.shy"]}, @@ -144,17 +144,20 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta, ]}, }}, "operate": {name: "运维群", storm: { - "web": {name: "web", index: [ + "cli": {name: "系统 cli", index: [ + "system", "daemon", "python", "output", + "runtime", "process", + ]}, + "web": {name: "网络 web", index: [ "route", "serve", "space", "dream", "spide", "share", "cache", "story", ]}, - "relay": {name: "relay", index: [ - "aaa.totp", - "web.code.tmux.session", + "ssh": {name: "脚本 ssh", index: [ + "aaa.totp", "web.code.tmux.session", + "connect", "session", "service", "channel", ]}, - "os": {name: "os", action: [ - {name: "文件系统", help: "fs", index: "nfs.dir", args: ["", "time,size,path,link"]}, - {name: "操作系统", help: "os", index: "web.wiki.word", args: ["usr/learning/自然/编程/system.shy"]}, + "nfs": {name: "文件 nfs", index: [ + "dir", "file", ]}, }}, }, diff --git a/pane/River.css b/pane/River.css index 3488f47e..dc618e97 100644 --- a/pane/River.css +++ b/pane/River.css @@ -19,6 +19,8 @@ fieldset.River>div.output div.list { fieldset.River>div.output div.list div.item { border-left:solid 3px #ccdc4c; background-color:#073540b5; + font-family:monospace; + font-size:14px; } fieldset.River>div.output div.list div.item:hover { background-color:#2e515f; diff --git a/pane/River.js b/pane/River.js index 61145cf9..f17bdb08 100644 --- a/pane/River.js +++ b/pane/River.js @@ -61,8 +61,8 @@ Volcanos("onaction", {help: "控件交互", list: [], _init: function(can, msg, case "text": // msg.Push(key, can.user.MergeURL(can, {river: river, storm: storm})) // break - msg.Push(key, shy("跳转", function() { - can.onaction.action(msg._event, can, river, storm) + msg.Push(key, shy("跳转", function(event) { + can.onaction.action(event, can, river, storm) })); break default: msg.Push(key, "") } diff --git a/pane/Search.js b/pane/Search.js index bee7d56d..515829e9 100644 --- a/pane/Search.js +++ b/pane/Search.js @@ -17,7 +17,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, can.Status("count", index+1) return {text: [key == "text" && typeof line.text == "function" && line.text.help || value, "td"], onclick: function(event) { if (typeof line.text == "function") { - return can.onmotion.hide(can), line.text() + return can.onmotion.hide(can), line.text(event) } can.page.Append(can, can.ui.table, [{td: can.core.List(fields, function(item) { @@ -46,7 +46,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, can.ui.word.setSelectionRange(0, -1) }, - select: function(can, msg, cmds, cb) { + select: function(can, msg, cmds, cb) { can.ui.word.value = cmds[1] var fields = (cmds[2]||msg.Option("fields")||"pod,ctx,cmd,type,name,text").split(",") can.page.Appends(can, can.ui.table, [{th: fields}]), can.cb = function() { typeof cb == "function" && cb(can.onexport.select(can)), can.onmotion.hide(can) @@ -81,7 +81,7 @@ Volcanos("onaction", {help: "交互操作", list: ["关闭", "清空", "完成"] }) Volcanos("onexport", {help: "导出数据", list: ["selected", "count"], select: function(can) { - can.page.Select(can, can.ui.display, "tr", function(tr) { + return can.page.Select(can, can.ui.display, "tr", function(tr) { return can.page.Select(can, tr, "td", function(td) { return td.innerHTML }) }).slice(1) }, diff --git a/plugin/local/wiki/word.css b/plugin/local/wiki/word.css index 0571ef6b..5808fde8 100644 --- a/plugin/local/wiki/word.css +++ b/plugin/local/wiki/word.css @@ -7,11 +7,10 @@ body fieldset p.story[data-name=inner]:hover { cursor:copy; } body fieldset div.story[data-type=spark] { - padding:4px; - background-color:#2169a9; - border-left:solid 4px blue; + background-color:#2169a9; color:white; box-shadow: 4px 4px 10px 1px #626bd0; - color:white; + border-left:solid 4px blue; + padding:4px; margin:8px 0; } body fieldset div.story[data-type=spark] span:hover { background-color:#c10c8a;