From f743f67454db3324896b9b92432e902501d88afe Mon Sep 17 00:00:00 2001 From: estel <690930@qq.com> Date: Fri, 22 Aug 2025 15:14:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=BC=94=E7=A4=BAdemo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .kiro/specs/workflow-drag-drop-fix/design.md | 32 +++++++------- .../workflow-drag-drop-fix/requirements.md | 2 +- .kiro/specs/workflow-drag-drop-fix/tasks.md | 6 +++ app/app.config.ts | 6 +-- app/components/flow-nodes/WorkflowEditor.vue | 30 +++++++++---- app/layouts/home.vue | 5 +-- app/pages/index.vue | 41 +----------------- package.json | 2 +- pnpm-lock.yaml | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/capabilities/main.json | 5 ++- src-tauri/gen/schemas/capabilities.json | 2 +- src-tauri/icons/128x128.png | Bin 8822 -> 14087 bytes src-tauri/icons/128x128@2x.png | Bin 19724 -> 14087 bytes src-tauri/icons/32x32.png | Bin 1624 -> 14087 bytes src-tauri/icons/StoreLogo.png | Bin 2813 -> 14087 bytes src-tauri/icons/icon.icns | Bin 380713 -> 14087 bytes src-tauri/icons/icon.ico | Bin 31133 -> 131059 bytes src-tauri/icons/icon.png | Bin 67510 -> 14087 bytes src-tauri/tauri.conf.json | 6 +-- 20 files changed, 60 insertions(+), 81 deletions(-) diff --git a/.kiro/specs/workflow-drag-drop-fix/design.md b/.kiro/specs/workflow-drag-drop-fix/design.md index af4e199..64c9b10 100644 --- a/.kiro/specs/workflow-drag-drop-fix/design.md +++ b/.kiro/specs/workflow-drag-drop-fix/design.md @@ -32,11 +32,11 @@ The fix involves correcting the vuedraggable configuration to properly support: ```typescript const cloneNode = (original: FlowNode): FlowNode => { - return { - ...original, - id: `${original.id}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, - config: original.config ? { ...original.config } : undefined - }; + return { + ...original, + id: `${original.id}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, + config: original.config ? { ...original.config } : undefined + }; }; ``` @@ -53,16 +53,16 @@ const cloneNode = (original: FlowNode): FlowNode => { ### FlowNode Interface (Existing) ```typescript interface FlowNode { - id: string; // Unique identifier - name: string; // Display name - type: string; // Node type category - taskId: string; // Task execution identifier - icon: string; // Icon name - backgroundColor: string; - shape: "square" | "circle" | "rounded"; - textColor: string; - category: "控制类" | "设备类" | "媒体类" | "灯光类" | "延时类"; - config?: Record; + id: string // Unique identifier + name: string // Display name + type: string // Node type category + taskId: string // Task execution identifier + icon: string // Icon name + backgroundColor: string + shape: "square" | "circle" | "rounded" + textColor: string + category: "控制类" | "设备类" | "媒体类" | "灯光类" | "延时类" + config?: Record } ``` @@ -152,4 +152,4 @@ const workflowNodes = ref([]); - Use efficient ID generation to avoid blocking - Minimize re-renders during drag operations - Optimize large workflow handling -- Cache node definitions for better performance \ No newline at end of file +- Cache node definitions for better performance diff --git a/.kiro/specs/workflow-drag-drop-fix/requirements.md b/.kiro/specs/workflow-drag-drop-fix/requirements.md index ac2b24a..68fa484 100644 --- a/.kiro/specs/workflow-drag-drop-fix/requirements.md +++ b/.kiro/specs/workflow-drag-drop-fix/requirements.md @@ -47,4 +47,4 @@ This feature addresses the drag and drop functionality issue in the existing wor 1. WHEN I start dragging a node THEN the system SHALL provide visual feedback indicating drag state 2. WHEN I hover over a valid drop zone THEN the system SHALL highlight the drop zone 3. WHEN I hover over an invalid drop zone THEN the system SHALL indicate the zone is not droppable -4. WHEN dragging is in progress THEN the cursor SHALL change to indicate drag operation \ No newline at end of file +4. WHEN dragging is in progress THEN the cursor SHALL change to indicate drag operation diff --git a/.kiro/specs/workflow-drag-drop-fix/tasks.md b/.kiro/specs/workflow-drag-drop-fix/tasks.md index 996c7e4..e77d326 100644 --- a/.kiro/specs/workflow-drag-drop-fix/tasks.md +++ b/.kiro/specs/workflow-drag-drop-fix/tasks.md @@ -97,3 +97,9 @@ - Initialize dialog plugin in lib.rs - Remove invalid configuration fields that caused startup errors - _Requirements: 2.1, 3.1_ +- [x] 8. Fix Tauri 2.0 permissions configuration structure + - Move permissions to app section in tauri.conf.json (not root level) + - Add dialog plugin to plugins section + - Resolve "Additional properties are not allowed" configuration error + - Ensure proper Tauri 2.0 configuration format compliance + - _Requirements: 2.1, 3.1_ diff --git a/app/app.config.ts b/app/app.config.ts index 5ff8f88..d62972e 100644 --- a/app/app.config.ts +++ b/app/app.config.ts @@ -1,8 +1,8 @@ export default defineAppConfig({ app: { - name: "Nuxtor", - author: "Nicola Spadari", - repo: "https://github.com/NicolaSpadari/nuxtor", + name: "PlayTool-Demo", + author: "Estel", + repo: "https://github.com/estel-li", tauriSite: "https://tauri.app", nuxtSite: "https://nuxt.com", nuxtUiSite: "https://ui.nuxt.dev" diff --git a/app/components/flow-nodes/WorkflowEditor.vue b/app/components/flow-nodes/WorkflowEditor.vue index 5ca5170..0246149 100644 --- a/app/components/flow-nodes/WorkflowEditor.vue +++ b/app/components/flow-nodes/WorkflowEditor.vue @@ -237,6 +237,8 @@