diff --git a/plugin/plugin.json b/plugin/plugin.json
index 9b0e225..a244e4c 100644
--- a/plugin/plugin.json
+++ b/plugin/plugin.json
@@ -52,6 +52,14 @@
"分享中心",
"ShareCenter"
]
+ },
+ {
+ "code": "server",
+ "explain": "配置快捷命令后台服务",
+ "cmds": [
+ "快捷命令服务配置",
+ "quickcommandServer"
+ ]
}
]
-}
+}
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 1e529e4..69b2bef 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -83,8 +83,8 @@ export default defineComponent({
this.runCronTask(featureCode, cronExp);
});
// 快捷命令服务
- if (this.nativeProfile.apiServerStatus && this.profile.apiServerEnable) {
- window.quickcommandHttpServer().run(this.profile.apiServerPort);
+ if (this.nativeProfile.serverStatus && this.profile.apiServerEnable) {
+ window.quickcommandHttpServer().run(this.nativeProfile.serverPort);
console.log("Server Start...");
}
},
diff --git a/src/assets/feature/api.png b/src/assets/feature/api.png
deleted file mode 100644
index c423397..0000000
Binary files a/src/assets/feature/api.png and /dev/null differ
diff --git a/src/components/ConfigurationMenu.vue b/src/components/ConfigurationMenu.vue
index 87777d6..44d1441 100644
--- a/src/components/ConfigurationMenu.vue
+++ b/src/components/ConfigurationMenu.vue
@@ -118,36 +118,57 @@
-
+
+
+
+ 快捷命令服务
+
+
-
启用后,在主输入框输入「快捷命令服务」可以进入配置一个后台服务
- 通过本地监听{{
- $root.profile.apiServerPort
- }}端口的形式,接收用户传送过来的参数,然后根据参数执行不同的操作
+ >通过本地监听
+ {{ $root.nativeProfile.serverPort }}
+ 端口的形式,接收用户传送过来的参数,然后根据参数执行不同的操作
- 本功能的意义在于,将 utools
- 的接口暴露出来,可以通过命令行等外部途径
- 直接启用 ubrowser 或者直接redirect 到相应的插件
- 需要配置插件跟随 utools 启动和保留后台
+ 需要配置插件跟随 utools 启动和保留后台
+ 也可在主输入框通过关键字「快捷命令服务配置」进入
-
+
+
+
+
+
+
+
+
+
+ 运行代码
+
+
+
+
+
+ 一个可以直接运行代码的代码编辑器
+ 也可在主输入框输入关键字「RunCode」进入
+
+
@@ -384,6 +405,7 @@ export default {
showAbout: false,
showPanelConf: false,
features: features,
+ redirect: utools.redirect,
};
},
computed: {
@@ -457,7 +479,7 @@ export default {
this.$root.utools.whole.setFeature(_.cloneDeep(this.features[type]));
if (type === "apiServer" && !this.$root.profile.apiServerEnable) {
window.quickcommandHttpServer().stop();
- this.$root.nativeProfile.apiServerStatus = false;
+ this.$root.nativeProfile.serverStatus = false;
}
},
},
diff --git a/src/js/options/defaultProfile.js b/src/js/options/defaultProfile.js
index d2f51d6..7468960 100644
--- a/src/js/options/defaultProfile.js
+++ b/src/js/options/defaultProfile.js
@@ -12,11 +12,10 @@ export default {
quickUrlTag: "网址",
pluNickNameEnable: false,
pluNickNameTag: "别名",
- apiServerEnable: false,
- apiServerPort: 33442,
},
native: {
crontabs: {},
- apiServerStatus: false
+ serverPort: 33442,
+ serverStatus: false
}
}
\ No newline at end of file
diff --git a/src/js/options/quickFeatures.js b/src/js/options/quickFeatures.js
index f77a6f3..00a844e 100644
--- a/src/js/options/quickFeatures.js
+++ b/src/js/options/quickFeatures.js
@@ -42,13 +42,6 @@ const quickFeatures = {
cmds: ["插件别名"],
icon: require("../../assets/feature/plugin.png"),
platform: ["win32", "darwin", "linux"],
- },
- apiServer: {
- code: "feature_apiServer",
- explain: "配置快捷命令后台服务",
- cmds: ["快捷命令服务配置", "quickcommandServer"],
- icon: require("../../assets/feature/api.png"),
- platform: ["win32", "darwin", "linux"],
}
}
diff --git a/src/pages/quickFeaturesPage.vue b/src/pages/FeaturesPage.vue
similarity index 90%
rename from src/pages/quickFeaturesPage.vue
rename to src/pages/FeaturesPage.vue
index 52004a0..268c0a2 100644
--- a/src/pages/quickFeaturesPage.vue
+++ b/src/pages/FeaturesPage.vue
@@ -4,7 +4,6 @@