mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-09 06:54:11 +08:00
新建快捷命令支持base64格式
This commit is contained in:
parent
472f0029e2
commit
15395e3ff6
@ -1,59 +1,65 @@
|
|||||||
{
|
{
|
||||||
"pluginName": "快捷命令",
|
"pluginName": "快捷命令",
|
||||||
"description": "快速打开软件、网址及运行批处理、shell等脚本,免编写插件使用utools的api及实现UI交互",
|
"description": "快速打开软件、网址及运行批处理、shell等脚本,免编写插件使用utools的api及实现UI交互",
|
||||||
"main": "index.html",
|
"main": "index.html",
|
||||||
"homepage": "https://github.com/fofolee/uTools-quickcommand",
|
"homepage": "https://github.com/fofolee/uTools-quickcommand",
|
||||||
"publishPage": "https://yuanliao.info/d/424",
|
"publishPage": "https://yuanliao.info/d/424",
|
||||||
"version": "4.0.3",
|
"version": "4.0.3",
|
||||||
"development": {
|
"development": {
|
||||||
"main": "http://127.0.0.1:8080/"
|
"main": "http://127.0.0.1:8080/"
|
||||||
|
},
|
||||||
|
"author": "云之轩",
|
||||||
|
"logo": "logo.png",
|
||||||
|
"preload": "preload.js",
|
||||||
|
"pluginSetting": {
|
||||||
|
"single": false
|
||||||
|
},
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"code": "configuration",
|
||||||
|
"explain": "创建或编辑快捷命令",
|
||||||
|
"cmds": [
|
||||||
|
"快捷命令",
|
||||||
|
"QuickCommand"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"author": "云之轩",
|
{
|
||||||
"logo": "logo.png",
|
"code": "code",
|
||||||
"preload": "preload.js",
|
"explain": "运行代码",
|
||||||
"pluginSetting": {
|
"cmds": [
|
||||||
"single": false
|
"运行代码",
|
||||||
|
"RunCode"
|
||||||
|
],
|
||||||
|
"icon": "features/code.png"
|
||||||
},
|
},
|
||||||
"features": [
|
{
|
||||||
|
"code": "newcommand",
|
||||||
|
"explain": "快速新建快捷命令",
|
||||||
|
"cmds": [
|
||||||
|
"新建快捷命令",
|
||||||
|
"NewCommand",
|
||||||
{
|
{
|
||||||
"code": "configuration",
|
"type": "regex",
|
||||||
"explain": "创建或编辑快捷命令",
|
"label": "新建快捷命令",
|
||||||
"cmds": [
|
"match": "/^\\{[\\s\\S]*\"program\" *: *\".*\"[\\s\\S]*\"cmd\" *: *\".*\"[\\s\\S]*\\}$/i",
|
||||||
"快捷命令",
|
"maxNum": 1
|
||||||
"QuickCommand"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"code": "code",
|
"type": "regex",
|
||||||
"explain": "运行代码",
|
"label": "新建快捷命令",
|
||||||
"cmds": [
|
"match": "/^qc=eyJwcm9ncmFtIj/",
|
||||||
"运行代码",
|
"maxNum": 1
|
||||||
"RunCode"
|
|
||||||
],
|
|
||||||
"icon": "features/code.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"code": "newcommand",
|
|
||||||
"explain": "快速新建快捷命令",
|
|
||||||
"cmds": [
|
|
||||||
"新建快捷命令",
|
|
||||||
"NewCommand",
|
|
||||||
{
|
|
||||||
"type": "regex",
|
|
||||||
"label": "新建快捷命令",
|
|
||||||
"match": "/^\\{[\\s\\S]*\"program\" *: *\".*\"[\\s\\S]*\"cmd\" *: *\".*\"[\\s\\S]*\\}$/i",
|
|
||||||
"maxNum": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"code": "server",
|
|
||||||
"explain": "配置快捷命令后台服务",
|
|
||||||
"cmds": [
|
|
||||||
"快捷命令服务配置",
|
|
||||||
"quickcommandServer"
|
|
||||||
],
|
|
||||||
"icon": "features/server.png"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "server",
|
||||||
|
"explain": "配置快捷命令后台服务",
|
||||||
|
"cmds": [
|
||||||
|
"快捷命令服务配置",
|
||||||
|
"quickcommandServer"
|
||||||
|
],
|
||||||
|
"icon": "features/server.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -321,8 +321,17 @@ export default {
|
|||||||
initPage() {
|
initPage() {
|
||||||
// 如果从 newcommand 进入则直接新建命令
|
// 如果从 newcommand 进入则直接新建命令
|
||||||
if (this.newCommandDirect) {
|
if (this.newCommandDirect) {
|
||||||
if (this.$root.enterData.type === "text") this.addNewCommand();
|
if (this.$root.enterData.type === "text") {
|
||||||
else this.editCommand(JSON.parse(this.$root.enterData.payload));
|
this.addNewCommand();
|
||||||
|
} else if (this.$root.enterData.payload.slice(0, 3) === "qc=") {
|
||||||
|
this.editCommand(
|
||||||
|
JSON.parse(
|
||||||
|
window.base64Decode(this.$root.enterData.payload.slice(3))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.editCommand(JSON.parse(this.$root.enterData.payload));
|
||||||
|
}
|
||||||
this.$router.push("/configuration");
|
this.$router.push("/configuration");
|
||||||
}
|
}
|
||||||
if (this.$route.params.tags) {
|
if (this.$route.params.tags) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user