From a802c947ec60fccad63300194b10e6f82a31dcb4 Mon Sep 17 00:00:00 2001 From: NimBold Date: Mon, 22 Jun 2026 21:58:06 +0330 Subject: [PATCH] fix: remove global user-select none to allow text selection in logs --- package-lock.json | 10 ++++++++++ package.json | 1 + src/components/LogsView.tsx | 9 +++++++-- src/index.css | 2 -- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 116d177..a5e3638 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@tailwindcss/vite": "^4.3.0", "@tauri-apps/api": "^2", + "@tauri-apps/plugin-clipboard-manager": "^2.3.2", "@tauri-apps/plugin-dialog": "^2.7.1", "@tauri-apps/plugin-log": "^2.8.0", "@tauri-apps/plugin-notification": "^2.3.3", @@ -923,6 +924,15 @@ "node": ">= 10" } }, + "node_modules/@tauri-apps/plugin-clipboard-manager": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-clipboard-manager/-/plugin-clipboard-manager-2.3.2.tgz", + "integrity": "sha512-CUlb5Hqi2oZbcZf4VUyUH53XWPPdtpw43EUpCza5HWZJwxEoDowFzNUDt1tRUXA8Uq+XPn17Ysfptip33sG4eQ==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@tauri-apps/api": "^2.8.0" + } + }, "node_modules/@tauri-apps/plugin-dialog": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.7.1.tgz", diff --git a/package.json b/package.json index f0a1fa9..cf12bc5 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "dependencies": { "@tailwindcss/vite": "^4.3.0", "@tauri-apps/api": "^2", + "@tauri-apps/plugin-clipboard-manager": "^2.3.2", "@tauri-apps/plugin-dialog": "^2.7.1", "@tauri-apps/plugin-log": "^2.8.0", "@tauri-apps/plugin-notification": "^2.3.3", diff --git a/src/components/LogsView.tsx b/src/components/LogsView.tsx index 055d265..ccfb4b8 100644 --- a/src/components/LogsView.tsx +++ b/src/components/LogsView.tsx @@ -110,8 +110,13 @@ export default function LogsView() { const handleCopy = async () => { if (contextMenu?.text) { - await navigator.clipboard.writeText(contextMenu.text); - addToast({ message: 'Copied to clipboard', variant: 'success' }); + try { + await navigator.clipboard.writeText(contextMenu.text); + addToast({ message: 'Copied to clipboard', variant: 'success' }); + } catch (err) { + console.error('Clipboard write error:', err); + addToast({ message: 'Failed to copy to clipboard', variant: 'error' }); + } } setContextMenu(null); }; diff --git a/src/index.css b/src/index.css index 9a77d97..5421f3a 100644 --- a/src/index.css +++ b/src/index.css @@ -245,8 +245,6 @@ * { box-sizing: border-box; - user-select: none; - -webkit-user-select: none; } button,