From 306626669709b7960098971635aa496cb8c03b9b Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sun, 10 May 2026 01:13:00 +0800 Subject: [PATCH] fix(ui): resolve connection dialog errors - Escape `@` in i18n connection URL placeholder to prevent vue-i18n linked message compilation error - Add hidden DialogDescription to DialogContent to suppress reka-ui aria-describedby warning --- src/components/ui/dialog/DialogContent.vue | 13 ++++++++++++- src/i18n/locales/en.ts | 2 +- src/i18n/locales/zh-CN.ts | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/components/ui/dialog/DialogContent.vue b/src/components/ui/dialog/DialogContent.vue index 2c04de45e8..6c0841ed9f 100644 --- a/src/components/ui/dialog/DialogContent.vue +++ b/src/components/ui/dialog/DialogContent.vue @@ -4,7 +4,14 @@ import type { DialogContentEmits, DialogContentProps } from "reka-ui"; import type { HTMLAttributes } from "vue"; import { reactiveOmit } from "@vueuse/core"; import { XIcon } from "lucide-vue-next"; -import { DialogClose, DialogContent, DialogPortal, useForwardPropsEmits } from "reka-ui"; +import { + DialogClose, + DialogContent, + DialogDescription, + DialogPortal, + VisuallyHidden, + useForwardPropsEmits, +} from "reka-ui"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import DialogOverlay from "./DialogOverlay.vue"; @@ -39,6 +46,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits); ) " > + + + + diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index af69fd3382..1721f055ba 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -99,7 +99,7 @@ export default { driverName: "Driver Name", driverNamePlaceholder: "Vendor or environment name", urlParams: "URL Params", - connectionUrlPlaceholder: "postgresql://user:pass@host:5432/db?sslmode=require", + connectionUrlPlaceholder: "postgresql://user:pass{'@'}host:5432/db?sslmode=require", parseConnectionUrl: "Parse connection URL", parseConnectionUrlApplied: "Connection URL applied", parseConnectionUrlFailed: "Failed to parse connection URL: {message}", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 107d2364f6..50114b2914 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -98,7 +98,7 @@ export default { driverName: "驱动名称", driverNamePlaceholder: "厂商或环境名称", urlParams: "URL 参数", - connectionUrlPlaceholder: "postgresql://user:pass@host:5432/db?sslmode=require", + connectionUrlPlaceholder: "postgresql://user:pass{'@'}host:5432/db?sslmode=require", parseConnectionUrl: "解析连接 URL", parseConnectionUrlApplied: "已应用连接 URL", parseConnectionUrlFailed: "解析连接 URL 失败:{message}",