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
This commit is contained in:
t8y2
2026-05-10 01:13:00 +08:00
parent f4f3193994
commit 3066266697
3 changed files with 14 additions and 3 deletions
+12 -1
View File
@@ -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);
)
"
>
<VisuallyHidden as-child>
<DialogDescription />
</VisuallyHidden>
<slot />
<DialogClose v-if="showCloseButton" data-slot="dialog-close" as-child>
+1 -1
View File
@@ -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}",
+1 -1
View File
@@ -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}",