模拟按键新增常用按键,模拟操作新增按键序列,系统操作新增关闭进程,新增uTools功能分类,添加部分命令

This commit is contained in:
fofolee
2025-01-09 01:01:15 +08:00
parent d2c3b7999c
commit b676801b9a
10 changed files with 1277 additions and 68 deletions

View File

@@ -1,14 +1,17 @@
import { defineAsyncComponent } from "vue";
// UI Components
// 模拟操作组件
export const KeyEditor = defineAsyncComponent(() =>
import("src/components/composer/simulate/KeyEditor.vue")
);
export const ImageSearchEditor = defineAsyncComponent(() =>
import("components/composer/simulate/ImageSearchEditor.vue")
);
export const KeySequenceEditor = defineAsyncComponent(() =>
import("src/components/composer/simulate/KeySequenceEditor.vue")
);
// Control Flow Components
// 控制流组件
export const ConditionalJudgment = defineAsyncComponent(() =>
import("components/composer/control/ConditionalJudgment.vue")
);
@@ -31,18 +34,24 @@ export const TryCatchControl = defineAsyncComponent(() =>
import("components/composer/control/TryCatchControl.vue")
);
// Editor Components
// 网络组件
export const UBrowserEditor = defineAsyncComponent(() =>
import("components/composer/ubrowser/UBrowserEditor.vue")
);
export const AxiosConfigEditor = defineAsyncComponent(() =>
import("src/components/composer/network/AxiosConfigEditor.vue")
);
// 数据组件
export const RegexEditor = defineAsyncComponent(() =>
import("components/composer/data/regex/RegexEditor.vue")
);
// Crypto Components
export const ZlibEditor = defineAsyncComponent(() =>
import("src/components/composer/data/ZlibEditor.vue")
);
// 加密组件
export const SymmetricCryptoEditor = defineAsyncComponent(() =>
import("src/components/composer/coding/SymmetricCryptoEditor.vue")
);
@@ -50,20 +59,17 @@ export const AsymmetricCryptoEditor = defineAsyncComponent(() =>
import("src/components/composer/coding/AsymmetricCryptoEditor.vue")
);
// File Components
// 文件组件
export const FileOperationEditor = defineAsyncComponent(() =>
import("components/composer/file/FileOperationEditor.vue")
);
// System Components
// 系统组件
export const SystemCommandEditor = defineAsyncComponent(() =>
import("components/composer/system/SystemCommandEditor.vue")
);
export const ZlibEditor = defineAsyncComponent(() =>
import("src/components/composer/data/ZlibEditor.vue")
);
// UI组件
export const SelectListEditor = defineAsyncComponent(() =>
import("components/composer/ui/SelectListEditor.vue")
);

View File

@@ -10,12 +10,14 @@ import { uiCommands } from "./uiCommands";
import { codingCommands } from "./codingCommand";
import { mathCommands } from "./mathCommands";
import { userdataCommands } from "./userdataCommands";
import { utoolsCommands } from "./utoolsCommand";
export const commandCategories = [
fileCommands,
networkCommands,
systemCommands,
notifyCommands,
utoolsCommands,
dataCommands,
codingCommands,
controlCommands,

View File

@@ -3,18 +3,6 @@ export const otherCommands = {
icon: "more_horiz",
defaultOpened: false,
commands: [
{
value: "utools.redirect",
label: "转至指定插件",
config: [
{
key: "pluginName",
label: "要跳转至的插件名称",
type: "varInput",
icon: "alt_route",
},
],
},
{
value: "quickcommand.sleep",
label: "添加延时",

View File

@@ -4,11 +4,34 @@ export const simulateCommands = {
defaultOpened: false,
commands: [
{
value: "utools.simulateKeyboardTap",
value: "quickcomposer.simulate.keyboardTap",
label: "模拟按键",
config: [],
component: "KeyEditor",
},
{
value: "quickcomposer.simulate.keySequence",
label: "按键序列",
description: "按顺序执行多个按键操作",
component: "KeySequenceEditor",
},
{
value: "quickcommand.simulateCopy",
label: "模拟复制粘贴",
config: [],
functionSelector: [
{
value: "quickcommand.simulateCopy",
label: "复制",
icon: "content_copy",
},
{
value: "quickcommand.simulatePaste",
label: "粘贴",
icon: "content_paste",
},
],
},
{
value: "quickcomposer.simulate.sendText",
label: "发送文本",

View File

@@ -1,3 +1,5 @@
import { newVarInputVal } from "js/composer/varInputValManager";
export const systemCommands = {
label: "系统操作",
icon: "computer",
@@ -299,5 +301,26 @@ export const systemCommands = {
},
],
},
{
value: "quickcommand.kill",
label: "关闭进程",
desc: "关闭指定进程",
icon: "dangerous",
config: [
{
label: "进程ID",
type: "numInput",
icon: "developer_board",
width: 6,
},
{
label: "信号",
type: "varInput",
icon: "signal_cellular_alt",
defaultValue: newVarInputVal("str", "SIGTERM"),
width: 6,
},
],
},
],
};

View File

@@ -0,0 +1,87 @@
export const utoolsCommands = {
label: "uTools功能",
icon: "insights",
commands: [
{
value: "utools.hideMainWindow",
label: "隐藏主窗口",
desc: "隐藏主窗口",
icon: "visibility_off",
},
{
value: "quickcommand.wakeUtools",
label: "唤醒uTools",
desc: "唤醒uTools",
icon: "visibility",
},
{
value: "utools.setExpendHeight",
label: "设置uTools高度",
desc: "设置uTools高度",
icon: "height",
config: [
{
key: "height",
label: "高度",
type: "numInput",
icon: "straighten",
width: 12,
},
],
},
{
value: "utools.outPlugin",
label: "退出插件",
desc: "退出插件",
icon: "exit_to_app",
config: [
{
key: "isKill",
type: "select",
options: [
{ label: "杀死插件进程", value: true },
{ label: "插件隐藏到后台", value: false },
],
defaultValue: false,
icon: "logout",
},
],
},
{
value: "utools.isDarkColors",
label: "是否深色模式",
desc: "是否深色模式",
icon: "dark_mode",
outputVariable: "isDark",
saveOutput: true,
},
{
value: "utools.getUser",
label: "获取用户信息",
desc: "获取用户信息",
icon: "person",
outputVariable: "{avatar,nickname,type}",
saveOutput: true,
},
{
value: "utools.redirect",
label: "转至指定插件",
config: [
{
key: "pluginName",
label: "要跳转至的插件名称",
type: "varInput",
icon: "alt_route",
width: 6,
},
{
key: "payload",
label: "传递给插件的文本",
type: "varInput",
icon: "alt_route",
width: 6,
},
],
},
],
};