From 3da94ca069a4636bb08f0512a6502f1abeeb3742 Mon Sep 17 00:00:00 2001 From: zipg Date: Tue, 29 Sep 2026 13:20:39 +0800 Subject: [PATCH] fix(connection): copy raw password from the edit dialog field --- .../connection/ConnectionDialog.vue | 13 +++- .../src/components/ui/PasswordInput.vue | 2 +- .../ui/__tests__/PasswordInput.spec.ts | 39 ++++++++++++ .../__tests__/dialogTextSelection.spec.ts | 59 ++++++++++++++++++- .../src/lib/connection/dialogTextSelection.ts | 30 ++++++++++ 5 files changed, 139 insertions(+), 4 deletions(-) create mode 100644 apps/desktop/src/components/ui/__tests__/PasswordInput.spec.ts diff --git a/apps/desktop/src/components/connection/ConnectionDialog.vue b/apps/desktop/src/components/connection/ConnectionDialog.vue index e428161af8..bbea1cf93d 100644 --- a/apps/desktop/src/components/connection/ConnectionDialog.vue +++ b/apps/desktop/src/components/connection/ConnectionDialog.vue @@ -103,7 +103,7 @@ import { consulAgentAddressesMatch } from "@/lib/consul/agentTarget"; import { appendConnectionErrorHints, isJdbcMissingRuntimeDependencyError } from "@/lib/connection/connectionErrorHints"; import { buildCassandraExternalConfig, cassandraTlsConfigFromExternalConfig, type CassandraTlsConfig } from "@/lib/connection/cassandraTlsOptions"; import { savedMysqlTlsFormFields, supportsMysqlTlsOptions as mysqlTlsOptionsSupported, supportsMysqlTlsTab } from "@/lib/connection/mysqlTlsCapabilities"; -import { preventDialogDocumentSelectAll } from "@/lib/connection/dialogTextSelection"; +import { copyDialogPasswordFieldValue, preventDialogDocumentSelectAll } from "@/lib/connection/dialogTextSelection"; import { postgresLegacyTlsEnabled, postgresTlsModeForForm, setPostgresLegacyTlsEnabled } from "@/lib/connection/postgresTlsMode"; import { buildMqKafkaConnectionExtra, mqKafkaConnectionTarget, resolveMqKafkaConnectionSource, type MqKafkaConnectionSource } from "@/lib/connection/mqKafkaConnection"; import { assertCompleteDatabaseCategories, databaseSelectionForCategory } from "@/lib/connection/databaseCategoryOptions"; @@ -6832,7 +6832,16 @@ function openExternalUrl(url: string) {