diff --git a/frame.js b/frame.js index bc3f8269..5a7882de 100644 --- a/frame.js +++ b/frame.js @@ -205,11 +205,11 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta, {name: "HTML5", help: "浏览器", index: "web.wiki.word", args: ["usr/icebergs/misc/chrome/chrome.shy"]}, ]}, "linux": {name: "系统 linux", action: [ + {name: "centos", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/centos/centos.shy"]}, + {name: "ubuntu", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/ubuntu/ubuntu.shy"]}, + {name: "alpine", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/alpine/alpine.shy"]}, {name: "android", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/android/android.shy"]}, {name: "context", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/context/context.shy"]}, - {name: "alpine", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/alpine/alpine.shy"]}, - {name: "ubuntu", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/ubuntu/ubuntu.shy"]}, - {name: "centos", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/centos/centos.shy"]}, {name: "linux", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/src/main.shy"]}, ]}, "nginx": {name: "代理 nginx", action: [ diff --git a/lib/user.js b/lib/user.js index 903b954a..72b8e050 100644 --- a/lib/user.js +++ b/lib/user.js @@ -6,17 +6,12 @@ var user = Volcanos("user", {help: "用户模块", title: function(text) {return text && (document.title = text), document.title}, copy: function(can, text) { - var input = can.page.Append(can, document.body, [{type: "input"}]).first - input.value = text + var input = can.page.Append(can, document.body, [{type: "input", value: text}]).first input.setSelectionRange(0,-1) input.focus() document.execCommand("Copy") can.page.Remove(can, input) - can.user.toast(can, text, "复制成功") - return - navigator.clipboard.writeText(item.innerText).then(function() { - can.user.toast(can, "复制成功", "paste") - }) + can.user.toast(can, {text: text, title: "复制成功", width: 400}) }, login: function(can, cb) { var ui = can.user.input({clientX: 200, clientY: 100}, can, [ diff --git a/plugin/local/wiki/word.css b/plugin/local/wiki/word.css index 46e072c1..0571ef6b 100644 --- a/plugin/local/wiki/word.css +++ b/plugin/local/wiki/word.css @@ -11,6 +11,7 @@ body fieldset div.story[data-type=spark] { background-color:#2169a9; border-left:solid 4px blue; box-shadow: 4px 4px 10px 1px #626bd0; + color:white; } body fieldset div.story[data-type=spark] span:hover { background-color:#c10c8a;