读剪贴板支持图片、html、rtf,新增用户数据分类

This commit is contained in:
fofolee
2025-01-08 22:41:11 +08:00
parent cdd7b89e72
commit d2c3b7999c
8 changed files with 203 additions and 35 deletions

View File

@@ -9,6 +9,7 @@ import { controlCommands } from "./controlCommands";
import { uiCommands } from "./uiCommands";
import { codingCommands } from "./codingCommand";
import { mathCommands } from "./mathCommands";
import { userdataCommands } from "./userdataCommands";
export const commandCategories = [
fileCommands,
@@ -21,5 +22,6 @@ export const commandCategories = [
uiCommands,
simulateCommands,
mathCommands,
userdataCommands,
otherCommands,
];

View File

@@ -18,10 +18,30 @@ export const systemCommands = {
{
value: "electron.clipboard.readText",
label: "获取剪贴板内容",
config: [],
outputVariable: "clipboardText",
outputVariable: "clipboardContent",
saveOutput: true,
allowEmptyArgv: true,
functionSelector: [
{
value: "electron.clipboard.readText",
label: "剪贴板文本",
icon: "content_copy",
},
{
value: "quickcommand.readClipboardImage",
label: "剪贴板图片",
icon: "image",
},
{
value: "electron.clipboard.readRTF",
label: "剪贴板RTF",
icon: "text_snippet",
},
{
value: "electron.clipboard.readHTML",
label: "剪贴板HTML",
icon: "web",
},
],
},
{
value: "quickcomposer.system.exec",

View File

@@ -13,7 +13,7 @@ export const uiCommands = {
saveOutput: true,
config: [
{
label: "按钮",
label: "按钮",
type: "arrayEditor",
defaultValue: [
newVarInputVal("str", "是"),
@@ -55,7 +55,7 @@ export const uiCommands = {
{
label: "标题",
type: "varInput",
defaultValue: newVarInputVal("str", "请选择"),
defaultValue: newVarInputVal("str"),
width: 12,
},
],

View File

@@ -0,0 +1,61 @@
export const userdataCommands = {
label: "用户数据",
icon: "folder_shared",
defaultOpened: false,
commands: [
{
value: "quickcommand.userData.get",
label: "获取用户数据",
icon: "database",
config: [
{
label: "数据标识",
type: "input",
},
],
outputVariable: "userData",
saveOutput: true,
},
{
value: "quickcommand.userData.all",
label: "获取所有用户数据",
icon: "database",
outputVariable: "userDatas",
saveOutput: true,
},
{
value: "quickcommand.userData.put",
label: "设置用户数据",
icon: "database",
config: [
{
label: "数据",
type: "varInput",
width: 7,
},
{
label: "数据标识",
type: "input",
width: 3,
},
{
label: "不同步",
type: "checkbox",
defaultValue: true,
width: 2,
},
],
},
{
value: "quickcommand.userData.del",
label: "删除用户数据",
icon: "database",
config: [
{
label: "数据标识",
type: "input",
},
],
},
],
};