From 22ac1f4c0b28d8ede731f28ad05898612b4ca2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Mon, 14 Sep 2026 19:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20UI=20=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E5=89=AA=E8=B4=B4=E6=9D=BF=E5=86=99=E5=85=A5=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为主窗口补充 clipboard-manager 写文本权限 保留手动复制提示并继续抛出原始 Tauri 剪贴板错误 --- apps/ai-game-creator-shell/src-tauri/capabilities/main.json | 3 ++- .../src/view/ui-editor/components/UiEditorCopyPathButton.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/capabilities/main.json b/apps/ai-game-creator-shell/src-tauri/capabilities/main.json index 43257763a..b48ec8292 100644 --- a/apps/ai-game-creator-shell/src-tauri/capabilities/main.json +++ b/apps/ai-game-creator-shell/src-tauri/capabilities/main.json @@ -1,11 +1,12 @@ { "$schema": "../gen/schemas/desktop-schema.json", "identifier": "main", - "description": "AI 游戏创作主窗口允许读取系统剪贴板图片,用于粘贴素材附件;允许弹出原生打开/保存对话框用于素材上传与导出。", + "description": "AI 游戏创作主窗口允许读写系统剪贴板,用于粘贴素材附件和复制生成文件路径;允许弹出原生打开/保存对话框用于素材上传与导出。", "windows": ["client"], "permissions": [ "clipboard-manager:allow-read-image", "clipboard-manager:allow-read-text", + "clipboard-manager:allow-write-text", "core:image:allow-rgba", "core:image:allow-size", "core:resources:allow-close", diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/UiEditorCopyPathButton.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/components/UiEditorCopyPathButton.tsx index ea19e48bf..16322d05f 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/UiEditorCopyPathButton.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/UiEditorCopyPathButton.tsx @@ -18,8 +18,9 @@ export function UiEditorCopyPathButton({ try { await writeText(relativePath); setCopyState('copied'); - } catch { + } catch (error) { setCopyState('failed'); + throw error; } }