From 2249aa30c02aeb3de74cef27f8cdbeb799e47fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E8=B6=85?= Date: Mon, 14 Sep 2026 13:24:10 +0800 Subject: [PATCH] feat(editor): copy selected SQL as rich text with highlighting --- .../src/components/editor/QueryEditor.vue | 21 +++- apps/desktop/src/i18n/locales/az.ts | 1 + apps/desktop/src/i18n/locales/en.ts | 1 + apps/desktop/src/i18n/locales/es.ts | 1 + apps/desktop/src/i18n/locales/it.ts | 1 + apps/desktop/src/i18n/locales/ja.ts | 1 + apps/desktop/src/i18n/locales/ko.ts | 1 + apps/desktop/src/i18n/locales/pt-BR.ts | 1 + apps/desktop/src/i18n/locales/tr.ts | 1 + apps/desktop/src/i18n/locales/zh-CN.ts | 1 + apps/desktop/src/i18n/locales/zh-TW.ts | 1 + .../lib/common/__tests__/clipboard.spec.ts | 71 ++++++++++++- apps/desktop/src/lib/common/clipboard.ts | 57 ++++++++++ .../src/lib/sql/__tests__/sqlRichText.spec.ts | 74 +++++++++++++ apps/desktop/src/lib/sql/sqlHighlighter.ts | 9 +- apps/desktop/src/lib/sql/sqlRichText.ts | 100 ++++++++++++++++++ src-tauri/capabilities/default.json | 1 + 17 files changed, 339 insertions(+), 4 deletions(-) create mode 100644 apps/desktop/src/lib/sql/__tests__/sqlRichText.spec.ts create mode 100644 apps/desktop/src/lib/sql/sqlRichText.ts diff --git a/apps/desktop/src/components/editor/QueryEditor.vue b/apps/desktop/src/components/editor/QueryEditor.vue index 8163a8bf34..6da5d8b7f7 100644 --- a/apps/desktop/src/components/editor/QueryEditor.vue +++ b/apps/desktop/src/components/editor/QueryEditor.vue @@ -15,7 +15,7 @@ let lastHandledCompressRequestId = 0;