diff --git a/plugin/preload.js b/plugin/preload.js index 0158a28..5ce3749 100644 --- a/plugin/preload.js +++ b/plugin/preload.js @@ -498,6 +498,15 @@ let createNodeVM = (userVars) => { return vm } +window.showHelpPage = path => { + utools.ubrowser + .goto("https://www.yuque.com/fofolee-awga0/cpbg1m/bg31vl" + path) + .run({ + width: 1380, + height: 750 + }); +} + window.VmEval = (cmd, sandbox = {}) => new VM({ sandbox: sandbox }).run(cmd) diff --git a/src/assets/feature/crontab.png b/src/assets/feature/crontab.png deleted file mode 100644 index 5d0a5af..0000000 Binary files a/src/assets/feature/crontab.png and /dev/null differ diff --git a/src/components/CommandCard.vue b/src/components/CommandCard.vue index 36b0cf4..382b897 100644 --- a/src/components/CommandCard.vue +++ b/src/components/CommandCard.vue @@ -37,10 +37,10 @@ flat round color="blue-9" - icon="share" + icon="insights" > - 导出 + 设置 @@ -56,6 +56,34 @@ 复制到剪贴板 + + + + + 分享 + 暂未开放 + + + + + + 分享设置 + 暂未开放 + + + + + + 添加定时任务 + 定时执行当前命令,仅匹配类型为关键字时可用 + @@ -201,20 +229,32 @@ + + + diff --git a/src/components/quickFeatures/ApiServer.vue b/src/components/quickFeatures/ApiServer.vue index 47e4195..1a6bccb 100644 --- a/src/components/quickFeatures/ApiServer.vue +++ b/src/components/quickFeatures/ApiServer.vue @@ -128,12 +128,7 @@ export default { }, 1000); }, showHelp() { - utools.ubrowser - .goto("https://www.yuque.com/fofolee-awga0/cpbg1m/bg31vl#GNjEg") - .run({ - width: 1380, - height: 750, - }); + window.showHelpPage("#GNjEg"); }, }, }; diff --git a/src/components/quickFeatures/CrontabCmd.vue b/src/components/quickFeatures/CrontabCmd.vue deleted file mode 100644 index f461aa2..0000000 --- a/src/components/quickFeatures/CrontabCmd.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - - - diff --git a/src/js/options/defaultProfile.js b/src/js/options/defaultProfile.js index 656e84d..d02d9ce 100644 --- a/src/js/options/defaultProfile.js +++ b/src/js/options/defaultProfile.js @@ -4,6 +4,7 @@ export default { defaultPrimaryColor: "#009688", backgroundImg: null, codeHistory: {}, + crontabs: {}, quickFeatures: { favFile: { enable: false, @@ -17,10 +18,6 @@ export default { enable: false, tag: "别名" }, - crontab: { - enable: false, - tag: "任务" - }, apiServer: { enable: false, port: 33442, diff --git a/src/js/options/quickFeatures.js b/src/js/options/quickFeatures.js index 375ce9e..f77a6f3 100644 --- a/src/js/options/quickFeatures.js +++ b/src/js/options/quickFeatures.js @@ -43,13 +43,6 @@ const quickFeatures = { icon: require("../../assets/feature/plugin.png"), platform: ["win32", "darwin", "linux"], }, - crontab: { - code: "feature_crontab", - explain: "为快捷命令添加计划任务", - cmds: ["计划任务", "crontab"], - icon: require("../../assets/feature/crontab.png"), - platform: ["win32", "darwin", "linux"], - }, apiServer: { code: "feature_apiServer", explain: "配置快捷命令后台服务", diff --git a/src/pages/quickFeaturesPage.vue b/src/pages/quickFeaturesPage.vue index 0c29b01..d285475 100644 --- a/src/pages/quickFeaturesPage.vue +++ b/src/pages/quickFeaturesPage.vue @@ -4,7 +4,6 @@